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
Uses removeMRFiles but will first list the files to be deleted and will then ask for conformation.
public static boolean removeMRFilesInteractivelyFromDB( ArrayList entries_todelete ) { // String reply = "bogus"; boolean status; General.showOutput("Entries to delete: [" + entries_todelete.size() + "]"); General.showOutput("Entries to delete: " + entries_todelete.toString() ); General.showWarning("answering yes to the following question will lead to"); General.showWarning("deleting work that might not be recovered!"); String prompt = "Delete ALL the MR files for the above entries from the DB?"; if ( Strings.getInputBoolean( in, prompt ) ) { General.showOutput("Deleting the annotated MR files listed above."); status = removeMRFilesFromDB( entries_todelete ); if ( ! status ) { General.showError("in MRAnnotate.removeMRFilesInteractively found:"); General.showError("Deleting the annotated MR files failed."); return false; } } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static boolean removeMRFilesInteractively( String dir, ArrayList entries_todelete ) {\n \n// String reply = \"bogus\";\n boolean status;\n \n General.showOutput(\"Entries to delete: [\" + entries_todelete.size() + \"]\");\n General.showOutput(\"Entries to delete: \" + entries_todelete.toString() );\n \n General.showWarning(\"answering yes to the following question will lead to\");\n General.showWarning(\"deleting work that might not be recovered!\");\n \n String prompt = \"Delete ALL the MR files for the above entries from the directory:\"+dir+\"?\";\n if ( Strings.getInputBoolean( in, prompt ) ) {\n General.showOutput(\"Deleting the annotated MR files listed above.\");\n status = removeMRFiles( dir, entries_todelete );\n if ( ! status ) {\n General.showError(\"in MRAnnotate.removeMRFilesInteractively found:\");\n General.showError(\"Deleting the annotated MR files failed.\");\n return false;\n }\n }\n return true;\n }", "public static boolean removeMRFiles( String dir, ArrayList entries_todelete ) {\n \n for (Iterator i=entries_todelete.iterator(); i.hasNext();) {\n String entry_code = (String) i.next();\n String fname = dir + File.separator + entry_code + \".mr\";\n File f = new File(fname);\n if ( ! f.delete() ) {\n General.showError(\"in MRAnnotate.removeMRFiles found:\");\n General.showError(\"Deleting the annotated MR file [\"+fname+\"]\");\n return false;\n } else {\n General.showOutput(\"Deleted the annotated MR file for entry: [\"+entry_code+\"]\");\n }\n }\n return true;\n }", "public void removeFiles() throws ServiceException;", "private void clearFiles() {\r\n File file = new File(\"test_files/upload\");\r\n File[] files = file.listFiles();\r\n for (File delFile : files) {\r\n delFile.delete();\r\n }\r\n file = new File(\"test_files/stress.jar\");\r\n file.delete();\r\n }", "public static boolean removeMRFilesFromDB( ArrayList entries_todelete ) {\n \n boolean status = sql_epiII.deleteMRFilesByPDBIdsByDetail(\n entries_todelete, SQL_Episode_II.FILE_DETAIL_CLASSIFIED );\n if ( ! status ) {\n General.showError(\"in MRAnnotate.removeMRFilesFromDB found:\");\n General.showError(\"Deleting the annotated MR files:\" + entries_todelete);\n return false;\n } else {\n General.showOutput(\"Deleted the annotated MR files:\" + entries_todelete);\n }\n return true;\n }", "private void removeOldFiles() {\n Set<File> existingFiles = new HashSet<File>();\n collectFiles(existingFiles);\n for (ResourceResponse r : cacheResponseProcessor.getResources()) {\n String remotePathId = r.pathId;\n String remotePath = localClasspathProcessor.getLocalClasspath().get(remotePathId);\n String localPath = localPathTranslation.get(remotePath);\n File localFile = new File(localPath);\n File file = new File(localFile, r.name);\n existingFiles.remove(file);\n }\n }", "private void DeleteCMVMMVData() {\n String path = GetFilePath();\r\n File dir = new File(path);\r\n for (File file : dir.listFiles())\r\n if (!file.isDirectory())\r\n file.delete();\r\n DownloadCMVMMVFiles();//state, circle, ran, div\r\n }", "protected abstract boolean deleteCheckedFiles();", "private static void removeFromWorking(String fileName) {\n for (File file : WORKING_DIR.listFiles()) {\n if (!file.isDirectory()) {\n if (file.getName().equals(fileName)) {\n file.delete();\n break;\n }\n }\n }\n }", "private void clearClipsDirectory(){\n /* Citation : http://helpdesk.objects.com.au/java/how-to-delete-all-files-in-a-directory#:~:text=Use%20the%20listFiles()%20method,used%20to%20delete%20each%20file. */\n File directory = new File(Main.CREATED_CLIPS_DIRECTORY_PATH);\n File[] files = directory.listFiles();\n if(files != null){\n for(File file : files){\n if(!file.delete()) System.out.println(\"Failed to remove file \" + file.getName() + \" from \" + Main.CREATED_CLIPS_DIRECTORY_PATH);\n }\n }\n }", "private void deleteFilesFromDirectory(ArrayList<File> files)\n {\n for(File file:files) {\n Log.i(\"file\",\"indide\"+file.getPath());\n if (file.exists()) {\n Log.i(\"file\",\"exist\"+file.getPath());\n if (file.delete()) {\n Log.i(\"file\",\"delted successfully\"+file.getPath());\n } else {\n Log.i(\"file\",\"unable to delte file\"+file.getPath());\n }\n }\n }\n }", "private void removeNecessarySharedFiles(List<SharedFile> shared) {\n Iterator<com.cs407.noted.File> iterator = convertedSharedFiles.iterator();\n\n while (iterator.hasNext()) {\n com.cs407.noted.File file1 = iterator.next();\n boolean isIn = false;\n for (SharedFile sharedFile: shared) {\n if (sharedFile.getNoteID().equals(file1.getId())) {\n // remove the file\n isIn = true;\n break;\n }\n }\n if (!isIn) {\n iterator.remove();\n }\n }\n }", "public void deleteMoreFile() {\n\t\tFile outfile = new File(outFileString);\n\t\tFile files[] = outfile.listFiles();\n\t\tfor (int i = 0; i < files.length; i++) {\n\t\t\tString name = files[i].getAbsolutePath();\n\t\t\tif ((!name.contains(\"SICG\")) && (!name.contains(\"AndroidManifest.xml\"))) {\n\t\t\t\tDirDelete delete = new DirDelete();\n\t\t\t\tdelete.deleteDir(files[i]);\n\t\t\t}\n\t\t}\n\t}", "protected void applyPendingDeletes ()\n {\n while (!m_aDeleteStack.isEmpty ())\n removeMonitoredFile (m_aDeleteStack.pop ());\n }", "public void removeExpiredFiles() {\n \t\n \tsetCurrentTimeNow();\n\n File dir = new File(fsResource.getPath());\n File[] list = dir.listFiles(this);\n for (File file : list) {\n \tlogger.info(\"Auto expire file removed: {}\", file.getName());\n \tfile.delete();\n }\n }", "public void remFile(){\n ((MvwDefinitionDMO) core).remFile();\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tFile dir = new File(\"src/reports\");\n\t\t\t\tfor (File file : dir.listFiles())\n\t\t\t\tif (!file.isDirectory())\n\t\t\t\tfile.delete();\n\t\t\t\t}", "private void deleteFile() {\r\n actionDelete(dataModelArrayList.get(position));\r\n }", "@Override\n\tprotected void removeAction(HashSet<String> rmvSet){ \t\n\t\t// remove the 'deploymetSet'\n\t\tHashSet<File> delSet = new HashSet<File>();\n\t\tfor (File f: deploymentSet){\n\t\t\tif (rmvSet.contains(f.getName())){\n\t\t\t\tdelSet.add(f);\n\t\t\t}\n\t\t}\n\t\tdeploymentSet.removeAll(delSet);\n\t\n\t\t// delete mainMap\n\t\tfor (String rmvStr: rmvSet){\n\t\t\txmlMainClassInfoMap.remove(rmvStr);\n\t\t}\n\t\t\n\t\t// remove the relation and repository\n\t\t((AdaptDependencyManager)MiddleWareConfig.getInstance().getDepManager()).removeDeploymentNodeBySet(rmvSet);\n\t\t\n\t}", "private void expungeAllWatchListsFiles()\r\n {\r\n debug(\"expungeAllWatchListsFiles() - Delete ALL WATCHLIST Files\");\r\n\r\n java.io.File fileList = new java.io.File(\"./\");\r\n String rootName = getString(\"WatchListTableModule.edit.watch_list_basic_name\");\r\n String[] list = fileList.list(new MyFilter(rootName));\r\n for (int i = 0; i < list.length; i++)\r\n {\r\n StockMarketUtils.expungeListsFile(list[i]);\r\n }\r\n\r\n debug(\"expungeAllWatchListsFiles() - Delete ALL WATCHLIST Files - Complete\");\r\n }", "private void deleteResidualFile()\n\t{\n\t\tFile[] trainingSetFileName = directoryHandler.getTrainingsetDir().listFiles();\n\t\ttry\n\t\t{\n\t\t\tfor (int i = 1; i < nu; i++) trainingSetFileName[i].delete();\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private static void removeSSRs(File input){\n try(\n FileReader fRead = new FileReader(input+\".ssr\");\n BufferedReader bRead = new BufferedReader(fRead);\n FileReader fRead2 = new FileReader(input);\n BufferedReader bRead2 = new BufferedReader(fRead2)\n ){\n ArrayList<String> noSSRFilenames = new ArrayList<>();\n while (true){\n String line = bRead.readLine();\n if (line == null){\n break;\n }\n else{\n String [] nLine = line.split(\"\\t\");\n if (!nLine[0].equals(\"Name\")){\n if (!noSSRFilenames.contains(nLine[0])){\n noSSRFilenames.add(nLine[0]);\n }\n }\n }\n }\n boolean match = false;\n Sequence raw;\n String seqName = \"\";\n while (true) {\n String seqLine = bRead2.readLine();\n if (seqLine == null) {\n break;\n }\n else {\n if (seqLine.charAt(0) == '>') {\n match = false;\n for (String name : noSSRFilenames) {\n if (seqLine.equals(name)) {\n match = true;\n break;\n }\n }\n if (!match) {\n seqName = seqLine;\n }\n }\n //** Sequence objects are created and added to Metagenome\n else if(!match && seqLine.length() > DMMController.getIgnoreShortSeq() ){\n raw = new Sequence(seqName,seqLine,seqLine.length());\n sequences.add(raw);\n }\n }\n }\n }\n catch (Exception e){\n System.out.println(e.getMessage() + \"----------Remove SSRs issue\");\n }\n }", "public void clean()\r\n {\r\n // DO NOT TOUCH\r\n // System.out.println(unzipedFilePath);\r\n\r\n // only clean if there was a successful unzipping\r\n if (success)\r\n {\r\n // only clean if the file path to remove matches the zipped file.\r\n if (unzippedFilePath.equals(zippedFilePath.substring(0,\r\n zippedFilePath.length() - 4)))\r\n {\r\n // System.out.println(\"to be implmented\");\r\n for (File c : outputDir.listFiles())\r\n {\r\n // System.out.println(c.toString());\r\n if (!c.delete())\r\n {\r\n System.out.println(\"failed to delete\" + c.toString());\r\n }\r\n }\r\n outputDir.delete();\r\n outputDir = null;\r\n }\r\n }\r\n }", "@Override\n public void deleteFiles(Collection<String> absolutePaths) {\n gemFileDb.delete(absolutePaths);\n }", "static void removeFileFromShared() {\n\t\ttry {\n\t\t\tint fileMatchNumber = 0;\n\n\t\t\t// Get the current path of the user's shared files\n\t\t\tFile sharedPath = new File(\"users/\" + username +\"/shared\");\n\n\t\t\t// Get the contents of the directory and store it in an array\n\t\t\tFile[] sharedFiles = sharedPath.listFiles();\n\n\t\t\tSystem.out.println(\"Shared Files: \");\n\t\t\t// If the user has no shared files, let them know.\n\t\t\tif (sharedFiles.length == 0) {\n\t\t\t\tSystem.out.println(\"\\t --- \" + username + \" has shared files. ---\");\n System.out.println();\n\t\t\t\t// This has been added in order to allow the user to review the results before going back to the main menu\n\t\t\t\t// Upon pressing Enter, the main menu will come back up again and ready for a new menu option to be selected\n try {\n System.out.println(\"Press any key to return\");\n input.readLine();\n } catch (Exception e) {\n System.out.println(\"Error! \" + e.getMessage());\n }\n return;\n\t\t\t}\n\t\t\t// If the directory has files in it, print them on the screen to help the user with selection\n\t\t\tfor(File file : sharedFiles) {\n\t\t\t\tSystem.out.println(\"\\t + \" + file.getName());\n\t\t\t}\n\n\t\t\t// Let the user enter which file they would like to un-share\n\t\t\tSystem.out.println(\"Enter the name of the file you wish to un-share followed by Enter\");\n\t\t\tSystem.out.print(\"Your Entry: \");\n\n\t\t\tString fileToRemoveFromShare = input.readLine();\n\n\t\t\t// If the filename the user has entered is in the directory, then set the fileMatchNumber to be 1\n\t\t\tfor (int i = 0; i < sharedFiles.length; i++) {\n\t\t\t\tif (fileToRemoveFromShare.equals(sharedFiles[i].getName())) {\n\t\t\t\t\tfileMatchNumber = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// If the fileMatchNumber is equal to 1, then pass the request to the database via the CORBA server to de-register the file as available for sharing\n\t\t\tif (fileMatchNumber == 1) {\n\t\t\t\tSystem.out.println(server.stopFileShare(username, fileToRemoveFromShare));\n\n\t\t\t\t// Now, copy the file to the not-shared directory and remove it from the user's shared directory\n\t\t\t\tFile sharedFileToMove = new File(\"users/\" + username +\"/shared/\" + fileToRemoveFromShare);\n\t\t\t\tif(sharedFileToMove.renameTo(new File(\"users/\" + username +\"/not-shared/\" + fileToRemoveFromShare))) {\n\t\t\t\t\tsharedFileToMove.delete();\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Otherwise, the user entered an invalid filename\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"--------------------------------------------------------------------\");\n\t\t\t\tSystem.out.println(\"You have entered an invalid file name.\");\n\t\t\t}\n\t\t}\n\t\t// Catch any errors and terminate the function\n\t\tcatch (Exception e) {\n\t\t\tSystem.out.println(\"Error! : \" + e.getMessage());\n\t\t\treturn;\n\t\t}\n System.out.println();\n\t\t// This has been added in order to allow the user to review the results before going back to the main menu\n\t\t// Upon pressing Enter, the main menu will come back up again and ready for a new menu option to be selected\n try {\n System.out.println(\"Press any key to return\");\n input.readLine();\n } catch (Exception e) {\n System.out.println(\"Error! \" + e.getMessage());\n }\n\t}", "public void removePreviouslySavedFilesFromSDCard() {\n\t\tFile file = ctxt.getExternalFilesDir(Tattle_Config_Constants.SD_FOLDER_NAME + File.separator);\n\t\tif (file.exists()) {\n\t\t\tFile[] files = file.listFiles();\n\t\t\tfor (File f : files) {\n\t\t\t\tf.delete();\n\t\t\t}\n\t\t}\n\t\tfile.delete();\n\t}", "public void deleteGeneratedFiles();", "public static void doRemove(String fileName) {\n Stage fromSave = Utils.readObject(STAGED_FILES,\n Stage.class);\n HashSet<String> stagedFiles = fromSave.getStagedFiles();\n Commit currHead = Utils.readObject(TREE_DIR, Tree.class).\n getCurrHead();\n if (stagedFiles.contains(fileName) && currHead.getBlobs().\n containsKey(fileName)) {\n File stagedFile = Utils.join(STAGE_DIR, fileName);\n addToStageRemoval(fileName);\n removeFromWorking(fileName);\n stagedFile.delete();\n\n stagedFiles.remove(fileName);\n Stage.save(fromSave);\n } else if (stagedFiles.contains(fileName) && !currHead.getBlobs().\n containsKey(fileName)) {\n File stagedFile = Utils.join(STAGE_DIR, fileName);\n stagedFile.delete();\n\n stagedFiles.remove(fileName);\n Stage.save(fromSave);\n } else if (!stagedFiles.contains(fileName) && currHead.getBlobs().\n containsKey(fileName)) {\n if (!Utils.filesSet(WORKING_DIR).contains(fileName)) {\n File removedFile = Utils.join(STAGE_RM_DIR, fileName);\n try {\n removedFile.createNewFile();\n } catch (IOException ignored) {\n return;\n }\n String contents = currHead.getBlobs().get(fileName).\n getContents();\n Utils.writeContents(removedFile, contents);\n } else {\n addToStageRemoval(fileName);\n removeFromWorking(fileName);\n }\n } else {\n System.out.println(\"No reason to remove the file.\");\n System.exit(0);\n }\n }", "private static void rm(Gitlet currCommit, String[] args) {\n if (args.length != 2) {\n System.out.println(\"Please input the file to remove\");\n return;\n }\n Commit headCommit = currCommit.tree.getHeadCommit();\n if (!headCommit.containsFile(args[1])\n && !currCommit.status.isStaged(args[1])) {\n System.out.println(\"No reason to remove the file.\");\n } else {\n currCommit.status.markForRemoval(args[1]);\n }\n addSerializeFile(currCommit);\n }", "private void prune(java.io.File localDir, List<File> driveFiles) {\n java.io.File[] localArray = localDir.listFiles();\n for (java.io.File f : localArray) {\n boolean found = false;\n String lname = f.getName();\n for (File gf : driveFiles) {\n String gname = gf.getTitle();\n if (lname.equals(gname))\n found = true;\n }\n if (!found) {\n Log.e(\"DELETE PRUNE\", f.getParentFile().getName() + \"/\" + f.getName());\n deleteFile(f);\n }\n }\n }", "private void actionRemoveFile ()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\t//---- Get currently selected file index in the combo box\r\n\t\t\tint index = mainFormLink.getComponentPanelLeft().getComponentComboboxFileName().getSelectedIndex();\r\n\r\n\t\t\t//---- Remove the file from the project by its index\r\n\t\t\tDataController.scenarioRemoveFile(index);\r\n\r\n\t\t\thelperDisplayProjectFiles();\r\n\t\t\thelperDisplaySamplesCombobox();\r\n\t\t}\r\n\t\tcatch (ExceptionMessage e)\r\n\t\t{\r\n\t\t\tExceptionHandler.processException(e);\r\n\t\t}\r\n\t}", "private void deleteCacheFiles() {\n\n\t\t// get the directory file\n\t\tFile cache = new File(Constants.CACHE_DIR_PATH);\n\n\t\t// check if we got the correct instance of that directory file.\n\t\tif (!cache.exists() || !cache.isDirectory())\n\t\t\treturn;\n\n\t\t// gets the list of files in the directory\n\t\tFile[] files = cache.listFiles();\n\t\t// deleting\n\n\t\tdeleteFiles(cache);\n\t\tfiles = null;\n\t\tcache = null;\n\n\t}", "public void excludeAllFiles(){\n for(Map.Entry<String,File> entry : dataSourcesDirectories.entrySet()){\n \n //Get directory\n File dir = entry.getValue();\n \n //List files contained in this directory\n File[] listOfFiles = dir.listFiles();\n \n //Delete each file contained in this directory\n for(File file : listOfFiles)\n file.delete();\n \n //Delete directory\n dir.delete();\n \n }\n \n //For each directory created for each service\n for(Map.Entry<String,File> entry : servicesDirectories.entrySet()){\n \n //Get directory\n File dir = entry.getValue();\n \n //List files contained in this directory\n File[] listOfFiles = dir.listFiles();\n \n //Delete each file contained in this directory\n for(File file : listOfFiles)\n file.delete();\n \n //Delete directory\n dir.delete();\n \n }\n \n //Finally, delete sessionDirectory\n if(sessionDirectory != null)\n sessionDirectory.delete();\n \n }", "@PreAuthorize(\"hasRole('ROLE_ROOT')\")\n\tpublic void deleteFileUploads();", "private void removeArquivos(File arquivoOrdem, String arquivosCaixa[]) throws IOException\n\t{\n\t\tfor (int i=0; i < arquivosCaixa.length; i++)\n\t\t{\n\t\t\t// Remove o arquivo concatenado que foi criptografado\n\t\t\tString extArqCriptografado \t= getPropriedade(\"ordemVoucher.extensaoArquivoCriptografado\");\n//\t\t\tString dirOrigem \t\t= getPropriedade(\"ordemVoucher.dirArquivos\");\n\t\t\tString nomArqCriptografado\t= arquivosCaixa[i]+extArqCriptografado;\n\t\t\tFile arquivoCriptografado\t= new File(nomArqCriptografado);\n\t\t\tSystem.out.println(\"Removendo arquivo \"+nomArqCriptografado);\n\t\t\tif (!arquivoCriptografado.delete())\n\t\t\t\tSystem.out.println(\"Nao foi possivel remover o arquivo \"+nomArqCriptografado);\n\n\t\t\t// Remove o arquivo concatenado original\n\t\t\tString nomArqOrigem\t\t\t= arquivosCaixa[i];\n\t\t\tFile arquivoOrigem\t\t= new File(nomArqOrigem);\n\t\t\tSystem.out.println(\"Removendo arquivo \"+nomArqOrigem);\n\t\t\tif (!arquivoOrigem.delete())\n\t\t\t\tSystem.out.println(\"Nao foi possivel remover o arquivo \"+nomArqOrigem);\n\t\t}\n\t\t\n\t\t/* Remove tambem o arquivo compactado que foi enviado para o GPP */\n\t\tFile arqCompactado = new File(getNomeArquivoCompactado(arquivoOrdem));\n\t\tSystem.out.println(\"Removendo arquivo \"+arqCompactado.getName());\n\t\tif (!arqCompactado.delete())\n\t\t\tSystem.out.println(\"Nao foi possivel remover o arquivo \"+arqCompactado.getName());\n\t}", "void deleteChains() {\n\t\tif (!params.isDebug()) {\n\t\t\tfor (File deleteCandidate : toDelete) {\n\t\t\t\tdeleteCandidate.delete();\n\t\t\t\t\n\t\t\t\ttry (DirectoryStream<Path> directoryStream = Files.newDirectoryStream(deleteCandidate.toPath())) {\n\t\t\t\t\tfor (Path path : directoryStream) {\n\t\t\t\t\t\tif (!path.getFileName().toString().endsWith(\"_SCWRLed.pdb\")) {\n\t\t\t\t\t\t\tpath.toFile().delete();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} catch (IOException ex) {\n\t\t\t\t\tex.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Test\n public void testRemoveFileRemovesFile(){\n \n FileStorageService fss = DatabaseServiceTestTool.createFileStorageService();\n \n String user1 = DatabaseServiceTestTool.usernames[0];\n String user2 = DatabaseServiceTestTool.usernames[1];\n \n assertTrue(fss.getFilesFor(user1).size() == 0);\n assertTrue(fss.getFilesFor(user2).size() == 0);\n \n try {\n InputStream is1 = prepareRandomInputStream();\n fss.addFile(user1, \"hello.pgn\", is1);\n is1.close();\n \n InputStream is2 = prepareRandomInputStream();\n fss.addFile(user2, \"hello.pgn\", is2);\n is2.close();\n \n } catch (IOException e) {\n e.printStackTrace();\n fail();\n }\n \n assertTrue(fss.getFilesFor(user1).size() == 1);\n assertTrue(fss.getFilesFor(user2).size() == 1);\n \n assertEquals(fss.getFilesFor(user1).get(0), \"hello.pgn\");\n assertEquals(fss.getFilesFor(user2).get(0), \"hello.pgn\");\n \n try {\n fss.removeFile(user1, \"hello.pgn\");\n } catch (Exception e1) {\n e1.printStackTrace();\n fail();\n }\n \n assertTrue(fss.getFilesFor(user1).size() == 0);\n \n //testing for side-effects now\n assertTrue(fss.getFilesFor(user2).size() == 1);\n assertEquals(fss.getFilesFor(user2).get(0), \"hello.pgn\");\n \n DatabaseServiceTestTool.destroyFileStorageService(fss);\n }", "public int deleteReq() {\n String fileName = \"\";\n\n Log.v(\"File input stream\", fileName);\n String[] fileList = getContext().fileList();\n Log.v(\"File input stream\", Integer.toString(fileList.length));\n\n for (int i = 0; i < fileList.length; i++) {\n Log.v(\"File input stream\", fileList[i]);\n try {\n fileName = fileList[i];\n context.deleteFile(fileName);\n } catch (Exception e) {\n Log.e(\"Exception Thrown\", \"Exception Thrown\");\n }\n }\n return 0;\n }", "public void deleteAnonGeneListAnalysisFiles(String userMainDir, int analysis_id, DataSource pool) throws SQLException {\r\n\r\n\t\tlog.info(\"in deleteGeneListAnalysisFiles\");\r\n\r\n\t\tGeneListAnalysis thisGLA = getAnonGeneListAnalysis(analysis_id, pool);\r\n \r\n\t\tString dirToDelete = \"\";\r\n\t\tGeneList thisGeneList = thisGLA.getAnalysisGeneList();\r\n\t\tString glaDir = userMainDir+thisGeneList.getGene_list_id()+\"/\";\r\n log.debug(\"deleteAnonGeneListAnalysis:\"+glaDir);\r\n\t\tif (thisGLA.getAnalysis_type().equals(\"oPOSSUM\")) {\r\n\t\t\tdirToDelete = thisGeneList.getOPOSSUMDir(glaDir);\t\r\n\t\t} else if (thisGLA.getAnalysis_type().equals(\"MEME\")) {\r\n\t\t\tdirToDelete = thisGeneList.getMemeDir(glaDir);\t\r\n\t\t} else if (thisGLA.getAnalysis_type().equals(\"Upstream\")) {\r\n\t\t\tdirToDelete = thisGeneList.getUpstreamDir(glaDir);\t\r\n\t\t} else if (thisGLA.getAnalysis_type().equals(\"Pathway\")) {\r\n\t\t\tdirToDelete = thisGeneList.getPathwayDir(glaDir);\t\r\n\t\t} else if (thisGLA.getAnalysis_type().equals(\"multiMiR\")){\r\n dirToDelete=thisGeneList.getMultiMiRDir(glaDir)+thisGLA.getPath();\r\n } else if (thisGLA.getAnalysis_type().equals(\"GO\")){\r\n dirToDelete=thisGeneList.getGODir(glaDir)+thisGLA.getPath();\r\n } \r\n\t\tlog.debug(\"glaDir=\"+glaDir);\r\n\t\tlog.debug(\"dirToDelete=\"+dirToDelete);\r\n File dir=new File(dirToDelete);\r\n\t\tFile[] filesInDir = dir.listFiles();\r\n boolean emptyFolder=true;\r\n\t\tfor (int i=0; i<filesInDir.length; i++) {\r\n log.debug(\"files\"+i+\"=\"+filesInDir[i].getAbsolutePath());\r\n\t\t\tif (filesInDir[i].getName().indexOf(thisGLA.getCreate_date_as_string()) > -1 ||\r\n\t\t\t\tfilesInDir[i].getName().indexOf(thisGLA.getCreate_date_for_filename()) > -1 || \r\n thisGLA.getAnalysis_type().equals(\"GO\") || thisGLA.getAnalysis_type().equals(\"multiMiR\")\r\n ) {\r\n\t\t\t\ttry{\r\n if(!filesInDir[i].delete()){\r\n emptyFolder=false;\r\n }\r\n }catch(Exception e){\r\n log.error(\"error deleteing Gene List Analysis File:\"+filesInDir[i].getAbsolutePath(),e);\r\n }\r\n \r\n\t\t\t}\r\n\t\t}\r\n if(emptyFolder){\r\n try{\r\n dir.delete();\r\n }catch(Exception e){\r\n log.error(\"error deleteing Gene List Analysis Folder\",e);\r\n }\r\n }\r\n\t}", "private void cleanOutputFiles() throws DeviceNotAvailableException {\n CLog.d(\"Remove output file: %s\", mOutputFile);\n String extStore = mTestDevice.getMountPoint(IDevice.MNT_EXTERNAL_STORAGE);\n mTestDevice.executeShellCommand(String.format(\"rm %s/%s\", extStore, mOutputFile));\n }", "private void deleteUploadFiles(List<File> listFiles) {\r\n\t\tif (listFiles != null && listFiles.size() > 0) {\r\n\t\t\tfor (File aFile : listFiles) {\r\n\t\t\t\taFile.delete();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "void deleteTranslatedFiles(InformationResourceFile irFile);", "@AfterStep\n\tprivate void deleteFile(){\n\t\tif(LOGGER.isDebugEnabled()){\n\t\tLOGGER.debug(\" Entering into SalesReportByProductEmailProcessor.deleteFile() method --- >\");\n\t\t}\n\t\ttry {\n\t\t\tif(null != salesReportByProductBean){\n\t\t\tReportsUtilBO reportsUtilBO = reportBOFactory.getReportsUtilBO();\n\t\t\tList<String> fileNames = salesReportByProductBean.getFileNameList();\n\t\t\tString fileLocation = salesReportByProductBean.getFileLocation();\n\t\t\treportsUtilBO.deleteFile(fileNames, fileLocation);\n\t\t\t}\n\t\t} catch (PhotoOmniException e) {\n\t\t\tLOGGER.error(\" Error occoured at SalesReportByProductEmailProcessor.deleteFile() method ----> \" + e);\n\t\t}finally {\n\t\t\tif(LOGGER.isDebugEnabled()){\n\t\t\tLOGGER.debug(\" Exiting from SalesReportByProductEmailProcessor.deleteFile() method ---> \");\n\t\t\t}\n\t\t}\n\t}", "List<ChangedFile> resetChangedFiles(Map<Project, List<ChangedFile>> files);", "private void deleteIfNecessary(HashMap<String, Blob> allFiles,\n HashMap<String, Blob> filesInCurr) {\n for (String fileName: filesInCurr.keySet()) {\n if (allFiles.get(fileName) == null) {\n File fileInCWD = new File(Main.CWD, fileName);\n if (fileInCWD.exists()) {\n fileInCWD.delete();\n }\n }\n }\n }", "private void processFiles(List<File> mFileList, java.io.File targetFolder) {\n // check if the local file exists\n for (File file : mFileList) {\n java.io.File local = new java.io.File(targetFolder, file.getTitle());\n if (!local.exists()) {\n downloadFile(file, targetFolder);\n } else {\n if (checkTimeStamp(file)) {\n Log.e(\"DELETE TIME\", local.getParentFile().getName() + \"/\" + local.getName());\n deleteFile(local);\n downloadFile(file, targetFolder);\n } else {\n check = 1;\n Log.e(\"DL NOT NEEDED\", local.getParentFile().getName() + \"/\" + local.getName());\n numDownloading--;\n Log.e(\"STATUS NOT DL\",\"numDownloading is at \" + numDownloading);\n \n setNotification();\n if (numDownloading <= 0) {\n setFinalNotification();\n }\n }\n }\n }\n }", "public static synchronized void removeArchiveFiles() {\n System.out.println(Thread.currentThread().getName() + \"********************************************************* TestHelper.removeArchiveFiles\");\n String firstDestinationDirName = System.getProperty(USER_DIR)\n + File.separator\n + QVCSConstants.QVCS_PROJECTS_DIRECTORY\n + File.separator\n + getTestProjectName();\n File firstDestinationDirectory = new File(firstDestinationDirName);\n\n String secondDestinationDirName = firstDestinationDirName + File.separator + \"subProjectDirectory\";\n File secondDestinationDirectory = new File(secondDestinationDirName);\n\n String thirdDestinationDirName = secondDestinationDirName + File.separator + \"subProjectDirectory2\";\n File thirdDestinationDirectory = new File(thirdDestinationDirName);\n\n String fourthDestinationDirName = firstDestinationDirName + File.separator + QVCSConstants.QVCS_CEMETERY_DIRECTORY;\n File fourthDestinationDirectory = new File(fourthDestinationDirName);\n\n String fifthDestinationDirName = firstDestinationDirName + File.separator + QVCSConstants.QVCS_DIRECTORY_METADATA_DIRECTORY;\n File fifthDestinationDirectory = new File(fifthDestinationDirName);\n\n String sixthDestinationDirName = firstDestinationDirName + File.separator + QVCSConstants.QVCS_BRANCH_ARCHIVES_DIRECTORY;\n File sixthDestinationDirectory = new File(sixthDestinationDirName);\n\n deleteDirectory(sixthDestinationDirectory);\n deleteDirectory(fifthDestinationDirectory);\n deleteDirectory(fourthDestinationDirectory);\n deleteDirectory(thirdDestinationDirectory);\n deleteDirectory(secondDestinationDirectory);\n deleteDirectory(firstDestinationDirectory);\n }", "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}", "@Override\r\n public void onConfirmation(String callerTag) {\r\n ComponentsGetter cg = (ComponentsGetter)getSherlockActivity();\r\n FileDataStorageManager storageManager = cg.getStorageManager();\r\n if (storageManager.getFileById(mTargetFile.getFileId()) != null) {\r\n cg.getFileOperationsHelper().removeFile(mTargetFile, false);\r\n }\r\n }", "public void removeFiles(String mPath)\n\t{\n\t\tFile dir = new File(mPath);\n\n\t\tString[] children = dir.list();\n\t\tif (children != null) {\n\t\t\tfor (int i=0; i<children.length; i++) {\n\t\t\t\tString filename = children[i];\n\t\t\t\tFile f = new File(mPath + filename);\n\n\t\t\t\tif (f.exists()) {\n\t\t\t\t\tf.delete();\n\t\t\t\t}\n\t\t\t}//for\n\t\t}//if\n\n\t}", "public void deleteGeneListAnalysisFiles(String userMainDir, int analysis_id, Connection conn) throws SQLException {\r\n\r\n\t\tlog.info(\"in deleteGeneListAnalysisFiles\");\r\n\r\n\t\tGeneListAnalysis thisGLA = getGeneListAnalysis(analysis_id, conn);\r\n \r\n\t\tString dirToDelete = \"\";\r\n\t\tGeneList thisGeneList = thisGLA.getAnalysisGeneList();\r\n\t\tString glaDir = thisGeneList.getGeneListAnalysisDir(userMainDir);\r\n\r\n\t\tif (thisGLA.getAnalysis_type().equals(\"oPOSSUM\")) {\r\n\t\t\tdirToDelete = thisGeneList.getOPOSSUMDir(glaDir);\t\r\n\t\t} else if (thisGLA.getAnalysis_type().equals(\"MEME\")) {\r\n\t\t\tdirToDelete = thisGeneList.getMemeDir(glaDir);\t\r\n\t\t} else if (thisGLA.getAnalysis_type().equals(\"Upstream\")) {\r\n\t\t\tdirToDelete = thisGeneList.getUpstreamDir(glaDir);\t\r\n\t\t} else if (thisGLA.getAnalysis_type().equals(\"Pathway\")) {\r\n\t\t\tdirToDelete = thisGeneList.getPathwayDir(glaDir);\t\r\n\t\t} else if (thisGLA.getAnalysis_type().equals(\"multiMiR\")){\r\n dirToDelete=thisGeneList.getMultiMiRDir(glaDir)+thisGLA.getPath();\r\n } else if (thisGLA.getAnalysis_type().equals(\"GO\")){\r\n dirToDelete=thisGeneList.getGODir(glaDir)+thisGLA.getPath();\r\n } \r\n\t\tlog.debug(\"glaDir=\"+glaDir);\r\n\t\tlog.debug(\"dirToDelete=\"+dirToDelete);\r\n File dir=new File(dirToDelete);\r\n\t\tFile[] filesInDir = dir.listFiles();\r\n boolean emptyFolder=true;\r\n\t\tfor (int i=0; i<filesInDir.length; i++) {\r\n log.debug(\"files\"+i+\"=\"+filesInDir[i].getAbsolutePath());\r\n\t\t\tif (filesInDir[i].getName().indexOf(thisGLA.getCreate_date_as_string()) > -1 ||\r\n\t\t\t\tfilesInDir[i].getName().indexOf(thisGLA.getCreate_date_for_filename()) > -1 || \r\n thisGLA.getAnalysis_type().equals(\"GO\") || thisGLA.getAnalysis_type().equals(\"multiMiR\")\r\n ) {\r\n\t\t\t\ttry{\r\n if(!filesInDir[i].delete()){\r\n emptyFolder=false;\r\n }\r\n }catch(Exception e){\r\n log.error(\"error deleteing Gene List Analysis File:\"+filesInDir[i].getAbsolutePath(),e);\r\n }\r\n \r\n\t\t\t}\r\n\t\t}\r\n if(emptyFolder){\r\n try{\r\n dir.delete();\r\n }catch(Exception e){\r\n log.error(\"error deleteing Gene List Analysis Folder\",e);\r\n }\r\n }\r\n\t}", "public void removeAllUniqueFileIdentifier() {\r\n\t\tBase.removeAll(this.model, this.getResource(), UNIQUEFILEIDENTIFIER);\r\n\t}", "public File[] DeleteFile(String sfileName) {\n\t \tFile dir = new File(fileStorageLocation.toString());\n\t \tFile[] matchingFiles = dir.listFiles(new FilenameFilter() {\n\t \t public boolean accept(File dir, String name) {\n\t \t return name.endsWith(\"_\" + sfileName);\n\t \t }\n\t \t});\n\t \t\n\t \tfor (int i = 0; i < matchingFiles.length; i++)\n\t \t{\n\t \t\tmatchingFiles[i].delete();\n\t \t}\n \t\n return matchingFiles;\n }", "@RequestMapping(value=\"/remove/{filename}&{subdir}\", method = RequestMethod.GET)\r\n public String processRemoveFile(@PathVariable String filename, @PathVariable String subdir, Locale locale, Model model, HttpServletRequest request) {\r\n\t\t\r\n\t\tlogger.info(\"Delete file: \" + filename + \" in \" + QRDA_URIResolver.REPOSITORY_TESTFILES + \"/\" + subdir);\r\n\t\tfileService.deleteFile(filename, QRDA_URIResolver.REPOSITORY_TESTFILES, subdir);\r\n\t\treturn \"redirect:/testFiles\";\r\n\t}", "public void EliminarArchivos(){\n\t\ttry{\n\t\tFile Delete = new File(\"Cod.txt\");\n\t\tDelete.deleteOnExit();\n\t\tFile Borrar = new File(\"Maq.txt\");\n\t\tBorrar.deleteOnExit();\n\t\tFile eliminar = new File(\"WS.txt\");\n\t\teliminar.deleteOnExit();\n\t\tFile Bye = new File(\"RESPALDO.txt\");\n\t\tBye.deleteOnExit();\n\t\t\tBufferedReader numero= new BufferedReader(new FileReader(\"WS.txt\"));\n\t\t\tString valor = numero.readLine();\n\t\t\tint NumAreas= Integer.valueOf(valor);\n\t\t\tfor(int i=0; i< NumAreas;i++){\n\t\t\t\tvalor= numero.readLine();\n\t\t\t\tFile eliminas = new File(\"WS\"+valor+\".txt\");\n\t\t\t\teliminas.deleteOnExit();\n\t\t\t}\n\t\t\tnumero.close();\n\t\t}catch(IOException e){\n\t\t\tSystem.out.println(\"File not found\");\n\t\t}\n\t}", "public synchronized void cleanupSimple() {\n\t\tfinal int maxNumFiles = 1000;\n\t\tfinal int numFilesToDelete = 50;\n\n\t\tString[] children = mStorageDirectory.list();\n\t\tif (children != null) {\n\t\t\tif (children.length > maxNumFiles) {\n\t\t\t\tfor (int i = children.length - 1, m = i - numFilesToDelete; i > m; i--) {\n\t\t\t\t\tFile child = new File(mStorageDirectory, children[i]);\n\t\t\t\t\ttry {\n\t\t\t\t\t\tchild.delete();\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}", "public void removeFiles(String filter)\n {\n for (String s : fileList) {\n if (!s.contains(filter)) {\n fileList.remove(s);\n }\n }\n }", "@Test\n public void testRemoveCorruptedPendingCleanAction() throws IOException {\n HoodieCLI.conf = hadoopConf();\n\n Configuration conf = HoodieCLI.conf;\n\n HoodieTableMetaClient metaClient = HoodieCLI.getTableMetaClient();\n\n // Create four requested files\n for (int i = 100; i < 104; i++) {\n String timestamp = String.valueOf(i);\n // Write corrupted requested Clean File\n HoodieTestCommitMetadataGenerator.createEmptyCleanRequestedFile(tablePath, timestamp, conf);\n }\n\n // reload meta client\n metaClient = HoodieTableMetaClient.reload(metaClient);\n // first, there are four instants\n assertEquals(4, metaClient.getActiveTimeline().filterInflightsAndRequested().getInstants().count());\n\n CommandResult cr = shell().executeCommand(\"repair corrupted clean files\");\n assertTrue(cr.isSuccess());\n\n // reload meta client\n metaClient = HoodieTableMetaClient.reload(metaClient);\n assertEquals(0, metaClient.getActiveTimeline().filterInflightsAndRequested().getInstants().count());\n }", "private void cleanFolder(File[] files) {\n \t\t\n \t\tif (files != null) {\n \t\t\t// Iterate the files\n \t\t\tfor (int i = 0; i < files.length; i++) {\n \t\t\t\tFile f = files[i];\n \t\t\t\t// If the file is a directory, remove its contents recursively\n \t\t\t\tif (f.isDirectory()) {\n \t\t\t\t\tcleanFolder(f.listFiles());\n \t\t\t\t}\n \t\t\t\t// Remove the file if it is a class file\n \t\t\t\tif (f.getName().endsWith(\".class\"))\n \t\t\t\t\tf.delete();\n \t\t\t}\n \t\t}\n \t}", "public void doDeleteconfirm ( RunData data)\n\t{\n\t\tSessionState state = ((JetspeedRunData)data).getPortletSessionState (((JetspeedRunData)data).getJs_peid ());\n\t\tSet deleteIdSet = new TreeSet();\n\n\t\t// cancel copy if there is one in progress\n\t\tif(! Boolean.FALSE.toString().equals(state.getAttribute (STATE_COPY_FLAG)))\n\t\t{\n\t\t\tinitCopyContext(state);\n\t\t}\n\n\t\t// cancel move if there is one in progress\n\t\tif(! Boolean.FALSE.toString().equals(state.getAttribute (STATE_MOVE_FLAG)))\n\t\t{\n\t\t\tinitMoveContext(state);\n\t\t}\n\n\t\tString[] deleteIds = data.getParameters ().getStrings (\"selectedMembers\");\n\t\tif (deleteIds == null)\n\t\t{\n\t\t\t// there is no resource selected, show the alert message to the user\n\t\t\taddAlert(state, rb.getString(\"choosefile3\"));\n\t\t}\n\t\telse\n\t\t{\n\t\t\tdeleteIdSet.addAll(Arrays.asList(deleteIds));\n\t\t\tList deleteItems = new Vector();\n\t\t\tList notDeleteItems = new Vector();\n\t\t\tList nonEmptyFolders = new Vector();\n\t\t\tList roots = (List) state.getAttribute(STATE_COLLECTION_ROOTS);\n\t\t\tIterator rootIt = roots.iterator();\n\t\t\twhile(rootIt.hasNext())\n\t\t\t{\n\t\t\t\tBrowseItem root = (BrowseItem) rootIt.next();\n\n\t\t\t\tList members = root.getMembers();\n\t\t\t\tIterator memberIt = members.iterator();\n\t\t\t\twhile(memberIt.hasNext())\n\t\t\t\t{\n\t\t\t\t\tBrowseItem member = (BrowseItem) memberIt.next();\n\t\t\t\t\tif(deleteIdSet.contains(member.getId()))\n\t\t\t\t\t{\n\t\t\t\t\t\tif(member.isFolder())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(ContentHostingService.allowRemoveCollection(member.getId()))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tdeleteItems.add(member);\n\t\t\t\t\t\t\t\tif(! member.isEmpty())\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tnonEmptyFolders.add(member);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tnotDeleteItems.add(member);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(ContentHostingService.allowRemoveResource(member.getId()))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tdeleteItems.add(member);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tnotDeleteItems.add(member);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(! notDeleteItems.isEmpty())\n\t\t\t{\n\t\t\t\tString notDeleteNames = \"\";\n\t\t\t\tboolean first_item = true;\n\t\t\t\tIterator notIt = notDeleteItems.iterator();\n\t\t\t\twhile(notIt.hasNext())\n\t\t\t\t{\n\t\t\t\t\tBrowseItem item = (BrowseItem) notIt.next();\n\t\t\t\t\tif(first_item)\n\t\t\t\t\t{\n\t\t\t\t\t\tnotDeleteNames = item.getName();\n\t\t\t\t\t\tfirst_item = false;\n\t\t\t\t\t}\n\t\t\t\t\telse if(notIt.hasNext())\n\t\t\t\t\t{\n\t\t\t\t\t\tnotDeleteNames += \", \" + item.getName();\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tnotDeleteNames += \" and \" + item.getName();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\taddAlert(state, rb.getString(\"notpermis14\") + notDeleteNames);\n\t\t\t}\n\n\n\t\t\t/*\n\t\t\t\t\t//htripath-SAK-1712 - Set new collectionId as resources are not deleted under 'more' requirement.\n\t\t\t\t\tif(state.getAttribute(STATE_MESSAGE) == null){\n\t\t\t\t\t String newCollectionId=ContentHostingService.getContainingCollectionId(currentId);\n\t\t\t\t\t state.setAttribute(STATE_COLLECTION_ID, newCollectionId);\n\t\t\t\t\t}\n\t\t\t*/\n\n\t\t\t// delete item\n\t\t\tstate.setAttribute (STATE_DELETE_ITEMS, deleteItems);\n\t\t\tstate.setAttribute (STATE_DELETE_ITEMS_NOT_EMPTY, nonEmptyFolders);\n\t\t}\t// if-else\n\n\t\tif (state.getAttribute(STATE_MESSAGE) == null)\n\t\t{\n\t\t\tstate.setAttribute (STATE_MODE, MODE_DELETE_CONFIRM);\n\t\t\tstate.setAttribute(STATE_LIST_SELECTIONS, deleteIdSet);\n\t\t}\n\n\n\t}", "void deleteAllCopiedComponent(RecordSet compRs);", "private static void deleteDataFilesInManifestFile(DremioFileIO dremioFileIO, ManifestFile manifestFile) {\n try {\n // ManifestFiles.readPaths requires snapshotId not null, created manifestFile has null snapshot id\n // use a NonNullSnapshotIdManifestFileWrapper to provide a non-null dummy snapshotId\n ManifestFile nonNullSnapshotIdManifestFile =\n manifestFile.snapshotId()==null ? GenericManifestFile.copyOf(manifestFile).withSnapshotId(-1L).build():manifestFile;\n CloseableIterable<String> dataFiles = ManifestFiles.readPaths(nonNullSnapshotIdManifestFile, dremioFileIO);\n dataFiles.forEach(f -> dremioFileIO.deleteFile(f));\n } catch (Exception e) {\n logger.warn(String.format(\"Failed to delete up data files in manifestFile %s\" , manifestFile), e);\n }\n }", "public static void Deletefiles() throws Throwable\r\n\t{\r\n\t\tString filePath, timestamp;\r\n\t\tDate date = new Date();\r\n\t\ttimestamp = new SimpleDateFormat(\"MMMdd\").format(date);\r\n\t filePath = \"./target/screenshots/\" + timestamp;\r\n\t\tFile file = new File(filePath);\r\n\t\t\r\n\t\tString[] evdFiles;\r\n\t\tif (file.isDirectory())\r\n\t\t{\r\n\t\t\tevdFiles = file.list();\r\n\t\t\tSystem.out.println(\"number of files ::: \"+evdFiles.length);\r\n\t\t\tfor (int i = 0; i < evdFiles.length; i++)\r\n\t\t\t{\r\n\t\t\t\tFile evdFile = new File(file, evdFiles[i]);\r\n\t\t\t\tSystem.out.println(\"File to be deleted ::: \"+evdFile);\r\n\t\t\t\tif (!evdFile.isDirectory())\r\n\t\t\t\t{\r\n\t\t\t\t\tevdFile.delete();\r\n\t\t\t\t\tSystem.out.println(\"File deleted\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\ti = 0;\r\n\t}", "@Override\r\n public void remove() {\n ArrayList<String>Lines=new ArrayList<>();\r\n String Path = \"/home/yara/Documents/4year/OODP/Task.txt\";\r\n \r\n String RID=id.getText();\r\n String Taskname = name.getText();\r\n String startDate = date_start.getText();\r\n String EndDate = date_finish.getText();\r\n String LocalStatus = status.getText();\r\n String MemberID = MemberId.getText();\r\n \r\n Lines.add(RID);\r\n Lines.add(Taskname);\r\n Lines.add(startDate);\r\n Lines.add(EndDate);\r\n Lines.add(LocalStatus);\r\n Lines.add(MemberID);\r\n \r\n FileFacade facade = new FileFacade();\r\n facade.remove(Path, Lines);\r\n \r\n }", "public void cleanup(Appendable err) throws IOException {\n\n String[] toRemove = {\".data\", \".properties\", \".script\", \".tmp\", \".log\"};\n\n for (String aToRemove : toRemove) {\n String tmpFile = \"\" + Globals.DBname + aToRemove;\n File f = new File(tmpFile);\n if (f.exists()) {\n\n f.delete();\n err.append(\"Abacus disk clean up: removing \" + tmpFile + \"\\n\");\n\n }\n }\n err.append(\"\\n\");\n }", "private List<File> checkAndRemoveMatchingFiles(AbstractSchemaElement schemaElement) {\n\t\tSchemaFileMatcher fileMatcher = new SchemaFileMatcher(schemaElement);\n\t\tList<File> matchedFiles = new ArrayList<File>();\n\t\tboolean change = true;\n\t\twhile (change) {\n\t\t\tchange = false;\n\t\t\tfor (int i = 0; i < files.size(); i++) {\n\t\t\t\tFile file = files.get(i);\n\t\t\t\tString filename = file.getName();\n\t\t\t\tif (fileMatcher.matches(filename)) {\n\t\t\t\t\tfiles.remove(i);\n\t\t\t\t\tmatchedFiles.add(file);\n\t\t\t\t\tString schema = schemaElement.getSchema();\n\t\t\t\t\tif (schema != null && checkTrees) {\n\t\t\t\t\t\tLOG.trace(\"*******following: \"+schema);\n\t\t\t\t\t\tContainerCheck schemaCheck = new ContainerCheck(schema);\n\t\t\t\t\t\tschemaCheck.setCheckTrees(checkTrees);\n\t\t\t\t\t\tschemaCheck.checkProject(new SimpleContainer(file));\n//\t\t\t\t\t\tcheckUnmatchedFiles();\n\t\t\t\t\t\tLOG.trace(\"*******end: \"+schema);\n\t\t\t\t\t}\n\t\t\t\t\tchange = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn matchedFiles;\n\t}", "public static boolean deleteLockedWorkflows(final List<? extends AbstractExplorerFileStore> toDelWFs,\n final Map<AbstractContentProvider, DeletionConfirmationResult> confirmationResults) {\n boolean success = true;\n for (AbstractExplorerFileStore wf : toDelWFs) {\n assert AbstractExplorerFileStore.isWorkflow(wf)\n || AbstractExplorerFileStore.isWorkflowTemplate(wf);\n try {\n File loc = wf.toLocalFile(EFS.NONE, null);\n if (loc == null) {\n // can't do any locking or fancy deletion\n wf.delete(confirmationResults.get(wf.getContentProvider()), null);\n continue;\n }\n assert VMFileLocker.isLockedForVM(loc);\n\n // delete the workflow file first\n File[] children = loc.listFiles();\n if (children == null) {\n throw new CoreException(\n new Status(IStatus.ERROR,\n ExplorerActivator.PLUGIN_ID,\n Messages.ExplorerFileSystemUtils_14));\n }\n\n // delete workflow file first\n File wfFile = new File(loc, WorkflowPersistor.WORKFLOW_FILE);\n if (wfFile.exists()) {\n success &= wfFile.delete();\n } else {\n File tempFile =\n new File(loc, WorkflowPersistor.TEMPLATE_FILE);\n success &= tempFile.delete();\n }\n\n children = loc.listFiles(); // get a list w/o workflow file\n for (File child : children) {\n if (VMFileLocker.LOCK_FILE.equals(child.getName())) {\n // delete the lock file last\n continue;\n }\n boolean deletedIt = FileUtil.deleteRecursively(child);\n success &= deletedIt;\n if (!deletedIt) {\n LOGGER.error(Messages.ExplorerFileSystemUtils_15 + child.toString());\n }\n }\n\n // release lock in order to delete lock file\n VMFileLocker.unlockForVM(loc);\n // lock file resource may not exist\n File lockFile = new File(loc, VMFileLocker.LOCK_FILE);\n if (lockFile.exists()) {\n success &= lockFile.delete();\n }\n // delete the workflow directory itself\n success &= FileUtil.deleteRecursively(loc);\n } catch (CoreException e) {\n success = false;\n LOGGER.error(Messages.ExplorerFileSystemUtils_16 + wf.toString()\n + \": \" + e.getMessage(), e); //$NON-NLS-1$\n // continue with next workflow...\n }\n }\n return success;\n }", "public void deleteOutfiles(String filename) {\n Runtime runTime = Runtime.getRuntime();\n\n String[] commands = new String[]{MYSQL, mysqlDb, userFlag + mysqlUser, pwdFlag + mysqlPwd,\n executeFlag, sourceCommand + filename};\n\n try {\n Process proc = runTime.exec(commands);\n\n StreamGobbler errorGobbler = new StreamGobbler(proc.getErrorStream(), \"ERROR\");\n\n StreamGobbler outputGobbler = new StreamGobbler(proc.getInputStream(), \"OUTPUT\");\n\n errorGobbler.start();\n outputGobbler.start();\n\n try {\n if (proc.waitFor() == 1) {\n logger.error(\"Return code indicates error in deleting the load data outfiles \"\n + \"process\");\n }\n } catch (InterruptedException exception) {\n logger.error(\"Interrupted Exception while running the delete load data outfiles \"\n + \"process\", exception);\n }\n\n } catch (IOException exception) {\n logger.error(\"Attempt to spawn a DBMerge mysql process failed for file: \"\n + filename, exception);\n }\n }", "private void removePolicyContextDirectory(){\n\tString directoryName = getContextDirectoryName();\n\tFile f = new File(directoryName);\n\tif(f.exists()){\n\n // WORKAROUND: due to existence of timestamp file in given directory\n // for SE/EE synchronization\n File[] files = f.listFiles();\n if (files != null && files.length > 0) {\n for (int i = 0; i < files.length; i++) {\n files[i].delete();\n }\n }\n //WORKAROUND: End \n\n\t if (!f.delete()) {\n String defMsg = \"Failure removing policy context directory: \"+directoryName;\n String msg=localStrings.getLocalString(\"pc.file_delete_error\", defMsg);\n\t\tlogger.log(Level.SEVERE,msg);\n\t\tthrow new RuntimeException(defMsg);\n\t } else if(logger.isLoggable(Level.FINE)){\n\t\tlogger.fine(\"JACC Policy Provider: Policy context directory removed: \"+directoryName);\n\t }\n\n File appDir = f.getParentFile();\n // WORKAROUND: due to existence of timestamp file in given directory\n // for SE/EE synchronization\n File[] fs = appDir.listFiles();\n if (fs != null && fs.length > 0) {\n boolean hasDir = false;\n for (int i = 0; i < fs.length; i++) {\n if (fs[i].isDirectory()) {\n hasDir = true;\n break;\n }\n }\n if (!hasDir) {\n for (int i = 0; i < fs.length; i++) {\n fs[i].delete();\n }\n }\n }\n //WORKAROUND: End \n\n File[] moduleDirs = appDir.listFiles();\n if (moduleDirs == null || moduleDirs.length == 0) {\n if (!appDir.delete()) {\n String defMsg = \"Failure removing policy context directory: \" + appDir;\n String msg = localStrings.getLocalString(\"pc.file_delete_error\", defMsg);\n\t\t logger.log(Level.SEVERE,msg);\n\t\t throw new RuntimeException(defMsg);\n }\n }\n\t}\n }", "public abstract void stopAcceptingFiles();", "public void deleteTemporaryFiles() {\n if (!shouldReap()) {\n return;\n }\n\n for (File file : temporaryFiles) {\n try {\n FileHandler.delete(file);\n } catch (UncheckedIOException ignore) {\n // ignore; an interrupt will already have been logged.\n }\n }\n }", "protected void remove(String filename) throws IOException {\n\t\tthrow new IOException( \"not implemented\" ); //TODO map this to the FileSystem\n\t}", "public void removeFilesFromUser(\r\n registry.ClientRegistryStub.RemoveFilesFromUser removeFilesFromUser6\r\n\r\n ) throws java.rmi.RemoteException\r\n \r\n \r\n {\r\n org.apache.axis2.context.MessageContext _messageContext = null;\r\n\r\n \r\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[4].getName());\r\n _operationClient.getOptions().setAction(\"urn:removeFilesFromUser\");\r\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\r\n\r\n \r\n \r\n addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\"&\");\r\n \r\n org.apache.axiom.soap.SOAPEnvelope env = null;\r\n _messageContext = new org.apache.axis2.context.MessageContext();\r\n\r\n \r\n //Style is Doc.\r\n \r\n \r\n env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),\r\n removeFilesFromUser6,\r\n optimizeContent(new javax.xml.namespace.QName(\"http://registry\",\r\n \"removeFilesFromUser\")),new javax.xml.namespace.QName(\"http://registry\",\r\n \"removeFilesFromUser\"));\r\n \r\n\r\n //adding SOAP soap_headers\r\n _serviceClient.addHeadersToEnvelope(env);\r\n // create message context with that soap envelope\r\n\r\n _messageContext.setEnvelope(env);\r\n\r\n // add the message contxt to the operation client\r\n _operationClient.addMessageContext(_messageContext);\r\n\r\n _operationClient.execute(true);\r\n\r\n \r\n if (_messageContext.getTransportOut() != null) {\r\n _messageContext.getTransportOut().getSender().cleanup(_messageContext);\r\n }\r\n \r\n return;\r\n }", "private void m50956b() {\n if (!C8626b.m50749b() && !C8626b.m50748a()) {\n try {\n File file = new File(this.f36887b.getExternalFilesDir(null) + \"/.logcache\");\n if (file.exists() && file.isDirectory()) {\n for (File file2 : file.listFiles()) {\n file2.delete();\n }\n }\n } catch (NullPointerException unused) {\n }\n }\n }", "public static void rmBirtRpts(String[] fileNameArr, String userName)\n\t{\n\t\trmDumbFiles(fileNameArr, userName);\n\t\t//2. Delete dumb rpt data from table BSM_REPORT\n\t\tdeleteDumbFileDataFromDb(fileNameArr, userName);\n\t}", "public void removeAllOriginalFilename() {\r\n\t\tBase.removeAll(this.model, this.getResource(), ORIGINALFILENAME);\r\n\t}", "public void cleanDirs() {\n\t\tfor (File f : files) {\n\t\t\tFileUtils.deleteDir(f.toString());\n\t\t}\n\t}", "@Override\n\t\t\tpublic boolean accept(File dir, String filename) {\n\t\t\t\tif(filename.endsWith(\".wmm\"))\n\t\t\t\t{\n\t\t\t\t\tnew File(dir,filename).delete();\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}", "void rejectFiles(String[] fileIds,String[] commentList,String userId)throws LMSException;", "public void deletePendingReports() {\r\n String[] filesList = getCrashReportFilesList();\r\n if (filesList != null) {\r\n for (String fileName : filesList) {\r\n new File(mContext.getFilesDir(), fileName).delete();\r\n }\r\n }\r\n }", "@Override\r\n\tpublic void remFile(String path) {\n\t\t\r\n\t}", "public DBMaker deleteFilesAfterClose(){\n this.deleteFilesAfterCloseFlag = true;\n return this;\n }", "protected static void deleteOldFiles(String[] deleteFiles) {\n\t\t// Deletes Old Modpack Files\n\n\t\tSystem.out.println(\"Deleting old modpack files...\");\n\n\t\tif (downloaded) {\n\t\t\tif (deleteFiles != null) {\n\t\t\t\tfor (int i = 0; i < deleteFiles.length; i++) {\n\t\t\t\t\tFile file = new File(deleteFiles[i]);\n\t\t\t\t\tif (file.exists()) {\n\t\t\t\t\t\tFileUtil.sexyDelete(deleteFiles[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tFile cfgs = new File(configtarget);\n\t\t\tif (cfgs.exists()) {\n\t\t\t\tFileUtil.sexyDelete(configtarget);\n\t\t\t}\n\n\t\t\tFile mods = new File(modstarget);\n\t\t\tif (mods.exists()) {\n\t\t\t\tFileUtil.sexyDelete(modstarget);\n\t\t\t}\n\t\t}\n\t}", "public void deleteDownloadedFiles() {\n if (sDocPath.listFiles() == null || sDocPath.listFiles().length == 0) {\n return;\n }\n\n for (File file : sDocPath.listFiles()) {\n deleteFile(file);\n }\n }", "@Override\n\tpublic void fileDelete(int file_num) {\n\t\tworkMapper.fileDelete(file_num);\n\t}", "@Synchronized\r\n public void cleanTransferModelRecordsPeriodically() {\r\n try {\r\n ArrayList<Long> arrayList = getTransferModelsListIds();\r\n ArrayList<String> arrayListToDelete = new ArrayList<>();\r\n if (!arrayList.isEmpty() && arrayList.size() > 20) {\r\n for (int i = 19; i < arrayList.size(); i++) {\r\n arrayListToDelete.add(arrayList.get(i) + \"\");\r\n }\r\n String[] itemIds = arrayListToDelete.toArray(new String[arrayListToDelete.size()]);\r\n if (itemIds != null && itemIds.length > 0) {\r\n databaseHandler.getWritableDatabase();\r\n databaseHandler.deleteData(TableTransferModel.TABLE_NAME, TableTransferModel.id + \"=?\", itemIds);\r\n }\r\n }\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n FirebaseCrashlytics.getInstance().recordException(e);\r\n }\r\n }", "public void deleteFiles(Path[] files)\n {\n delete_files = files;\n }", "private void prune(java.io.File localDir, List<File> driveFiles, boolean dir) {\n java.io.File[] localArray = localDir.listFiles();\n for (java.io.File f : localArray) {\n if (!dir) {\n // only consider folders\n if (!f.isDirectory())\n continue;\n } else {\n // only consider files\n if (f.isDirectory())\n continue;\n }\n boolean found = false;\n String lname = f.getName();\n for (File gf : driveFiles) {\n String gname = gf.getTitle();\n if (lname.equals(gname))\n found = true;\n }\n if (!found) {\n Log.e(\"DELETE PRUNE\", f.getParentFile().getName() + \"/\" + f.getName());\n deleteFile(f);\n }\n }\n }", "public void removeRlsSourceFile(IAstRlsSourceFile rlsFile);", "@AfterClass(groups ={\"All\"})\n\tpublic void deleteFolder() {\n\t\ttry {\n\t\t\tUserAccount account = dciFunctions.getUserAccount(suiteData);\n\t\t\tUniversalApi universalApi = dciFunctions.getUniversalApi(suiteData, account);\n\t\t\tif(suiteData.getSaasApp().equalsIgnoreCase(\"Salesforce\")){\n\t\t\t\tfor(String id:uploadId){\n\t\t\t\t\tMap<String,String> fileInfo = new HashMap<String,String> ();\n\t\t\t\t\tfileInfo.put(\"fileId\", id);\n\t\t\t\t\tdciFunctions.deleteFile(universalApi, suiteData, fileInfo);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tdciFunctions.deleteFolder(universalApi, suiteData, folderInfo);\n\t\t\t}\n\t\t} catch (Exception ex) {\n\t\t\tLogger.info(\"Issue with Delete Folder Operation \" + ex.getLocalizedMessage());\n\t\t}\n\t}", "private void handleRmd(String dir) {\n String filename = currDirectory;\n\n // only alphanumeric folder names are allowed\n if (dir != null && dir.matches(\"^[a-zA-Z0-9]+$\")) {\n filename = filename + fileSeparator + dir;\n\n // check if file exists, is directory\n File d = new File(filename);\n\n if (d.exists() && d.isDirectory()) {\n d.delete();\n\n sendMsgToClient(\"250 Directory was successfully removed\");\n } else {\n sendMsgToClient(\"550 Requested action not taken. File unavailable.\");\n }\n } else {\n sendMsgToClient(\"550 Invalid file name.\");\n }\n\n }", "public void removeFileFromList(ChatFile file){\n\t\tfilelist.remove(file);\t\t\t\n\t}", "@TestFor(issues = \"TW-42737\")\n public void test_directory_remove() throws Exception {\n CommitPatchBuilder patchBuilder = myCommitSupport.getCommitPatchBuilder(myRoot);\n patchBuilder.createFile(\"dir/file\", new ByteArrayInputStream(\"content\".getBytes()));\n patchBuilder.createFile(\"dir2/file\", new ByteArrayInputStream(\"content\".getBytes()));\n patchBuilder.commit(new CommitSettingsImpl(\"user\", \"Create dir with file\"));\n patchBuilder.dispose();\n\n RepositoryStateData state1 = myGit.getCurrentState(myRoot);\n\n patchBuilder = myCommitSupport.getCommitPatchBuilder(myRoot);\n patchBuilder.deleteDirectory(\"dir\");\n patchBuilder.commit(new CommitSettingsImpl(\"user\", \"Delete dir\"));\n patchBuilder.dispose();\n\n RepositoryStateData state2 = myGit.getCurrentState(myRoot);\n\n List<ModificationData> changes = myGit.getCollectChangesPolicy().collectChanges(myRoot, state1, state2, CheckoutRules.DEFAULT);\n then(changes).hasSize(1);\n then(changes.get(0).getChanges()).extracting(\"fileName\", \"type\").containsOnly(Tuple.tuple(\"dir/file\", VcsChange.Type.REMOVED));\n }", "public synchronized void cleanup() {\n\t\tString[] children = mStorageDirectory.list();\n\t\tif (children != null) { // children will be null if the directory does\n\t\t\t\t\t\t\t\t// not exist.\n\t\t\tfor (int i = 0; i < children.length; i++) { // remove too small file\n\t\t\t\tFile child = new File(mStorageDirectory, children[i]);\n\t\t\t\tif (!child.equals(new File(mStorageDirectory, NOMEDIA))\n\t\t\t\t\t\t&& child.length() <= MIN_FILE_SIZE_IN_BYTES) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tchild.delete();\n\t\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}", "public void deleteAdbLogFiles() {\n\t\t\n\t\ttry {\n\n\n\t\t\tSystem.out.println(\"<-----------------------DELETING ADB LOG Files----------------->\");\n\n\t\t\tFile dir = new File(\"src/test/resources/adbLogs\");\n\t\t\tif(dir.isDirectory() == false) \n\t\t\t{\n\t\t\t\tSystem.out.println(\"Not a directory. Do nothing\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tFile[] listFiles = dir.listFiles();\n\t\t\tfor(File file : listFiles)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Deleting \"+file.getName());\n\t\t\t\tfile.delete();\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\n\t\t\te.printStackTrace();\n\n\t\t}\n\n\n\t}", "@Override\n public void onRemoval(final RemovalNotification<String, Optional<File>> notification) {\n if (!notification.getKey().endsWith(\"/\") && tempDirectory != null && notification.getValue().isPresent())\n FileRemovals.delete(notification.getValue().get());\n }", "@Override\n\tpublic void deleteUploadedFiles(AuthenticationToken token, String uploadedDirectory, List<String> uploadedFiles) throws PermissionDeniedException, FileDeleteFailedException {\n\t\tFile file = new File(uploadedDirectory);\n\t\tFile[] childFiles = file.listFiles();\n\t\tfor(File child : childFiles){\n\t\t\tif(child.isFile() && uploadedFiles.contains(child.getName())){\n\t\t\t\tdeleteFile(token, child.getAbsolutePath());\n\t\t\t}\n\t\t}\t\n\t}", "public void removeRafProcessList(List<RafProcess> rafProcessList);", "@AfterClass\r\n\tpublic static void cleanupBoogiePrinterFiles() {\r\n\r\n\t\tfinal File root = getRootFolder(ROOT_FOLDER);\r\n\r\n\t\tCollection<File> files = TestUtil.getFiles(root, new String[] { \".bpl\" });\r\n\t\tfiles = TestUtil.filterFiles(files, TEMPORARY_BOOGIE_FILENAME_PATTERN);\r\n\r\n\t\tif (files.isEmpty()) {\r\n\t\t\tSystem.out.println(\r\n\t\t\t\t\tString.format(\"No cleanup of %s necessary, no files matching the pattern %s have been found\",\r\n\t\t\t\t\t\t\tROOT_FOLDER, TEMPORARY_BOOGIE_FILENAME_PATTERN));\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tSystem.out.println(String.format(\"Begin cleanup of %s\", ROOT_FOLDER));\r\n\t\tfor (final File f : files) {\r\n\t\t\ttry {\r\n\t\t\t\tif (f.delete()) {\r\n\t\t\t\t\tSystem.out.println(String.format(\"Sucessfully deleted %s\", f.getAbsolutePath()));\r\n\t\t\t\t} else {\r\n\t\t\t\t\tSystem.out.println(String.format(\"Deleteing %s failed\", f.getAbsolutePath()));\r\n\t\t\t\t}\r\n\t\t\t} catch (final SecurityException e) {\r\n\t\t\t\tSystem.err.println(String.format(\"Exception while deleting file %s\", f));\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void deleteSelectedFile() {\r\n\t\tString sel = this.displayFileNames.getSelectedValue();\r\n\t\tif(sel != null) {\r\n\t\t\tFileModel model = FileData.getFileModel(sel);\r\n\t\t\tFileType type = model.getFileType();\r\n\t\t\tFileData.deleteFileModel(type);\r\n\t\t\tthis.setButtonEnabled(type);\r\n\t\t\tthis.loadFileNames();\r\n\t\t\tthis.updateColumnSelections(type);\r\n\t\t\tColumnData.clearMatchedCells(type);\r\n\t\t}\r\n\t}" ]
[ "0.65396726", "0.6352614", "0.6048669", "0.59721357", "0.5945105", "0.5917453", "0.59125966", "0.574722", "0.5708152", "0.57081187", "0.565496", "0.5654443", "0.5643784", "0.56397754", "0.562812", "0.56139934", "0.56137455", "0.5613269", "0.5607443", "0.5604167", "0.55915177", "0.5556266", "0.5538492", "0.5528461", "0.5506838", "0.54868007", "0.54736274", "0.5450592", "0.54503703", "0.544762", "0.54473764", "0.535992", "0.53588444", "0.5356059", "0.53556776", "0.5339338", "0.5336124", "0.5293912", "0.5289604", "0.5285636", "0.5285021", "0.52849036", "0.52797824", "0.5270241", "0.5243352", "0.5239733", "0.5230304", "0.5218143", "0.52075076", "0.5206193", "0.51941866", "0.51694566", "0.51658076", "0.5157532", "0.5155039", "0.5153675", "0.51532257", "0.5151577", "0.5127149", "0.51270944", "0.5120941", "0.51196826", "0.51192695", "0.51180094", "0.51178235", "0.5114905", "0.5112262", "0.51112133", "0.51099306", "0.5101182", "0.5100806", "0.5099786", "0.50890106", "0.5083623", "0.5083527", "0.5078718", "0.5077964", "0.50646925", "0.505327", "0.5049195", "0.50410163", "0.5031526", "0.50301474", "0.50266814", "0.50137013", "0.50121903", "0.50089496", "0.5006797", "0.50037116", "0.50011367", "0.49933976", "0.49893838", "0.49837202", "0.49698135", "0.49651715", "0.49619195", "0.49601683", "0.4957766", "0.4949854", "0.49474883" ]
0.6377753
1
Will look for all files named xxxx.mr in the given directory and those for which xxxx seems to be a valid PDB code will use them as an PDB MR file. It will issue warnings for files ending with .mr for which xxxx doesn't seem to be a PDB code.
public static ArrayList getEntriesFromMRFiles( String dir ) { ArrayList entries = new ArrayList(); File rdir = new File( dir ); String[] mr_files = rdir.list( new FilenameFilter() { public boolean accept(File d, String name) { return name.endsWith( ".mr" ); } }); if (mr_files == null) { General.showWarning("Found NO entries on file in directory: " + dir); return (entries); } File f; String fname, entry_code; // Check if the code conforms for (int i=0; i<mr_files.length; i++) { f = new File(mr_files[i]); fname = f.getPath(); entry_code = fname.substring(0,4); // Check whether that's reasonable by matching against reg.exp. if ( Wattos.Utils.Strings.is_pdb_code( entry_code ) ) { entries.add( entry_code ); } else { General.showWarning("Skipping this file."); General.showWarning("String for filename ["+fname+ "] doesn't look like a pdb code: " + entry_code); } } Collections.sort(entries); return (entries); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void processDirectory(String dirName, DraftStatus minimalDraftStatus)\n throws IOException, ParseException {\n File dir = new File(outputDir + dirName);\n if (!dir.exists()) {\n dir.mkdirs();\n }\n SupplementalDataInfo sdi = SupplementalDataInfo.getInstance(CldrUtility.DEFAULT_SUPPLEMENTAL_DIRECTORY);\n Factory cldrFactory = Factory.make(\n cldrCommonDir + dirName + \"/\", \".*\");\n Set<String> files = cldrFactory.getAvailable();\n for (String filename : files) {\n if (LdmlConvertRules.IGNORE_FILE_SET.contains(filename)) {\n continue;\n }\n if (!filename.matches(match)) {\n continue;\n }\n\n System.out.println(\"Processing file \" + dirName + \"/\" + filename);\n String pathPrefix;\n CLDRFile file = cldrFactory.make(filename, resolve && dirName.equals(MAIN), minimalDraftStatus);\n\n sectionItems.clear();\n if (dirName.equals(MAIN)) {\n pathPrefix = \"/cldr/\" + dirName + \"/\" + filename.replaceAll(\"_\", \"-\") + \"/\";\n } else {\n pathPrefix = \"/cldr/\" + dirName + \"/\";\n }\n mapPathsToSections(file, pathPrefix, sdi);\n\n String outputDirname;\n if (dirName.equals(MAIN)) {\n outputDirname = outputDir + dirName + File.separator + filename.replaceAll(\"_\", \"-\");\n } else {\n outputDirname = outputDir + dirName;\n }\n convertCldrItems(outputDirname, pathPrefix);\n }\n }", "private void validateReflexMapFile(String mapToCheck) throws FileNotFoundException\n {\n //Initialize the map scanner\n reflexValidator = new Scanner(new File(mapToCheck));\n\n if (reflexValidator.next().contains(\"reflex\"))\n {\n reflexValidated = true;\n System.out.println(\"\\nThis is a valid Reflex Arena map file\");\n }\n\n else\n {\n System.out.println(\"\\nThis is not a Reflex Arena map file\");\n }\n }", "private Map<String, ModuleReference> scanDirectory(Path dir)\n throws IOException\n {\n // The map of name -> mref of modules found in this directory.\n Map<String, ModuleReference> nameToReference = new HashMap<>();\n\n try (DirectoryStream<Path> stream = Files.newDirectoryStream(dir)) {\n for (Path entry : stream) {\n BasicFileAttributes attrs;\n try {\n attrs = Files.readAttributes(entry, BasicFileAttributes.class);\n } catch (NoSuchFileException ignore) {\n // file has been removed or moved, ignore for now\n continue;\n }\n\n ModuleReference mref = readModule(entry, attrs);\n\n // module found\n if (mref != null) {\n // can have at most one version of a module in the directory\n String name = mref.descriptor().name();\n ModuleReference previous = nameToReference.put(name, mref);\n if (previous != null) {\n String fn1 = fileName(mref);\n String fn2 = fileName(previous);\n throw new FindException(\"Two versions of module \"\n + name + \" found in \" + dir\n + \" (\" + fn1 + \" and \" + fn2 + \")\");\n }\n }\n }\n }\n\n return nameToReference;\n }", "public static boolean removeMRFiles( String dir, ArrayList entries_todelete ) {\n \n for (Iterator i=entries_todelete.iterator(); i.hasNext();) {\n String entry_code = (String) i.next();\n String fname = dir + File.separator + entry_code + \".mr\";\n File f = new File(fname);\n if ( ! f.delete() ) {\n General.showError(\"in MRAnnotate.removeMRFiles found:\");\n General.showError(\"Deleting the annotated MR file [\"+fname+\"]\");\n return false;\n } else {\n General.showOutput(\"Deleted the annotated MR file for entry: [\"+entry_code+\"]\");\n }\n }\n return true;\n }", "public IAstRlsSourceFile findRlsFile(int langCode);", "String findPhastConsFile(String dirName, String regex) {\n\t\ttry {\n\t\t\tFile dir = new File(dirName);\n\t\t\tfor (File f : dir.listFiles()) {\n\t\t\t\tString fname = f.getCanonicalPath();\n\t\t\t\tif (fname.matches(regex)) return fname;\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\t// Do nothing\n\t\t}\n\n\t\tLog.info(\"Cannot find any file in directory '\" + dirName + \"' matching regular expression '\" + regex + \"'\");\n\t\treturn null;\n\t}", "private static void processRepository(File repo) {\n System.out.println(\"Processing repository: \" + repo);\n for (File fileOrDir : repo.listFiles()) {\n if (fileOrDir.isDirectory()) {\n processModule(fileOrDir);\n }\n }\n }", "public void parseFile(File dir) {\r\n\t\tFile[] files = dir.listFiles();\r\n\t\tfor(int i = 0; i < files.length; i++) {\r\n\t\t\tif(files[i].isDirectory()) {\r\n\t\t\t\tparseFile(files[i]);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tif(!files[i].exists()) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tString fileName = files[i].getName();\r\n\t\t\t\tif(fileName.toLowerCase().endsWith(\".json\")) {\r\n\t\t\t\t\twq.execute(new Worker(library, files[i]));\r\n\t\t\t\t}\t\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private static boolean processFile(final File file){\n \tif (file.isDirectory()){\r\n\t\t\tfinal int total = file.listFiles(filter).length;\r\n\t\t\tint count = 1;\r\n\t\t\tif (isDebug){\r\n\t\t\t\tSystem.out.println(\"Found \" + total + \" items in \" + file.getPath());\r\n\t\t\t}\r\n \t\tfor (final File subFile : file.listFiles(filter)){\r\n\t\t\t\tif (subFile.getPath().endsWith(\".cbr\")){\r\n\t\t\t\t\tSystem.out.println(\"Processing item \" + count + \" of \" + total + \" in \" + file.getPath());\r\n\t\t\t\t}\r\n\t\t\t\tif (file.getPath().contains(\" \")){\r\n\t\t\t\t\tSystem.out.println(\"Path contains space: '\" + file.getPath() + \"'\");\r\n\t\t\t\t\tfinal File newFile = new File(file.getPath().replace(\" \",\"_\"));\r\n\t\t\t\t\tif (newFile.exists()){\r\n\t\t\t\t\t\tSystem.out.println(\"There is a file whose path contains space: '\" + file.getPath() + \"', and another file with the same name, but with underscores instead of spaces. Sort this out before proceeding.\");\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (file.renameTo(newFile)){\r\n\t\t\t\t\t\tSystem.out.println(\"rename succeeded\");\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tSystem.out.println(\"rename failed\");\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (!processFile(subFile)){\r\n\t\t\t\t\t//Error encountered\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t\tcount++;\r\n\t\t\t}\r\n\t\t\treturn true;\r\n \t}\r\n \t\r\n \tif (!file.getPath().endsWith(\".cbr\")){\r\n \t\tif (isDebug){\r\n \t\t\tSystem.out.println(\"File is not .cbr. Skipping \" + file.getPath());\r\n \t\t}\r\n return true;\r\n }\r\n \r\n if (isDebug){\r\n\t\t\tSystem.out.println(\"CBR file: \" + file);\r\n\t\t}\r\n\t\t\r\n //Make sure this file hasn't already been unrarred\r\n final String fileNameWithExtension = file.getPath().substring(1 + file.getPath().lastIndexOf(File.separator));\r\n final String fileName = fileNameWithExtension.substring(0, fileNameWithExtension.lastIndexOf(\".\"));\r\n //System.out.println(\"File name: \" + fileName);\r\n boolean foundMatchingCbz = false;\r\n for (final File searchFile : file.getParentFile().listFiles()){//search without filter to find matching cbz file\r\n \tif (searchFile.getPath().endsWith(fileName + \".cbz\")) {\r\n \tfoundMatchingCbz = true;\r\n break;\r\n }\r\n }\r\n if (foundMatchingCbz){\r\n \tSystem.out.println(\"Skipping this file because it seems to have already been unrarred and zipped: \" + file.getPath());\r\n return true;\r\n }\r\n\r\n\t\tfinal String pathTempFileName = cleanFileName(fileName);\r\n\t\tfinal File pathTemp = new File(file.getParentFile().getPath() + File.separator + fileName + \"_temp\");\r\n\t\tif (!pathTemp.exists()){\r\n\t\t\tif (isDebug){\r\n\t\t\t\tSystem.out.println(\"Temp folder for this cbr file doesn't exist. (\" + pathTemp.getPath() + \") Creating it.\");\r\n\t\t\t}\r\n try{\r\n boolean mkTempResult = pathTemp.mkdir();\r\n if (!mkTempResult){\r\n \t\t\tSystem.out.println(\"Failed to create \" + pathTemp.getPath());\r\n return false;\r\n }\r\n }catch(SecurityException securityException){\r\n \t\t\tSystem.out.println(\"Caught securityException while creating \" + pathTemp.getPath());\r\n return false;\r\n }\r\n\t\t}else{\r\n\t\t\tSystem.out.println(\"Temp folder exists. (\" + pathTemp.getPath() + \") That's weird. \\n\"\r\n\t\t\t\t+ \"A previous run didn't complete properly. Fix that before running this again.\");\r\n\t\t\treturn false;\r\n }\r\n \r\n if (isDebug){\r\n\t if (!pathTemp.exists()){\r\n \t \t//It should definitely exist now. If it doesn't something went wrong\r\n \t\tSystem.out.println(\"Temp folder for this cbr file doesn't exist. (\" + pathTemp.getPath() + \") Something went wrong.\");\r\n \t\treturn false;\r\n \t}else{\r\n\t \tSystem.out.println(\"Temp folder for this cbr file exists. (\" + pathTemp.getPath() + \".\");\r\n \t }\r\n }\r\n \r\n //Temp folder should be empty\r\n if (pathTemp.list().length > 0){\r\n\t\t\tSystem.out.println(\"Temp folder should empty but is not. Please sort this out before retrying: \" + pathTemp.getPath());\r\n return false;\r\n }\r\n \r\n //Unrar this file to a folder in the temp folder\r\n if (isDebug){\r\n \tSystem.out.println(\"Unrarring: \" + file.getPath());\r\n }\r\n runProcUnrar(file.getPath());\r\n\r\n //There should then be just one item (the afore mentioned folder) in temp\r\n /*if (pathTemp.list().length != 1){\r\n \tSystem.out.print(\"Something is wrong. \");\r\n\t if (pathTemp.list().length > 1){\r\n \t \tSystem.out.println(\"More than one item in temp folder after unrarring: \" + pathTemp.getPath());\r\n }else{\r\n \tSystem.out.println(\"No item in temp folder after unrarring: \" + pathTemp.getPath());\r\n }\r\n \tbreak;\r\n }*/\r\n\r\n //Make a name for the new cbz file\r\n final String name = fileName /*pathTemp.list()[0].replace(' ', '_').replaceAll(\"[^a-zA-Z0-9_]\",\"\") */+ \".cbz\";\r\n //System.out.println(\"Name: \" + name);\r\n\r\n //Output a zip file to this folder with this name (param 1), using these contents (param 2)\r\n runProcZip(file.getParentFile().getPath() + File.separator + name, pathTemp.getPath()+\"/.\");\r\n\r\n //Clean up after yourself\r\n runProcCleanTemp(pathTemp.getPath(), true);\r\n \treturn true;\r\n }", "public void compile(MindFile f) {\n \t\t\n \t}", "public void runForEachSample(String dirName, String fnamePattern){\n System.out.println(\"Getting all files with reads per transcripts counts. Files names finish with \" + fnamePattern);\n File dir = new File(dirName);\n for (File ch : dir.listFiles()) {\n if (ch.isDirectory())\n for (File child : ch.listFiles()){\n if (child.getName().matches(fnamePattern)){\n try {\n getSNPStatisticsPerSample(child.getPath());\n } catch (IOException ex) {\n Logger.getLogger(GetAllStatisticsRNAseq.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }\n }\n }", "public void mo83570c() {\n File[] listFiles;\n File file = new File(this.f60297d);\n if (file.isDirectory() && (listFiles = file.listFiles()) != null && listFiles.length >= this.f60294a) {\n Arrays.sort(listFiles, this.f60295b);\n for (int i = 0; i < listFiles.length && listFiles.length >= this.f60294a; i++) {\n File file2 = listFiles[i];\n if (!this.f60299f.contains(file2)) {\n ArgusLogger.m85574b(String.format(C6969H.m41409d(\"G4D8AC619BE22AF20E809D047FEE1C6C47DC3D008AD3FB969E71DD05BE6EAD1D26DC3D008AD3FB969EA079D41E6A5D1D26880DD1FBB70E36CF547\"), file2.getPath()));\n mo83569b(Collections.singleton(file2));\n }\n }\n }\n }", "public ScanReplace(String file, String startDir)\n {\n confFileName = file;\n startPath = Paths.get(startDir);\n fileSpec = \"*.*\";\n\n ReadConfig();\n\n System.out.println(\"Directory,Filename,Line Number, Sub Line Number, Matching Line\");\n FindFiles(startPath.toAbsolutePath());\n\n SummaryReport();\n }", "private native void setDefaultRealmFileDirectory(String fileDir, AssetManager assets);", "private void checkFileStatus() throws CustomException, IOException\n\t{\n\t\t//For all .mgf files\n\t\tfor (int i=0; i<mgfFiles.size(); i++)\n\t\t{\n\n\t\t\tString resultFileName = \n\t\t\t\t\tmgfFiles.get(i).substring(0,mgfFiles.get(i).lastIndexOf(\".\"))+\"_Results.csv\";\n\t\t\t//TODO: Cannot write files if checking for file. \n\t\t\t/*\n\t\t\tif (isFileUnlocked(resultFileName))\n\t\t\t\tthrow new CustomException(\"Please close \"+resultFileName, null);\n\t\t\t */\n\t\t}\n\n\t}", "private void processDir(final String filename) throws FileNotFoundException, IOException, RepositoryException,\n RDFHandlerException\n {\n final File dataDir = new File(filename);\n System.out.println(\"Using data directory: \" + dataDir);\n\n // get the data files\n final File[] dataFiles = dataDir.listFiles(new FilenameFilter()\n {\n @Override\n public boolean accept(final File dir, final String name)\n {\n return name.contains(\"heartrate\") && (name.endsWith(\"csv\") || name.endsWith(\"CSV\"));\n }\n });\n // want to make sure we only create each person and sensor once\n Arrays.sort(dataFiles);\n\n // FIXME testing with just 1 file to start\n final File[] testFiles = dataFiles;\n // testFiles[0] = dataFiles[0];\n\n int count = 0;\n\n for (final File file : testFiles)\n {\n final String oldPid = currentPid;\n\n System.out.println(\"processing \" + file);\n\n try\n {\n parseFilename(file);\n\n // did we change people?\n if (oldPid != currentPid)\n {\n createNewPersonHeartRate();\n }\n\n repoConn.begin();\n count += processFileHeartRate(file);\n repoConn.commit();\n\n System.out.println(String.format(\" %,d records\", Integer.valueOf(count)));\n }\n catch (final NumberFormatException e)\n {\n System.err.println(\"Cannot read the date from the file format\");\n }\n }\n }", "protected Set<SModule> processModuleFiles(SRepository repo, final Collection<File> moduleSourceDescriptorFiles) {\n Set<SModule> modules = new LinkedHashSet<SModule>();\n\n // XXX need a way to figure which FS to use here. Technically, it should come from a project as we are going to\n // use these modules as part of the project. OTOH, we know these are local FS files.\n final IFileSystem fs = myEnvironment.getPlatform().findComponent(VFSManager.class).getFileSystem(VFSManager.FILE_FS);\n DescriptorIOFacade descriptorIOFacade = myEnvironment.getPlatform().findComponent(DescriptorIOFacade.class);\n final ModulesMiner mminer = new ModulesMiner(Collections.<IFile>emptySet(), descriptorIOFacade);\n for (File df : CollectionSequence.fromCollection(moduleSourceDescriptorFiles)) {\n IFile descriptorFile = fs.getFile(df);\n if (descriptorIOFacade.fromFileType(descriptorFile) == null) {\n info(String.format(\"File %s doesn't point to module descriptor, ignored\", moduleSourceDescriptorFiles));\n continue;\n }\n mminer.collectModules(descriptorFile);\n }\n ModuleRepositoryFacade mrf = new ModuleRepositoryFacade(repo);\n final SRepositoryExt repoExt = ((SRepositoryExt) mrf.getRepository());\n for (ModulesMiner.ModuleHandle mh : mminer.getCollectedModules()) {\n // seems reasonable just to instantiate a module here and leave its registration to caller\n // however, at the moment, Generator modules need access to their source Language module, which they look up in the repository\n SModule module = repoExt.registerModule(mrf.instantiate(mh.getDescriptor(), mh.getFile()), myOwner);\n info(\"Loaded module \" + module);\n modules.add(module);\n }\n return modules;\n }", "private void findAssignmentFiles(ArrayList<File> files, String directory) {\n\n //---------- Step 1: find and uncompress zip files ----------\n if (bAutoUncompress) {\n ArrayList<File> compressedFiles = findFilesByExtension(directory, COMPRESSION_EXTENSIONS);\n for (File cFile : compressedFiles) {\n //uncompress each zip file\n String[] cmd = {\"unzip\", \"-u\", cFile.getAbsolutePath(), \"-d\", stripFileExtension(cFile.getAbsolutePath())};\n String cmdStr = \"unzip -u \\\"\" + cFile.getAbsolutePath() + \"\\\" -d \\\"\" + stripFileExtension(cFile.getAbsolutePath()) + \"\\\"\";\n console(cmdStr);\n\n try {\n Runtime r = Runtime.getRuntime();\n Process p = r.exec(cmd); //execute the unzip command\n //Process p = r.exec(\"unzip -u \\34/Users/jvolcy/work/test/JordanStill_1124140_assignsubmission_file_/P0502b.zip\\34 -d \\34/Users/jvolcy/work/test/JordanStill_1124140_assignsubmission_file_/P0502b\\34\");\n p.waitFor();\n } catch (Exception e) {\n console(\"[findAssignmentFiles()]\", e);\n }\n }\n }\n\n //---------- Step 2: find programming files in the directory ----------\n ArrayList<File> programmingFiles = findFilesByExtension(directory, PYTHON_AND_CPP_EXTENSIONS);\n if (programmingFiles.size() > 0) {\n files.addAll(programmingFiles);\n //if we found any files, we are done\n return;\n }\n\n //---------- Step 3: search for sub-directories ----------\n ArrayList<File> subDirs = getSubDirectories(directory, true);\n for (File sDir : subDirs) {\n //Step 4: recursively call findAssignmentFiles() if we find subdirectories\n findAssignmentFiles(files, sDir.toString());\n }\n\n //---------- Step 5 ----------\n //No assignment files found. This may be the end of the recursion.\n }", "private void processDir(){\n // get the location of ISAW code base\n String isaw_home=SharedData.getProperty(\"ISAW_HOME\");\n if(isaw_home==null)\n throw new InstantiationError(\"Could not find directory:ISAW_HOME is null\");\n isaw_home=FilenameUtil.setForwardSlash(isaw_home+\"/\");\n\n // get the name of the directory to check\n String dir=FilenameUtil.setForwardSlash(isaw_home\n +\"DataSetTools/parameter/\");\n\n // check that the directory is okay to work with\n if(DEBUG) System.out.println(\"Looking in \"+dir);\n File paramDir=new File(dir);\n if( !(paramDir.exists()) || !(paramDir.isDirectory()) )\n throw new InstantiationError(\"Could not find directory \" + dir);\n\n // get the list of all possible classes\n File[] files=paramDir.listFiles();\n String filename=null;\n for( int i=0 ; i<files.length ; i++ ){\n filename=checkName(files[i].toString(),isaw_home.length());\n if(filename!=null) addParameter(filename);\n }\n \n \n\n dir=FilenameUtil.setForwardSlash(isaw_home\n +\"gov/anl/ipns/Parameters/\");\n\n // check that the directory is okay to work with\n if(DEBUG) System.out.println(\"Looking in \"+dir);\n paramDir=new File(dir);\n if( !(paramDir.exists()) || !(paramDir.isDirectory()) )\n throw new InstantiationError(\"Could not find directory \" + dir);\n\n // get the list of all possible classes\n files=paramDir.listFiles();\n filename=null;\n for( int i=0 ; i<files.length ; i++ ){\n filename=checkName(files[i].toString(),isaw_home.length());\n if(filename!=null) addParameter(filename);\n }\n\n }", "public static void main(String[] args) {\n String dictionaryPath = \"/Users/johtani/tmp/dictionary/unidic-mecab-2.1.2_src\";\n // UniDic 2.3.0\n //String dictionaryPath = \"/Users/johtani/tmp/dictionary/unidic-cwj-2.3.0\";\n CsvParserSettings settings = new CsvParserSettings();\n CsvFormat format = new CsvFormat();\n format.setComment('\\0');\n settings.setFormat(format);\n CsvParser parser = new CsvParser(settings);\n\n try (DirectoryStream<Path> ds = Files.newDirectoryStream(Paths.get(dictionaryPath), \"*.csv\")){\n for (Path file : ds) {\n checkFile(parser, file);\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n System.out.println(\"Finished!\");\n }", "private void scanDirectory(final File directory) throws AnalyzerException {\n\t\tFile[] files = directory.listFiles();\n\t\tfor (File f : files) {\n\t\t\t// scan .class file\n\t\t\tif (f.isFile() && f.getName().toLowerCase().endsWith(\".class\")) {\n\t\t\t\tInputStream is = null;\n\t\t\t\ttry {\n\t\t\t\t\tis = new FileInputStream(f);\n\t\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\t\tthrow new AnalyzerException(\n\t\t\t\t\t\t\t\"Cannot read input stream from '\"\n\t\t\t\t\t\t\t\t\t+ f.getAbsolutePath() + \"'.\", e);\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tnew ClassReader(is).accept(scanVisitor,\n\t\t\t\t\t\t\tClassReader.SKIP_CODE);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tthrow new AnalyzerException(\n\t\t\t\t\t\t\t\"Cannot launch class visitor on the file '\"\n\t\t\t\t\t\t\t\t\t+ f.getAbsolutePath() + \"'.\", e);\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tis.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tthrow new AnalyzerException(\n\t\t\t\t\t\t\t\"Cannot close input stream on the file '\"\n\t\t\t\t\t\t\t\t\t+ f.getAbsolutePath() + \"'.\", e);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// loop on childs\n\t\t\t\tif (f.isDirectory()) {\n\t\t\t\t\tscanDirectory(f);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public static boolean Java_find(File dir, String name) {\n boolean flag = false;\n // TODO: find files\n File[] list = dir.listFiles();\n FileOperation.listOfFiles = new ArrayList<String>();\n FileOperation.listOfMatching = new ArrayList<String>();\n listOfAllFiles(dir);\n for(String filename:FileOperation.listOfFiles){\n if(filename.contains(name)){\n flag=true;\n listOfMatching.add(filename);\n }\n }\n return flag;\n }", "@Override\n\t\t\tpublic boolean accept(File dir, String filename) {\n\t\t\t\tif(filename.endsWith(\".wmm\"))\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}", "public Mapping(RulesDirectory rd,IRSession session, RuleSet rs){\n this.session = session;\n this.state = session.getState();\n String filename = rs.getMapPath().get(0);\n try {\n InputStream s = session.getRulesDirectory().getFileSource().openStreamSearch(\n FileType.MAP, session.getRuleSet(), filename);\n session.getState().traceTagBegin(\"loadMapping\", \"file\",filename);\n this.loadMap(s);\n session.getState().traceTagEnd(); \n } catch (FileNotFoundException e) {\n throw new RuntimeException(e);\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n }", "@Override\n public final boolean accept(File dir, String name) {\n return pattern.matcher(name).find();\n }", "public static void m6739b(File file) {\n if (file.listFiles() != null && file.listFiles().length > 1) {\n long c = m6740c(file, false);\n for (File file2 : file.listFiles()) {\n if (!file2.getName().equals(String.valueOf(c)) && !file2.getName().equals(\"stale.tmp\")) {\n m6741h(file2);\n }\n }\n }\n }", "private static void getFiles(String root, Vector files) {\n Location f = new Location(root);\n String[] subs = f.list();\n if (subs == null) subs = new String[0];\n Arrays.sort(subs);\n \n // make sure that if a config file exists, it is first on the list\n for (int i=0; i<subs.length; i++) {\n if (subs[i].endsWith(\".bioformats\") && i != 0) {\n String tmp = subs[0];\n subs[0] = subs[i];\n subs[i] = tmp;\n break;\n }\n }\n \n if (subs == null) {\n LogTools.println(\"Invalid directory: \" + root);\n return;\n }\n \n ImageReader ir = new ImageReader();\n Vector similarFiles = new Vector();\n \n for (int i=0; i<subs.length; i++) {\n LogTools.println(\"Checking file \" + subs[i]);\n subs[i] = new Location(root, subs[i]).getAbsolutePath();\n if (isBadFile(subs[i]) || similarFiles.contains(subs[i])) {\n LogTools.println(subs[i] + \" is a bad file\");\n String[] matching = new FilePattern(subs[i]).getFiles();\n for (int j=0; j<matching.length; j++) {\n similarFiles.add(new Location(root, matching[j]).getAbsolutePath());\n }\n continue;\n }\n Location file = new Location(subs[i]);\n \n if (file.isDirectory()) getFiles(subs[i], files);\n else if (file.getName().equals(\".bioformats\")) {\n // special config file for the test suite\n configFiles.add(file.getAbsolutePath());\n }\n else {\n if (ir.isThisType(subs[i])) {\n LogTools.println(\"Adding \" + subs[i]);\n files.add(file.getAbsolutePath());\n }\n else LogTools.println(subs[i] + \" has invalid type\");\n }\n file = null;\n }\n }", "MafSource readSource(File sourceFile);", "private void scan(String filename){\n\t\tverifyAutomatons();\n\t\tsymbolTable = new SymbolTable();\n\t\tprogramInternalForm = new ProgramInternalForm();\n\n\t\tString[] tokensVal = getProgramFromFile(filename);\n\n\t\tint i = 0;\n\t\twhile (i < tokensVal.length) {\n\t\t\tverifySingleTokens(tokensVal[i]);\n\t\t\ti++;\n\t\t}\n\t}", "public static boolean Java_find(File dir, String name) {\n boolean flag = false;\n // TODO: find files\n File[] fileList = dir.listFiles();\n\n for (File file : fileList) {\n if (file.getName().endsWith(name)) {\n System.out.println(file.getAbsolutePath());\n flag = true;\n } else if (file.isDirectory()) {\n boolean tempFlag = Java_find(file, name);\n if (!flag) {\n flag = tempFlag;\n }\n }\n }\n\n return flag;\n }", "@Test\n public void testGeneratorWithCustomResolverDirectory() throws Exception\n {\n File jarFile = new File(_tempDir, \"testWithResolverDirectory.jar\");\n Map<String, String> jarEntries = new HashMap<>();\n jarEntries.put(\"custom/CustomResolverFoo.pdl\", \"record CustomResolverFoo {}\");\n createJarFile(jarFile, jarEntries);\n\n // Define the expected output\n Map<String, String> expectedTypeNamesToSourceFileMap = new HashMap<>();\n expectedTypeNamesToSourceFileMap.put(\"NeedsCustomResolver\", PEGASUS_DIR + FS + \"NeedsCustomResolver.pdl\");\n expectedTypeNamesToSourceFileMap.put(\"CustomResolverFoo\", jarFile + \":custom/CustomResolverFoo.pdl\");\n\n testRunGenerator(\"NeedsCustomResolver.pdl\", expectedTypeNamesToSourceFileMap, jarFile.getCanonicalPath(),\n Collections.singletonList(\"custom\"), null);\n }", "private void processCourseFile(final String fileDir) throws IOException {\n mapReducer.preFillMap(cntMap, fileDir + File.separator + COURSE_FILE);\n }", "private static void searchFile(File fileDir) throws Exception {\n String fileName = getFileNameInput();\n File targetFile = new File(fileDir.toString() + \"\\\\\" + fileName);\n boolean fileExists = targetFile.exists();\n if (fileExists) {\n System.out.println(\"File is found on current directory.\");\n } else {\n throw new FileNotFoundException(\"No such file on current directory.\");\n }\n }", "private synchronized void m29549c() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n*/\n /*\n r6 = this;\n monitor-enter(r6);\n r0 = r6.f24853c;\t Catch:{ all -> 0x0050 }\n if (r0 == 0) goto L_0x004b;\t Catch:{ all -> 0x0050 }\n L_0x0005:\n r0 = com.google.android.m4b.maps.cg.bx.m23056a();\t Catch:{ all -> 0x0050 }\n r1 = 0;\n r2 = r6.f24854d;\t Catch:{ IOException -> 0x0035, all -> 0x0030 }\n r3 = r6.f24853c;\t Catch:{ IOException -> 0x0035, all -> 0x0030 }\n r2 = r2.openFileInput(r3);\t Catch:{ IOException -> 0x0035, all -> 0x0030 }\n if (r2 == 0) goto L_0x0027;\n L_0x0014:\n r3 = new com.google.android.m4b.maps.ar.a;\t Catch:{ IOException -> 0x0036 }\n r4 = com.google.android.m4b.maps.de.af.f19891a;\t Catch:{ IOException -> 0x0036 }\n r3.<init>(r4);\t Catch:{ IOException -> 0x0036 }\n r6.f24851a = r3;\t Catch:{ IOException -> 0x0036 }\n r3 = r6.f24851a;\t Catch:{ IOException -> 0x0036 }\n r4 = com.google.android.m4b.maps.ap.C4655c.m20771a(r2);\t Catch:{ IOException -> 0x0036 }\n r3.m20819a(r4);\t Catch:{ IOException -> 0x0036 }\n goto L_0x0029;\t Catch:{ IOException -> 0x0036 }\n L_0x0027:\n r6.f24851a = r1;\t Catch:{ IOException -> 0x0036 }\n L_0x0029:\n com.google.android.m4b.maps.cg.bx.m23057a(r0);\t Catch:{ all -> 0x0050 }\n L_0x002c:\n com.google.android.m4b.maps.ap.C4655c.m20773b(r2);\t Catch:{ all -> 0x0050 }\n goto L_0x004b;\n L_0x0030:\n r2 = move-exception;\n r5 = r2;\n r2 = r1;\n r1 = r5;\n goto L_0x0044;\n L_0x0035:\n r2 = r1;\n L_0x0036:\n r6.f24851a = r1;\t Catch:{ all -> 0x0043 }\n r1 = r6.f24854d;\t Catch:{ all -> 0x0043 }\n r3 = r6.f24853c;\t Catch:{ all -> 0x0043 }\n r1.deleteFile(r3);\t Catch:{ all -> 0x0043 }\n com.google.android.m4b.maps.cg.bx.m23057a(r0);\t Catch:{ all -> 0x0050 }\n goto L_0x002c;\t Catch:{ all -> 0x0050 }\n L_0x0043:\n r1 = move-exception;\t Catch:{ all -> 0x0050 }\n L_0x0044:\n com.google.android.m4b.maps.cg.bx.m23057a(r0);\t Catch:{ all -> 0x0050 }\n com.google.android.m4b.maps.ap.C4655c.m20773b(r2);\t Catch:{ all -> 0x0050 }\n throw r1;\t Catch:{ all -> 0x0050 }\n L_0x004b:\n r0 = 1;\t Catch:{ all -> 0x0050 }\n r6.f24852b = r0;\t Catch:{ all -> 0x0050 }\n monitor-exit(r6);\n return;\n L_0x0050:\n r0 = move-exception;\n monitor-exit(r6);\n throw r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.m4b.maps.cg.q.c():void\");\n }", "@SuppressWarnings(\"null\")\n public int processSlurpDirectory() throws MegatronException {\n int noOfFiles = 0;\n int noOfOkFiles = 0;\n \n // -- Ensure okDir and errorDir\n File okDir = null;\n File errorDir = null;\n TypedProperties globalProps = AppProperties.getInstance().getGlobalProperties();\n String slurpDirName = globalProps.getString(AppProperties.SLURP_DIR_KEY, \"slurp\");\n File slurpDir = new File(slurpDirName);\n try {\n okDir = new File(slurpDir, OK_DIR);\n FileUtil.ensureDir(okDir);\n errorDir = new File(slurpDir, ERROR_DIR);\n FileUtil.ensureDir(errorDir);\n } catch (IOException e) {\n String dirName = (errorDir != null) ? errorDir.getAbsolutePath() : okDir.getAbsolutePath(); \n String msg = \"Cannot create directory: \" + dirName;\n throw new MegatronException(msg, e);\n }\n \n // -- Process files\n File[] fileArray = slurpDir.listFiles();\n if (fileArray == null) {\n throw new MegatronException(\"Cannot retrieve file list for the slurp directory: \" + slurpDir.getAbsolutePath());\n }\n List<File> files = new ArrayList<File>(Arrays.asList(fileArray));\n Collections.sort(files, new Comparator<File>() {\n public int compare(File o1, File o2) {\n // oldest file first\n return (o1.lastModified() < o2.lastModified()) ? -1 : (o1.lastModified() == o2.lastModified() ? 0 : 1);\n }\n });\n Map<String, Long> jobTypeLastExecutedMap = new HashMap<String, Long>();\n for (Iterator<File> iterator = files.iterator(); iterator.hasNext(); ) {\n File file = iterator.next();\n if (file.isDirectory()) {\n continue;\n }\n ++noOfFiles;\n log.info(\"Processing file in the slurp directory: \" + file.getName());\n // create job type props\n String jobType = AppProperties.getInstance().mapFilenameToJobType(file.getName(), true);\n log.info(\"Job type found: \" + jobType);\n if (jobType == null) {\n String msg = \"Skipping file; cannot map job-type to file in slurp directory: \" + file.getName();\n log.error(msg);\n System.out.println(msg);\n moveFile(file, errorDir);\n continue;\n }\n // process file\n try {\n TypedProperties props = AppProperties.getInstance().createTypedPropertiesForCli(jobType);\n \n // ensure unique job name by sleeping 1 second if risk of a name clash (timestamp is in seconds)\n Long lastExecuted = jobTypeLastExecutedMap.get(jobType);\n if ((lastExecuted != null) && (System.currentTimeMillis() - lastExecuted.longValue()) < 2000L) {\n log.debug(\"Sleeps 1 second to ensure unique job name.\");\n Thread.sleep(1000L);\n }\n jobTypeLastExecutedMap.put(jobType, new Long(System.currentTimeMillis())); \n \n processFile(props, file);\n moveFile(file, okDir);\n ++noOfOkFiles;\n } catch (Exception e) {\n String msg = \"Processing of file in slurp directory failed: \" + file.getName();\n log.error(msg, e);\n System.out.println(msg);\n moveFile(file, errorDir);\n }\n }\n\n int noOfErrorFiles = noOfFiles - noOfOkFiles;\n log.info(\"Processing of the slurp directory finished. No. of files: \" + noOfFiles + \" (errors: \" + noOfErrorFiles + \").\");\n\n return noOfOkFiles;\n }", "@Test\n\tpublic void testWellknownFileAnalyzers() {\n\t\tfinal File py = new File(\"./src/test/resources/file.py\");\n\t\tFileAnalyzer fa = FileAnalyzerFactory.buildFileAnalyzer(py);\n\t\tassertTrue(fa instanceof PythonFileAnalyzer);\n\t\t\n\t\tfinal File d = new File(\"./src/test/resources\");\n\t\tfa = FileAnalyzerFactory.buildFileAnalyzer(d);\n\t\tassertTrue(fa instanceof DirAnalyzer);\n\t\t\n\t\tfinal File ja = new File(\"./src/test/resources/file.java\");\n\t\tfa = FileAnalyzerFactory.buildFileAnalyzer(ja);\n\t\tassertTrue(fa instanceof JavaFileAnalyzer2);\n\t}", "public Mapper() {\n\t\t\n\t\tmirMap = scanMapFile(\"mirMap.txt\");\n\t\tgeneMap = scanMapFile(\"geneMap.txt\");\n\t\t\n\t}", "public final void mo14831s() {\n Iterator it = ((ArrayList) mo14817d()).iterator();\n while (it.hasNext()) {\n File file = (File) it.next();\n if (file.listFiles() != null) {\n m6739b(file);\n long c = m6740c(file, false);\n if (((long) this.f6567b.mo14797a()) != c) {\n try {\n new File(new File(file, String.valueOf(c)), \"stale.tmp\").createNewFile();\n } catch (IOException unused) {\n f6563c.mo14884b(6, \"Could not write staleness marker.\", new Object[0]);\n }\n }\n for (File b : file.listFiles()) {\n m6739b(b);\n }\n }\n }\n }", "public void getSourceJavaFilesForOneRepository(File dir, FilenameFilter searchSuffix, ArrayList<File> al) {\n\n\t\tFile[] files = dir.listFiles();\t\t\n\t\tfor(File f : files) {\n\t\t\tString lowercaseName = f.getName().toLowerCase();\n\t\t\tif(lowercaseName.indexOf(\"test\")!=-1)\n\t\t\t{\n\t\t\t\t/* we do not consider test files in our study */\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t if(f.isDirectory()){\n\t\t\t\t /* iterate over every directory */\n\t\t\t\t getSourceJavaFilesForOneRepository(f, searchSuffix, al);\t\t\n\t\t\t } else {\n\t\t\t\t /* returns the desired java files */\n\t\t\t\t if(searchSuffix.accept(dir, f.getName())){\n\t\t\t\t\t al.add(f);\n\t\t\t\t }\n\t\t\t }\n\t\t\t}\n\t\t}\n\t}", "boolean readAndCompare(String jbbInstdir,String simInstdir,String jbbColldir,String simColldir){\n Logger.debug(\"Dirs : [\\n\\t\" + jbbInstdir + \",\\n\\t\" + simInstdir + \",\\n\\t\" + jbbColldir + \",\\n\\t\" + simColldir + \"\\n]\");\n\n glblAppName = null; glblAppSize = 0;\n\n boolean check = processJbbInst(jbbInstdir);\n if(!check) { Logger.warn(\"Error in jbbinst files checking \" + caseString); return check; }\n check = processSimInst(simInstdir);\n if(!check) { Logger.warn(\"Error in siminst files checking \" + caseString); return check; }\n\n check = processJbbColl(jbbColldir);\n if(!check) { Logger.warn(\"Error in jbbcoll files checking \" + caseString); return check; }\n check = processSimColl(simColldir);\n if(!check) { Logger.warn(\"Error in simcoll files checking \" + caseString); return check; }\n\n return true;\n\n }", "public static void main(String[] args) throws IOException {\n\n\n findFile();\n return;\n }", "@Test\n public void testScanFile() throws DatabaseException {\n try (Engine instance = new Engine(getSettings())) {\n instance.addFileTypeAnalyzer(new JarAnalyzer());\n File file = BaseTest.getResourceAsFile(this, \"dwr.jar\");\n Dependency dwr = instance.scanFile(file);\n file = BaseTest.getResourceAsFile(this, \"org.mortbay.jmx.jar\");\n instance.scanFile(file);\n assertEquals(2, instance.getDependencies().length);\n\n file = BaseTest.getResourceAsFile(this, \"dwr.jar\");\n Dependency secondDwr = instance.scanFile(file);\n\n assertEquals(2, instance.getDependencies().length);\n }\n }", "private String checkFilename(String str){\n\n final ArrayList<String> values = new ArrayList<String>();\n File dir = new File(path);\n String[] list = dir.list();\n int num = 1;\n String origin = str;\n if (list != null) {\n while(Arrays.asList(list).contains(str+\".m4a\")){\n str = origin + String.format(\" %03d\", num);\n num+=1;\n }\n }\n return str;\n }", "private void processFolder(File folder) {\n \t\tFile[] subFolders = folder.listFiles(new FileFilter() {\n \t\t\t@Override\n \t\t\tpublic boolean accept(File pathname) {\n \t\t\t\treturn pathname.isDirectory();\n \t\t\t}\n \t\t});\n \t\tfor (File subFolder : subFolders){\n \t\t\tprocessFolder(subFolder); \n \t\t}\n \t\tPattern nameRegex = Pattern.compile(\"([\\\\d-]+)\\\\.(pdf|epub)\", Pattern.CANON_EQ | Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE);\n \t\tFile[] files = folder.listFiles();\n \t\tfor (File file : files) {\n \t\t\tlogger.info(\"Processing file \" + file.getName());\n \t\t\tprocessLog.addNote(\"Processing file \" + file.getName());\n \t\t\tif (file.isDirectory()) {\n \t\t\t\t//TODO: Determine how to deal with nested folders?\n \t\t\t\t//processFolder(file);\n \t\t\t} else {\n \t\t\t\t// File check to see if it is of a known type\n \t\t\t\tMatcher nameMatcher = nameRegex.matcher(file.getName());\n \t\t\t\tif (nameMatcher.matches()) {\n \t\t\t\t\tImportResult importResult = new ImportResult();\n \t\t\t\t\tString isbn = nameMatcher.group(1);\n \t\t\t\t\tString fileType = nameMatcher.group(2).toLowerCase();\n \t\t\t\t\timportResult.setBaseFilename(isbn);\n \t\t\t\t\tisbn = isbn.replaceAll(\"-\", \"\");\n \t\t\t\t\timportResult.setISBN(isbn);\n \t\t\t\t\timportResult.setCoverImported(\"\");\n \t\t\t\t\t\n \t\t\t\t\ttry {\n \t\t\t\t\t\t// Get the record for the isbn\n \t\t\t\t\t\tgetRelatedRecords.setString(1, \"%\" + isbn + \"%\");\n \t\t\t\t\t\tResultSet existingRecords = getRelatedRecords.executeQuery();\n \t\t\t\t\t\tif (!existingRecords.next()){\n \t\t\t\t\t\t\t//No record found \n \t\t\t\t\t\t\tlogger.info(\"Could not find record for ISBN \" + isbn);\n \t\t\t\t\t\t\timportResult.setStatus(fileType, \"failed\", \"Could not find record for ISBN \" + isbn);\n \t\t\t\t\t\t\tprocessLog.incErrors();\n \t\t\t\t\t\t\tprocessLog.addNote(\"Could not find record for ISBN \" + isbn);\n \t\t\t\t\t\t}else{\n \t\t\t\t\t\t\tlogger.info(\"Found at least one record for \" + isbn);\n \t\t\t\t\t\t\tif (existingRecords.last()){\n \t\t\t\t\t\t\t\tif (existingRecords.getRow() >= 2){\n \t\t\t\t\t\t\t\t\tlogger.info(\"Multiple records were found for ISBN \" + isbn);\n \t\t\t\t\t\t\t\t\timportResult.setStatus(fileType, \"failed\", \"Multiple records were found for ISBN \" + isbn);\n \t\t\t\t\t\t\t\t\tprocessLog.incErrors();\n \t\t\t\t\t\t\t\t\tprocessLog.addNote(\"Multiple records were found for ISBN \" + isbn);\n \t\t\t\t\t\t\t\t}else{\n \t\t\t\t\t\t\t\t\t//We have an existing record\n \t\t\t\t\t\t\t\t\texistingRecords.first();\n \t\t\t\t\t\t\t\t\tString recordId = existingRecords.getString(\"id\");\n \t\t\t\t\t\t\t\t\tString accessType = existingRecords.getString(\"accessType\");\n \t\t\t\t\t\t\t\t\tString source = existingRecords.getString(\"source\");\n \t\t\t\t\t\t\t\t\tlogger.info(\" Attaching file to \" + recordId + \" accessType = \" + accessType + \" source=\" + source);\n \t\t\t\t\t\t\t\t\t\t\n \t\t\t\t\t\t\t\t\t// Copy the file to the library if it does not exist already\n \t\t\t\t\t\t\t\t\tFile resultsFile = new File(libraryDirectory + source + \"_\" + file.getName());\n \t\t\t\t\t\t\t\t\tif (resultsFile.exists()) {\n \t\t\t\t\t\t\t\t\t\tlogger.info(\"Skipping file because it already exists in the library\");\n \t\t\t\t\t\t\t\t\t\timportResult.setStatus(fileType, \"skipped\" ,\"File has already been copied to library\");\n \t\t\t\t\t\t\t\t\t\tprocessLog.addNote(\"Skipping file \" + file.getName() + \" because it already exists in the library\");\n \t\t\t\t\t\t\t\t\t} else {\n \t\t\t\t\t\t\t\t\t\tlogger.info(\"Importing file \" + file.getName());\n \t\t\t\t\t\t\t\t\t\t//Check to see if the file has already been added to the library.\n \t\t\t\t\t\t\t\t\t\tdoesItemExist.setString(1, file.getName());\n \t\t\t\t\t\t\t\t\t\tdoesItemExist.setString(2, recordId);\n \t\t\t\t\t\t\t\t\t\tResultSet existingItems = doesItemExist.executeQuery();\n \t\t\t\t\t\t\t\t\t\tif (existingItems.next()){\n \t\t\t\t\t\t\t\t\t\t\t//The item already exists\n \t\t\t\t\t\t\t\t\t\t\tlogger.info(\" the file has already been attached to this record\");\n \t\t\t\t\t\t\t\t\t\t\timportResult.setStatus(fileType, \"skipped\" ,\"The file has already been aded as an eContent Item\");\n \t\t\t\t\t\t\t\t\t\t\tprocessLog.addNote(\"Skipping file \" + file.getName() + \" because has already been attached to this record\");\n \t\t\t\t\t\t\t\t\t\t}else{\n \t\t\t\t\t\t\t\t\t\t\t\n \t\t\t\t\t\t\t\t\t\t\ttry {\n \t\t\t\t\t\t\t\t\t\t\t\tlogger.info(\" copying the file to library source=\" + file + \" dest=\" + resultsFile);\n \t\t\t\t\t\t\t\t\t\t\t\t//Copy the pdf file to the library\n \t\t\t\t\t\t\t\t\t\t\t\tUtil.copyFile(file, resultsFile);\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\t//Add file to acs server\n \t\t\t\t\t\t\t\t\t\t\t\tboolean addedToAcs = true;\n \t\t\t\t\t\t\t\t\t\t\t\tif (accessType.equals(\"acs\")){\n \t\t\t\t\t\t\t\t\t\t\t\t\tlogger.info(\"Adding file to the ACS server\");\n \t\t\t\t\t\t\t\t\t\t\t\t\taddedToAcs = addFileToAcsServer(fileType, resultsFile, importResult);\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\t\n \t\t\t\t\t\t\t\t\t\t\t\tif (addedToAcs){\n \t\t\t\t\t\t\t\t\t\t\t\t\t//filename, acsId, recordId, item_type, addedBy, date_added, date_updated\n \t\t\t\t\t\t\t\t\t\t\t\t\tlong curTimeSec = new Date().getTime() / 1000;\n \t\t\t\t\t\t\t\t\t\t\t\t\taddEContentItem.setString(1, resultsFile.getName());\n \t\t\t\t\t\t\t\t\t\t\t\t\taddEContentItem.setString(2, importResult.getAcsId());\n \t\t\t\t\t\t\t\t\t\t\t\t\taddEContentItem.setString(3, recordId);\n \t\t\t\t\t\t\t\t\t\t\t\t\taddEContentItem.setString(4, fileType);\n \t\t\t\t\t\t\t\t\t\t\t\t\taddEContentItem.setLong(5, -1);\n \t\t\t\t\t\t\t\t\t\t\t\t\taddEContentItem.setLong(6, curTimeSec);\n \t\t\t\t\t\t\t\t\t\t\t\t\taddEContentItem.setLong(7, curTimeSec);\n \t\t\t\t\t\t\t\t\t\t\t\t\tint rowsInserted = addEContentItem.executeUpdate();\n \t\t\t\t\t\t\t\t\t\t\t\t\tif (rowsInserted == 1){\n \t\t\t\t\t\t\t\t\t\t\t\t\t\timportResult.setStatus(fileType, \"success\", \"\");\n \t\t\t\t\t\t\t\t\t\t\t\t\t\tlogger.info(\" added to the database\");\n \t\t\t\t\t\t\t\t\t\t\t\t\t\t\n \t\t\t\t\t\t\t\t\t\t\t\t\t}else{\n \t\t\t\t\t\t\t\t\t\t\t\t\t\tlogger.info(\" file could not be added to the database\");\n \t\t\t\t\t\t\t\t\t\t\t\t\t\tprocessLog.addNote(file.getName() + \" could not be added to the database\");\n \t\t\t\t\t\t\t\t\t\t\t\t\t\tprocessLog.incErrors();\n \t\t\t\t\t\t\t\t\t\t\t\t\t}\n \t\t\t\t\t\t\t\t\t\t\t\t}else{\n \t\t\t\t\t\t\t\t\t\t\t\t\tlogger.info(\" the file could not be added to the acs server\");\n \t\t\t\t\t\t\t\t\t\t\t\t\tprocessLog.addNote(file.getName() + \" could not be added to the acs server\");\n \t\t\t\t\t\t\t\t\t\t\t\t\tprocessLog.incErrors();\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\t\n \t\t\t\t\t\t\t\t\t\t\t\tif (importResult.getSatus(fileType).equals(\"failed\")){\n \t\t\t\t\t\t\t\t\t\t\t\t\t//If we weren't able to add the file correctly, remove it so it will be processed next time. \n \t\t\t\t\t\t\t\t\t\t\t\t\tresultsFile.delete();\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\t\n \t\t\t\t\t\t\t\t\t\t\t} catch (IOException e) {\n \t\t\t\t\t\t\t\t\t\t\t\tlogger.error(\"Error copying file to record\", e);\n \t\t\t\t\t\t\t\t\t\t\t\timportResult.setStatus(fileType, \"failed\", \"Error copying file \" + e.toString());\n \t\t\t\t\t\t\t\t\t\t\t}\n \t\t\t\t\t\t\t\t\t\t}\n \t\t\t\t\t\t\t\t\t}\n \t\t\t\t\t\t\t\t}\n \t\t\t\t\t\t\t}\n \t\t\t\t\t\t}\n \t\t\t\t\t} catch (SQLException e) {\n \t\t\t\t\t\tlogger.error(\"Error finding related records\", e);\n \t\t\t\t\t\timportResult.setStatus(\"pdf\", \"failed\", \"SQL error processing file \" + e.toString());\n \t\t\t\t\t}\n \t\t\t\t\timportResults.add(importResult);\n \t\t\t\t\t//Update that another file has been processed.\n \t\t\t\t\tprocessLog.incUpdated();\n \t\t\t\t\ttry {\n \t\t\t\t\t\tupdateRecordsProcessed.setLong(1, processLog.getNumUpdates());\n \t\t\t\t\t\tupdateRecordsProcessed.setLong(2, processLog.getNumErrors());\n \t\t\t\t\t\tupdateRecordsProcessed.setLong(3, logEntryId);\n \t\t\t\t\t\tupdateRecordsProcessed.executeUpdate();\n \t\t\t\t\t} catch (SQLException e) {\n \t\t\t\t\t\tlogger.error(\"Error updating number of records processed.\", e);\n \t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tprocessLog.addNote(\" Skipping because the name is not an ISBN\");\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t\t\n \t}", "public static void fix(World world) {\n \t\tFile regionFolder = new File(Bukkit.getWorldContainer() + File.separator + world.getName() + File.separator + \"region\");\r\n \t\tif (regionFolder.exists()) {\r\n \t\t\t// Loop through all region files of the world\r\n \t\t\tint dx, dz;\r\n \t\t\tint rx, rz;\r\n \t\t\tfor (String regionFileName : regionFolder.list()) {\r\n \t\t\t\t// Validate file\r\n \t\t\t\tFile file = new File(regionFolder + File.separator + regionFileName);\r\n \t\t\t\tif (!file.isFile() || !file.exists()) {\r\n \t\t\t\t\tcontinue;\r\n \t\t\t\t}\r\n \t\t\t\tString[] parts = regionFileName.split(\"\\\\.\");\r\n \t\t\t\tif (parts.length != 4 || !parts[0].equals(\"r\") || !parts[3].equals(\"mca\")) {\r\n \t\t\t\t\tcontinue;\r\n \t\t\t\t}\r\n \t\t\t\t// Obtain the chunk offset of this region file\r\n \t\t\t\ttry {\r\n \t\t\t\t\trx = Integer.parseInt(parts[1]) << 5;\r\n \t\t\t\t\trz = Integer.parseInt(parts[2]) << 5;\r\n \t\t\t\t} catch (Exception ex) {\r\n \t\t\t\t\tcontinue;\r\n \t\t\t\t}\r\n \r\n \t\t\t\t// Is it contained in the cache?\r\n \t\t\t\tReference<RegionFile> ref = RegionFileCacheRef.FILES.get(file);\r\n \t\t\t\tRegionFile reg = null;\r\n \t\t\t\tif (ref != null) {\r\n \t\t\t\t\treg = ref.get();\r\n \t\t\t\t}\r\n \t\t\t\tboolean closeOnFinish = false;\r\n \t\t\t\tif (reg == null) {\r\n \t\t\t\t\tcloseOnFinish = true;\r\n \t\t\t\t\t// Manually load this region file\r\n \t\t\t\t\treg = new RegionFile(file);\r\n \t\t\t\t}\r\n \t\t\t\t// Obtain all generated chunks in this region file\r\n \t\t\t\tfor (dx = 0; dx < 32; dx++) {\r\n \t\t\t\t\tfor (dz = 0; dz < 32; dz++) {\r\n \t\t\t\t\t\tif (reg.c(dx, dz)) {\r\n \t\t\t\t\t\t\t// Region file exists - add it\r\n\t\t\t\t\t\t\tfix(world, rx + dx, rz + dz, true);\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\tif (closeOnFinish) {\r\n \t\t\t\t\t// Close the region file stream - we are done with it\r\n \t\t\t\t\treg.c();\r\n \t\t\t\t}\r\n \t\t\t}\r\n\t\t} else {\r\n\t\t\tNoLagg.plugin.log(Level.WARNING, \"Failed to fix world '\" + world.getName() + \"': Region folder is missing!\");\r\n \t\t}\r\n \t}", "String[] getCrashReportFilesList() {\r\n File dir = mContext.getFilesDir();\r\n \r\n Log.d(LOG_TAG, \"Looking for error files in \" + dir.getAbsolutePath());\r\n \r\n // Filter for \".stacktrace\" files\r\n FilenameFilter filter = new FilenameFilter() {\r\n public boolean accept(File dir, String name) {\r\n return name.endsWith(\".stacktrace\");\r\n }\r\n };\r\n return dir.list(filter);\r\n }", "private void tryLoadJarInDir(File dir) {\n logger.info(\"tryLoadJarInDir-dirPath:{}\",dir.getAbsoluteFile());\n // 自动加载目录下的jar包\n if (dir.exists() && dir.isDirectory()) {\n for (File file : dir.listFiles()) {\n if (file.isFile() && file.getName().endsWith(\".jar\")) {\n logger.info(\"tryLoadJarInDir-jar:{}\",file.getAbsoluteFile());\n this.addURL(file);\n continue;\n }\n }\n }\n }", "@Test\r\n\tpublic void testSampleFile() {\r\n\r\n\t\tRaceList rl = null;\r\n\t\trl = WolfResultsReader.readRaceListFile(\"test-files/sample.md\");\r\n\t\tassertEquals(2, rl.size());\r\n\r\n\t}", "@Override\n\t\t\tpublic boolean accept(File dir, String name) {\n\t\t\t\tlogger.debug(name);\n\t\t\treturn name.contains(\".RData\");\n\t\t\t}", "protected void evaluate(String filePath) throws FormatException {\n\n try {\n int latSlash = filePath.lastIndexOf(\"/\");\n if (latSlash > 1) {\n if (DEBUG) {\n Debug.output(\"Have lat index of \" + latSlash);\n }\n String lonSearch = filePath.substring(0, latSlash);\n\n if (DEBUG) {\n Debug.output(\"Searching for lon index in \" + lonSearch);\n }\n int lonSlash = lonSearch.lastIndexOf(\"/\");\n if (lonSlash > 1) {\n filename = filePath.substring(latSlash + 1);\n String latString = filename.toUpperCase();\n\n if (DEBUG) {\n Debug.output(\"have lat \" + latString);\n }\n\n int dotIndex = latString.indexOf(\".\");\n if (dotIndex > 0) {\n\n lat = Double.parseDouble(latString.substring(1,\n dotIndex));\n if (latString.charAt(0) == 'S') {\n lat *= -1;\n }\n\n subDirs = filePath.substring(lonSlash + 1, latSlash);\n String dd = filePath.substring(0, lonSlash + 1);\n if (dd.length() > 0) {\n dtedDir = dd;\n }\n\n String lonString = subDirs.toUpperCase();\n\n if (DEBUG) {\n Debug.output(\"have lon \" + lonString);\n }\n\n lon = Double.parseDouble(lonString.substring(1));\n if (lonString.charAt(0) == 'W') {\n lon *= -1;\n }\n\n level = (int) Integer.parseInt(filePath.substring(filePath.length() - 1));\n if (DEBUG) {\n Debug.output(\"have level \" + level);\n }\n return;\n }\n }\n }\n } catch (NumberFormatException nfe) {\n\n }\n\n throw new FormatException(\"StandardDTEDNameTranslator couldn't convert \"\n + filePath + \" to valid parameters\");\n }", "public void calculateFDR(Long fileID) {\n FDRData fdrData = getFDRDataFromPSMLevel(fileID);\n fileFDRData.put(fileID, fdrData);\n\n fileFDRCalculated.put(fileID, false);\n\n\n String baseScoreShort = getBaseFDRScorePSMLevel(fileID);\n if (baseScoreShort == null) {\n LOGGER.error(\"Could not get a valid score from PSM level!\");\n return;\n }\n\n fdrData.setScoreShortName(baseScoreShort);\n LOGGER.info(\"set the score for peptide FDR calculation for fileID={}: {}\",\n \t\tfileID, fdrData.getScoreShortName());\n\n // recalculate the decoy status (especially important, if decoy pattern was changed)\n updateDecoyStates(fileID);\n\n if (fileReportPeptides.get(fileID) == null) {\n LOGGER.error(\"No peptides found for the file with ID={}\", fileID);\n return;\n }\n\n // create new list of the filters and leave only the PSM level filters\n List<AbstractFilter> filters = new ArrayList<>(getFilters(fileID));\n ListIterator<AbstractFilter> filterIt = filters.listIterator();\n\n while (filterIt.hasNext()) {\n AbstractFilter filter = filterIt.next();\n RegisteredFilters regFilter = filter.getRegisteredFilter();\n if (!RegisteredFilters.getPSMFilters().contains(regFilter)) {\n filterIt.remove();\n }\n }\n\n // get a List of the ReportPeptides for FDR calculation\n List<ReportPeptide> listForFDR = new ArrayList<>(getFilteredReportPeptides(fileID, filters));\n\n // get the comparator for the score\n boolean higherScoreBetter = psmModeller.getHigherScoreBetter(fdrData.getScoreShortName());\n Comparator<ReportPeptide> peptideComparator = new ScoreComparator<>(fdrData.getScoreShortName(), higherScoreBetter);\n\n // calculate the FDR values\n fdrData.calculateFDR(listForFDR, peptideComparator);\n\n // and also calculate the FDR score\n FDRScore.calculateFDRScore(listForFDR, fdrData, higherScoreBetter);\n\n // the FDR for this file is calculated now\n fileFDRCalculated.put(fileID, true);\n }", "public boolean accept(File dir, String name) {\n/* 120 */ return this.pattern.matcher(name).matches();\n/* */ }", "private static String[] findFiles(String dirpath) {\n\t\tString fileSeparator = System.getProperty(\"file.separator\");\n\t\tVector<String> fileListVector = new Vector<String>();\n\t\tFile targetDir = null;\n\t\ttry {\n\t\t\ttargetDir = new File(dirpath);\n\t\t\tif (targetDir.isDirectory())\n\t\t\t\tfor (String val : targetDir.list(new JavaFilter()))\n\t\t\t\t\tfileListVector.add(dirpath + fileSeparator + val);\n\t\t} catch(Exception e) {\n\t\t\tlogger.error(e);\n\t\t\tSystem.exit(1);\n\t\t}\n\t\t\n\t\tString fileList = \"\";\n\t\tfor (String filename : fileListVector) {\n\t\t\tString basename = filename.substring(filename.lastIndexOf(fileSeparator) + 1);\n\t\t\tfileList += \"\\t\" + basename;\n\t\t}\n\t\tif (fileList.equals(\"\")) \n\t\t\tfileList += \"none.\";\n\t\tlogger.trace(\"Unpackaged source files found in dir \" + dirpath + fileSeparator + \": \" + fileList);\n\t\t\n\t\treturn (String[]) fileListVector.toArray(new String[fileListVector.size()]);\n\t}", "public static void main(String[] args) throws Exception {\n String ade_view_root = args[1].trim();\n String filelistpath=args[0].trim();\n String[] files=FamilyModuleHelper.getFileList(filelistpath, ade_view_root);\n HashSet<String> projectDirs = new HashSet<String>(); \n \n vcScanner.debugWriter = new BufferedWriter(new FileWriter(\"listBindings.txt\"));\n vcScanner.writer = new BufferedWriter(new FileWriter(\"VC_scan_UI_Performance.csv\")); \n vcScanner.writer1 = new BufferedWriter(new FileWriter(\"VC_scan_UI_Performance_noVC.csv\"));\n vcScanner.generateExemptionList();\n vcScanner.writer1.write(\"Family,Module,Product,Filename,Label,ViewName,Issue,Jsff,Model,Component\\n\");\n vcScanner.writer.write(\"Family,Module,Product,Filename,Label,ViewName, ViewAttribute,\" +\n \"Column Name, Table Name, IsView, ResolvedTableCol, Indexed Table, NumRows, NumBlocks, Column Type, Index, Column Position, \" +\n \"VC Required, Is VC Case-insensitive?, IsQueriable?, RenderMode, VCR:VCI, \" +\n \"UI File, modelValue, componentName\\n\");\n \n boolean familySet = false;\n for(int i = 0; i < files.length; i++) {\n String filePath = ade_view_root + \"/\" + files[i].trim();\n File f = new File(filePath);\n if(!f.exists())\n continue;\n if(fileOfInterest(filePath)) {\n viewFilesInTransaction.add(files[i].trim());\n if(!familySet){\n vcScanner.sCrawlDir = files[i].trim();\n vcScanner.m_family = ViewCriteriaHelper.getFamily(files[i].trim());\n familySet = true;\n }\n String jprDir = VCPremergeChecker.findProjectDirectory(filePath);\n projectDirs.add(jprDir);\n } \n } \n if(projectDirs.size()==0)\n return;\n \n if(args.length > 2){\n String label = args[2].trim();\n String release = FamilyModuleHelper.getRelease(label);\n if(!ViewCriteriaHelper.isEmpty(release)) {\n try{\n int releaseNo= Integer.parseInt(release);\n \n if(releaseNo >= 11){\n vcScanner.function_indexColumns = SqlIndexFinder.readIndexesFromFile_rel11(\"function\");\n vcScanner.default_indexColumns = SqlIndexFinder.readIndexesFromFile_rel11(\"default\");\n SqlIndexFinder.readColPositionsFromFile_rel11();\n SqlIndexFinder.readTableDataFromFile_rel11();\n SqlIndexFinder.readViewDataFromFile_rel11();\n }else {\n vcScanner.function_indexColumns = SqlIndexFinder.readIndexesFromFile(\"function\");\n vcScanner.default_indexColumns = SqlIndexFinder.readIndexesFromFile(\"default\");\n SqlIndexFinder.readColPositionsFromFile();\n SqlIndexFinder.readTableDataFromFile();\n SqlIndexFinder.readViewDataFromFile();\n }\n if(releaseNo >=8)\n SqlIndexFinder.readTableDataFromFile_customer();\n \n }catch (NumberFormatException e) {\n //do nothing\n }\n }\n }else{\n vcScanner.function_indexColumns = SqlIndexFinder.readIndexesFromFile(\"function\");\n vcScanner.default_indexColumns = SqlIndexFinder.readIndexesFromFile(\"default\");\n SqlIndexFinder.readColPositionsFromFile();\n SqlIndexFinder.readTableDataFromFile();\n SqlIndexFinder.readViewDataFromFile();\n }\n \n \n \n \n vcScanner.parser =new ModifiedComboboxParser(vcScanner.m_family.toLowerCase(), ModifiedComboboxParser.ScanType.ALL);\n \n crawlDirectories(projectDirs); \n vcScanner.processFiles();\n vcScanner.writer.close();\n vcScanner.writer1.close();\n \n BufferedReader reader = new BufferedReader(new FileReader(\"VC_scan_UI_Performance_noVC.csv\"));\n vcScanner.writer1 = new BufferedWriter(new FileWriter(\"VC_scan_UI_Performance_noVC_rows.csv\"));\n vcScanner.writer1.write(\"Family,Module,Product,Filename,Label,ViewName,Issue,\" +\n \"UI File,Model,Component, ListOfTables, MaxRows, Blocks, TableWithMaxRows,WHEREContainsBinds\\n\");\n \n String line = reader.readLine();\n while((line = reader.readLine()) != null){\n \n String[] parts = line.split(\",\");\n String fileName = ade_view_root + \"/\" + parts[3].trim(); \n XMLDocument voXml = null;\n if(parts[3].trim().startsWith(\"oracle\"))\n voXml = vcScanner.voXmlsFromOtherJars.get(parts[3].trim());\n //ViewCriteriaHelper.getMaxRows(fileName,writer1,line,voXml, exemptions,currentVCViolations);\n ViewCriteriaHelper.getMaxRows(fileName,vcScanner.writer1,line,voXml,vcScanner.noVCexemptedTables1, vcScanner.noVCexemptedTables2_maxrows,vcScanner.lovVOToBaseVOMapping,vcScanner.voMaxRowsCalculated);\n }\n \n vcScanner.writer1.close();\n \n BufferedWriter outputFileWriter = new BufferedWriter(new FileWriter(\"vc_perf_scan.txt\"));\n \n reader = new BufferedReader(new FileReader(\"VC_scan_UI_Performance.csv\"));\n line = reader.readLine();\n boolean hasViolation = false;\n while((line = reader.readLine()) != null){\n String[] parts = line.split(\",\");\n if(parts.length < 25) continue; \n \n String fileName = parts[22].trim();\n if(viewFilesInTransaction.contains(fileName)){\n hasViolation = true;\n if(line.contains(\"savedSearch\"))\n outputFileWriter.write(\"Issue: SavedSearchBadViewCriteriaItems\\n\");\n else\n outputFileWriter.write(\"Issue: BadViewCriteriaItems\\n\");\n outputFileWriter.write(\"VO FileName: \" + parts[3] + \"\\n\");\n outputFileWriter.write(\"ViewAttribute: \" + parts[6].trim() + \"\\n\");\n outputFileWriter.write(\"ViewCriteria Name: \" + parts[21] + \"\\n\");\n outputFileWriter.write(\"Table Name: \" + parts[8] + \"\\n\");\n outputFileWriter.write(\"Column Name: \" + parts[7] + \"\\n\");\n outputFileWriter.write(\"Column position in index: \" + parts[16] + \"\\n\");\n outputFileWriter.write(\"UI File: \" + parts[22] + \"\\n\"); \n outputFileWriter.write(\"Model value: \" + parts[23] + \"\\n\"); \n outputFileWriter.write(\"Component: \" + parts[24] + \"\\n\");\n outputFileWriter.write(\"Description:\" + \"Required and Selectively Required ViewCriteria items \" +\n \"used in query panels and LOVs should be backed by proper indexes\\n\\n\");\n }\n }\n \n reader.close();\n \n if(hasViolation)\n outputFileWriter.write(\"\\n\\nPlease see http://myforums.oracle.com/jive3/thread.jspa?threadID=871762&tstart=0 \" +\n \"for description of the issue and resolution.\\n\\n\\n\");\n \n reader = new BufferedReader(new FileReader(\"VC_scan_UI_Performance_noVC_rows.csv\"));\n line = reader.readLine();\n hasViolation = false;\n while((line = reader.readLine()) != null){\n String[] parts = line.split(\",\");\n if(parts.length < 15) continue; \n \n String fileName = parts[7].trim();\n if(viewFilesInTransaction.contains(fileName)){\n hasViolation = true;\n if(line.contains(\"savedSearch\"))\n outputFileWriter.write(\"Issue: SavedSearchNoViewCriteria\\n\");\n else\n outputFileWriter.write(\"Issue: NoViewCriteria\\n\");\n outputFileWriter.write(\"VO FileName: \" + parts[3] + \"\\n\");\n outputFileWriter.write(\"UI File: \" + parts[7] + \"\\n\"); \n outputFileWriter.write(\"Model: \" + parts[8] + \"\\n\");\n outputFileWriter.write(\"Component: \" + parts[9] + \"\\n\");\n outputFileWriter.write(\"Description:\" + parts[6] + \"\\n\\n\");\n }\n }\n \n reader.close(); \n \n if(hasViolation)\n outputFileWriter.write(\"\\n\\nPlease see http://myforums.oracle.com/jive3/thread.jspa?threadID=871763&tstart=0\" +\n \" for description of the issue and resolution.\\n\\n\");\n \n outputFileWriter.close();\n \n }", "private void validateMapFileOutputContent(\n FileSystem fs, Path dir) throws Exception {\n // map output is a directory with index and data files\n assertPathExists(\"Map output\", dir);\n Path expectedMapDir = getPart0000(dir);\n assertPathExists(\"Map output\", expectedMapDir);\n assertIsDirectory(expectedMapDir);\n FileStatus[] files = fs.listStatus(expectedMapDir);\n Assertions.assertThat(files)\n .as(\"No files found in \" + expectedMapDir)\n .isNotEmpty();\n assertPathExists(\"index file in \" + expectedMapDir,\n new Path(expectedMapDir, MapFile.INDEX_FILE_NAME));\n assertPathExists(\"data file in \" + expectedMapDir,\n new Path(expectedMapDir, MapFile.DATA_FILE_NAME));\n }", "public void setSymbolMapsDirectory(String dir) {\n\t\tif (!dir.equals(symbolMapsDirectory)) {\r\n\t\t\tsymbolMapsDirectory = dir;\r\n\t\t\tsymbolMaps = new HashMap<String, SymbolMap>();\r\n\t\t}\r\n\t}", "public static void main(String[] args) throws IOException, SQLException, ClassNotFoundException\n\t{\n\t if (args.length != 4)\n\t {\n\t System.err.println(\"Needs 4 args\");\n\t\t return; \n\t }\n\t \n String dir = args[0];\n\t\tint minTokens = Integer.parseInt(args[1]);\n\t\tString outFolder = args[2];\n\t\tString outFilename = args[3];\n\t\t\n\t\tfinal long startTime = System.currentTimeMillis();\n\t\t\n\t\t// make a list of all files \n\t\tFile folder = new File(dir);\n\t\tFile[] listOfFiles = folder.listFiles();\n\t\tList<File> files = new ArrayList<File>(Arrays.asList(listOfFiles));\n\t\tSystem.out.println(String.format(\"%d files in dir %s\", files.size(), dir));\n\n\t\t// configure CPD\n\t\tCPDConfiguration config = new CPDConfiguration();\n\t\tconfig.setLanguage(LanguageFactory.createLanguage(\"Java\"));\n\t\tconfig.setMinimumTileSize(minTokens);\n\t\tconfig.setEncoding(\"UTF-8\");\n\t\tconfig.setRenderer(new CSVRenderer());\n\t\t/* Has no effect\n\t\tconfig.setIgnoreAnnotations(true);\n\t\tconfig.setIgnoreIdentifiers(true);\n\t\tconfig.setIgnoreLiterals(true);*/\n\t\t\n\t\tStringBuilder dupOut = new StringBuilder();\n\t\tStringBuilder errOut = new StringBuilder();\n\t\tint totalCnt = 0;\n\t\tArrayList<Match> matchList = new ArrayList<>();\n\n\t\tfor(File file: files)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tmatchList.clear();\n\t\t\t\t\n\t\t\t\t// run CPD on this file\n\t\t\t\tCPD cpd = new CPD(config);\n\t\t\t\tcpd.add(file);\n\t\t\t\tcpd.go();\n\t\t\t\t\n\t\t\t\t// collect results\n\t\t\t\tIterator<Match> it = cpd.getMatches();\n\t\t\t\twhile(it.hasNext())\n\t\t\t\t{\n\t\t\t\t\tMatch m = it.next();\n\t\t\t\t\tmatchList.add(m);\n\t\t\t\t}\n\t\t\t\tif (!matchList.isEmpty()) // write to output\n\t\t\t\t{\n\t\t\t\t\tString csv = config.getRenderer().render(cpd.getMatches());\n\t\t\t\t\tdupOut.append(csv.substring(csv.indexOf('\\n') + 1)); // remove header\n\t\t\t\t\ttotalCnt += matchList.size();\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (Exception e)\n\t\t\t{\n\t\t\t\terrOut.append(file.getName() + \",\" + e.getMessage() + \"\\n\");\n\t\t\t}\n\t\t}\n\t\t\n\t\t// write output to files\n\t\ttry\n\t\t{\n\t\t\tString name = folder.getName();\n\t\t\tnew FileReporter(new File(outFolder,outFilename)).report(dupOut.toString()); //name + \"-cpd\" + minTokens + \".csv\"\n\t\t\tnew FileReporter(new File(outFolder,name + \"-cpd\" + minTokens + \"-err.csv\")).report(errOut.toString());\n\t\t} catch (ReportException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\tSystem.out.println(\"Total nr of dups found \" + totalCnt);\n\t\t\n\t\tfinal long endTime = System.currentTimeMillis();\n\t\tSystem.out.println(\"Total execution time in s: \" + (endTime - startTime)/1000 );\n\t}", "public static void main(final String[] args) {\n System.out.println(\"Processing directory :: \" + Constants.FILEFIXER_ROOT_DIR);\n new SrtFileFixer().process();\n }", "public final synchronized com.google.android.m4b.maps.bu.C4910a m21843a(java.lang.String r10) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/79094208.run(Unknown Source)\n*/\n /*\n r9 = this;\n monitor-enter(r9);\n r0 = r9.f17909e;\t Catch:{ all -> 0x0056 }\n r1 = 0;\n if (r0 != 0) goto L_0x0008;\n L_0x0006:\n monitor-exit(r9);\n return r1;\n L_0x0008:\n r0 = r9.f17907c;\t Catch:{ all -> 0x0056 }\n r2 = com.google.android.m4b.maps.az.C4733b.m21060a(r10);\t Catch:{ all -> 0x0056 }\n r0 = r0.m21933a(r2, r1);\t Catch:{ all -> 0x0056 }\n if (r0 == 0) goto L_0x0054;\t Catch:{ all -> 0x0056 }\n L_0x0014:\n r2 = r0.length;\t Catch:{ all -> 0x0056 }\n r3 = 9;\t Catch:{ all -> 0x0056 }\n if (r2 <= r3) goto L_0x0054;\t Catch:{ all -> 0x0056 }\n L_0x0019:\n r2 = 0;\t Catch:{ all -> 0x0056 }\n r2 = r0[r2];\t Catch:{ all -> 0x0056 }\n r4 = 1;\t Catch:{ all -> 0x0056 }\n if (r2 == r4) goto L_0x0020;\t Catch:{ all -> 0x0056 }\n L_0x001f:\n goto L_0x0054;\t Catch:{ all -> 0x0056 }\n L_0x0020:\n r5 = com.google.android.m4b.maps.bs.C4891e.m21914c(r0, r4);\t Catch:{ all -> 0x0056 }\n r2 = new com.google.android.m4b.maps.ar.a;\t Catch:{ all -> 0x0056 }\n r7 = com.google.android.m4b.maps.de.C5350x.f20104b;\t Catch:{ all -> 0x0056 }\n r2.<init>(r7);\t Catch:{ all -> 0x0056 }\n r7 = new java.io.ByteArrayInputStream;\t Catch:{ IOException -> 0x0052 }\n r8 = r0.length;\t Catch:{ IOException -> 0x0052 }\n r8 = r8 - r3;\t Catch:{ IOException -> 0x0052 }\n r7.<init>(r0, r3, r8);\t Catch:{ IOException -> 0x0052 }\n r2.m20818a(r7);\t Catch:{ IOException -> 0x0052 }\n r0 = 2;\n r0 = r2.m20843h(r0);\t Catch:{ all -> 0x0056 }\n r10 = r10.equals(r0);\t Catch:{ all -> 0x0056 }\n if (r10 != 0) goto L_0x0042;\n L_0x0040:\n monitor-exit(r9);\n return r1;\n L_0x0042:\n r10 = new com.google.android.m4b.maps.bu.a;\t Catch:{ all -> 0x0056 }\n r10.<init>();\t Catch:{ all -> 0x0056 }\n r10.m22018a(r4);\t Catch:{ all -> 0x0056 }\n r10.m22020a(r2);\t Catch:{ all -> 0x0056 }\n r10.m22016a(r5);\t Catch:{ all -> 0x0056 }\n monitor-exit(r9);\n return r10;\n L_0x0052:\n monitor-exit(r9);\n return r1;\n L_0x0054:\n monitor-exit(r9);\n return r1;\n L_0x0056:\n r10 = move-exception;\n monitor-exit(r9);\n throw r10;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.m4b.maps.bs.b.a(java.lang.String):com.google.android.m4b.maps.bu.a\");\n }", "private void parseLrc(String filepathname) throws LrcFileNotFoundException,\n LrcFileUnsupportedEncodingException,\n LrcFileIOException,\n LrcFileInvalidFormatException {\n String file = new String(filepathname);\n\n // dealing with different text file encodings.\n // (1) try reading BOM from text file\n FileInputStream lrcFileStream = null;\n try {\n lrcFileStream = new FileInputStream(new File(file));\n\n } catch (FileNotFoundException e) {\n // if failed to load at the same folder then try /sdcard/Music/Lyrics\n // change the path to specified folder\n Scanner s = new Scanner(file);\n String fileName = s.findInLine(Pattern.compile(\"(?!.*/).*\"));\n String anotherFile = new StringBuilder(mContext.getResources().getString(R.string.lrc_file_path)).append(fileName).toString();\n\n try {\n lrcFileStream = new FileInputStream(new File(anotherFile));\n file = anotherFile;\n\n } catch (FileNotFoundException ee) {\n throw new LrcFileNotFoundException(\n mContext.getResources().getString(R.string.lrc_file_not_found));\n }\n }\n\n BufferedInputStream bin = null;\n String code = null;\n try {\n bin = new BufferedInputStream(lrcFileStream);\n int p = (bin.read() << 8) + bin.read(); // first 2 bytes\n int q = bin.read(); // 3rd byte\n\n // first check to see if it's Unicode Transition Format (UTF-8, UTF-16)\n switch (p) {\n // first check UTF-8 with BOM\n case 0xefbb:\n if (q == 0xbf) {\n code = \"UTF-8\"; // on windows, UTF-8 text files have a BOM: \"EF BB BF\";\n } else {\n code = \"UNKNOWN\"; // however, on linux, there's no BOM for UTF-8\n }\n break;\n\n // UTF-16 with BOM\n case 0xfffe: // little endian\n case 0xfeff: // big endian\n code = \"UTF-16\"; // the Scanner can recognize big endian or little endian\n break;\n\n default:\n code = \"UNKNOWN\";\n break;\n }\n\n } catch (IOException e) {\n MusicLogUtils.d(TAG, \"parseLrc : I/O error when reading .lrc file\");\n throw new LrcFileIOException(\n mContext.getResources().getString(R.string.lrc_file_io_error));\n }\n\n // (2) if no BOM detected, we don't know if it's Unicode or ISO-8859-1 compatible encoding\n // try firstly to detect UTF-8 without BOM\n // by going through all the text file to see if there's one \"character unit\" that does not \n // match the UTF-8 encoding rule.\n if (\"UNKNOWN\".equals(code)) {\n try {\n lrcFileStream = new FileInputStream(new File(file));\n\n } catch (FileNotFoundException e) {\n throw new LrcFileNotFoundException(\n mContext.getResources().getString(R.string.lrc_file_not_found));\n }\n\n try {\n bin = new BufferedInputStream(lrcFileStream);\n byte[] value = new byte[3];\n int result = 1;\n\n boolean isUTF8 = true;\n int byte1 = 0;\n int byte2 = 0;\n int byte3 = 0;\n while (result > 0) {\n result = bin.read(value, 0, 1);\n if (result <= 0) {\n break;\n }\n\n byte1 = value[0] & 0xff;\n if ((byte1 <= 0x7f) && (byte1 >= 0x01)) {\n // matches 1 byte encoding\n continue;\n } else {\n // need read one more byte\n result = bin.read(value, 1, 1);\n if (result <= 0) {\n break;\n }\n\n byte2 = value[1] & 0xff;\n if ((byte1 <= 0xdf) && (byte1 >= 0xc0)\n && (byte2 <= 0xbf) && (byte2 >= 0x80)) {\n // matches 2 bytes encoding\n continue;\n } else {\n // need read one more byte\n result = bin.read(value, 2, 1);\n if (result <= 0) {\n break;\n }\n \n byte3 = value[2] & 0xff;\n if ((byte1 <= 0xef) && (byte1 >= 0xe0) && (byte2 <= 0xbf)\n && (byte2 >= 0x80) && (byte3 <= 0xbf) && (byte3 >= 0x80)) {\n continue;\n } else {\n // don't match any of this it should not be UTF-8\n isUTF8 = false;\n break;\n }\n }\n }\n\n }\n \n\n if (isUTF8) {\n code = \"UTF-8\"; // if detected as UTF-8 then change the \"UNKNOWN\" result\n }\n\n } catch (IOException e) {\n MusicLogUtils.d(TAG, \"parseLrc : I/O error when reading .lrc file\");\n throw new LrcFileIOException(\n mContext.getResources().getString(R.string.lrc_file_io_error));\n }\n }\n\n // if cannot be detected as Unicode series\n // then try with ISO-8859-1 compatible encoding according to device's default locale setting\n // create a scanner object according to the file name\n Scanner s = null;\n try {\n if (\"UNKNOWN\".equals(code)) {\n s = new Scanner(new File(file), LyricsLocale.defLocale2CharSet());\n } else {\n s = new Scanner(new File(file), code); // UTF-8 or UTF-16\n }\n\n } catch (FileNotFoundException e) {\n throw new LrcFileNotFoundException(\n mContext.getResources().getString(R.string.lrc_file_not_found));\n } catch (IllegalArgumentException e) { // when the defLocale2CharSet returns null\n MusicLogUtils.d(TAG, \"parseLrc : unsupported textual encoding\");\n throw new LrcFileUnsupportedEncodingException(\n mContext.getResources().getString(R.string.lrc_file_invalid_encoding));\n }\n\n // (3) scanner success, clean up\n mLyricContent.clear();\n\n // parse and add all possible lyrics sentences & information\n // the unrecognized lines in the file are omitted.\n while (s.hasNextLine()) {\n String next = s.nextLine(); // get a valid line\n if (next.length() < 1) {\n continue; // the empty line is omitted\n }\n\n // try to parse this line as a lyric sentence\n Integer[] integerArray = analyzeLrc(next);\n int len = integerArray.length;\n\n if (0 == len) { // no timeTag, thus it is a line of information or unrecognized line\n Scanner scn = new Scanner(next);\n\n // should match the .lrc file's \"infoTag\" format\n String info = scn.findInLine(\"\\\\[(al|ar|by|re|ti|ve):.*\\\\]\");\n if (null != info) { // if matches one of the info tags\n String tag = info.substring(1, 3);\n LyricSentence tmp = new LyricSentence(info.substring(4, info.length() - 1));\n if (tag.equals(\"al\") || tag.equals(\"AL\")) {\n mAlbumName = tmp;\n } else if (tag.equals(\"ar\") || tag.equals(\"AR\")) {\n mArtistName = tmp;\n } else if (tag.equals(\"by\") || tag.equals(\"BY\")) {\n mLyricAuthor = tmp;\n } else if (tag.equals(\"re\") || tag.equals(\"RE\")) {\n mLyricBuilder = tmp;\n } else if (tag.equals(\"ti\") || tag.equals(\"TI\")) {\n mTrackTitle = tmp;\n } else if (tag.equals(\"ve\") | tag.equals(\"VE\")) {\n mLyricBuilderVer = tmp;\n }\n } else { // it's possible to be \"offset\"\n String offset = scn.findInLine(\"\\\\[offset:[\\\\+|-]{1}\\\\d+\\\\]\");\n if (null != offset) { // if matches offset tag\n mAdjustMilliSec\n = Integer.parseInt(offset.substring(9, offset.length() - 1))\n * ( (offset.charAt(8) == '+') ? 1 : -1 );\n }\n }\n } else { // has time tags, then it's a line of lyrics sentence\n for (int k = 0; k < len; k++) {\n int time = integerArray[k].intValue();\n LyricSentence lrcSentence\n = new LyricSentence(resolveLrc(next), time + mAdjustMilliSec);\n mLyricContent.add(lrcSentence);\n }\n }\n }\n\n // sort the lyrics sentences as the sequence of time tags\n Collections.sort(mLyricContent);\n \n if (mLyricContent.isEmpty()) {\n throw new LrcFileInvalidFormatException(\n mContext.getResources().getString(R.string.lrc_file_invalid_format));\n }\n }", "public static void main(String[] args)\r\n\t{\r\n\t\t\r\n\t\tString path = System.getProperty(\"user.dir\") + \"\\\\TestFiles\" ;\r\n//\t\tString pathOut = System.getProperty(\"user.dir\") + \"\\\\TestFilesOut\" ;\t\r\n\t\t\r\n\t\tFile folder = new File( path ) ;\r\n\t\tFile[] listOfFiles = folder.listFiles() ;\r\n\t\t\r\n\t\tfor (int i = 0; i < listOfFiles.length; i++)\r\n\t\t{\r\n\t\t\t//System.out.printf(\"%-2s %s%n\",i ,listOfFiles[i].getName()) ;\r\n\t\t\tString nameIn = null , nameOut = null ;\r\n\t\t\tPrintWriter outputFile = null ; // keep compiler happy\r\n\t\t\tSymbolTable symbolTable ;\r\n\t\t\t\r\n\t\t\tnameIn = listOfFiles[i].getPath() ;\r\n\t\t\t\r\n\t\t\tif (nameIn.substring(nameIn.indexOf(\".\") + 1).equals(\"asm\"))\r\n\t\t\t{//System.out.printf(\"%s %n %s%n\",listOfFiles[i].getName(), nameOut) ;\r\n\t\t\t\t\r\n\t\t\t\tnameOut = listOfFiles[i].getName() ;\r\n\t\t\t\tnameOut = nameOut.substring(0, nameOut.lastIndexOf('.')) + \"0\" ;\r\n\t\t\t\tnameOut = path + \"\\\\\" + nameOut + \".hack\" ;\t\r\n\t\t\t\t\r\n\t\t\t\ttry\r\n\t\t\t\t{\r\n\t\t\t\t\toutputFile = new PrintWriter(new FileOutputStream(nameOut)) ;\r\n\t\t\t\t}\r\n\t\t\t\tcatch (FileNotFoundException ex)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.err.println(\"Could not open output file \" + nameOut) ;\r\n\t\t\t\t\tSystem.err.println(\"Run program again, make sure you have write permissions, etc.\") ;\r\n\t\t\t\t\tSystem.exit(0) ;\r\n\t\t\t\t}\r\n\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t// TODO: finish driver as algorithm describes\r\n\t\t\r\n\t\t\t\tsymbolTable = new SymbolTable() ;\r\n\t\t\t\tfirstPass(nameIn, symbolTable) ;\t\t\r\n\t\t\t\tsecondPass(nameIn, symbolTable, outputFile) ;\t\t\t\t\r\n\t\t\t\toutputFile.close() ;\t\t\r\n\t\t\t\tSystem.out.println(listOfFiles[i].getName() + \" Done successfully!\") ;\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "private p000a.p001a.p002a.p003a.C0916s m1655b(p000a.p001a.p002a.p003a.p022i.p024b.C0112x r7, p000a.p001a.p002a.p003a.p034n.C0157e r8) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/293907205.run(Unknown Source)\n*/\n /*\n r6 = this;\n r0 = r7.m321a();\n r7 = r7.m322b();\n r1 = 0;\n r2 = r1;\n L_0x000a:\n r3 = r6.f1533u;\n r3 = r3 + 1;\n r6.f1533u = r3;\n r0.m2803e();\n r3 = r0.mo2010a();\n if (r3 != 0) goto L_0x0032;\n L_0x0019:\n r7 = r6.f1513a;\n r8 = \"Cannot retry non-repeatable request\";\n r7.m260a(r8);\n if (r2 == 0) goto L_0x002a;\n L_0x0022:\n r7 = new a.a.a.a.b.m;\n r8 = \"Cannot retry request with a non-repeatable request entity. The cause lists the reason the original request failed.\";\n r7.<init>(r8, r2);\n throw r7;\n L_0x002a:\n r7 = new a.a.a.a.b.m;\n r8 = \"Cannot retry request with a non-repeatable request entity.\";\n r7.<init>(r8);\n throw r7;\n L_0x0032:\n r2 = r6.f1529q;\t Catch:{ IOException -> 0x0086 }\n r2 = r2.mo1932c();\t Catch:{ IOException -> 0x0086 }\n if (r2 != 0) goto L_0x0057;\t Catch:{ IOException -> 0x0086 }\n L_0x003a:\n r2 = r7.mo15e();\t Catch:{ IOException -> 0x0086 }\n if (r2 != 0) goto L_0x004f;\t Catch:{ IOException -> 0x0086 }\n L_0x0040:\n r2 = r6.f1513a;\t Catch:{ IOException -> 0x0086 }\n r3 = \"Reopening the direct connection.\";\t Catch:{ IOException -> 0x0086 }\n r2.m260a(r3);\t Catch:{ IOException -> 0x0086 }\n r2 = r6.f1529q;\t Catch:{ IOException -> 0x0086 }\n r3 = r6.f1528p;\t Catch:{ IOException -> 0x0086 }\n r2.mo2023a(r7, r8, r3);\t Catch:{ IOException -> 0x0086 }\n goto L_0x0057;\t Catch:{ IOException -> 0x0086 }\n L_0x004f:\n r2 = r6.f1513a;\t Catch:{ IOException -> 0x0086 }\n r3 = \"Proxied connection. Need to start over.\";\t Catch:{ IOException -> 0x0086 }\n r2.m260a(r3);\t Catch:{ IOException -> 0x0086 }\n goto L_0x0085;\t Catch:{ IOException -> 0x0086 }\n L_0x0057:\n r2 = r6.f1513a;\t Catch:{ IOException -> 0x0086 }\n r2 = r2.m262a();\t Catch:{ IOException -> 0x0086 }\n if (r2 == 0) goto L_0x007c;\t Catch:{ IOException -> 0x0086 }\n L_0x005f:\n r2 = r6.f1513a;\t Catch:{ IOException -> 0x0086 }\n r3 = new java.lang.StringBuilder;\t Catch:{ IOException -> 0x0086 }\n r3.<init>();\t Catch:{ IOException -> 0x0086 }\n r4 = \"Attempt \";\t Catch:{ IOException -> 0x0086 }\n r3.append(r4);\t Catch:{ IOException -> 0x0086 }\n r4 = r6.f1533u;\t Catch:{ IOException -> 0x0086 }\n r3.append(r4);\t Catch:{ IOException -> 0x0086 }\n r4 = \" to execute request\";\t Catch:{ IOException -> 0x0086 }\n r3.append(r4);\t Catch:{ IOException -> 0x0086 }\n r3 = r3.toString();\t Catch:{ IOException -> 0x0086 }\n r2.m260a(r3);\t Catch:{ IOException -> 0x0086 }\n L_0x007c:\n r2 = r6.f1518f;\t Catch:{ IOException -> 0x0086 }\n r3 = r6.f1529q;\t Catch:{ IOException -> 0x0086 }\n r2 = r2.m464a(r0, r3, r8);\t Catch:{ IOException -> 0x0086 }\n r1 = r2;\n L_0x0085:\n return r1;\n L_0x0086:\n r2 = move-exception;\n r3 = r6.f1513a;\n r4 = \"Closing the connection.\";\n r3.m260a(r4);\n r3 = r6.f1529q;\t Catch:{ IOException -> 0x0093 }\n r3.close();\t Catch:{ IOException -> 0x0093 }\n L_0x0093:\n r3 = r6.f1520h;\n r4 = r0.m2802d();\n r3 = r3.retryRequest(r2, r4, r8);\n if (r3 == 0) goto L_0x010a;\n L_0x009f:\n r3 = r6.f1513a;\n r3 = r3.m270d();\n if (r3 == 0) goto L_0x00d9;\n L_0x00a7:\n r3 = r6.f1513a;\n r4 = new java.lang.StringBuilder;\n r4.<init>();\n r5 = \"I/O exception (\";\n r4.append(r5);\n r5 = r2.getClass();\n r5 = r5.getName();\n r4.append(r5);\n r5 = \") caught when processing request to \";\n r4.append(r5);\n r4.append(r7);\n r5 = \": \";\n r4.append(r5);\n r5 = r2.getMessage();\n r4.append(r5);\n r4 = r4.toString();\n r3.m269d(r4);\n L_0x00d9:\n r3 = r6.f1513a;\n r3 = r3.m262a();\n if (r3 == 0) goto L_0x00ea;\n L_0x00e1:\n r3 = r6.f1513a;\n r4 = r2.getMessage();\n r3.m261a(r4, r2);\n L_0x00ea:\n r3 = r6.f1513a;\n r3 = r3.m270d();\n if (r3 == 0) goto L_0x000a;\n L_0x00f2:\n r3 = r6.f1513a;\n r4 = new java.lang.StringBuilder;\n r4.<init>();\n r5 = \"Retrying request to \";\n r4.append(r5);\n r4.append(r7);\n r4 = r4.toString();\n r3.m269d(r4);\n goto L_0x000a;\n L_0x010a:\n r8 = r2 instanceof p000a.p001a.p002a.p003a.C0176z;\n if (r8 == 0) goto L_0x0134;\n L_0x010e:\n r8 = new a.a.a.a.z;\n r0 = new java.lang.StringBuilder;\n r0.<init>();\n r7 = r7.mo10a();\n r7 = r7.m474e();\n r0.append(r7);\n r7 = \" failed to respond\";\n r0.append(r7);\n r7 = r0.toString();\n r8.<init>(r7);\n r7 = r2.getStackTrace();\n r8.setStackTrace(r7);\n throw r8;\n L_0x0134:\n throw r2;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: a.a.a.a.i.b.p.b(a.a.a.a.i.b.x, a.a.a.a.n.e):a.a.a.a.s\");\n }", "private Map<String, ModuleReference> scan(Path entry) {\n\n BasicFileAttributes attrs;\n try {\n attrs = Files.readAttributes(entry, BasicFileAttributes.class);\n } catch (NoSuchFileException e) {\n return Map.of();\n } catch (IOException ioe) {\n throw new FindException(ioe);\n }\n\n try {\n\n if (attrs.isDirectory()) {\n Path mi = entry.resolve(MODULE_INFO);\n if (!Files.exists(mi)) {\n // assume a directory of modules\n return scanDirectory(entry);\n }\n }\n\n // packaged or exploded module\n ModuleReference mref = readModule(entry, attrs);\n if (mref != null) {\n String name = mref.descriptor().name();\n return Map.of(name, mref);\n }\n\n // not recognized\n String msg;\n if (!isLinkPhase && entry.toString().endsWith(\".jmod\")) {\n msg = \"JMOD format not supported at execution time\";\n } else {\n msg = \"Module format not recognized\";\n }\n throw new FindException(msg + \": \" + entry);\n\n } catch (IOException ioe) {\n throw new FindException(ioe);\n }\n }", "public final synchronized void mo5320b() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n*/\n /*\n r6 = this;\n monitor-enter(r6);\n r0 = r6.f24853c;\t Catch:{ all -> 0x004c }\n r1 = 0;\t Catch:{ all -> 0x004c }\n r2 = 0;\t Catch:{ all -> 0x004c }\n if (r0 == 0) goto L_0x0046;\t Catch:{ all -> 0x004c }\n L_0x0007:\n r0 = r6.f24851a;\t Catch:{ all -> 0x004c }\n if (r0 != 0) goto L_0x0013;\t Catch:{ all -> 0x004c }\n L_0x000b:\n r0 = r6.f24854d;\t Catch:{ all -> 0x004c }\n r3 = r6.f24853c;\t Catch:{ all -> 0x004c }\n r0.deleteFile(r3);\t Catch:{ all -> 0x004c }\n goto L_0x0046;\t Catch:{ all -> 0x004c }\n L_0x0013:\n r0 = com.google.android.m4b.maps.cg.bx.m23058b();\t Catch:{ all -> 0x004c }\n r3 = r6.f24854d;\t Catch:{ IOException -> 0x0032, all -> 0x002f }\n r4 = r6.f24853c;\t Catch:{ IOException -> 0x0032, all -> 0x002f }\n r3 = r3.openFileOutput(r4, r1);\t Catch:{ IOException -> 0x0032, all -> 0x002f }\n r4 = r6.f24851a;\t Catch:{ IOException -> 0x0033 }\n r4 = r4.m20837d();\t Catch:{ IOException -> 0x0033 }\n r3.write(r4);\t Catch:{ IOException -> 0x0033 }\n com.google.android.m4b.maps.cg.bx.m23057a(r0);\t Catch:{ all -> 0x004c }\n L_0x002b:\n com.google.android.m4b.maps.ap.C4655c.m20770a(r3);\t Catch:{ all -> 0x004c }\n goto L_0x0046;\n L_0x002f:\n r1 = move-exception;\n r3 = r2;\n goto L_0x003f;\n L_0x0032:\n r3 = r2;\n L_0x0033:\n r4 = r6.f24854d;\t Catch:{ all -> 0x003e }\n r5 = r6.f24853c;\t Catch:{ all -> 0x003e }\n r4.deleteFile(r5);\t Catch:{ all -> 0x003e }\n com.google.android.m4b.maps.cg.bx.m23057a(r0);\t Catch:{ all -> 0x004c }\n goto L_0x002b;\t Catch:{ all -> 0x004c }\n L_0x003e:\n r1 = move-exception;\t Catch:{ all -> 0x004c }\n L_0x003f:\n com.google.android.m4b.maps.cg.bx.m23057a(r0);\t Catch:{ all -> 0x004c }\n com.google.android.m4b.maps.ap.C4655c.m20770a(r3);\t Catch:{ all -> 0x004c }\n throw r1;\t Catch:{ all -> 0x004c }\n L_0x0046:\n r6.f24851a = r2;\t Catch:{ all -> 0x004c }\n r6.f24852b = r1;\t Catch:{ all -> 0x004c }\n monitor-exit(r6);\n return;\n L_0x004c:\n r0 = move-exception;\n monitor-exit(r6);\n throw r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.m4b.maps.cg.q.b():void\");\n }", "private boolean compileMethod(String codeDirectory){\n String fileToCompile = new String();\n int compilationResult = 0;\n CodeCompile compileObject = new CodeCompile();\n compilationResult = compileObject.CompileJavaCode(codeDirectory,errorImage);\n return (boolean) (compilationResult==0);\n }", "private void processReportFiles()\r\n {\r\n writeToLogFile(\" \");\r\n int fileCount = 0, successCount = 0;\r\n accountCount = 0;\r\n failedAccountCount = 0;\r\n boolean first = true;\r\n try\r\n {\r\n // Process report files directory\r\n File directory = new File(dropDir);\r\n File[] fileArray = directory.listFiles();\r\n for (int i = 0; i < fileArray.length; i++)\r\n {\r\n // process the file and move to processed directory if successful\r\n File reportFile = fileArray[i];\r\n String pathname = reportFile.getAbsolutePath();\r\n String filename = reportFile.getName();\r\n if (processedReportFile(reportFile))\r\n {\r\n File rfMove = new File(procDir+BACKSLASH+filename);\r\n if (!reportFile.renameTo(rfMove))\r\n writeToLogFile(\"failed to move processed report file: \"+pathname);\r\n successCount++;\r\n }\r\n fileCount++;\r\n }\r\n writeToLogFile(\" \");\r\n // summarise report files processed in log file\r\n if (fileCount==0)\r\n {\r\n writeToLogFile(\"No report files in drop directory\");\r\n System.out.println(\"No report files in drop directory\");\r\n }\r\n else\r\n {\r\n if (!((accountCount==0)&&(failedAccountCount==0)))\r\n {\r\n writeToLogFile(\"No account FTP requests : \"+accountCount);\r\n if (failedAccountCount>0)\r\n writeToLogFile(\"No failed account FTP requests : \"+failedAccountCount);\r\n }\r\n writeToLogFile(\" \");\r\n String finalMessage = successCount + \" report file\";\r\n if (successCount>1)\r\n finalMessage = finalMessage + \"s\";\r\n finalMessage = finalMessage + \" out of \" + fileCount + \" successfully processed\";\r\n System.out.println(finalMessage);\r\n writeToLogFile(finalMessage);\r\n }\r\n writeToLogFile(\" \");\r\n\r\n }\r\n catch(Exception ex)\r\n {\r\n writeToLogFile(\"Error in processReportFiles : \" + ex.getMessage());\r\n }\r\n }", "private void readMetaData() throws AreaFileException {\r\n \r\n int i;\r\n// hasReadData = false;\r\n\r\n// if (! fileok) {\r\n// throw new AreaFileException(\"Error reading AreaFile directory\");\r\n// }\r\n\r\n dir = new int[AD_DIRSIZE];\r\n\r\n for (i=0; i < AD_DIRSIZE; i++) {\r\n try { dir[i] = af.readInt();\r\n } catch (IOException e) {\r\n status = -1;\r\n throw new AreaFileException(\"Error reading AreaFile directory:\" + e);\r\n }\r\n }\r\n position += AD_DIRSIZE * 4;\r\n\r\n // see if the directory needs to be byte-flipped\r\n\r\n if (dir[AD_VERSION] != VERSION_NUMBER) {\r\n McIDASUtil.flip(dir,0,19);\r\n // check again\r\n if (dir[AD_VERSION] != VERSION_NUMBER)\r\n throw new AreaFileException(\r\n \"Invalid version number - probably not an AREA file\");\r\n // word 20 may contain characters -- if small integer, flip it...\r\n if ( (dir[20] & 0xffff) == 0) McIDASUtil.flip(dir,20,20);\r\n McIDASUtil.flip(dir,21,23);\r\n // words 24-31 contain memo field\r\n McIDASUtil.flip(dir,32,50);\r\n // words 51-2 contain cal info\r\n McIDASUtil.flip(dir,53,55);\r\n // word 56 contains original source type (ascii)\r\n McIDASUtil.flip(dir,57,63);\r\n flipwords = true;\r\n }\r\n\r\n areaDirectory = new AreaDirectory(dir);\r\n\r\n // pull together some values needed by other methods\r\n navLoc = dir[AD_NAVOFFSET];\r\n calLoc = dir[AD_CALOFFSET];\r\n auxLoc = dir[AD_AUXOFFSET];\r\n datLoc = dir[AD_DATAOFFSET];\r\n numBands = dir[AD_NUMBANDS];\r\n linePrefixLength = \r\n dir[AD_DOCLENGTH] + dir[AD_CALLENGTH] + dir[AD_LEVLENGTH];\r\n if (dir[AD_VALCODE] != 0) linePrefixLength = linePrefixLength + 4;\r\n if (linePrefixLength != dir[AD_PFXSIZE]) \r\n throw new AreaFileException(\"Invalid line prefix length in AREA file.\");\r\n lineDataLength = numBands * dir[AD_NUMELEMS] * dir[AD_DATAWIDTH];\r\n lineLength = linePrefixLength + lineDataLength;\r\n numberLines = dir[AD_NUMLINES];\r\n\r\n if (datLoc > 0 && datLoc != McIDASUtil.MCMISSING) {\r\n navbytes = datLoc - navLoc;\r\n calbytes = datLoc - calLoc;\r\n auxbytes = datLoc - auxLoc;\r\n }\r\n if (auxLoc > 0 && auxLoc != McIDASUtil.MCMISSING) {\r\n navbytes = auxLoc - navLoc;\r\n calbytes = auxLoc - calLoc;\r\n }\r\n\r\n if (calLoc > 0 && calLoc != McIDASUtil.MCMISSING ) {\r\n navbytes = calLoc - navLoc;\r\n }\r\n\r\n\r\n // Read in nav block\r\n if (navLoc > 0 && navbytes > 0) {\r\n nav = new int[navbytes/4];\r\n newPosition = (long) navLoc;\r\n skipByteCount = (int) (newPosition - position);\r\n try {\r\n af.skipBytes(skipByteCount);\r\n } catch (IOException e) {\r\n status = -1;\r\n throw new AreaFileException(\"Error skipping AreaFile bytes: \" + e);\r\n }\r\n for (i=0; i<navbytes/4; i++) {\r\n try {\r\n nav[i] = af.readInt();\r\n } catch (IOException e) {\r\n status = -1;\r\n throw new AreaFileException(\"Error reading AreaFile navigation:\"+e);\r\n }\r\n }\r\n if (flipwords){\r\n flipnav(nav);\r\n }\r\n position = navLoc + navbytes;\r\n }\r\n\r\n // Read in cal block\r\n if (calLoc > 0 && calbytes > 0) {\r\n cal = new int[calbytes/4];\r\n newPosition = (long)calLoc;\r\n skipByteCount = (int) (newPosition - position);\r\n try {\r\n af.skipBytes(skipByteCount);\r\n } catch (IOException e) {\r\n status = -1;\r\n throw new AreaFileException(\"Error skipping AreaFile bytes: \" + e);\r\n }\r\n for (i=0; i<calbytes/4; i++) {\r\n try { \r\n cal[i] = af.readInt();\r\n } catch (IOException e) {\r\n status = -1;\r\n throw new AreaFileException(\"Error reading AreaFile calibration:\"+e);\r\n }\r\n }\r\n // if (flipwords) flipcal(cal);\r\n position = calLoc + calbytes;\r\n }\r\n\r\n // Read in aux block\r\n if (auxLoc > 0 && auxbytes > 0){\r\n aux = new int[auxbytes/4];\r\n newPosition = (long) auxLoc;\r\n skipByteCount = (int) (newPosition - position);\r\n try{\r\n af.skipBytes(skipByteCount);\r\n }catch (IOException e){\r\n status = -1;\r\n throw new AreaFileException(\"Error skipping AreaFile bytes: \" + e);\r\n }\r\n for (i = 0; i < auxbytes/4; i++){\r\n try{\r\n aux[i] = af.readInt();\r\n }catch (IOException e){\r\n status = -1;\r\n throw new AreaFileException(\"Error reading AreaFile aux block:\" + e);\r\n }\r\n }\r\n position = auxLoc + auxbytes;\r\n }\r\n\r\n // now return the Dir, as requested...\r\n status = 1;\r\n return;\r\n }", "public void compileEnded(File workDir, List<? extends File> excludedFiles) { }", "public void compileEnded(File workDir, List<? extends File> excludedFiles) { }", "public boolean ParseExcellon(String fileName, DrillList drillList, DrillToolMap drillToolMap)\n {\n ILogWriter log= new ConsoleLogWriter();\n f=new FileOpration();\n f.Open(fileName);\n String s;\n s=SkipComments();\n if (s.compareTo(\"M48\")!=0)\n {\n log.Writeln(\"begin of header not found\");\n return false;\n }\n log.Writeln(s+\"\\t//header found at \"+f.getIndex());\n s=f.Readln();\n while (s.lastIndexOf(\";FILE_FORMAT=\")==-1)\n {\n s=f.Readln();\n if (s==null) return false;\n }\n log.Writeln(s+\"\\t//found decimal point position declaration at \"+ f.getIndex());\n try {\n digBeforePoint = Integer.parseInt(s.substring(s.lastIndexOf('=')+1,s.lastIndexOf(':')));\n log.Writeln(\"\\tamount of digts before point is setted to \"+digBeforePoint);\n int digAfterPointStartPosition=s.lastIndexOf(':')+1;\n digAfterPoint= Integer.parseInt(s.substring(digAfterPointStartPosition,s.indexOf(' ',digAfterPointStartPosition)));\n log.Writeln(\"\\tamount of digts after point is setted to \"+digAfterPoint);\n }\n catch (NumberFormatException | IndexOutOfBoundsException exc)\n {\n log.Writeln(\"invalid decimal point position declaration\");\n f.Close();\n return false;\n }\n /*catch (IndexOutOfBoundsException exc)\n {\n log.Writeln(\"invalid decimal point position declaration\");\n f.Close();\n return false;\n }*/\n s=SkipComments();\n switch (s.toUpperCase())\n {\n case \"METRIC\":\n metric=true;\n break;\n case \"INCH\":\n metric=false;\n break;\n default:\n log.Writeln(\"the type of measurement system not found\");\n return false;\n }\n log.Writeln(s+\"\\t//the type of measurement system found at \"+f.getIndex());\n log.Writeln(\"\\t the type of measurement system is setted to \"+ (metric?\"METRIC\":\"INCH\"));\n do\n {\n s=SkipComments();\n log.Writeln(s);\n if (s.charAt(0)=='%') break;\n try\n {\n String toolName = s.substring(0, s.indexOf('C'));\n double toolDiam=Double.parseDouble(s.substring(s.indexOf('C')+1));\n drillToolMap.AddTool(toolName,toolDiam);\n log.Writeln(\"\\t\"+toolName+\" with diameter \"+toolDiam+\" found at \"+f.getIndex());\n\n }\n catch (NumberFormatException | IndexOutOfBoundsException exc)\n {\n log.Writeln(\"invalid tool declaration at \"+f.getIndex());\n f.Close();\n return false;\n }\n\n } while (s.charAt(0)!='%');\n log.Writeln(\"end of header found at \"+f.getIndex());\n s = SkipComments();\n do {\n if (s==null)\n {\n log.Writeln(\"parsing completed without footer at \"+f.getIndex());\n f.Close();\n return false;\n }\n if (s.compareTo(\"T00\")==0)\n {\n log.Writeln(\"\\tFooter found at \"+f.getIndex());\n s = SkipComments();\n log.Writeln(s);\n if (s.compareTo(\"M30\")==0)\n {\n log.Writeln(\"\\tEnd of file found at \"+f.getIndex());\n f.Close();\n log.Writeln(\"\\tPARSING COMPLETED\");\n return true;\n }\n log.Writeln(\"parsing completed without footer at \"+f.getIndex());\n f.Close();\n return false;\n }\n log.Writeln(s);\n if (drillToolMap.GetToolDiam(s) == -1) {\n log.Writeln(\"invalid tool name found at \" + f.getIndex());\n f.Close();\n return false;\n }\n DrillFrame df=new DrillFrame();\n df.setDrillDiam(drillToolMap.GetToolDiam(s));\n log.Writeln(\"\\ttool \"+s+\" frame with tool diameter \"+ df.getDrillDiam()+\" found at \"+f.getIndex());\n double x=0,y=0;\n do\n {\n s=SkipComments();\n log.Writeln(s);\n try\n {\n String tempX=\"\",tempY=\"\";\n if (s.indexOf('X')!=-1)\n {\n if (s.indexOf('Y')!=-1)\n {\n tempX = s.substring(s.indexOf('X') + 1, s.indexOf('Y'));\n tempY = s.substring(s.indexOf('Y') + 1);\n }\n else\n {\n tempX = s.substring(s.indexOf('X') + 1);\n }\n }\n else\n {\n if (s.indexOf('Y')!=-1)\n {\n tempY = s.substring(s.indexOf('Y') + 1);\n }\n else\n {\n drillList.Add(df);\n break;\n }\n\n }\n if (tempX!=\"\")\n x=Double.parseDouble(tempX)/Math.pow(10,digAfterPoint);\n if (tempY!=\"\")\n y=Double.parseDouble(tempY)/Math.pow(10,digAfterPoint);\n df.addPoint(x,y);\n log.Writeln(\"\\tpoint (\"+Double.toString(x)+\",\"+Double.toString(y)+\") found at \"+f.getIndex());\n }\n catch (NumberFormatException | IndexOutOfBoundsException exc)\n {\n log.Writeln(\"invalid coordinate at \"+f.getIndex());\n f.Close();\n return false;\n }\n\n }while(true);\n }while (true);\n\n\n //f.Close();\n //return true;\n }", "private void findChangeMarkerFile() {\n if (new File(pathsProvider.getLocalProgramTempDir(), \"dbchangemarker.txt\").exists()) {\n if (hasMetadataChange) System.out.print(\"Found previous changes.\\n\");\n hasMetadataChange = true;\n }\n }", "public static void searchForImageReferences(File rootDir, FilenameFilter fileFilter) {\n \t\tfor (File file : rootDir.listFiles()) {\n \t\t\tif (file.isDirectory()) {\n \t\t\t\tsearchForImageReferences(file, fileFilter);\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\ttry {\n \t\t\t\tif (fileFilter.accept(rootDir, file.getName())) {\n \t\t\t\t\tif (MapTool.getFrame() != null) {\n \t\t\t\t\t\tMapTool.getFrame().setStatusMessage(\"Caching image reference: \" + file.getName());\n \t\t\t\t\t}\n \t\t\t\t\trememberLocalImageReference(file);\n \t\t\t\t}\n \t\t\t} catch (IOException ioe) {\n \t\t\t\tioe.printStackTrace();\n \t\t\t}\n \t\t}\n \t\t// Done\n \t\tif (MapTool.getFrame() != null) {\n \t\t\tMapTool.getFrame().setStatusMessage(\"\");\n \t\t}\n \t}", "@Override\n protected void process() {\n final List<File> srtFiles = new FileFinder().collect(new File(Constants.FILEFIXER_ROOT_DIR), Constants.SRT_EXTENSION);\n\n // process each file, making a backup first if it is enabled\n for (final File srtFile : srtFiles) {\n System.out.println(\"Processing subtitle file :: \" + srtFile.getName());\n\n if (Constants.MAKE_BACKUPS) {\n backupFile(srtFile);\n }\n\n fix(srtFile);\n }\n }", "public void ProcessFiles() {\n LOG.info(\"Processing SrcML files ...\");\n final Collection<File> allFiles = ctx.files.AllFiles();\n int processed = 0;\n final int numAllFiles = allFiles.size();\n final int logDiv = Math.max(1, Math.round(numAllFiles / 100f));\n\n for (File file : allFiles) {\n final String filePath = file.filePath;\n final FilePath fp = ctx.internFilePath(filePath);\n\n Document document = readSrcmlFile(filePath);\n DocWithFileAndCppDirectives extDoc = new DocWithFileAndCppDirectives(file, fp, document, ctx);\n\n internAllFunctionsInFile(file, document);\n processFeatureLocationsInFile(extDoc);\n\n if ((++processed) % logDiv == 0) {\n int percent = Math.round((100f * processed) / numAllFiles);\n LOG.info(\"Parsed SrcML file \" + processed + \"/\" + numAllFiles\n + \" (\" + percent + \"%) (\" + (numAllFiles - processed) + \" to go)\");\n }\n }\n\n LOG.info(\"Parsed all \" + processed + \" SrcML file(s).\");\n }", "public void readTheFile() {\n \t\terrorMap.clear();\n \n \t\tBufferedReader br;\n \t\tString nextLine;\n \t\tString[] header = null;\n \t\tArrayList<String> lines = new ArrayList<String>();\n \t\ttry {\n \t\t\tlogger.debug(\"{} loading file: {} \", getName(), RobotNX100Controller.class.getResource(\"motoman_error_code.txt\").getPath());\n \n \t\t\tbr = new BufferedReader(new FileReader(RobotNX100Controller.class.getResource(\"motoman_error_code.txt\").getPath()));\n \t\t\twhile (((nextLine = br.readLine()) != null) && (nextLine.length() > 0)) {\n \t\t\t\tif (nextLine.startsWith(\"Code\")) {\n \t\t\t\t\theader = nextLine.split(\"[, \\t][, \\t]*\");\n \t\t\t\t} else if (!nextLine.startsWith(\"#\"))\n \t\t\t\t\tlines.add(nextLine);\n \t\t\t}\n \t\t\tbr.close();\n \t\t} catch (FileNotFoundException fnfe) {\n \t\t\t// we do not want to interrupt processing because error map file not set.\n \t\t\tlogger.warn(\"Can not find the Error Message file {} for {}. Only Error code will be reported.\",\n \t\t\t\t\tgetErrorCodeFilename(), getName());\n \t\t\tlogger.warn(\"caused by \" + fnfe.getMessage(), fnfe);\n \t\t\tbr = null;\n \t\t\treturn;\n \t\t} catch (IOException ioe) {\n \t\t\t// we do not want to interrupt processing because error map file not set.\n \t\t\tlogger.warn(\"Can not find the Error Message file {} for {}. Only Error code will be reported.\",\n \t\t\t\t\tgetErrorCodeFilename(), getName());\n \t\t\tlogger.error(\"caused by \" + ioe.getMessage(), ioe);\n \t\t\tbr = null;\n \t\t\treturn;\n \t\t}\n \n \t\tnumberOfRows = lines.size();\n \t\tlogger.debug(\"the file contained \" + numberOfRows + \" lines\");\n \t\tint nColumns = new StringTokenizer(lines.get(0), \"\\t\").countTokens();\n \t\tlogger.debug(\"each line should contain \" + nColumns + \" numbers\");\n \t\tkeys = new ArrayList<String>();\n \t\tif (header != null) {\n \t\t\tfor (int i = 1; i < nColumns; i++) {\n \t\t\t\terrorMap.put(header[0], header[i]);\n \t\t\t}\n \t\t\tkeys.add(header[0]);\n \t\t}\n \n \t\tfor (int i = 0; i < numberOfRows; i++) {\n \t\t\tnextLine = lines.get(i);\n \t\t\tString[] thisLine = nextLine.split(\"[\\t][\\t]*\");\n \t\t\tfor (int j = 0; j < thisLine.length; j++)\n \t\t\t\terrorMap.put(thisLine[0], thisLine[j]);\n \t\t\tkeys.add(thisLine[0]);\n \t\t}\n \t}", "public static boolean removeMRFilesFromDB( ArrayList entries_todelete ) {\n \n boolean status = sql_epiII.deleteMRFilesByPDBIdsByDetail(\n entries_todelete, SQL_Episode_II.FILE_DETAIL_CLASSIFIED );\n if ( ! status ) {\n General.showError(\"in MRAnnotate.removeMRFilesFromDB found:\");\n General.showError(\"Deleting the annotated MR files:\" + entries_todelete);\n return false;\n } else {\n General.showOutput(\"Deleted the annotated MR files:\" + entries_todelete);\n }\n return true;\n }", "public static void main(String[] args) {\n String fileDirectoryPath = \"D:\\\\My WorkSpace\\\\New folder\\\\FBCO Worklist\";\n String[] sysEnvDetails = {\"SrcSystem\", \"SrcEnv\", \"TgtSystem\", \"TgtEnv\"};\n File dir = new File(fileDirectoryPath);\n search(\".*\\\\.sql\", dir, sysEnvDetails);\n\n }", "private File getMatchingFile(String fileName){\n debug(\"matching file: \"+fileName);\n StringBuffer filePath = new StringBuffer();\n filePath.append(rootDir.getAbsolutePath());\n filePath.append(File.separator);\n String compPath = fileName.replace('\\\\', '/'); \n Iterator it = files.iterator(); \n while(it.hasNext()){\n String rawPath = (String)it.next();\n String path = rawPath.replace('\\\\', '/');\n debug(\"path:\"+path); \n if(getFile(rawPath).isDirectory()){\n //check if path ends with the same name as fileName starts\n int rawIndex = path.lastIndexOf('/');\n String rawEnd = path.substring(rawIndex+1);\n debug(\"rawend:\"+rawEnd);\n int compIndex = compPath.indexOf('/');\n String compStart;\n if (compIndex < 0) {\n compStart = \".\";\n } else {\n compStart = compPath.substring(0,compIndex);\n }\n if(rawEnd.equals(compStart)){\n debug(\"equals\");\n filePath.append(path);\n if (compIndex >= 0) filePath.append(compPath.substring(compIndex));\n break;\n }\n }else{\n if(path.endsWith(compPath)){\n filePath.append(path);\n break;\n }\n }\n }\n debug(\"matching file result:\"+filePath.toString());\n return new File(filePath.toString());\n }", "static void analyze(String workingDir) throws FileNotFoundException, IOException {\n String inputPath = workingDir + \"/aggregated\";\n String outputPath = workingDir + \"/analyzed\";\n\n\n // A domain filter to exclude ignored domains. Is able to cope if the files don't exist.\n Filter domainFilter = new FileDomainFilter(\n // Some defaults.\n new String[] {\n \"doi.org\",\n \"crossref.org\",\n \"unknown.special\"},\n\n // Files that contain filtered out domain names. May or may not exist.\n new String[] {\n workingDir + \"/filter-domain-names.txt\",\n workingDir + \"/filter-full-domain-names.txt\"\n });\n\n File input = new File(inputPath);\n File output = new File(outputPath);\n\n System.out.format(\"Process %s to %s\\n\", inputPath, outputPath);\n Analyzer analyzer = new Analyzer(input, output);\n\n AnalyzerStrategy[] strategies = new AnalyzerStrategy[] {\n new CodeTableAnalyzerStrategy(new TruncateDay()),\n new CodeTableAnalyzerStrategy(new TruncateMonth()),\n\n // Domain and full domain filtered and unfiltered.\n new FullDomainAnalyzerStrategy(new TruncateMonth(), new EverythingFilter()),\n new DomainAnalyzerStrategy(new TruncateDay(), new EverythingFilter()),\n new FullDomainAnalyzerStrategy(new TruncateMonth(), domainFilter),\n new DomainAnalyzerStrategy(new TruncateDay(), domainFilter),\n\n new GroupedFullDomainsAnalyzerStrategy(new EverythingFilter()),\n new GroupedFullDomainsAnalyzerStrategy(domainFilter),\n new FullDomainDomainAnalyzerStrategy(),\n\n new DOIAnalyzerStrategy(),\n \n // Top N once with unfiltered domains.\n new TopNDomainsTableAnalyzerStrategy(10, new TruncateDay(), new EverythingFilter()),\n new TopNDomainsTableAnalyzerStrategy(10, new TruncateMonth(), new EverythingFilter()),\n new TopNDomainsTableAnalyzerStrategy(100, new TruncateMonth(), new EverythingFilter()),\n\n // And once with filtered domains. Even if the files aren't present, referrers like doi.org will be removed.\n new TopNDomainsTableAnalyzerStrategy(10, new TruncateDay(), domainFilter),\n new TopNDomainsTableAnalyzerStrategy(10, new TruncateMonth(), domainFilter),\n new TopNDomainsTableAnalyzerStrategy(100, new TruncateMonth(), domainFilter)\n\n\n };\n\n try {\n for (AnalyzerStrategy strategy: strategies) {\n System.out.format(\"Analyze with strategy: %s \\n\", strategy.toString());\n analyzer.run(strategy);\n // As each strategy is stateful and stays in the GC graph, allow it to let go of its data (which can be sizable).\n strategy.dispose();\n System.out.format(\"Finished analyze with strategy: %s \\n\", strategy.toString());\n }\n } catch (Exception e) {\n System.err.println(\"Error:\");\n e.printStackTrace();\n }\n }", "public void mo83568b(File file) {\n if (file.isDirectory()) {\n File[] listFiles = file.listFiles();\n if (listFiles == null || listFiles.length == 0) {\n mo83565a(file);\n return;\n }\n for (File file2 : listFiles) {\n mo83568b(file2);\n }\n }\n mo83565a(file);\n }", "@Override\n\t\t\t\t\tpublic boolean accept(File f) {\n\t\t\t\t\t\tif (f.isDirectory()) {\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tString filename = f.getName().toLowerCase();\n\t\t\t\t\t\t\treturn filename.endsWith(\".pr1\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "public void checkWithCorrectResults() {\n\t\tFile correctDir = new File (correctDir() + \"/\" + assignmentNo());\r\n\r\n//\t\tFile testDir = new File (\"Test Data/Test 110 F13 Assignments/Assignment3\");\r\n\t\tFile testDir = new File (testDir() + \"/\" + assignmentNo());\r\n\r\n\t\tString[] ignoreSuffixesArray = {\".zip\", \".ini\", \".json\", \"Submission attachment(s)\"};\r\n//\t\tString[] ignoreSuffixesArray = {\".zip\", \".ini\", \".json\"};\r\n\r\n\t\tList<String> ignoreSuffixesList = Arrays.asList(ignoreSuffixesArray);\r\n\t\tSystem.out.println(DirectoryUtils.compare (correctDir, testDir, ignoreSuffixesList));\r\n\t}", "private void b044904490449щ0449щ() {\n /*\n r7 = this;\n r0 = new rrrrrr.ccrcrc;\n r1 = new java.lang.StringBuilder;\n r1.<init>();\n r2 = r7.bнн043Dннн;\n r2 = com.immersion.aws.analytics.ImmrAnalytics.b044C044C044C044Cьь(r2);\n r2 = r2.getFilesDir();\n r1 = r1.append(r2);\n r2 = java.io.File.separator;\n r1 = r1.append(r2);\n L_0x001b:\n r2 = 1;\n switch(r2) {\n case 0: goto L_0x001b;\n case 1: goto L_0x0024;\n default: goto L_0x001f;\n };\n L_0x001f:\n r2 = 0;\n switch(r2) {\n case 0: goto L_0x0024;\n case 1: goto L_0x001b;\n default: goto L_0x0023;\n };\n L_0x0023:\n goto L_0x001f;\n L_0x0024:\n r2 = \"3HC4C-01.txt\";\n r1 = r1.append(r2);\n r1 = r1.toString();\n r0.<init>(r1);\n r0.load();\n L_0x0034:\n r1 = r0.size();\n if (r1 <= 0) goto L_0x007a;\n L_0x003a:\n r1 = r0.peek();\n r2 = new rrrrrr.rcccrr;\n r2.<init>();\n r3 = r7.bнн043Dннн;\n r3 = com.immersion.aws.analytics.ImmrAnalytics.b044Cь044C044Cьь(r3);\n monitor-enter(r3);\n r4 = r7.bнн043Dннн;\t Catch:{ all -> 0x0074 }\n r4 = com.immersion.aws.analytics.ImmrAnalytics.bь044C044C044Cьь(r4);\t Catch:{ all -> 0x0074 }\n r4 = r4.bЛ041B041BЛ041BЛ;\t Catch:{ all -> 0x0074 }\n r5 = r7.bнн043Dннн;\t Catch:{ all -> 0x0074 }\n r5 = com.immersion.aws.analytics.ImmrAnalytics.bь044C044C044Cьь(r5);\t Catch:{ all -> 0x0074 }\n r5 = r5.b041B041B041BЛ041BЛ;\t Catch:{ all -> 0x0074 }\n r6 = r7.bнн043Dннн;\t Catch:{ all -> 0x0074 }\n r6 = com.immersion.aws.analytics.ImmrAnalytics.bь044C044C044Cьь(r6);\t Catch:{ all -> 0x0074 }\n r6 = r6.bЛЛЛ041B041BЛ;\t Catch:{ all -> 0x0074 }\n monitor-exit(r3);\t Catch:{ all -> 0x0074 }\n r1 = r2.sendHttpRequestFromCache(r4, r5, r6, r1);\n if (r1 == 0) goto L_0x0077;\n L_0x0069:\n if (r4 == 0) goto L_0x0077;\n L_0x006b:\n if (r5 == 0) goto L_0x0077;\n L_0x006d:\n r0.remove();\n r0.save();\n goto L_0x0034;\n L_0x0074:\n r0 = move-exception;\n monitor-exit(r3);\t Catch:{ all -> 0x0074 }\n throw r0;\n L_0x0077:\n r0.save();\n L_0x007a:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: rrrrrr.cccccr.b044904490449щ0449щ():void\");\n }", "@Override\r\n\t\tpublic boolean accept(File dir, String name) {\n\t\t\treturn indexFilenames.contains(name.toLowerCase());\r\n\t\t}", "private boolean isCodeFile(File file) {\n return file.isFile() && file.getName().endsWith(CODE_FILE_EXTENSION);\n }", "public static void main(String[] args)\r\n\t{\r\n\t\tString inputFolder = rootFolder + \"\\\\LED Peg\";\r\n\t\tString outputFolder = rootFolder + \"\\\\LEDPeg_output\";\r\n\t\t\t\t\r\n\t\tFile folder = new File(inputFolder);\r\n\t\tFile[] listOfFiles = folder.listFiles();\r\n\t\t\r\n\t\tEntropy2017Targeting imageProcessor = new Entropy2017Targeting(null, null);\r\n\t\timageProcessor.processingForPeg = true;\r\n\t\t\r\n\t\tfor(File f : listOfFiles)\r\n\t\t{\r\n\t\t\tSystem.out.println();\r\n\t\t\tSystem.out.println(\"---------------------------------------------------------------------------------------------\");\r\n\t\t\tSystem.out.println();\r\n\t\t\tSystem.out.println(\"File: \" + f.getPath());\r\n\t\t\t\r\n\t\t\tMat ourImage = Imgcodecs.imread(f.getPath());\r\n\t\t\timageProcessor.processImage(ourImage);\r\n\t\t\tImgcodecs.imwrite(outputFolder + \"\\\\\"+ f.getName()+\".png\", ourImage);\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Completed file.\");\r\n\t\t}\r\n\t\tSystem.out.println(\"Processed all images.\");\r\n\t}", "private void runTestInDirectory(String dirName) throws Exception {\n Pattern indentPattern = Pattern.compile(\"^.*\\\\s\\\\(indent (\\\\d+)\\\\)\\\\s*\");\n\n String testName = getTestName(true);\n if (Character.isLetter(testName.charAt(0)) && Character.isDigit(testName.charAt(testName.length() - 1))) {\n testName = testName.substring(0, testName.length() - 1);\n }\n\n File dir = new File(new File(getTestDataPath(), getBasePath()), dirName);\n boolean found = false;\n\n final StringBuilder combinedActualResult = new StringBuilder();\n final StringBuilder combinedExpectedResult = new StringBuilder();\n\n for (String ext : new String[]{\".stmt\", \".unit\"}) {\n String testFileName = testName + ext;\n File entry = new File(dir, testFileName);\n if (!entry.exists()) {\n continue;\n }\n\n found = true;\n String[] lines = ArrayUtil.toStringArray(FileUtil.loadLines(entry, \"UTF-8\"));\n boolean isCompilationUnit = entry.getName().endsWith(\".unit\");\n\n // The first line may have a \"|\" to indicate the page width.\n int pageWidth = 80;\n int i = 0;\n\n if (lines[0].endsWith(\"|\")) {\n // As it happens, this is always 40 except for some files in 'regression'\n pageWidth = lines[0].indexOf(\"|\");\n i = 1;\n }\n\n System.out.println(\"\\nTest: \" + dirName + \"/\" + testFileName + \", Right margin: \" + pageWidth);\n final CommonCodeStyleSettings settings = getSettings(DartLanguage.INSTANCE);\n settings.RIGHT_MARGIN = pageWidth;\n settings.KEEP_LINE_BREAKS = false; // TODO Decide whether this should be the default -- risky!\n\n while (i < lines.length) {\n String description = (dirName + \"/\" + testFileName + \":\" + (i + 1) + \" \" + lines[i++].replaceAll(\">>>\", \"\")).trim();\n\n // Let the test specify a leading indentation. This is handy for\n // regression tests which often come from a chunk of nested code.\n int leadingIndent = 0;\n Matcher matcher = indentPattern.matcher(description);\n\n if (matcher.matches()) {\n // The leadingIndent is only used by some tests in 'regression'.\n leadingIndent = Integer.parseInt(matcher.group(1));\n settings.RIGHT_MARGIN = pageWidth - leadingIndent;\n }\n\n String input = \"\";\n // If the input isn't a top-level form, wrap everything in a function.\n // The formatter fails horribly otherwise.\n if (!isCompilationUnit) input += \"m() {\\n\";\n\n while (!lines[i].startsWith(\"<<<\")) {\n String line = lines[i++];\n if (leadingIndent > 0) line = line.substring(leadingIndent);\n if (!isCompilationUnit) line = \" \" + line;\n input += line + \"\\n\";\n }\n\n if (!isCompilationUnit) input += \"}\\n\";\n\n String expectedOutput = \"\";\n if (!isCompilationUnit) expectedOutput += \"m() {\\n\";\n\n i++;\n\n while (i < lines.length && !lines[i].startsWith(\">>>\")) {\n String line = lines[i++];\n if (leadingIndent > 0) line = line.substring(leadingIndent);\n if (!isCompilationUnit) line = \" \" + line;\n expectedOutput += line + \"\\n\";\n }\n\n if (!isCompilationUnit) expectedOutput += \"}\\n\";\n\n SourceCode inputCode = extractSelection(input, isCompilationUnit);\n SourceCode expected = extractSelection(expectedOutput, isCompilationUnit);\n\n myTextRange = new TextRange(inputCode.selectionStart, inputCode.selectionEnd());\n\n try {\n doTextTest(inputCode.text, expected.text);\n if (KNOWN_TO_FAIL.contains(description)) {\n fail(\"The test passed, but was expected to fail: \" + description);\n }\n System.out.println(\"TEST PASSED: \" + (description.isEmpty() ? \"(unnamed)\" : description));\n }\n catch (ComparisonFailure failure) {\n if (!KNOWN_TO_FAIL.contains(description)) {\n combinedExpectedResult.append(\"TEST: \").append(description).append(\"\\n\").append(failure.getExpected()).append(\"\\n\");\n combinedActualResult.append(\"TEST: \").append(description).append(\"\\n\").append(failure.getActual()).append(\"\\n\");\n }\n }\n }\n }\n\n if (!found) {\n fail(\"No test data for \" + testName);\n }\n\n assertEquals(combinedExpectedResult.toString(), combinedActualResult.toString());\n }", "@InterfaceAudience.Private\n @VisibleForTesting\n long scanForLogs() throws IOException {\n LOG.debug(\"scanForLogs on {}\", appDirPath);\n long newestModTime = 0;\n RemoteIterator<FileStatus> iterAttempt = list(appDirPath);\n while (iterAttempt.hasNext()) {\n FileStatus statAttempt = iterAttempt.next();\n LOG.debug(\"scanForLogs on {}\", statAttempt.getPath().getName());\n if (!statAttempt.isDirectory()\n || !statAttempt.getPath().getName()\n .startsWith(ApplicationAttemptId.appAttemptIdStrPrefix)) {\n LOG.debug(\"Scanner skips for unknown dir/file {}\",\n statAttempt.getPath());\n continue;\n }\n String attemptDirName = statAttempt.getPath().getName();\n RemoteIterator<FileStatus> iterCache = list(statAttempt.getPath());\n while (iterCache.hasNext()) {\n FileStatus statCache = iterCache.next();\n if (!statCache.isFile()) {\n continue;\n }\n String filename = statCache.getPath().getName();\n String owner = statCache.getOwner();\n //YARN-10884:Owner of File is set to Null on WASB Append Operation.ATS fails to read such\n //files as UGI cannot be constructed using Null User.To Fix this,anonymous user is set\n //when ACL us Disabled as the UGI is not needed there\n if ((owner == null || owner.isEmpty()) && !aclsEnabled) {\n LOG.debug(\"The owner was null when acl disabled, hence making the owner anonymous\");\n owner = \"anonymous\";\n }\n // We should only update time for log files.\n boolean shouldSetTime = true;\n LOG.debug(\"scan for log file: {}\", filename);\n if (filename.startsWith(DOMAIN_LOG_PREFIX)) {\n addSummaryLog(attemptDirName, filename, owner, true);\n } else if (filename.startsWith(SUMMARY_LOG_PREFIX)) {\n addSummaryLog(attemptDirName, filename, owner,\n false);\n } else if (filename.startsWith(ENTITY_LOG_PREFIX)) {\n addDetailLog(attemptDirName, filename, owner);\n } else {\n shouldSetTime = false;\n }\n if (shouldSetTime) {\n newestModTime\n = Math.max(statCache.getModificationTime(), newestModTime);\n }\n }\n }\n\n // if there are no logs in the directory then use the modification\n // time of the directory itself\n if (newestModTime == 0) {\n newestModTime = fs.getFileStatus(appDirPath).getModificationTime();\n }\n\n return newestModTime;\n }", "CRYS_Score(RunParameters params) {\n\t\tthis.params = params;\n\t\ttry {\n\t\t\tthis.myProt = new SimpleProtein(params.getPDBsrc(), params);\n\t\t\trequestedChain = params.getChainToProcess();\n\t\t\texpectedTotalNumberOfFiles = myProt.getChain(requestedChain).getLength() * 20;\n\t\t\t//\t\t\tTODO find a way to read CIF files to map object to allow for multithreading of SFCHECK\n\t\t\t\n\t\t\t\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(e.getMessage());\n\t\t\tSystem.out.println(\"Problem processing PDB file\");\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\t\n\t\t}\n\t}", "public boolean accept(File dir, String name) {\n return pattern.matcher(new File(name).getName()).matches();\n }", "private boolean isApeFile(java.lang.String r4, java.lang.String r5) {\n /*\n r3 = this;\n java.lang.String r3 = \"audio/*\"\n boolean r3 = r3.equals(r4)\n r4 = 0\n if (r3 == 0) goto L_0x005e\n r3 = 0\n android.media.MediaExtractor r0 = new android.media.MediaExtractor // Catch:{ IOException -> 0x003b, all -> 0x0037 }\n r0.<init>() // Catch:{ IOException -> 0x003b, all -> 0x0037 }\n r0.setDataSource(r5) // Catch:{ IOException -> 0x0035 }\n r3 = r4\n L_0x0013:\n int r5 = r0.getTrackCount() // Catch:{ IOException -> 0x0035 }\n if (r3 >= r5) goto L_0x0031\n android.media.MediaFormat r5 = r0.getTrackFormat(r3) // Catch:{ IOException -> 0x0035 }\n java.lang.String r1 = \"mime\"\n java.lang.String r5 = r5.getString(r1) // Catch:{ IOException -> 0x0035 }\n if (r5 == 0) goto L_0x002e\n java.lang.String r1 = \"audio/\"\n boolean r5 = r5.startsWith(r1) // Catch:{ IOException -> 0x0035 }\n if (r5 == 0) goto L_0x002e\n goto L_0x0031\n L_0x002e:\n int r3 = r3 + 1\n goto L_0x0013\n L_0x0031:\n r0.release()\n goto L_0x005e\n L_0x0035:\n r3 = move-exception\n goto L_0x003e\n L_0x0037:\n r4 = move-exception\n r0 = r3\n r3 = r4\n goto L_0x0058\n L_0x003b:\n r5 = move-exception\n r0 = r3\n r3 = r5\n L_0x003e:\n java.lang.String r5 = \"\"\n java.lang.StringBuilder r1 = new java.lang.StringBuilder // Catch:{ all -> 0x0057 }\n r1.<init>() // Catch:{ all -> 0x0057 }\n java.lang.String r2 = \"ringtoneCopyFrom3rdParty: \"\n r1.append(r2) // Catch:{ all -> 0x0057 }\n r1.append(r3) // Catch:{ all -> 0x0057 }\n java.lang.String r3 = r1.toString() // Catch:{ all -> 0x0057 }\n com.oneplus.settings.ringtone.OPMyLog.e(r5, r3) // Catch:{ all -> 0x0057 }\n if (r0 == 0) goto L_0x005e\n goto L_0x0031\n L_0x0057:\n r3 = move-exception\n L_0x0058:\n if (r0 == 0) goto L_0x005d\n r0.release()\n L_0x005d:\n throw r3\n L_0x005e:\n return r4\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.oneplus.settings.ringtone.OPLocalRingtonePickerActivity.isApeFile(java.lang.String, java.lang.String):boolean\");\n }", "private void scanJarArchive() throws AnalyzerException {\n\t\tJarFile jarFile;\n\t\ttry {\n\t\t\tjarFile = new JarFile(archive);\n\t\t} catch (IOException ioe) {\n\t\t\tthrow new AnalyzerException(\"Cannot build jar file on archive '\"\n\t\t\t\t\t+ archive + \"'.\", ioe);\n\t\t}\n\t\tEnumeration<? extends ZipEntry> en = jarFile.entries();\n\t\twhile (en.hasMoreElements()) {\n\t\t\tZipEntry e = en.nextElement();\n\t\t\tString name = e.getName();\n\t\t\t// iterate through the jar file\n\t\t\tif (name.toLowerCase().endsWith(\".class\")) {\n\t\t\t\ttry {\n\t\t\t\t\tnew ClassReader(jarFile.getInputStream(e)).accept(\n\t\t\t\t\t\t\tscanVisitor, ClassReader.SKIP_CODE);\n\t\t\t\t} catch (Exception ioe) {\n\t\t\t\t\tthrow new AnalyzerException(\n\t\t\t\t\t\t\t\"Error while analyzing file entry '\" + name\n\t\t\t\t\t\t\t\t\t+ \"' in jar file '\" + archive + \"'\", ioe);\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t\ttry {\n\t\t\tjarFile.close();\n\t\t} catch (IOException ioe) {\n\t\t\tlogger.warn(\"Error while trying to close the file '\" + jarFile\n\t\t\t\t\t+ \"'\", ioe);\n\t\t}\n\n\t}", "public static void main(String[] args) throws IOException {\n\n SimpleDateFormat ft = new SimpleDateFormat(\"hh:mm:ss\");\n System.out.println(\"Started at \" + ft.format(new Date()));\n\n // Folder containing android apps to analyze\n final PluginId pluginId = PluginId.getId(\"idaDoctor\");\n final IdeaPluginDescriptor pluginDescriptor = PluginManager.getPlugin(pluginId);\n File experimentDirectory = new File(root_project.getBasePath());\n fileName = new File(pluginDescriptor.getPath().getAbsolutePath()+\"/resources/results.csv\");\n String smellsNeeded = args[0];\n\n FILE_HEADER = new String[StringUtils.countMatches(smellsNeeded, \"1\") + 1];\n\n DataTransmissionWithoutCompressionRule dataTransmissionWithoutCompressionRule = new DataTransmissionWithoutCompressionRule();\n DebuggableReleaseRule debbugableReleaseRule = new DebuggableReleaseRule();\n DurableWakeLockRule durableWakeLockRule = new DurableWakeLockRule();\n InefficientDataFormatAndParserRule inefficientDataFormatAndParserRule = new InefficientDataFormatAndParserRule();\n InefficientDataStructureRule inefficientDataStructureRule = new InefficientDataStructureRule();\n InefficientSQLQueryRule inefficientSQLQueryRule = new InefficientSQLQueryRule();\n InternalGetterSetterRule internaleGetterSetterRule = new InternalGetterSetterRule();\n LeakingInnerClassRule leakingInnerClassRule = new LeakingInnerClassRule();\n LeakingThreadRule leakingThreadRule = new LeakingThreadRule();\n MemberIgnoringMethodRule memberIgnoringMethodRule = new MemberIgnoringMethodRule();\n NoLowMemoryResolverRule noLowMemoryResolverRule = new NoLowMemoryResolverRule();\n PublicDataRule publicDataRule = new PublicDataRule();\n RigidAlarmManagerRule rigidAlarmManagerRule = new RigidAlarmManagerRule();\n SlowLoopRule slowLoopRule = new SlowLoopRule();\n UnclosedCloseableRule unclosedCloseableRule = new UnclosedCloseableRule();\n\n String[] smellsType = {\"DTWC\", \"DR\", \"DW\", \"IDFP\", \"IDS\", \"ISQLQ\", \"IGS\", \"LIC\", \"LT\", \"MIM\", \"NLMR\", \"PD\", \"RAM\", \"SL\", \"UC\"};\n\n FILE_HEADER[0] = \"Class\";\n\n int headerCounter = 1;\n\n for (int i = 0; i < smellsNeeded.length(); i++) {\n if (smellsNeeded.charAt(i) == '1') {\n FILE_HEADER[headerCounter] = smellsType[i];\n headerCounter++;\n }\n }\n\n CSVFormat csvFileFormat = CSVFormat.DEFAULT.withRecordSeparator(NEW_LINE_SEPARATOR);\n FileWriter fileWriter = new FileWriter(fileName);\n try (CSVPrinter csvFilePrinter = new CSVPrinter(fileWriter, csvFileFormat)) {\n csvFilePrinter.printRecord((Object[]) FILE_HEADER);\n\n for (File project : experimentDirectory.listFiles()) {\n\n if (!project.isHidden()) {\n\n // Method to convert a directory into a set of java packages.\n ArrayList<PackageBean> packages = FolderToJavaProjectConverter.convert(project.getAbsolutePath());\n\n for (PackageBean packageBean : packages) {\n\n for (ClassBean classBean : packageBean.getClasses()) {\n\n List record = new ArrayList();\n\n System.out.println(\"-- Analyzing class: \" + classBean.getBelongingPackage() + \".\" + classBean.getName());\n\n record.add(classBean.getBelongingPackage() + \".\" + classBean.getName());\n\n if (smellsNeeded.charAt(0) == '1') {\n if (dataTransmissionWithoutCompressionRule.isDataTransmissionWithoutCompression(classBean)) {\n record.add(\"1\");\n } else {\n record.add(\"0\");\n }\n }\n\n if (smellsNeeded.charAt(1) == '1') {\n if (debbugableReleaseRule.isDebuggableRelease(RunAndroidSmellDetection.getAndroidManifest(project))) {\n record.add(\"1\");\n } else {\n record.add(\"0\");\n }\n }\n\n if (smellsNeeded.charAt(2) == '1') {\n if (durableWakeLockRule.isDurableWakeLock(classBean)) {\n record.add(\"1\");\n } else {\n record.add(\"0\");\n }\n }\n\n if (smellsNeeded.charAt(3) == '1') {\n if (inefficientDataFormatAndParserRule.isInefficientDataFormatAndParser(classBean)) {\n record.add(\"1\");\n } else {\n record.add(\"0\");\n }\n }\n\n if (smellsNeeded.charAt(4) == '1') {\n if (inefficientDataStructureRule.isInefficientDataStructure(classBean)) {\n record.add(\"1\");\n } else {\n record.add(\"0\");\n }\n }\n\n if (smellsNeeded.charAt(5) == '1') {\n if (inefficientSQLQueryRule.isInefficientSQLQuery(classBean)) {\n record.add(\"1\");\n } else {\n record.add(\"0\");\n }\n }\n\n if (smellsNeeded.charAt(6) == '1') {\n if (internaleGetterSetterRule.isInternalGetterSetter(classBean)) {\n record.add(\"1\");\n } else {\n record.add(\"0\");\n }\n }\n\n if (smellsNeeded.charAt(7) == '1') {\n if (leakingInnerClassRule.isLeakingInnerClass(classBean)) {\n record.add(\"1\");\n } else {\n record.add(\"0\");\n }\n }\n\n if (smellsNeeded.charAt(8) == '1') {\n if (leakingThreadRule.isLeakingThread(classBean)) {\n record.add(\"1\");\n } else {\n record.add(\"0\");\n }\n }\n\n if (smellsNeeded.charAt(9) == '1') {\n if (memberIgnoringMethodRule.isMemberIgnoringMethod(classBean)) {\n record.add(\"1\");\n } else {\n record.add(\"0\");\n }\n }\n\n if (smellsNeeded.charAt(10) == '1') {\n if (noLowMemoryResolverRule.isNoLowMemoryResolver(classBean)) {\n record.add(\"1\");\n } else {\n record.add(\"0\");\n }\n }\n\n if (smellsNeeded.charAt(11) == '1') {\n if (publicDataRule.isPublicData(classBean)) {\n record.add(\"1\");\n } else {\n record.add(\"0\");\n }\n }\n\n if (smellsNeeded.charAt(12) == '1') {\n if (rigidAlarmManagerRule.isRigidAlarmManager(classBean)) {\n record.add(\"1\");\n } else {\n record.add(\"0\");\n }\n }\n\n if (smellsNeeded.charAt(13) == '1') {\n if (slowLoopRule.isSlowLoop(classBean)) {\n record.add(\"1\");\n } else {\n record.add(\"0\");\n }\n }\n\n if (smellsNeeded.charAt(14) == '1') {\n if (unclosedCloseableRule.isUnclosedCloseable(classBean)) {\n record.add(\"1\");\n } else {\n record.add(\"0\");\n }\n }\n csvFilePrinter.printRecord(record);\n }\n }\n }\n }\n }\n System.out.println(\"CSV file was created successfully!\");\n System.out.println(\"Finished at \" + ft.format(new Date()));\n }", "private final java.util.Map<java.lang.String, java.lang.String> m11967c() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r7 = this;\n r0 = new java.util.HashMap;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r0.<init>();\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r1 = r7.f10169c;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r2 = r7.f10170d;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r3 = f10168i;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r4 = 0;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r5 = 0;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r6 = 0;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r1 = r1.query(r2, r3, r4, r5, r6);\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n if (r1 == 0) goto L_0x0031;\n L_0x0014:\n r2 = r1.moveToNext();\t Catch:{ all -> 0x002c }\n if (r2 == 0) goto L_0x0028;\t Catch:{ all -> 0x002c }\n L_0x001a:\n r2 = 0;\t Catch:{ all -> 0x002c }\n r2 = r1.getString(r2);\t Catch:{ all -> 0x002c }\n r3 = 1;\t Catch:{ all -> 0x002c }\n r3 = r1.getString(r3);\t Catch:{ all -> 0x002c }\n r0.put(r2, r3);\t Catch:{ all -> 0x002c }\n goto L_0x0014;\n L_0x0028:\n r1.close();\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n goto L_0x0031;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n L_0x002c:\n r0 = move-exception;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r1.close();\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n throw r0;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n L_0x0031:\n return r0;\n L_0x0032:\n r0 = \"ConfigurationContentLoader\";\n r1 = \"PhenotypeFlag unable to load ContentProvider, using default values\";\n android.util.Log.e(r0, r1);\n r0 = 0;\n return r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.measurement.zzsi.c():java.util.Map<java.lang.String, java.lang.String>\");\n }", "private static void check (String filename)\n\t\t\tthrows Exception {\n\t\tpythonLexer lexer = new pythonLexer(\n\t\t\t\tCharStreams.fromFileName(filename));\n\t\tCommonTokenStream tokens = \n\t\t new CommonTokenStream(lexer);\n\t\tParseTree tree =\n\t\t syntacticAnalyse(tokens);\n\t\tcontextualAnalyse(tree,tokens);\n\t}", "void processContentFiles(final File directoryToProcess, final String configId) {\r\n File[] files = directoryToProcess.listFiles();\r\n for (int fileIndex = 0; fileIndex < files.length; fileIndex++) {\r\n if (!(files[fileIndex].getName().equals(Constants.CONFIGURATION_FILE_NAME) || files[fileIndex]\r\n .getName().startsWith(\"successful_\"))) {\r\n try {\r\n storeContentToInfrastructure(directoryToProcess, configId, files, fileIndex);\r\n }\r\n catch (DepositorException e) {\r\n // FIXME give a message\r\n LOG.error(e.getMessage(), e);\r\n addToFailedConfigurations(configId);\r\n }\r\n }\r\n }\r\n }", "private List<Locale> findAvailableLocales(File directory) {\n\t\t\n\t\tif(directory == null) throw new NullPointerException();\n\t\t\n\t\tArrayList<Locale> localeList = new ArrayList<Locale>();\n\n\t\tif(!directory.exists() || !directory.isDirectory()) {\n\t\t\treturn localeList;\n\t\t}\n\n\t\tFile[] files = directory.listFiles();\n\t\t\n\t\tPattern pattern01 = Pattern.compile(RESOURCE_BUNDLE_BASE_NAME + \"(?:_([.[^_]]+)){1}(?:_([.[^_]]+)){1}(?:_(.+)){0,}\" + \"\\\\.\" + RESOURCE_BUNDLE_EXTENSION);\n\t\tPattern pattern02 = Pattern.compile(RESOURCE_BUNDLE_BASE_NAME + \"(?:_([.[^_]]+)){1}(?:_([.[^_]]+)){0,}\" + \"\\\\.\" + RESOURCE_BUNDLE_EXTENSION);\n\t\t\n//\t\tSystem.out.println(\"\\n\\n\\n\");\n\n\t\tfor(File file : files) {\n\t\t\t\n\t\t\tString fileName = file.getName();\n\t\t\t\n\t\t\tString language = \"\";\n\t\t\tString country = \"\";\n\t\t\tString variant = \"\";\n\t\t\t\n//\t\t\tSystem.out.println(\"testing file \\\"\" + fileName + \"\\\"\");\n\n\t\t\tMatcher matcher01 = pattern01.matcher(fileName);\n\t\t\t\n\t\t\tif(matcher01.matches()) {\n\t\t\t\t\n//\t\t\t\tfor(int i = 0; i < matcher01.groupCount(); i++) {\n//\t\t\t\t\tSystem.out.println(i + \" = \" + matcher01.group(i + 1));\n//\t\t\t\t}\n\t\t\t\t\n\t\t\t\tlanguage = matcher01.group(1);\n\t\t\t\tcountry = matcher01.group(2);\n\t\t\t\tvariant = matcher01.group(3) != null ? matcher01.group(3) : \"\";\n\t\t\t\t\n\t\t\t\tlocaleList.add(new Locale(matcher01.group(1), matcher01.group(2), matcher01.group(3) != null ? matcher01.group(3) : \"\"));\n\t\t\t\n\t\t\t} else {\n\n\t\t\t\tMatcher matcher02 = pattern02.matcher(fileName);\n\t\t\t\t\n\t\t\t\tif(matcher02.matches()) {\n\t\t\t\t\t\n//\t\t\t\t\tfor(int i = 0; i < matcher02.groupCount(); i++) {\n//\t\t\t\t\t\tSystem.out.println(i + \" = \" + matcher02.group(i + 1));\n//\t\t\t\t\t}\n\n\t\t\t\t\tlanguage = matcher02.group(1);\n\t\t\t\t\tcountry = matcher02.group(2) != null ? matcher02.group(2) : \"\";\n\n\t\t\t\t\tlocaleList.add(new Locale(matcher02.group(1), matcher02.group(2) != null ? matcher02.group(2) : \"\"));\n\n\t\t\t\t} else {\n//\t\t\t\t\tSystem.out.println(\"not matches\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n//\t\t\tSystem.out.println(\"language = \" + language);\n//\t\t\tSystem.out.println(\"country = \" + country);\n//\t\t\tSystem.out.println(\"variant = \" + variant);\n\t\t\t\n//\t\t\tSystem.out.println();\n\t\t}\n\n//\t\tfor(Locale l : localeList) {\n//\t\t\tSystem.out.println(\"found -> \" + \"language=\" + l.getLanguage() + \",country=\" + l.getCountry() + \",variant=\" + l.getVariant());\n//\t\t}\n\t\t\n\t\treturn localeList;\n\t}", "public long mo915b() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:14)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r4 = this;\n r0 = -1;\n r2 = r4.f18088d;\t Catch:{ NumberFormatException -> 0x000e }\n if (r2 == 0) goto L_0x000d;\t Catch:{ NumberFormatException -> 0x000e }\n L_0x0006:\n r2 = r4.f18088d;\t Catch:{ NumberFormatException -> 0x000e }\n r2 = java.lang.Long.parseLong(r2);\t Catch:{ NumberFormatException -> 0x000e }\n r0 = r2;\n L_0x000d:\n return r0;\n L_0x000e:\n return r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: okhttp3.c.b.b():long\");\n }", "public void searchFile(String fname) {\n File file = new File(fname);\n try {\n BufferedReader br = new BufferedReader(new FileReader(file));\n String s;\n while ((s = br.readLine()) != null) { \n //Search each line for at least 1 match ogf the regex\n searchLine(s);\n }\n } catch (FileNotFoundException e) { \n System.out.println(\"File \" + fname + \" not found\");\n } catch (IOException e) { \n e.printStackTrace();\n }\n }", "public static void readDirectory(String dir){\n\t\tMap<Integer,Integer> catemap = new HashMap<Integer, Integer>();\r\n\t\tFile[] names = null;\r\n\t\tFile file = new File(dir);\r\n\t\tif(file.isFile())\r\n\t\t\tnames = new File[]{file};\r\n\t\telse\r\n\t\t\tnames = new File(dir).listFiles();\r\n\t\tList<String> lines = null;\r\n\t\tList<String> strs = null;\r\n\t\tList<Integer> keys = new ArrayList<Integer>();\r\n\t\tList<Integer> values = new ArrayList<Integer>();\r\n\t\tint v = 0;\r\n\t\tif(null!=names&&names.length>0){\r\n\t\t\tfor(File f:names){\r\n\t\t\t\tif(null!=lines)\r\n\t\t\t\t\tlines.clear();\r\n\t\t\t\tlines = readFile(f,\"utf-8\");\r\n\t\t\t\tif(null!=lines){\r\n\t\t\t\t\tint j = 0;\r\n\t\t\t\t\tint k=0;\r\n\t\t\t\t\tfor(String line:lines){\r\n\t\t\t\t\t\tstrs = parseStr2List(line, \"\\\\t\");\r\n//\t\t\t\t\t\tif(null!=strs&&strs.size()==7){\r\n//\t\t\t\t\t\t\tv = getPerValue(strs.get(3));\r\n//\t\t\t\t\t\t\tmaxmap.put(v, 1+DataFormat.parseInt(maxmap.get(v)));\r\n//\t\t\t\t\t\t\tv = getPerValue(strs.get(5));\r\n//\t\t\t\t\t\t\tcatemap.put(v, 1+DataFormat.parseInt(catemap.get(v)));\r\n//\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(null!=strs&&strs.size()==2){\r\n\t\t\t\t\t\t\tv = DataFormat.parseInt(strs.get(0));\r\n//\t\t\t\t\t\t\tif(v<=500){\r\n//\t\t\t\t\t\t\t\tv = j/5+1;\r\n//\t\t\t\t\t\t\t\tj = j+1;\r\n//\t\t\t\t\t\t\t}else{\r\n//\t\t\t\t\t\t\t\tv = 101;\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\tif(k>500) break;\r\n\t\t\t\t\t\t\tk++;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif(j<20){\r\n\t\t\t\t\t\t\t\tkeys.add(v);\r\n\t\t\t\t\t\t\t\tvalues.add(DataFormat.parseInt(strs.get(1)));\r\n\t\t\t\t\t\t\t\tj++;\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\tj=0;\r\n\t\t\t\t\t\t\t\tSystem.out.println(Arrays.toString(keys.toArray(new Integer[]{})));\r\n\t\t\t\t\t\t\t\tSystem.out.println(Arrays.toString(values.toArray(new Integer[]{})));\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\r\n//\t\t\t\t\t\t\tcatemap.put(v, DataFormat.parseInt(strs.get(1))+DataFormat.parseInt(catemap.get(v)));\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}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n//\t\tfor(Entry<Integer, Integer> entry:maxmap.entrySet()){\r\n//\t\t\tUtils.appendToFile(\"/vol/user_log/maxmap.txt\", entry.getKey()+\"\\t\"+entry.getValue());\r\n//\t\t}\r\n//\t\tfor(Entry<Integer, Integer> entry:catemap.entrySet()){\r\n//\t\t\tUtils.appendToFile(\"C:\\\\Program Files\\\\SecureCRT\\\\download\\\\map.txt\", entry.getKey()+\"\\t\"+entry.getValue());\r\n//\t\t}\r\n\t}" ]
[ "0.47929156", "0.4763515", "0.47578984", "0.47503415", "0.4713239", "0.45593682", "0.45391962", "0.4524681", "0.45153102", "0.4500489", "0.44661888", "0.4458026", "0.44425064", "0.44390818", "0.44231704", "0.44222873", "0.43957707", "0.43921617", "0.43875164", "0.43733227", "0.43656623", "0.4341217", "0.4313503", "0.42947662", "0.42927176", "0.4291806", "0.42812434", "0.42635345", "0.42570212", "0.42549238", "0.42523208", "0.42506477", "0.4239399", "0.4238537", "0.4233459", "0.42251417", "0.42070422", "0.420637", "0.42052823", "0.41939357", "0.41898096", "0.4185746", "0.41780463", "0.41588596", "0.41526726", "0.41463286", "0.41441137", "0.41245782", "0.41234434", "0.41213137", "0.41195384", "0.41142178", "0.41132784", "0.41115743", "0.41069928", "0.41034183", "0.40998816", "0.40932408", "0.40840828", "0.40793628", "0.40778542", "0.40609092", "0.40587944", "0.40569377", "0.40479577", "0.4040968", "0.40397146", "0.40352508", "0.40352508", "0.4030371", "0.40251336", "0.40164265", "0.4014325", "0.40062597", "0.40043828", "0.40025997", "0.4002095", "0.4000066", "0.39919057", "0.3989063", "0.3988271", "0.39877707", "0.39813888", "0.39808476", "0.3980441", "0.39772722", "0.397607", "0.3969709", "0.39646617", "0.39640906", "0.39634258", "0.39579752", "0.39537743", "0.39423755", "0.39385566", "0.3938546", "0.39311418", "0.39197648", "0.39154175", "0.39102885" ]
0.6249276
0
Will look for all mrfiles in the database that have the standard details: mrfile.details = SQL_Episode_II.FILE_DETAIL_CLASSIFIED
public static ArrayList getEntriesFromClassifiedMRFiles() { ArrayList entries = sql_epiII.getPDBIdFromMRFileByDetail( SQL_Episode_II.FILE_DETAIL_CLASSIFIED ); if (entries == null) { General.showError("getting entry codes from the db."); return (entries); } Collections.sort(entries); return (entries); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void findRecordings(){\n File[] files = new File(\"Concatenated/\").listFiles();\n _records.clear();\n _versionNum = 1;\n for (File file : files){\n if (file.isFile()){\n String nameOnFile = file.getName().substring(file.getName().lastIndexOf('_')+1,file.getName().lastIndexOf('.')).toUpperCase();\n if (nameOnFile.equals(_name.toUpperCase())){\n _records.add(file.getName());\n _versionNum++;\n }\n }\n }\n }", "public ArrayList<File> findRelevantFiles (int reimburseID);", "@Override\n public Collection<AbstractFile> visit(FileSystem fs) {\n \n SleuthkitCase sc = Case.getCurrentCase().getSleuthkitCase();\n \n StringBuilder queryB = new StringBuilder();\n queryB.append(\"SELECT * FROM tsk_files WHERE (fs_obj_id = \").append(fs.getId());\n queryB.append(\") AND (size > 0)\");\n queryB.append(\" AND ( (meta_type = \").append(TskData.TSK_FS_META_TYPE_ENUM.TSK_FS_META_TYPE_REG.getMetaType());\n queryB.append(\") OR (meta_type = \").append(TskData.TSK_FS_META_TYPE_ENUM.TSK_FS_META_TYPE_DIR.getMetaType());\n queryB.append( \"AND (name != '.') AND (name != '..')\");\n queryB.append(\") )\");\n if (getUnallocatedFiles == false) {\n queryB.append( \"AND (type = \");\n queryB.append(TskData.TSK_DB_FILES_TYPE_ENUM.FS.getFileType());\n queryB.append(\")\");\n }\n \n try {\n final String query = queryB.toString();\n logger.log(Level.INFO, \"Executing query: \" + query);\n ResultSet rs = sc.runQuery(query);\n List<AbstractFile> contents = sc.resultSetToAbstractFiles(rs);\n Statement s = rs.getStatement();\n rs.close();\n if (s != null) {\n s.close();\n }\n return contents;\n } catch (SQLException ex) {\n logger.log(Level.WARNING, \"Couldn't get all files in FileSystem\", ex);\n return Collections.emptySet();\n }\n }", "@Override\n\tpublic List<HumanFile> findHumanFileAll() {\n\t\treturn HumanFileMapper.findHumanFileAll();\n\t}", "@Override\n\tpublic void recovery() {\n\t\tRecordTable recordTable = new RecordTable(); \n\t\tjava.util.List<FileRecordInfoModel> lst = null;\n\t\ttry {\n\t\t\tlst = recordTable.findAllRows();\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\tfor(FileRecordInfoModel model : lst)\n\t\t\t_recordSingle.addParam(model,false);\n\t\t\t// 读取配置,看是否需要扫描文件。--以后加\n\t}", "@Test\n public void getAllRecordsTest() {\n FileMetaData fileMetaData = new FileMetaData();\n fileMetaData.setAuthorName(\"Puneet\");\n fileMetaData.setFileName(\"resum2\");\n fileMetaData.setDescription(\"Attached resume to test upload\");\n fileMetaData.setUploadTimeStamp(DateUtil.getCurrentDate());\n fileMetaDataRepository.saveAndFlush(fileMetaData);\n fileMetaData = new FileMetaData();\n fileMetaData.setAuthorName(\"Puneet1\");\n fileMetaData.setFileName(\"resume3\");\n fileMetaData.setDescription(\"Attached resume to test upload1\");\n fileMetaData.setUploadTimeStamp(DateUtil.getCurrentDate());\n fileMetaDataRepository.saveAndFlush(fileMetaData);\n List<FileMetaData> fileMetaDataList = fileMetaDataRepository.findAll();\n Assert.assertNotNull(fileMetaDataList);\n //Assert.assertEquals(2, fileMetaDataList.size());\n }", "public ArrayList<FileDesc> getAllFiles() {\n\n\t\tArrayList<FileDesc> result = new ArrayList<FileDesc>();\n\n\t\ttry {\n\t\t\tjava.sql.PreparedStatement ps = ((org.inria.jdbc.Connection) db).prepareStatement(TCell_QEP_IDs.QEP.EP_getAllFiles);\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\t\n\t\t\tString query = \"SELECT FILEGID, TYPE, DESCRIPTION FROM FILE\";\n\t\t\tSystem.out.println(\"Executing query : \" + query);\t\t\t\n\n\t\t\t\n\t\t\twhile (rs.next() == true) {\n\t\t\t\tString fileGID = rs.getString(1);\n\t\t\t\tString type = rs.getString(2);\n\t\t\t\tString Description = rs.getString(3);\n\t\t\t\tresult.add(new FileDesc(fileGID, \"\", \"\", \"\", type, Description));\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\t// Uncomment when the close function will be implemented\n\t\t\t// attemptToClose(ps);\n\t\t\t\n\t\t}\n\n\t\treturn result;\n\t}", "public List<Medium> getAllMedia() throws ContestManagementException {\n return null;\r\n }", "public List<Medium> getAllMedia() throws ContestManagementException {\n return null;\r\n }", "@Override\r\n\tpublic List<FileMetaDataEntity> getAllFiles() {\n\t\treturn null;\r\n\t}", "@Test\n public void testGetAllMedia() throws ODSKartException, FileNotFoundException {\n System.out.println(\"getAllMedia\");\n DBManager instance = new ODSDBManager(\"long.ods\");\n List<Medium> result = instance.getAllMedia();\n assertEquals(expResultAll, result);\n // TODO review the generated test code and remove the default call to fail.\n // fail(\"The test case is a prototype.\");\n }", "public boolean nextFileInfo(FileInfo info) {\n\n\t\t// Get the next file from the search\n\n\t\ttry {\n\n\t\t\t// Return the next file details or loop until a match is found if a\n\t\t\t// complex wildcard filter\n\t\t\t// has been specified\n\t\t\twhile (m_rs.next()) {\n\t\t\t\tString name = m_rs.getString(\"name\");\n\t\t\t\t// Get the file name for the next file\n\t\t\t\tinfo.setFileId(m_rs.getInt(\"id\"));\n\t\t\t\tinfo.setFileName(name);\n\t\t\t\tinfo.setSize(m_rs.getLong(\"size\"));\n\t\t\t\tif(name.equalsIgnoreCase(DBUtil.CLOUDURL))\n\t\t\t\t{\n\t\t\t\t\ttry{\n\t\t\t\t\t//重设置大小\n\t\t\t\t\tinfo.setFileId(-99);\n//\t\t\t\t\tinfo.setFileId(-userId);\n\t\t\t\t\tinfo.setSize(DBUtil.getURLMYFILE_TXT(this.getBaseUrl(),userId).getBytes().length);\n\t\t\t\t\t}catch(Exception e)\n\t\t\t\t\t{\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tlong modifyDate = m_rs.getLong(\"lastModified\");\n\t\t\t\tif (modifyDate != 0L)\n\t\t\t\t\tinfo.setModifyDateTime(modifyDate);\n\t\t\t\telse\n\t\t\t\t\tinfo.setModifyDateTime(System.currentTimeMillis());\n\t\t\t\t\n\t\t\t\tTimestamp ts = m_rs.getTimestamp(\"add_time\");\n\t\t\t\tif (ts !=null && ts.getTime()>0)\n\t\t\t\t{\n\t\t\t\t\tinfo.setCreationDateTime(ts.getTime());\n\t\t\t\t\tinfo.setChangeDateTime(info.getModifyDateTime());\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tinfo.setCreationDateTime(info.getModifyDateTime());\n\t\t\t\t\tinfo.setChangeDateTime(info.getModifyDateTime());\n\t\t\t\t}\t\t\t\t\n\t\t\t\tint attr = 0;\n\t\t\t\tif (m_rs.getBoolean(\"isFile\") == true) {\n\t\t\t\t\tinfo.setFileType(FileType.RegularFile);\t\t\t\t\t\n\t\t\t\t\tattr += FileAttribute.ReadOnly;// 只读权限\n\t\t\t\t} else\n\t\t\t\t\tattr += FileAttribute.Directory;\n\n\t\t\t\tif (m_rs.getBoolean(\"isHidden\") == true) \n\t\t\t\t{\n\t\t\t\t\tattr += FileAttribute.Hidden;//隐藏\n\t\t\t\t}\n\t\t\t\tinfo.setFileType(FileType.Directory);\n\t\t\t\t\t\t\t\t\n\t\t\t\tif (hasMarkAsOffline()) {\n\t\t\t\t\tif (getOfflineFileSize() == 0 || info.getSize() >= getOfflineFileSize())\n\t\t\t\t\t\tattr += FileAttribute.NTOffline;\n\t\t\t\t}\n\t\t\t\tinfo.setFileAttributes(attr);\n\t\t\t\tinfo.setUid(userId);\n\n\t\t\t\tif (m_filter == null || m_filter.matchesPattern(info.getFileName()) == true)\n\t\t\t\t\treturn true;\n\t\t\t}\n\t\t} catch (SQLException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t\t// No more files\n\t\tcloseSearch();\n\t\treturn false;\n\t}", "static Vector< DbRecord > ReadRecords( String szDbDir )\n {\n File DbDir;\n File[] files;\n Vector<DbRecord> Users = new Vector<DbRecord>( 10, 10 );\n\n // Read all records to identify\n DbDir = new File( szDbDir );\n files = DbDir.listFiles();\n\n if( (files == null) || (files.length == 0) )\n {\n return Users;\n }\n\n for( int iFiles = 0; iFiles < files.length; iFiles++)\n {\n try\n {\n if( files[iFiles].isFile() )\n {\n DbRecord User = new DbRecord( files[iFiles].getAbsolutePath() );\n Users.add( User );\n }\n }\n catch( FileNotFoundException e )\n {\n // The record has invalid data. Skip it and continue processing.\n }\n catch( NullPointerException e )\n {\n JOptionPane.showConfirmDialog(null, \"erro\"+e);\n }\n catch( AppException e )\n {\n // The record has invalid data or access denied. Skip it and continue processing.\n }\n }\n \n return Users;\n }", "public List<GridFSDBFile> find(String filename) {\n\treturn find(filename, null);\n }", "public void performFileSearch() {\n\n // ACTION_OPEN_DOCUMENT is the intent to choose a file via the system's file browser.\n Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT);\n\n // Filter to only show results that can be \"opened\", such as a\n // file (as opposed to a list of contacts or timezones)\n intent.addCategory(Intent.CATEGORY_OPENABLE);\n\n // Filter to show only images, using the image MIME data type.\n // If one wanted to search for ogg vorbis files, the type would be \"audio/ogg\".\n // To search for all documents available via installed storage providers, it would be \"*/*\".\n intent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION | Intent.FLAG_GRANT_PERSISTABLE_URI_PERMISSION);\n intent.setType(\"image/*\");\n\n startActivityForResult(intent, READ_REQUEST_CODE);\n }", "public DaoResponse<DecodedFile> find(MultivaluedMap<String, String> multivaluedMap){\n String query = createQuery(multivaluedMap, false);\n Connection conn = null;\n List<DecodedFile> decodedFiles = new ArrayList<>();\n Set<String> fields = (multivaluedMap.get(\"fields\") == null) ? null : new HashSet<>(multivaluedMap.get(\"fields\"));\n\n try {\n // create connection and prepare the query\n conn = dataSource.getConnection();\n PreparedStatement ps = conn.prepareStatement(query);\n\n // execute query and close connection\n ResultSet rs = ps.executeQuery();\n while (rs.next()) {\n if (fields != null) {\n DecodedFile decodedFile = new DecodedFile();\n if (fields.contains(\"id\")) {\n decodedFile.setId(rs.getInt(\"id\"));\n }\n if (fields.contains(\"fileName\")) {\n decodedFile.setFileName(rs.getString(\"fileName\"));\n }\n if (fields.contains(\"decodeKey\")) {\n decodedFile.setDecodeKey(rs.getString(\"decodeKey\"));\n }\n if (fields.contains(\"md5\")) {\n decodedFile.setMd5(rs.getString(\"md5\"));\n }\n if (fields.contains(\"firstWord\")) {\n decodedFile.setFirstWorld(rs.getString(\"firstWord\"));\n }\n if (fields.contains(\"secret\")) {\n decodedFile.setSecret(rs.getString(\"secret\"));\n }\n decodedFiles.add(decodedFile);\n } else {\n decodedFiles.add(new DecodedFile(\n rs.getInt(\"id\"),\n rs.getString(\"fileName\"),\n rs.getString(\"decodeKey\"),\n rs.getString(\"md5\"),\n rs.getString(\"firstWord\"),\n rs.getString(\"secret\")\n ));\n }\n }\n rs.close();\n ps.close();\n return new DaoResponse<>(decodedFiles, 0, decodedFiles.size(), decodedFiles.size(), 1000);\n } catch (SQLException e) {\n LOG.error(\"Error when try to find decodedFiles\" + e);\n } finally {\n closeConnection(conn);\n }\n\n return null;\n }", "public static ArrayList getEntriesFromMRFiles( String dir ) {\n \n ArrayList entries = new ArrayList();\n \n File rdir = new File( dir );\n String[] mr_files = rdir.list( new FilenameFilter() {\n public boolean accept(File d, String name) { return name.endsWith( \".mr\" ); }\n });\n \n if (mr_files == null) {\n General.showWarning(\"Found NO entries on file in directory: \" + dir);\n return (entries);\n }\n \n File f;\n String fname, entry_code;\n \n // Check if the code conforms\n for (int i=0; i<mr_files.length; i++) {\n f = new File(mr_files[i]);\n fname = f.getPath();\n entry_code = fname.substring(0,4);\n // Check whether that's reasonable by matching against reg.exp.\n if ( Wattos.Utils.Strings.is_pdb_code( entry_code ) ) {\n entries.add( entry_code );\n } else {\n General.showWarning(\"Skipping this file.\");\n General.showWarning(\"String for filename [\"+fname+\n \"] doesn't look like a pdb code: \" + entry_code);\n }\n }\n Collections.sort(entries);\n return (entries);\n }", "public void performFileSearch() {\n Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT);\n\n // Filter to only show results that can be \"opened\", such as a file (as opposed to a list\n // of contacts or timezones)\n intent.addCategory(Intent.CATEGORY_OPENABLE);\n\n // Filter to show only images, using the image MIME data type.\n // If one wanted to search for ogg vorbis files, the type would be \"audio/ogg\".\n // To search for all documents available via installed storage providers, it would be\n // \"*/*\".\n intent.setType(\"image/*\");\n\n startActivityForResult(intent, READ_REQUEST_CODE);\n // END_INCLUDE (use_open_document_intent)\n }", "public static ArrayList<Media> getMedia() {\n File titleFile = new File(\"./data/titles.csv\");\n\n Scanner titleScan;\n try {\n titleScan = new Scanner(titleFile);\n } catch (IOException e) {\n throw new Error(\"Could not open titles file\");\n }\n\n titleScan.nextLine();\n\n // Read File to build medias without directors\n ArrayList<Media> medias = new ArrayList<Media>();\n while (titleScan.hasNextLine()) {\n String line = titleScan.nextLine();\n String[] ratingParts = line.split(\"\\t\");\n int mediaIndex = indexOfMedia(medias, ratingParts[1]);\n if (mediaIndex == -1) {\n String[] genreList = ratingParts[7].split(\",\");\n if (ratingParts[6].isEmpty()) {\n continue;\n }\n int runtime = Integer.parseInt(ratingParts[6]);\n int releaseYear = ratingParts[4].isEmpty() ? Integer.parseInt(ratingParts[8])\n : Integer.parseInt(ratingParts[4]);\n Media newMedia = new Media(ratingParts[1], ratingParts[3], genreList, runtime, releaseYear);\n medias.add(newMedia);\n } else {\n updateReleaseDate(medias.get(mediaIndex), Integer.parseInt(ratingParts[4]));\n }\n }\n\n // Close Title Scanner\n titleScan.close();\n\n // Open Principals Scanner\n File principalFile = new File(\"./data/principals.csv\");\n FileReader principaFileReader;\n Scanner principalScan;\n\n try {\n principaFileReader = new FileReader(principalFile);\n } catch (IOException e) {\n throw new Error(\"Could not open principals file reader\");\n }\n principalScan = new Scanner(principaFileReader);\n principalScan.nextLine();\n\n // Get directorID for the media\n // int count = 0;\n while (principalScan.hasNextLine()) {\n String line = principalScan.nextLine();\n String[] principalParts = line.split(\"\\t\");\n int mediaIndex = indexOfMedia(medias, principalParts[1]);\n\n if (mediaIndex != -1 && isDirector(principalParts[3])) {\n medias.get(mediaIndex).directorId = principalParts[2];\n }\n }\n\n // Close Scanners\n principalScan.close();\n\n // Return Media List\n return medias;\n }", "public boolean hasRetrieveFile() {\n return msgCase_ == 2;\n }", "public List<Record> _queryWholePatrolCard_Records(Long fid) {\n synchronized (this) {\n if (wholePatrolCard_RecordsQuery == null) {\n QueryBuilder<Record> queryBuilder = queryBuilder();\n queryBuilder.where(Properties.Fid.eq(null));\n wholePatrolCard_RecordsQuery = queryBuilder.build();\n }\n }\n Query<Record> query = wholePatrolCard_RecordsQuery.forCurrentThread();\n query.setParameter(0, fid);\n return query.list();\n }", "@Override\n\tpublic FileVO detailFile(int file_num) {\n\t\treturn workMapper.detailFile(file_num);\n\t}", "public ArrayList<Record> getAllSavedRecords() {\n ArrayList<Record> resultList = new ArrayList<>();\n\n File baseFolder = getBaseFolder();\n if (baseFolder != null) {\n String[] allRecords = baseFolder.list();\n if (allRecords == null || allRecords.length == 0) {\n return resultList;\n }\n\n for (String eachRecord : allRecords) {\n Record record = loadRecordFromFolderName(eachRecord);\n if (record == null) {\n continue;\n }\n updateRecordCurrentSize(record);\n updateRecordCurrentImageCount(record);\n resultList.add(record);\n }\n }\n\n if (resultList.size() > 0) {\n sortRecordList(resultList);\n }\n return resultList;\n }", "private void checkFileStatus() throws CustomException, IOException\n\t{\n\t\t//For all .mgf files\n\t\tfor (int i=0; i<mgfFiles.size(); i++)\n\t\t{\n\n\t\t\tString resultFileName = \n\t\t\t\t\tmgfFiles.get(i).substring(0,mgfFiles.get(i).lastIndexOf(\".\"))+\"_Results.csv\";\n\t\t\t//TODO: Cannot write files if checking for file. \n\t\t\t/*\n\t\t\tif (isFileUnlocked(resultFileName))\n\t\t\t\tthrow new CustomException(\"Please close \"+resultFileName, null);\n\t\t\t */\n\t\t}\n\n\t}", "private ArrayList findResultList(File file){\n debug(\"findResultList:\"+file.getAbsolutePath());\n ArrayList result = new ArrayList();\n LogInformation logInfo = null;\n Iterator it = resultList.iterator();\n while(it.hasNext()){\n logInfo = (LogInformation)it.next();\n File logFile = logInfo.getFile();\n debug(\"result logFile:\"+logFile.getAbsolutePath()); \n if(logFile.getAbsolutePath().startsWith(file.getAbsolutePath())){\n debug(\"result ok\");\n result.add(logInfo);\n }\n }\n return result;\n }", "boolean hasRetrieveFile();", "public Spectrumfile(ResultSet aRS) throws SQLException {\r\n super(aRS);\r\n filename = aRS.getString(\"filename\");\r\n }", "public List<RecordLabel> getFestivalDetails(MusicFestivalRO[] details) {\n\n List<RecordLabel> recordLabels = new ArrayList<>();\n List<MusicFestivalRO> musicalROs = Arrays.asList(details);\n musicalROs.forEach(musicalRO -> {\n musicalRO.getBands().forEach(bands -> {\n if (CollectionUtils.isEmpty(recordLabels)) {\n getRecordLabelList(musicalRO, bands, recordLabels);\n } else {\n boolean labelFound = false;\n for (int i = 0; i < recordLabels.size(); i++) {\n if (recordLabels.get(i).getLabelName().equals(bands.getRecordLabel())) {\n labelFound = true;\n if (labelFound) {\n boolean bandFound = false;\n for (int j = 0; j < recordLabels.get(i).getBands().size(); j++) {\n if (recordLabels.get(i).getBands().get(j).getBandName().equals(bands.getName())) {\n bandFound = true;\n recordLabels.get(i).getBands().get(j).getMusicFestivals().add(musicalRO.getName());\n }\n }\n if (!bandFound) {\n List<Band> bandList = recordLabels.get(i).getBands();\n Band band = new Band();\n band.setBandName(bands.getName());\n\n List<String> festivalList = new ArrayList<>();\n festivalList.add(musicalRO.getName());\n Collections.sort(festivalList);\n\n band.setMusicFestivals(festivalList);\n bandList.add(band);\n }\n\n }\n\n }\n }\n if (!labelFound) {\n getRecordLabelList(musicalRO, bands, recordLabels);\n labelFound = false;\n\n }\n\n }\n });\n });\n SortUtil.sortLabels(recordLabels);\n return recordLabels;\n }", "public boolean hasRetrieveFile() {\n return msgCase_ == 2;\n }", "private static ArrayList m5336a(File[] fileArr) {\n ArrayList arrayList = new ArrayList();\n int i = 0;\n while (i < fileArr.length) {\n if (fileArr[i].isFile() && fileArr[i].getName().length() == 10 && TextUtils.isDigitsOnly(fileArr[i].getName())) {\n arrayList.add(fileArr[i]);\n }\n i++;\n }\n return arrayList;\n }", "public Gel_BioInf_Models.File getClinicalRelevantVariants() {\n return clinicalRelevantVariants;\n }", "@Override\n\tpublic List<File> getAll() {\n\t\t return getSession().\n\t createQuery(\"from File f\", File.class).\n\t getResultList();\n\t}", "public Gel_BioInf_Models.File getClinicalRelevantVariants() {\n return clinicalRelevantVariants;\n }", "public static ArrayList getEntriesFromClassifiedMRFilesNewerThanDays( int max_days ) {\n \n ArrayList entries = sql_epiII.getPDBIdFromMRFileByDetailNewerThanDays(\n SQL_Episode_II.FILE_DETAIL_CLASSIFIED, max_days );\n \n if (entries == null) {\n General.showError(\"getting entry codes from the db.\");\n return (entries);\n }\n Collections.sort(entries);\n return (entries);\n }", "public static boolean removeMRFilesFromDB( ArrayList entries_todelete ) {\n \n boolean status = sql_epiII.deleteMRFilesByPDBIdsByDetail(\n entries_todelete, SQL_Episode_II.FILE_DETAIL_CLASSIFIED );\n if ( ! status ) {\n General.showError(\"in MRAnnotate.removeMRFilesFromDB found:\");\n General.showError(\"Deleting the annotated MR files:\" + entries_todelete);\n return false;\n } else {\n General.showOutput(\"Deleted the annotated MR files:\" + entries_todelete);\n }\n return true;\n }", "public void mo83570c() {\n File[] listFiles;\n File file = new File(this.f60297d);\n if (file.isDirectory() && (listFiles = file.listFiles()) != null && listFiles.length >= this.f60294a) {\n Arrays.sort(listFiles, this.f60295b);\n for (int i = 0; i < listFiles.length && listFiles.length >= this.f60294a; i++) {\n File file2 = listFiles[i];\n if (!this.f60299f.contains(file2)) {\n ArgusLogger.m85574b(String.format(C6969H.m41409d(\"G4D8AC619BE22AF20E809D047FEE1C6C47DC3D008AD3FB969E71DD05BE6EAD1D26DC3D008AD3FB969EA079D41E6A5D1D26880DD1FBB70E36CF547\"), file2.getPath()));\n mo83569b(Collections.singleton(file2));\n }\n }\n }\n }", "@Override\n public Collection<FsContent> visit(FileSystem fs) {\n\n SleuthkitCase sc = Case.getCurrentCase().getSleuthkitCase();\n\n String query = \"SELECT * FROM tsk_files WHERE fs_obj_id = \" + fs.getId()\n + \" AND (meta_type = \" + TskData.TSK_FS_META_TYPE_ENUM.TSK_FS_META_TYPE_REG.getMetaType()\n + \") AND (size > 0)\";\n try {\n ResultSet rs = sc.runQuery(query);\n List<FsContent> contents = sc.resultSetToFsContents(rs);\n Statement s = rs.getStatement();\n rs.close();\n if (s != null) {\n s.close();\n }\n return contents;\n } catch (SQLException ex) {\n logger.log(Level.WARNING, \"Couldn't get all files in FileSystem\", ex);\n return Collections.emptySet();\n }\n }", "public AllRecords getAllRecords() {\n\t\treturn fileService.withFile(FILE_NAME, new AllRecords(), file -> {\n\t\t\tvar records = fileService.readFile(file, AllRecords.class);\n\t\t\trecords.easy = sort(records.easy);\n\t\t\trecords.medium = sort(records.medium);\n\t\t\trecords.hard = sort(records.hard);\n\t\t\treturn records;\n\t\t});\n\t}", "public String getFileNamingDetails();", "public static void readResultsFromFile(File resultfile) {\n FileWriter fileWriter = null;\n try {\n fileWriter = new FileWriter(\"res.csv\");\n CSVPrinter csvp = null;\n CSVFormat csvf = CSVFormat.DEFAULT.withRecordSeparator(newLineSeparator);\n csvp = new CSVPrinter(fileWriter, csvf);\n csvp.printRecord(fileHeader);\n Constituency constituency = new Constituency();\n Candidate candidate = new Candidate();\n int flag = 0, constituencyFlag = 0, detailCounter = 0;\n FileReader fr = new FileReader(resultfile);\n LineNumberReader lnr = new LineNumberReader(fr);\n LineNumberReader nextReader;\n String line, nextLines;\n String candidateline = \"(\\\\A)(\\\\d+)(\\\\s)(\\\\w*)\";\n String constituencyline = \"(\\\\A)(\\\\d+)([.])(\\\\s)(\\\\w+)\";\n String sexline = \"(\\\\A)([M F])\";\n String ageline = \"(\\\\A)^([0-9]){2}$\";\n String categoryline = \"(\\\\A)([SC GEN ST]{1,3}$)\";\n String partyline = \"(\\\\A)^(?!GEN|TURNOUT)([A-Z()]+){3,10}$\";\n String generalline = \"(\\\\A)^([0-9]){1,10}$\";\n String postalline = \"(\\\\A)^[0-9]{1,4}$\";\n String totalline = \"(\\\\A)^([0-9]{1,10}$)\";\n Pattern candidatepattern = Pattern.compile(candidateline);\n Pattern constituencypattern = Pattern.compile(constituencyline);\n Pattern sexpattern = Pattern.compile(sexline);\n Pattern agepattern = Pattern.compile(ageline);\n Pattern categorypattern = Pattern.compile(categoryline);\n Pattern partypattern = Pattern.compile(partyline);\n Pattern generalpattern = Pattern.compile(generalline);\n Pattern postalpattern = Pattern.compile(postalline);\n Pattern totalpattern = Pattern.compile(totalline);\n while((line = lnr.readLine()) != null){\n if (line.toLowerCase().contains(\"detailed results\")){\n flag++;\n }\n if (flag >= 2){\n Matcher candidatematcher = candidatepattern.matcher(line);\n Matcher constituencymatcher = constituencypattern.matcher(line);\n if (candidatematcher.find()) {\n candidate.name = line;\n candidate.constituency = constituency.name;\n detailCounter = 1;\n constituencyFlag = 1;\n nextReader = lnr;\n while(!(nextLines = nextReader.readLine()).isEmpty()){\n nextLines.trim();\n candidate.name = candidate.name.concat(\" \"+nextLines);\n }\n // System.out.println(candidate.name);\n }\n if (constituencymatcher.find()){\n if(constituencyFlag == 1){\n writeResultsIntoFile(constituency, csvp);\n constituency = new Constituency();\n }\n constituency.name = line;\n //System.out.println(constituency.name);\n constituencyFlag = 0;\n }\n if (detailCounter > 0 && detailCounter <= 7){\n if(!line.isEmpty()) {\n switch (detailCounter) {\n case 1:\n Matcher sexmatcher = sexpattern.matcher(line);\n if (sexmatcher.find()) {\n candidate.sex = line;\n detailCounter++;\n }\n break;\n case 2:\n Matcher agematcher = agepattern.matcher(line);\n if (agematcher.find()) {\n candidate.age = line;\n detailCounter++;\n }\n break;\n case 3:\n Matcher categorymatcher = categorypattern.matcher(line);\n if (categorymatcher.find()) {\n candidate.category = line;\n detailCounter++;\n }\n break;\n case 4:\n Matcher partymatcher = partypattern.matcher(line);\n if (partymatcher.find()) {\n candidate.party = line;\n detailCounter++;\n }\n break;\n case 5:\n Matcher generalmatcher = generalpattern.matcher(line);\n if (generalmatcher.find()) {\n candidate.general = line;\n detailCounter++;\n }\n break;\n case 6:\n Matcher postalmatcher = postalpattern.matcher(line);\n if (postalmatcher.find()) {\n candidate.postal = line;\n detailCounter++;\n }\n break;\n case 7:\n Matcher totalmatcher = totalpattern.matcher(line);\n if (totalmatcher.find()) {\n candidate.total = line;\n detailCounter++;\n }\n default:\n break;\n }\n }\n }\n if (detailCounter > 7){\n constituency.candidates.add(candidate);\n candidate = new Candidate();\n detailCounter = 0;\n }\n }\n }\n } catch (IOException e){\n System.out.println(e);\n }finally {\n try{\n fileWriter.flush();\n fileWriter.close();\n }catch(IOException e){\n System.out.println(\"Error while flushing/closing file\");\n }\n }\n }", "@Test \n public void findByFileNameTest() {\n FileMetaData fileMetaData = new FileMetaData();\n fileMetaData.setAuthorName(\"Puneet\");\n fileMetaData.setFileName(\"resume1\");\n fileMetaData.setDescription(\"Attached resume to test upload\");\n fileMetaData.setUploadTimeStamp(DateUtil.getCurrentDate());\n fileMetaDataRepository.saveAndFlush(fileMetaData);\n FileMetaData fetchedRecord = fileMetaDataRepository.findByFileName(\"resume1\"); \n Assert.assertNotNull(fetchedRecord);\n Assert.assertEquals(\"Puneet\", fetchedRecord.getAuthorName());\n Assert.assertEquals(\"resume1\", fetchedRecord.getFileName());\n Assert.assertEquals(\"Attached resume to test upload\", fetchedRecord.getDescription()); \n }", "public static void filter() throws IOException {\n\t\tHashSet<String> wikimid = new HashSet<String>();\r\n\t\t{\r\n\t\t\tDelimitedReader dr = new DelimitedReader(Main.file_midWidTypeNameAlias);\r\n\t\t\tString[] l;\r\n\t\t\twhile ((l = dr.read()) != null) {\r\n\t\t\t\twikimid.add(l[0]);\r\n\t\t\t}\r\n\t\t\tdr.close();\r\n\t\t\tD.p(\"wiki id size is\", wikimid.size());\r\n\t\t}\r\n\t\tDelimitedWriter dw = new DelimitedWriter(Main.file_visible + \".filter\");\r\n\t\t{\r\n\t\t\tDelimitedReader dr = new DelimitedReader(Main.file_visible);\r\n\t\t\t//DelimitedReader dr = new DelimitedReader(Main.dir+\"/temp\");\r\n\t\t\tString[] l;\r\n\t\t\tint count = 0, write = 0;\r\n\t\t\twhile ((l = dr.read()) != null) {\r\n\t\t\t\tcount++;\r\n\t\t\t\tif (l[3].equals(\"/m/06x68\")) {\r\n\t\t\t\t\tD.p(l[3]);\r\n\t\t\t\t}\r\n\t\t\t\tif (count % 100000 == 0) {\r\n\t\t\t\t\tD.p(\"count vs write\", count, write);\r\n\t\t\t\t}\r\n\t\t\t\tString rel = l[2];\r\n\t\t\t\tif (rel.startsWith(\"/type/\") || rel.startsWith(\"/user/\") || rel.startsWith(\"/common/\")\r\n\t\t\t\t\t\t|| rel.startsWith(\"/base/\")) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tif (l[0].startsWith(\"s\") && !wikimid.contains(l[1])) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tif (l[0].startsWith(\"j\") && (!wikimid.contains(l[1]) || !wikimid.contains(l[3]))) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tdw.write(l);\r\n\t\t\t\twrite++;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\tdw.close();\r\n\t\tSort.sort(Main.file_visible + \".filter\", Main.file_visible + \".filter.sbmid\", Main.dir,\r\n\t\t\t\tnew Comparator<String[]>() {\r\n\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic int compare(String[] arg0, String[] arg1) {\r\n\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\treturn arg0[1].compareTo(arg1[1]);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t});\r\n\t\t//\t\tSort.sort(Main.file_visible + \".filter\", Main.file_visible + \".filter.sbmid2\", Main.dir,\r\n\t\t//\t\t\t\tnew Comparator<String[]>() {\r\n\t\t//\r\n\t\t//\t\t\t\t\t@Override\r\n\t\t//\t\t\t\t\tpublic int compare(String[] arg0, String[] arg1) {\r\n\t\t//\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t//\t\t\t\t\t\treturn arg0[3].compareTo(arg1[3]);\r\n\t\t//\t\t\t\t\t}\r\n\t\t//\r\n\t\t//\t\t\t\t});\r\n\t\t//\t\tSort.sort(Main.file_visible + \".filter\", Main.file_visible + \".filter.sbrel\", Main.dir,\r\n\t\t//\t\t\t\tnew Comparator<String[]>() {\r\n\t\t//\r\n\t\t//\t\t\t\t\t@Override\r\n\t\t//\t\t\t\t\tpublic int compare(String[] arg0, String[] arg1) {\r\n\t\t//\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t//\t\t\t\t\t\treturn arg0[2].compareTo(arg1[2]);\r\n\t\t//\t\t\t\t\t}\r\n\t\t//\r\n\t\t//\t\t\t\t});\r\n\t}", "private static void testFileSearch(TrackingServer ts) {\r\n\t\tString requestFormat = \"FIND=%s|FAILED_SERVERS=%s\";\r\n\t\tString finalRequest = null;\r\n\t\tStringBuilder failedPeer = null;\r\n\t\tts.readL.lock();\r\n\t\ttry {\r\n\t\t\tfor (Entry<String, HashSet<Machine>> entry : ts.filesServersMap.entrySet()) {\r\n\t\t\t\tfailedPeer = new StringBuilder();\r\n\t\t\t\tfor (Machine m : entry.getValue()) {\r\n\t\t\t\t\tfailedPeer.append(m.toString());\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tfinalRequest = String.format(requestFormat, entry.getKey(), failedPeer.toString());\r\n\t\t\t\tbyte[] result = ts.handleSpecificRequest(finalRequest);\r\n\t\t\t\tSystem.out.println(\"result of find=\" + Utils.byteToString(result) + \" entrySet=\" + entry.getValue());\r\n\t\t\t}\r\n\t\t} finally {\r\n\t\t\tts.readL.unlock();\r\n\t\t}\r\n\r\n\t}", "protected ArrayList<Path> find(Path file) {\n\t\tPath name = file.getFileName();\n\t\tif (name != null && matcher.matches(name)) {\n\t\t\tresults.add(file);\n\t\t}\n\t\treturn null;\n\t}", "@Override\n\tpublic List<SecondaryMaterials> findFuliaoDetails(String name) throws Exception {\n\t\treturn fuliaoMapper.findFuliaoDetails(name);\n\t}", "public List<GridFSDBFile> find(String filename, DBObject sort) {\n\treturn find(new BasicDBObject(\"filename\", filename), sort);\n }", "@Override\n\tpublic List<HumanFile> findHumanFileByIds(List list) {\n\t\treturn HumanFileMapper.findHumanFileByIds(list);\n\t}", "public TbSysFileExample() {\r\n oredCriteria = new ArrayList<Criteria>();\r\n }", "public List<GridFSFile> getDBFilesInfo() {\n try {\n List<GridFSFile> files = new LinkedList<>();\n GridFSFindIterable gfsi = gridFSBucket.find();\n for (GridFSFile gfsf : gfsi) {\n files.add(gfsf);\n }\n return files;\n } catch (MongoException e) {\n System.err.println(e.getCode() + \" \" + e.getMessage());\n return null;\n }\n }", "public List<String> getFileLines() {\n\t\tspeciesByExperiment = new TIntObjectHashMap<List<String>>();\n\t\ttissuesByExperiment = new TIntObjectHashMap<List<String>>();\n\t\tcellTypesByExperiment = new TIntObjectHashMap<List<String>>();\n\t\tdiseaseByExperiment = new TIntObjectHashMap<List<String>>();\n\t\tquantificationByExperiment = new TIntObjectHashMap<List<String>>();\n\t\tinstrumentByExperiment = new TIntObjectHashMap<List<String>>();\n\t\tmodificationByExperiment = new TIntObjectHashMap<List<String>>();\n\t\texperimental_factorByExperiment = new TIntObjectHashMap<List<String>>();\n\n\t\tfinal List<String> ret = new ArrayList<String>();\n\t\tfinal Map<String, PexFileMapping> fileLocationsMapping = new THashMap<String, PexFileMapping>();\n\t\tfinal List<PexFileMapping> totalFileList = new ArrayList<PexFileMapping>();\n\t\tint fileCounter = 1;\n\t\t// organize the files by experiments\n\t\tfor (final Experiment experiment : experimentList.getExperiments()) {\n\n\t\t\tfinal File prideXmlFile = experiment.getPrideXMLFile();\n\t\t\tif (prideXmlFile != null) {\n\t\t\t\t// FILEMAPPINGS\n\t\t\t\t// PRIDE XML\n\t\t\t\tfinal int resultNum = fileCounter;\n\t\t\t\tfinal PexFileMapping prideXMLFileMapping = new PexFileMapping(\"result\", fileCounter++,\n\t\t\t\t\t\tprideXmlFile.getAbsolutePath(), null);\n\n\t\t\t\ttotalFileList.add(prideXMLFileMapping);\n\t\t\t\tfileLocationsMapping.put(prideXMLFileMapping.getPath(), prideXMLFileMapping);\n\n\t\t\t\t// Iterate over replicates\n\t\t\t\tfinal List<Replicate> replicates = experiment.getReplicates();\n\t\t\t\tfor (final Replicate replicate : replicates) {\n\t\t\t\t\t// sample metadatas\n\t\t\t\t\taddSampleMetadatas(resultNum, replicate);\n\n\t\t\t\t\t// PEak lists\n\t\t\t\t\tfinal List<PexFileMapping> peakListFileMappings = new ArrayList<PexFileMapping>();\n\t\t\t\t\t// raw files\n\t\t\t\t\tfinal List<PexFileMapping> rawFileMappings = new ArrayList<PexFileMapping>();\n\t\t\t\t\t// search engine output lists\n\t\t\t\t\tfinal List<PexFileMapping> outputSearchEngineFileMappings = new ArrayList<PexFileMapping>();\n\t\t\t\t\t// MIAPE MS and MSI reports\n\t\t\t\t\tfinal List<PexFileMapping> miapeReportFileMappings = new ArrayList<PexFileMapping>();\n\t\t\t\t\t// RAW FILES\n\t\t\t\t\tfinal List<PexFile> rawFiles = getReplicateRawFiles(replicate);\n\n\t\t\t\t\tif (rawFiles != null) {\n\t\t\t\t\t\tfor (final PexFile rawFile : rawFiles) {\n\t\t\t\t\t\t\tif (!fileLocationsMapping.containsKey(rawFile.getFileLocation())) {\n\t\t\t\t\t\t\t\tfinal PexFileMapping rawFileMapping = new PexFileMapping(\"raw\", fileCounter++,\n\t\t\t\t\t\t\t\t\t\trawFile.getFileLocation(), null);\n\t\t\t\t\t\t\t\trawFileMappings.add(rawFileMapping);\n\t\t\t\t\t\t\t\tfileLocationsMapping.put(rawFile.getFileLocation(), rawFileMapping);\n\n\t\t\t\t\t\t\t\t// PRIDE XML -> RAW file\n\t\t\t\t\t\t\t\tprideXMLFileMapping.addRelationship(rawFileMapping.getId());\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// PEAK LISTS\n\t\t\t\t\tfinal List<PexFile> peakListFiles = getPeakListFiles(replicate);\n\t\t\t\t\tfinal List<PexFileMapping> replicatePeakListFileMappings = new ArrayList<PexFileMapping>();\n\t\t\t\t\tif (peakListFiles != null) {\n\t\t\t\t\t\tfor (final PexFile peakList : peakListFiles) {\n\t\t\t\t\t\t\tif (!fileLocationsMapping.containsKey(peakList.getFileLocation())) {\n\t\t\t\t\t\t\t\tfinal PexFileMapping peakListFileMapping = new PexFileMapping(\"peak\", fileCounter++,\n\t\t\t\t\t\t\t\t\t\tpeakList.getFileLocation(), null);\n\t\t\t\t\t\t\t\tpeakListFileMappings.add(peakListFileMapping);\n\t\t\t\t\t\t\t\treplicatePeakListFileMappings.add(peakListFileMapping);\n\t\t\t\t\t\t\t\tfileLocationsMapping.put(peakList.getFileLocation(), peakListFileMapping);\n\n\t\t\t\t\t\t\t\t// PRIDE XML -> PEAK LIST file\n\t\t\t\t\t\t\t\tprideXMLFileMapping.addRelationship(peakListFileMapping.getId());\n\t\t\t\t\t\t\t\t// RAW file -> PEAK LIST file\n\t\t\t\t\t\t\t\tfor (final PexFileMapping rawFileMapping : rawFileMappings) {\n\t\t\t\t\t\t\t\t\trawFileMapping.addRelationship(peakListFileMapping.getId());\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// prideXMLFileMapping\n\t\t\t\t\t\t\t\t// .addRelationship(peakListFileMapping\n\t\t\t\t\t\t\t\t// .getId());\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// MIAPE MS REPORTS\n\t\t\t\t\tfinal List<PexFile> miapeMSReportFiles = getMiapeMSReportFiles(replicate);\n\t\t\t\t\tif (miapeMSReportFiles != null)\n\t\t\t\t\t\tfor (final PexFile miapeMSReportFile : miapeMSReportFiles) {\n\t\t\t\t\t\t\tif (!fileLocationsMapping.containsKey(miapeMSReportFile.getFileLocation())) {\n\t\t\t\t\t\t\t\tfinal PexFileMapping miapeReportFileMapping = new PexFileMapping(\"other\", fileCounter++,\n\t\t\t\t\t\t\t\t\t\tmiapeMSReportFile.getFileLocation(), null);\n\t\t\t\t\t\t\t\tmiapeReportFileMappings.add(miapeReportFileMapping);\n\t\t\t\t\t\t\t\tfileLocationsMapping.put(miapeMSReportFile.getFileLocation(), miapeReportFileMapping);\n\n\t\t\t\t\t\t\t\t// PRIDE XML -> MIAPE MS report\n\t\t\t\t\t\t\t\tprideXMLFileMapping.addRelationship(miapeReportFileMapping.getId());\n\t\t\t\t\t\t\t\t// RAW file -> MIAPE MS report\n\t\t\t\t\t\t\t\tfor (final PexFileMapping rawFileMapping : rawFileMappings) {\n\t\t\t\t\t\t\t\t\trawFileMapping.addRelationship(miapeReportFileMapping.getId());\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// PEAK LIST file -> MIAPE MS report\n\t\t\t\t\t\t\t\tfor (final PexFileMapping peakListFileMapping : replicatePeakListFileMappings) {\n\t\t\t\t\t\t\t\t\tpeakListFileMapping.addRelationship(miapeReportFileMapping.getId());\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t// SEARCH ENGINE OUTPUT FILES\n\t\t\t\t\tfinal List<PexFile> searchEngineOutputFiles = getSearchEngineOutputFiles(replicate);\n\t\t\t\t\tfinal List<PexFileMapping> replicatesearchEngineOutputFilesMappings = new ArrayList<PexFileMapping>();\n\t\t\t\t\tif (searchEngineOutputFiles != null) {\n\t\t\t\t\t\tfor (final PexFile peakList : searchEngineOutputFiles) {\n\t\t\t\t\t\t\tif (!fileLocationsMapping.containsKey(peakList.getFileLocation())) {\n\t\t\t\t\t\t\t\tfinal PexFileMapping searchEngineOutputFileMapping = new PexFileMapping(\"search\",\n\t\t\t\t\t\t\t\t\t\tfileCounter++, peakList.getFileLocation(), null);\n\t\t\t\t\t\t\t\toutputSearchEngineFileMappings.add(searchEngineOutputFileMapping);\n\t\t\t\t\t\t\t\treplicatesearchEngineOutputFilesMappings.add(searchEngineOutputFileMapping);\n\t\t\t\t\t\t\t\tfileLocationsMapping.put(peakList.getFileLocation(), searchEngineOutputFileMapping);\n\t\t\t\t\t\t\t\t// PRIDE XML -> SEARCH ENGINE OUTPUT file\n\t\t\t\t\t\t\t\tprideXMLFileMapping.addRelationship(searchEngineOutputFileMapping.getId());\n\t\t\t\t\t\t\t\t// RAW file -> SEARCH ENGINE OUTPUT file\n\t\t\t\t\t\t\t\tfor (final PexFileMapping rawFileMapping : rawFileMappings) {\n\t\t\t\t\t\t\t\t\trawFileMapping.addRelationship(searchEngineOutputFileMapping.getId());\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// PEAK LIST FILE -> SEARCH ENGINE OUTPUT file\n\t\t\t\t\t\t\t\tfor (final PexFileMapping peakListFileMapping : replicatePeakListFileMappings) {\n\t\t\t\t\t\t\t\t\tpeakListFileMapping.addRelationship(searchEngineOutputFileMapping.getId());\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\n\t\t\t\t\t// MIAPE MSI REPORTS\n\t\t\t\t\tfinal List<PexFile> miapeMSIReportFiles = getMiapeMSIReportFiles(replicate);\n\t\t\t\t\tif (miapeMSIReportFiles != null)\n\t\t\t\t\t\tfor (final PexFile miapeMSIReportFile : miapeMSIReportFiles) {\n\t\t\t\t\t\t\tif (!fileLocationsMapping.containsKey(miapeMSIReportFile.getFileLocation())) {\n\t\t\t\t\t\t\t\tfinal PexFileMapping miapeReportFileMapping = new PexFileMapping(\"other\", fileCounter++,\n\t\t\t\t\t\t\t\t\t\tmiapeMSIReportFile.getFileLocation(), null);\n\t\t\t\t\t\t\t\tmiapeReportFileMappings.add(miapeReportFileMapping);\n\t\t\t\t\t\t\t\tfileLocationsMapping.put(miapeMSIReportFile.getFileLocation(), miapeReportFileMapping);\n\n\t\t\t\t\t\t\t\t// PRIDE XML -> MIAPE MSI report\n\t\t\t\t\t\t\t\tprideXMLFileMapping.addRelationship(miapeReportFileMapping.getId());\n\t\t\t\t\t\t\t\t// RAW file -> MIAPE MSI report\n\t\t\t\t\t\t\t\tfor (final PexFileMapping rawFileMapping : rawFileMappings) {\n\t\t\t\t\t\t\t\t\trawFileMapping.addRelationship(miapeReportFileMapping.getId());\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// PEAK LIST FILE -> MIAPE MSI report\n\t\t\t\t\t\t\t\tfor (final PexFileMapping peakListFileMapping : replicatePeakListFileMappings) {\n\t\t\t\t\t\t\t\t\tpeakListFileMapping.addRelationship(miapeReportFileMapping.getId());\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// SEARCH ENGINE OUTPUT file -> MIAPE MSI report\n\t\t\t\t\t\t\t\tfor (final PexFileMapping searchEngineOutputFileMapping : replicatesearchEngineOutputFilesMappings) {\n\t\t\t\t\t\t\t\t\tsearchEngineOutputFileMapping.addRelationship(miapeReportFileMapping.getId());\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t// Add all to the same list and then sort by id\n\t\t\t\t\ttotalFileList.addAll(outputSearchEngineFileMappings);\n\t\t\t\t\ttotalFileList.addAll(miapeReportFileMappings);\n\t\t\t\t\ttotalFileList.addAll(peakListFileMappings);\n\t\t\t\t\ttotalFileList.addAll(rawFileMappings);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Sort the list of files\n\t\tCollections.sort(totalFileList, new Comparator<PexFileMapping>() {\n\n\t\t\t@Override\n\t\t\tpublic int compare(PexFileMapping o1, PexFileMapping o2) {\n\n\t\t\t\treturn Integer.valueOf(o1.getId()).compareTo(Integer.valueOf(o2.getId()));\n\n\t\t\t}\n\n\t\t});\n\t\tfor (final PexFileMapping pexFileMapping : totalFileList) {\n\t\t\tret.add(pexFileMapping.toString());\n\t\t}\n\t\treturn ret;\n\t}", "public boolean hasFileInfo() {\n return fieldSetFlags()[15];\n }", "public IdentificationExtension(ResultSet aRS) throws SQLException {\n super(aRS);\n this.iSpectrumFileName = aRS.getString(\"filename\");\n }", "public static ArrayList readScifinder( String filename)\n {\n \t\tArrayList bibitems=new ArrayList();\n \t\tFile f = new File(filename);\n \n \t\tif(!f.exists() && !f.canRead() && !f.isFile()){\n \t\t\tSystem.err.println(\"Error \" + filename + \" is not a valid file and|or is not readable.\");\n \t\t\treturn null;\n \t\t}\n \t\tStringBuffer sb=new StringBuffer();\n \t\ttry{\n \t\t\tBufferedReader in = new BufferedReader(new FileReader( filename));\n \n \t\t\tString str;\n \t\t\twhile ((str = in.readLine()) != null) {\n \t\t\t\tsb.append(str);\n \t\t\t}\n \t\t\tin.close();\n \n \t\t}\n \t\tcatch(IOException e){return null;}\n \t\tString [] entries=sb.toString().split(\"START_RECORD\");\n \t\tHashMap hm=new HashMap();\n \t\tfor(int i=1; i<entries.length; i++){\n \t\t\tString[] fields = entries[i].split(\"FIELD \");\n \t\t\tString Type=\"\";\n \t\t\thm.clear(); // reset\n \t\t\tfor(int j=0; j<fields.length; j++) if (fields[j].indexOf(\":\") >= 0) {\n \t\t\t\tString tmp[]= new String[2];\n tmp[0] = fields[j].substring(0, fields[j].indexOf(\":\"));\n tmp[1] = fields[j].substring(fields[j].indexOf(\":\")+1);\n \t\t\t\tif(tmp.length > 1){//==2\n \t\t\t\t\tif(tmp[0].equals(\"Author\"))\n \t\t\t\t\t\thm.put( \"author\", tmp[1].replaceAll(\";\",\" and \") );\n \t\t\t\t\telse if(tmp[0].equals(\"Title\"))\n \t\t\t\t\t\thm.put(\"title\",tmp[1]);\n \n \t\t\t\t\telse if(tmp[0].equals(\"Journal Title\"))\n \t\t\t\t\t\thm.put(\"journal\",tmp[1]);\n \n \t\t\t\t\telse if(tmp[0].equals(\"Volume\"))\n \t\t\t\t\thm.put(\"volume\",tmp[1]);\n \t\t\t\telse if(tmp[0].equals(\"Page\"))\n \t\t\t\t\thm.put(\"pages\",tmp[1]);\n \t\t\t\telse if(tmp[0].equals(\"Publication Year\"))\n \t\t\t\t\thm.put(\"year\",tmp[1]);\n \t\t\t\telse if(tmp[0].equals(\"Abstract\"))\n \t\t\t\t\thm.put(\"abstract\",tmp[1]);\n \t\t\t\telse if(tmp[0].equals(\"Supplementary Terms\"))\n \t\t\t\t\thm.put(\"keywords\",tmp[1]);\n \t\t\t\telse if(tmp[0].equals(\"Document Type\"))\n \t\t\t\t\tType=tmp[1].replaceAll(\"Journal\",\"article\");\n \t\t\t}\n \t }\n \n \t BibtexEntry b=new BibtexEntry(Globals.DEFAULT_BIBTEXENTRY_ID,\n \t\t\t\t\t\t\t\t\t Globals.getEntryType(Type)); // id assumes an existing database so don't create one here\n \t b.setField( hm);\n \t bibitems.add( b );\n \n \t}\n \treturn bibitems;\n }", "public List<Record> _queryPerPatrolCard_Records(Long fid) {\n synchronized (this) {\n if (perPatrolCard_RecordsQuery == null) {\n QueryBuilder<Record> queryBuilder = queryBuilder();\n queryBuilder.where(Properties.Fid.eq(null));\n perPatrolCard_RecordsQuery = queryBuilder.build();\n }\n }\n Query<Record> query = perPatrolCard_RecordsQuery.forCurrentThread();\n query.setParameter(0, fid);\n return query.list();\n }", "@Transactional\n\n\t@Override\n\tpublic Collection<FileModel> getAll() {\n\t\treturn fm.findAll();\n\t}", "NewsFile selectByPrimaryKey(Integer fileId);", "@Test\n public void testLegacyWildcardAndFileMetadataMixed() {\n Path filePath = new Path(\"hdfs:///w/x/y/z.csv\");\n ImplicitColumnOptions options = standardOptions(filePath);\n options.useLegacyWildcardExpansion(true);\n ImplicitColumnManager implictColManager = new ImplicitColumnManager(\n fixture.getOptionManager(),\n options);\n\n ScanLevelProjection scanProj = ScanLevelProjection.build(\n RowSetTestUtils.projectList(\n ScanTestUtils.FILE_NAME_COL,\n SchemaPath.DYNAMIC_STAR,\n ScanTestUtils.SUFFIX_COL),\n Lists.newArrayList(implictColManager.projectionParser()));\n\n List<ColumnProjection> cols = scanProj.columns();\n assertEquals(5, cols.size());\n assertTrue(scanProj.columns().get(0) instanceof FileMetadataColumn);\n assertTrue(scanProj.columns().get(1) instanceof UnresolvedWildcardColumn);\n assertTrue(scanProj.columns().get(2) instanceof FileMetadataColumn);\n assertTrue(scanProj.columns().get(3) instanceof PartitionColumn);\n assertTrue(scanProj.columns().get(4) instanceof PartitionColumn);\n }", "boolean hasFileInfo();", "boolean hasFileInfo();", "boolean hasMediaFile();", "private void processFolder(File folder) {\n \t\tFile[] subFolders = folder.listFiles(new FileFilter() {\n \t\t\t@Override\n \t\t\tpublic boolean accept(File pathname) {\n \t\t\t\treturn pathname.isDirectory();\n \t\t\t}\n \t\t});\n \t\tfor (File subFolder : subFolders){\n \t\t\tprocessFolder(subFolder); \n \t\t}\n \t\tPattern nameRegex = Pattern.compile(\"([\\\\d-]+)\\\\.(pdf|epub)\", Pattern.CANON_EQ | Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE);\n \t\tFile[] files = folder.listFiles();\n \t\tfor (File file : files) {\n \t\t\tlogger.info(\"Processing file \" + file.getName());\n \t\t\tprocessLog.addNote(\"Processing file \" + file.getName());\n \t\t\tif (file.isDirectory()) {\n \t\t\t\t//TODO: Determine how to deal with nested folders?\n \t\t\t\t//processFolder(file);\n \t\t\t} else {\n \t\t\t\t// File check to see if it is of a known type\n \t\t\t\tMatcher nameMatcher = nameRegex.matcher(file.getName());\n \t\t\t\tif (nameMatcher.matches()) {\n \t\t\t\t\tImportResult importResult = new ImportResult();\n \t\t\t\t\tString isbn = nameMatcher.group(1);\n \t\t\t\t\tString fileType = nameMatcher.group(2).toLowerCase();\n \t\t\t\t\timportResult.setBaseFilename(isbn);\n \t\t\t\t\tisbn = isbn.replaceAll(\"-\", \"\");\n \t\t\t\t\timportResult.setISBN(isbn);\n \t\t\t\t\timportResult.setCoverImported(\"\");\n \t\t\t\t\t\n \t\t\t\t\ttry {\n \t\t\t\t\t\t// Get the record for the isbn\n \t\t\t\t\t\tgetRelatedRecords.setString(1, \"%\" + isbn + \"%\");\n \t\t\t\t\t\tResultSet existingRecords = getRelatedRecords.executeQuery();\n \t\t\t\t\t\tif (!existingRecords.next()){\n \t\t\t\t\t\t\t//No record found \n \t\t\t\t\t\t\tlogger.info(\"Could not find record for ISBN \" + isbn);\n \t\t\t\t\t\t\timportResult.setStatus(fileType, \"failed\", \"Could not find record for ISBN \" + isbn);\n \t\t\t\t\t\t\tprocessLog.incErrors();\n \t\t\t\t\t\t\tprocessLog.addNote(\"Could not find record for ISBN \" + isbn);\n \t\t\t\t\t\t}else{\n \t\t\t\t\t\t\tlogger.info(\"Found at least one record for \" + isbn);\n \t\t\t\t\t\t\tif (existingRecords.last()){\n \t\t\t\t\t\t\t\tif (existingRecords.getRow() >= 2){\n \t\t\t\t\t\t\t\t\tlogger.info(\"Multiple records were found for ISBN \" + isbn);\n \t\t\t\t\t\t\t\t\timportResult.setStatus(fileType, \"failed\", \"Multiple records were found for ISBN \" + isbn);\n \t\t\t\t\t\t\t\t\tprocessLog.incErrors();\n \t\t\t\t\t\t\t\t\tprocessLog.addNote(\"Multiple records were found for ISBN \" + isbn);\n \t\t\t\t\t\t\t\t}else{\n \t\t\t\t\t\t\t\t\t//We have an existing record\n \t\t\t\t\t\t\t\t\texistingRecords.first();\n \t\t\t\t\t\t\t\t\tString recordId = existingRecords.getString(\"id\");\n \t\t\t\t\t\t\t\t\tString accessType = existingRecords.getString(\"accessType\");\n \t\t\t\t\t\t\t\t\tString source = existingRecords.getString(\"source\");\n \t\t\t\t\t\t\t\t\tlogger.info(\" Attaching file to \" + recordId + \" accessType = \" + accessType + \" source=\" + source);\n \t\t\t\t\t\t\t\t\t\t\n \t\t\t\t\t\t\t\t\t// Copy the file to the library if it does not exist already\n \t\t\t\t\t\t\t\t\tFile resultsFile = new File(libraryDirectory + source + \"_\" + file.getName());\n \t\t\t\t\t\t\t\t\tif (resultsFile.exists()) {\n \t\t\t\t\t\t\t\t\t\tlogger.info(\"Skipping file because it already exists in the library\");\n \t\t\t\t\t\t\t\t\t\timportResult.setStatus(fileType, \"skipped\" ,\"File has already been copied to library\");\n \t\t\t\t\t\t\t\t\t\tprocessLog.addNote(\"Skipping file \" + file.getName() + \" because it already exists in the library\");\n \t\t\t\t\t\t\t\t\t} else {\n \t\t\t\t\t\t\t\t\t\tlogger.info(\"Importing file \" + file.getName());\n \t\t\t\t\t\t\t\t\t\t//Check to see if the file has already been added to the library.\n \t\t\t\t\t\t\t\t\t\tdoesItemExist.setString(1, file.getName());\n \t\t\t\t\t\t\t\t\t\tdoesItemExist.setString(2, recordId);\n \t\t\t\t\t\t\t\t\t\tResultSet existingItems = doesItemExist.executeQuery();\n \t\t\t\t\t\t\t\t\t\tif (existingItems.next()){\n \t\t\t\t\t\t\t\t\t\t\t//The item already exists\n \t\t\t\t\t\t\t\t\t\t\tlogger.info(\" the file has already been attached to this record\");\n \t\t\t\t\t\t\t\t\t\t\timportResult.setStatus(fileType, \"skipped\" ,\"The file has already been aded as an eContent Item\");\n \t\t\t\t\t\t\t\t\t\t\tprocessLog.addNote(\"Skipping file \" + file.getName() + \" because has already been attached to this record\");\n \t\t\t\t\t\t\t\t\t\t}else{\n \t\t\t\t\t\t\t\t\t\t\t\n \t\t\t\t\t\t\t\t\t\t\ttry {\n \t\t\t\t\t\t\t\t\t\t\t\tlogger.info(\" copying the file to library source=\" + file + \" dest=\" + resultsFile);\n \t\t\t\t\t\t\t\t\t\t\t\t//Copy the pdf file to the library\n \t\t\t\t\t\t\t\t\t\t\t\tUtil.copyFile(file, resultsFile);\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\t//Add file to acs server\n \t\t\t\t\t\t\t\t\t\t\t\tboolean addedToAcs = true;\n \t\t\t\t\t\t\t\t\t\t\t\tif (accessType.equals(\"acs\")){\n \t\t\t\t\t\t\t\t\t\t\t\t\tlogger.info(\"Adding file to the ACS server\");\n \t\t\t\t\t\t\t\t\t\t\t\t\taddedToAcs = addFileToAcsServer(fileType, resultsFile, importResult);\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\t\n \t\t\t\t\t\t\t\t\t\t\t\tif (addedToAcs){\n \t\t\t\t\t\t\t\t\t\t\t\t\t//filename, acsId, recordId, item_type, addedBy, date_added, date_updated\n \t\t\t\t\t\t\t\t\t\t\t\t\tlong curTimeSec = new Date().getTime() / 1000;\n \t\t\t\t\t\t\t\t\t\t\t\t\taddEContentItem.setString(1, resultsFile.getName());\n \t\t\t\t\t\t\t\t\t\t\t\t\taddEContentItem.setString(2, importResult.getAcsId());\n \t\t\t\t\t\t\t\t\t\t\t\t\taddEContentItem.setString(3, recordId);\n \t\t\t\t\t\t\t\t\t\t\t\t\taddEContentItem.setString(4, fileType);\n \t\t\t\t\t\t\t\t\t\t\t\t\taddEContentItem.setLong(5, -1);\n \t\t\t\t\t\t\t\t\t\t\t\t\taddEContentItem.setLong(6, curTimeSec);\n \t\t\t\t\t\t\t\t\t\t\t\t\taddEContentItem.setLong(7, curTimeSec);\n \t\t\t\t\t\t\t\t\t\t\t\t\tint rowsInserted = addEContentItem.executeUpdate();\n \t\t\t\t\t\t\t\t\t\t\t\t\tif (rowsInserted == 1){\n \t\t\t\t\t\t\t\t\t\t\t\t\t\timportResult.setStatus(fileType, \"success\", \"\");\n \t\t\t\t\t\t\t\t\t\t\t\t\t\tlogger.info(\" added to the database\");\n \t\t\t\t\t\t\t\t\t\t\t\t\t\t\n \t\t\t\t\t\t\t\t\t\t\t\t\t}else{\n \t\t\t\t\t\t\t\t\t\t\t\t\t\tlogger.info(\" file could not be added to the database\");\n \t\t\t\t\t\t\t\t\t\t\t\t\t\tprocessLog.addNote(file.getName() + \" could not be added to the database\");\n \t\t\t\t\t\t\t\t\t\t\t\t\t\tprocessLog.incErrors();\n \t\t\t\t\t\t\t\t\t\t\t\t\t}\n \t\t\t\t\t\t\t\t\t\t\t\t}else{\n \t\t\t\t\t\t\t\t\t\t\t\t\tlogger.info(\" the file could not be added to the acs server\");\n \t\t\t\t\t\t\t\t\t\t\t\t\tprocessLog.addNote(file.getName() + \" could not be added to the acs server\");\n \t\t\t\t\t\t\t\t\t\t\t\t\tprocessLog.incErrors();\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\t\n \t\t\t\t\t\t\t\t\t\t\t\tif (importResult.getSatus(fileType).equals(\"failed\")){\n \t\t\t\t\t\t\t\t\t\t\t\t\t//If we weren't able to add the file correctly, remove it so it will be processed next time. \n \t\t\t\t\t\t\t\t\t\t\t\t\tresultsFile.delete();\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\t\n \t\t\t\t\t\t\t\t\t\t\t} catch (IOException e) {\n \t\t\t\t\t\t\t\t\t\t\t\tlogger.error(\"Error copying file to record\", e);\n \t\t\t\t\t\t\t\t\t\t\t\timportResult.setStatus(fileType, \"failed\", \"Error copying file \" + e.toString());\n \t\t\t\t\t\t\t\t\t\t\t}\n \t\t\t\t\t\t\t\t\t\t}\n \t\t\t\t\t\t\t\t\t}\n \t\t\t\t\t\t\t\t}\n \t\t\t\t\t\t\t}\n \t\t\t\t\t\t}\n \t\t\t\t\t} catch (SQLException e) {\n \t\t\t\t\t\tlogger.error(\"Error finding related records\", e);\n \t\t\t\t\t\timportResult.setStatus(\"pdf\", \"failed\", \"SQL error processing file \" + e.toString());\n \t\t\t\t\t}\n \t\t\t\t\timportResults.add(importResult);\n \t\t\t\t\t//Update that another file has been processed.\n \t\t\t\t\tprocessLog.incUpdated();\n \t\t\t\t\ttry {\n \t\t\t\t\t\tupdateRecordsProcessed.setLong(1, processLog.getNumUpdates());\n \t\t\t\t\t\tupdateRecordsProcessed.setLong(2, processLog.getNumErrors());\n \t\t\t\t\t\tupdateRecordsProcessed.setLong(3, logEntryId);\n \t\t\t\t\t\tupdateRecordsProcessed.executeUpdate();\n \t\t\t\t\t} catch (SQLException e) {\n \t\t\t\t\t\tlogger.error(\"Error updating number of records processed.\", e);\n \t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tprocessLog.addNote(\" Skipping because the name is not an ISBN\");\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t\t\n \t}", "public final void mo14831s() {\n Iterator it = ((ArrayList) mo14817d()).iterator();\n while (it.hasNext()) {\n File file = (File) it.next();\n if (file.listFiles() != null) {\n m6739b(file);\n long c = m6740c(file, false);\n if (((long) this.f6567b.mo14797a()) != c) {\n try {\n new File(new File(file, String.valueOf(c)), \"stale.tmp\").createNewFile();\n } catch (IOException unused) {\n f6563c.mo14884b(6, \"Could not write staleness marker.\", new Object[0]);\n }\n }\n for (File b : file.listFiles()) {\n m6739b(b);\n }\n }\n }\n }", "public static void filter_old() throws IOException {\n\t\tHashSet<String> wikimid = new HashSet<String>();\r\n\t\t{\r\n\t\t\tDelimitedWriter dw = new DelimitedWriter(Main.file_mid2wid);\r\n\t\t\tDelimitedReader dr = new DelimitedReader(Main.file_fbdump_2_len4);\r\n\t\t\tString[] l;\r\n\t\t\twhile ((l = dr.read()) != null) {\r\n\t\t\t\tif (l[1].equals(\"/type/object/key\") && l[2].equals(\"/wikipedia/en_id\")) {\r\n\t\t\t\t\tdw.write(l[0], l[3]);\r\n\t\t\t\t\twikimid.add(l[0]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tdr.close();\r\n\t\t\tdw.close();\r\n\t\t\tD.p(\"wiki id size is\", wikimid.size());\r\n\t\t}\r\n\t\tDelimitedWriter dw = new DelimitedWriter(Main.file_visible + \".filter\");\r\n\t\t{\r\n\t\t\tDelimitedReader dr = new DelimitedReader(Main.file_visible);\r\n\t\t\tString[] l;\r\n\t\t\tint count = 0, write = 0;\r\n\t\t\twhile ((l = dr.read()) != null) {\r\n\t\t\t\tcount++;\r\n\t\t\t\tif (count % 100000 == 0) {\r\n\t\t\t\t\tD.p(\"count vs write\", count, write);\r\n\t\t\t\t}\r\n\t\t\t\tString rel = l[2];\r\n\t\t\t\tif (rel.startsWith(\"/type\") || rel.startsWith(\"/user\") || rel.startsWith(\"/common\")\r\n\t\t\t\t\t\t|| rel.startsWith(\"/base\")) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tif (l[0].startsWith(\"s\") && !wikimid.contains(l[1])) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tif (l[0].startsWith(\"j\") && (!wikimid.contains(l[1]) || !wikimid.contains(l[3]))) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tdw.write(l);\r\n\t\t\t\twrite++;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\tdw.close();\r\n\t\tSort.sort(Main.file_visible + \".filter\", Main.file_visible + \".filter.sbmid\", Main.dir,\r\n\t\t\t\tnew Comparator<String[]>() {\r\n\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic int compare(String[] arg0, String[] arg1) {\r\n\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\treturn arg0[1].compareTo(arg1[1]);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t});\r\n\t\tSort.sort(Main.file_visible + \".filter\", Main.file_visible + \".filter.sbmid2\", Main.dir,\r\n\t\t\t\tnew Comparator<String[]>() {\r\n\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic int compare(String[] arg0, String[] arg1) {\r\n\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\treturn arg0[3].compareTo(arg1[3]);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t});\r\n\t\tSort.sort(Main.file_visible + \".filter\", Main.file_visible + \".filter.sbrel\", Main.dir,\r\n\t\t\t\tnew Comparator<String[]>() {\r\n\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic int compare(String[] arg0, String[] arg1) {\r\n\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\treturn arg0[2].compareTo(arg1[2]);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t});\r\n\t}", "public static ArrayList<String> getAvailableParts() {\n ArrayList<String> allParts = new ArrayList<String>();\n String pattern = \"_db.dat\";\n File dir = new File(getRapidSmithPath() + File.separator + \"devices\");\n if (!dir.exists()) {\n MessageGenerator.briefErrorAndExit(\"ERROR: No part files exist. Please run \" +\n Installer.class.getCanonicalName() + \" to create part files.\");\n }\n for (String partFamily : dir.list()) {\n File partDir = new File(dir.getAbsolutePath() + File.separator + partFamily);\n for (String part : partDir.list()) {\n if (part.endsWith(pattern)) {\n allParts.add(part.replace(pattern, \"\"));\n }\n }\n }\n return allParts;\n }", "List<File> getSystemDescriptionFiles();", "private AFile getFileToCheck() {\n\t\tif (fileListTblMdl != null && ((compareCount > 8 && compareCount % 4 == 0) || compareCount >= fileList.size())) {\n\t\t\tfileListTblMdl.fireTableDataChanged();\n\t\t}\n\t\tif (compareCount >= fileList.size()) {\n\t\t\treturn null;\n\t\t} else {\n\t\t\tsynchronized (fileList) {\n\t\t\t\treturn fileList.get(compareCount++);\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tpublic ResultTO getFileInfoFromMd5(String md5String) {\n\t\tResultTO result = this.getAllFiles();\n\t\tif (result.isError()) {\n\t\t\tresult.setMessage(\"Some error occurred in getting the file for the given MD5\");\n\t\t\tresult.setFiles(new ArrayList<InfoFileTO>());\n\t\t\treturn result;\n\t\t}\n\t\tList<InfoFileTO> infoFileList = result.getFiles();\n\t\t// If it is void (when some error occurred) it is not executed\n\t\tfor (InfoFileTO infoFileTO : infoFileList) {\n\t\t\tif (infoFileTO.getHashMd5().equals(md5String)) {\n\t\t\t\tresult.setMessage(\"Monitor Operation successfully completed\");\n\t\t\t\tresult.setFiles(Arrays.asList(infoFileTO));\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\tresult.setMessage(\"No file has been found with the given Hash MD5!\");\n\t\t\t\tresult.setFiles(new ArrayList<InfoFileTO>());\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "@Test\n public void testGetMediaTypes() throws ODSKartException, FileNotFoundException {\n System.out.println(\"getMediaTypes\");\n DBManager instance = new ODSDBManager(\"test.ods\");\n List<String> expResult = new ArrayList<String>();\n expResult.add(\"b\");\n List<String> result = instance.getMediaTypes();\n assertEquals(expResult, result);\n instance = new ODSDBManager(\"long.ods\");\n expResult.add(\"c\");\n result = instance.getMediaTypes();\n assertEquals(expResult,result);\n // TODO review the generated test code and remove the default call to fail.\n // fail(\"The test case is a prototype.\");\n }", "public List<AttachFile> getFiles(int no) {\n\t\treturn sqlSession.selectList(\"org.zerock.mapper.agentMapper.viewFiles\", no);\n\t}", "public synchronized ResultSet getFileList() {\n try {\n return statement.executeQuery(\"select * from FileManager\");\n } catch (SQLException ex) {\n Logger.getLogger(DataManager.class.getName()).log(Level.SEVERE,\n null, ex);\n }\n\n return null;\n }", "List<MediaMetadata> getAll();", "public String getRecordFile();", "public List<GridFSDBFile> find(DBObject query) {\n\treturn find(query, null);\n }", "@Override\r\n\tpublic Map<String, Object> fileSelectStoredFileName(int no) {\n\t\treturn sqlSession.selectOne(namespace + \"fileSelectStoredFileName\", no);\r\n\t}", "abstract public Shard<Set<File>> getFilesKnowledge();", "public RecordSet loadAllProcessingDetail(Record inputRecord);", "public List<MimeType> getAllMimeTypes() throws ContestManagementException {\n return null;\r\n }", "public List<MimeType> getAllMimeTypes() throws ContestManagementException {\n return null;\r\n }", "private File m5346f() {\n if (Process.myUid() == 1000) {\n return null;\n }\n File file;\n boolean equals;\n try {\n equals = \"mounted\".equals(Environment.getExternalStorageState());\n } catch (Exception e) {\n equals = false;\n }\n if (!C1222aj.m5343c() || equals) {\n File a = C1222aj.m5334a(this.f4232a);\n if (a != null) {\n File file2 = new File(a.getPath() + File.separator + \"carrierdata\");\n if (file2.exists() && file2.isDirectory()) {\n File[] listFiles = file2.listFiles();\n if (listFiles != null && listFiles.length > 0) {\n ArrayList a2 = C1222aj.m5336a(listFiles);\n if (a2.size() >= 2) {\n a = (File) a2.get(0);\n file = (File) a2.get(1);\n if (a.getName().compareTo(file.getName()) <= 0) {\n file = a;\n }\n return file;\n }\n }\n }\n }\n }\n file = null;\n return file;\n }", "public String printFileConsultationDetail() {\n String consultationDetail = \"\";\n for (String symptom : symptoms) {\n consultationDetail += symptom + Constants.DETAILS_DELIMITER;\n }\n consultationDetail += Constants.SYMPTOM_DELIMITER;\n for (String diagnosis : diagnoses) {\n consultationDetail += diagnosis + Constants.DETAILS_DELIMITER;\n }\n consultationDetail += Constants.DIAGNOSIS_DELIMITER;\n for (String prescription : prescriptions) {\n consultationDetail += prescription + Constants.DETAILS_DELIMITER;\n }\n consultationDetail += Constants.PRESCRIPTION_DELIMITER;\n return consultationDetail;\n }", "public JSONArray listBaredFiles(Connection conn, File cond) throws Exception{\n this.result = new JSONArray();\n PreparedStatement ps = null;\n ResultSet rs = null;\n boolean fileID = false;\n String sql = \"SELECT F.FILE_ID, F.LOGICAL_FILE_NAME LFN, F.IS_FILE_VALID, F.DATASET_ID, F.BLOCK_ID, F.FILE_TYPE_ID, \"\n\t\t +\" F.CHECK_SUM, F.EVENT_COUNT, F.FILE_SIZE, F.BRANCH_HASH_ID, F.ADLER32, F.MD5, F.AUTO_CROSS_SECTION,\"\n\t\t + \" F.CREATION_DATE, F.CREATE_BY, F.LAST_MODIFICATION_DATE, F.LAST_MODIFIED_BY \"\n + \" FROM \" + schemaOwner + \"FILES F \"\n + \" WHERE \";\n\tif(cond.getFileID() != 0){ \n\t sql += \"F.FILE_ID = ? \";\n\t fileID =true;\n\t}\n else if (cond.getLogicalFileName() != null || cond.getLogicalFileName() != \"\"){\n\t if ( (cond.getLogicalFileName()).indexOf('%') != -1) sql += \" F.LOGICAL_FILE_NAME like ?\";\n\t else sql += \" F.LOGICAL_FILE_NAME = ?\";\n\t}\n else throw new DBSException(\"Input Data Error\", \"File name (LFN) or ID have to be provided. \");\n\n ps = null;\n rs = null;\n try{\n ps = DBManagement.getStatement(conn, sql);\n //prepare statement index starting with 1, but JSONArray index starting with 0.\n\t if(fileID)ps.setInt(1, cond.getFileID());\n\t else ps.setString(1, cond.getLogicalFileName());\n //System.out.println(ps.toString());\n rs = ps.executeQuery();\n while(rs.next()){\n String lfn = rs.getString(\"LFN\");\n int fileId = rs.getInt(\"FILE_ID\");\n\t\tint isValid = rs.getInt(\"IS_FILE_VALID\");\n\t\tString cksum = rs.getString(\"CHECK_SUM\");\n\t\tint ecnt = rs.getInt(\"EVENT_COUNT\");\n\t\tint fsize = rs.getInt(\"FILE_SIZE\");\n\t\tdouble xcr = rs.getDouble(\"AUTO_CROSS_SECTION\");\n\t\tString adl = rs.getString(\"ADLER32\");\n\t\tString md = rs.getString(\"MD5\");\n\t\tlong cDate = rs.getLong(\"CREATION_DATE\");\n\t\tString cBy = rs.getString(\"CREATE_BY\");\n\t\tlong lDate = rs.getLong(\"LAST_MODIFICATION_DATE\");\n\t\tString lBy = rs.getString(\"LAST_MODIFIED_BY\");\n \n\t\tthis.result.put(new File(fileId, lfn, isValid, cksum, ecnt, fsize,\n adl, md, xcr, cDate, cBy, lDate, lBy));\n\t }\n }finally {\n if (rs != null) rs.close();\n if (ps != null) ps.close();\n }\n return this.result;\n }", "@Override\r\n\tpublic Map<String, Object> select_file_info(Map<String, Object> map) throws Exception {\n\t\treturn sql.selectOne(\"cms_board.select_file_info\", map);\r\n\t}", "private void query() {\n if (mDriveServiceHelper != null) {\n Log.d(\"error\", \"Querying for files.\");\n\n mDriveServiceHelper.queryFiles()\n .addOnSuccessListener(fileList -> {\n StringBuilder builder = new StringBuilder();\n for (File file : fileList.getFiles()) {\n builder.append(file.getName()).append(\"\\n\");\n }\n String fileNames = builder.toString();\n\n// mFileTitleEditText.setText(\"File List\");\n// mDocContentEditText.setText(fileNames);\n\n setReadOnlyMode();\n })\n .addOnFailureListener(exception -> Log.e(\"error\", \"Unable to query files.\", exception));\n }\n }", "@Test\r\n\tpublic void findByFileInfoID() {\n\t\tSystem.out.println(123);\r\n\t\tint file_id = 1;\r\n\t\tFileInfo f= fileInfoDao.findByFileInfoID(file_id);\r\n\t\tdd(f);\r\n\t\t\r\n\t}", "public static List<SQLquery> updateQueryList() throws IOException {\n\n List<String> querynames = new ArrayList<String>();\n List<SQLquery> queries = new ArrayList<SQLquery>();\n File curDir = new File(\".\");\n String[] fileNames = curDir.list();\n\n for (int i = 0; i <= fileNames.length - 1; i++) {\n\n /**\n * SELECT ONLY .XYZ FILES FROM FOLDER\n */\n System.out.println(fileNames[i]);\n if (fileNames[i].contains(\".xyz\")) {\n\n querynames.add(fileNames[i]);\n\n }\n\n }\n\n /**\n * create SQLquery objects with appropriate name and query string\n */\n for ( String querypath : querynames ) {\n\n String content = new String(Files.readAllBytes(Paths.get(querypath)));\n SQLquery newquery = new SQLquery(querypath.replace(\".xyz\",\"\"),content);\n queries.add(newquery);\n\n }\n\n /**\n * return query list\n */\n return queries;\n\n }", "public List<Patient> readAllPatientsMasked() throws ClassNotFoundException, SQLException, Exception {\n\t\tList<Patient> patientList = new ArrayList<>();\n\n\t\ttry {\n\t\t\tPatientDbDaoImpl patientDbDao = new PatientDbDaoImpl();\n\t\t\tpatientList = patientDbDao.readAllWithMaskedDetails();\n\t\t} catch (SQLException e) {\n\t\t\tthrow new SQLException(e);\n\t\t}\n\t\treturn patientList;\n\t}", "public void searchFile(String fname) {\n File file = new File(fname);\n try {\n BufferedReader br = new BufferedReader(new FileReader(file));\n String s;\n while ((s = br.readLine()) != null) { \n //Search each line for at least 1 match ogf the regex\n searchLine(s);\n }\n } catch (FileNotFoundException e) { \n System.out.println(\"File \" + fname + \" not found\");\n } catch (IOException e) { \n e.printStackTrace();\n }\n }", "public List<String> nomsFactures() {\n File folder = new File(\"factures/\");\n File[] listOfFiles = folder.listFiles();\n List<String> noms = new ArrayList<String>();\n\n for (int i = 0; i < listOfFiles.length; i++) {\n if (listOfFiles[i].isFile()) {\n noms.add(listOfFiles[i].getName());\n }\n }\n return noms;\n }", "private void readResultSet() throws IOException {\n\n\t\tBufferedReader reader = new BufferedReader(\n\t\t\t\t(new InputStreamReader(new FileInputStream(new File(\"./thrash/\" + fileName)), \"ISO-8859-1\")));\n\n\t\tString line = reader.readLine();\n\n\t\twhile (line != null) {\n\n\t\t\tString rate = line.split(\"rate=\")[1].trim();\n\t\t\tString label = line.split(\"[0-9]\\\\.[0-9]\")[0].trim();\n//\t\t\tString googleDescription = line.split(\"googleDescription=\")[1].split(\"score\")[0].trim();\n\t\t\tString score = line.split(\"score=\")[1].split(\"rate=\")[0].trim();\n\n\t\t\tSpatialObject obj = new SpatialObject(label, Double.parseDouble(rate), Double.parseDouble(score));\n//\t\t\tSystem.out.println(\"Label: \" + label);\n//\t\t\tSystem.out.println(\"Rate: \" + rate);\n//\t\t\tSystem.out.println(\"Score: \" + score);\n//\t\t\tSpatialObject idealObj = new SpatialObject(googleDescription, Double.parseDouble(rate), Double.parseDouble(rate));\n\t\t\tSpatialObject idealObj = new SpatialObject(label, Double.parseDouble(rate), Double.parseDouble(rate));\n\n\t\t\tresults.add(obj);\n\t\t\tidealResults.add(idealObj);\n\n\t\t\tline = reader.readLine();\n\t\t}\n\n\t\treader.close();\n\t}", "public abstract List<LocalFile> getAllFiles();", "ArrayList<File> findSong(File file) {\n ArrayList<File> arrayList = new ArrayList<>();\n\n File[] files = file.listFiles();\n for (File singleFile : files) {\n if (singleFile.isDirectory() && !singleFile.isHidden()) {\n arrayList.addAll(findSong(singleFile));\n } else {\n if (singleFile.getName().endsWith(\".mp3\") || singleFile.getName().endsWith(\".wva\")) {\n arrayList.add(singleFile);\n }\n }\n }\n return arrayList;\n }", "DiaryFile selectByPrimaryKey(String maperId);", "@Override\n public boolean hasUploadedFiles(Item item) throws SQLException\n {\n List<Bundle> bundles = getBundles(item, \"ORIGINAL\");\n for (Bundle bundle : bundles) {\n if (CollectionUtils.isNotEmpty(bundle.getBitstreams())) {\n return true;\n }\n }\n return false;\n }", "@Override\n\tpublic List<FactNonPrintedMaterial> findAll() throws SystemException {\n\t\treturn findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);\n\t}", "private void readMetaData() throws AreaFileException {\r\n \r\n int i;\r\n// hasReadData = false;\r\n\r\n// if (! fileok) {\r\n// throw new AreaFileException(\"Error reading AreaFile directory\");\r\n// }\r\n\r\n dir = new int[AD_DIRSIZE];\r\n\r\n for (i=0; i < AD_DIRSIZE; i++) {\r\n try { dir[i] = af.readInt();\r\n } catch (IOException e) {\r\n status = -1;\r\n throw new AreaFileException(\"Error reading AreaFile directory:\" + e);\r\n }\r\n }\r\n position += AD_DIRSIZE * 4;\r\n\r\n // see if the directory needs to be byte-flipped\r\n\r\n if (dir[AD_VERSION] != VERSION_NUMBER) {\r\n McIDASUtil.flip(dir,0,19);\r\n // check again\r\n if (dir[AD_VERSION] != VERSION_NUMBER)\r\n throw new AreaFileException(\r\n \"Invalid version number - probably not an AREA file\");\r\n // word 20 may contain characters -- if small integer, flip it...\r\n if ( (dir[20] & 0xffff) == 0) McIDASUtil.flip(dir,20,20);\r\n McIDASUtil.flip(dir,21,23);\r\n // words 24-31 contain memo field\r\n McIDASUtil.flip(dir,32,50);\r\n // words 51-2 contain cal info\r\n McIDASUtil.flip(dir,53,55);\r\n // word 56 contains original source type (ascii)\r\n McIDASUtil.flip(dir,57,63);\r\n flipwords = true;\r\n }\r\n\r\n areaDirectory = new AreaDirectory(dir);\r\n\r\n // pull together some values needed by other methods\r\n navLoc = dir[AD_NAVOFFSET];\r\n calLoc = dir[AD_CALOFFSET];\r\n auxLoc = dir[AD_AUXOFFSET];\r\n datLoc = dir[AD_DATAOFFSET];\r\n numBands = dir[AD_NUMBANDS];\r\n linePrefixLength = \r\n dir[AD_DOCLENGTH] + dir[AD_CALLENGTH] + dir[AD_LEVLENGTH];\r\n if (dir[AD_VALCODE] != 0) linePrefixLength = linePrefixLength + 4;\r\n if (linePrefixLength != dir[AD_PFXSIZE]) \r\n throw new AreaFileException(\"Invalid line prefix length in AREA file.\");\r\n lineDataLength = numBands * dir[AD_NUMELEMS] * dir[AD_DATAWIDTH];\r\n lineLength = linePrefixLength + lineDataLength;\r\n numberLines = dir[AD_NUMLINES];\r\n\r\n if (datLoc > 0 && datLoc != McIDASUtil.MCMISSING) {\r\n navbytes = datLoc - navLoc;\r\n calbytes = datLoc - calLoc;\r\n auxbytes = datLoc - auxLoc;\r\n }\r\n if (auxLoc > 0 && auxLoc != McIDASUtil.MCMISSING) {\r\n navbytes = auxLoc - navLoc;\r\n calbytes = auxLoc - calLoc;\r\n }\r\n\r\n if (calLoc > 0 && calLoc != McIDASUtil.MCMISSING ) {\r\n navbytes = calLoc - navLoc;\r\n }\r\n\r\n\r\n // Read in nav block\r\n if (navLoc > 0 && navbytes > 0) {\r\n nav = new int[navbytes/4];\r\n newPosition = (long) navLoc;\r\n skipByteCount = (int) (newPosition - position);\r\n try {\r\n af.skipBytes(skipByteCount);\r\n } catch (IOException e) {\r\n status = -1;\r\n throw new AreaFileException(\"Error skipping AreaFile bytes: \" + e);\r\n }\r\n for (i=0; i<navbytes/4; i++) {\r\n try {\r\n nav[i] = af.readInt();\r\n } catch (IOException e) {\r\n status = -1;\r\n throw new AreaFileException(\"Error reading AreaFile navigation:\"+e);\r\n }\r\n }\r\n if (flipwords){\r\n flipnav(nav);\r\n }\r\n position = navLoc + navbytes;\r\n }\r\n\r\n // Read in cal block\r\n if (calLoc > 0 && calbytes > 0) {\r\n cal = new int[calbytes/4];\r\n newPosition = (long)calLoc;\r\n skipByteCount = (int) (newPosition - position);\r\n try {\r\n af.skipBytes(skipByteCount);\r\n } catch (IOException e) {\r\n status = -1;\r\n throw new AreaFileException(\"Error skipping AreaFile bytes: \" + e);\r\n }\r\n for (i=0; i<calbytes/4; i++) {\r\n try { \r\n cal[i] = af.readInt();\r\n } catch (IOException e) {\r\n status = -1;\r\n throw new AreaFileException(\"Error reading AreaFile calibration:\"+e);\r\n }\r\n }\r\n // if (flipwords) flipcal(cal);\r\n position = calLoc + calbytes;\r\n }\r\n\r\n // Read in aux block\r\n if (auxLoc > 0 && auxbytes > 0){\r\n aux = new int[auxbytes/4];\r\n newPosition = (long) auxLoc;\r\n skipByteCount = (int) (newPosition - position);\r\n try{\r\n af.skipBytes(skipByteCount);\r\n }catch (IOException e){\r\n status = -1;\r\n throw new AreaFileException(\"Error skipping AreaFile bytes: \" + e);\r\n }\r\n for (i = 0; i < auxbytes/4; i++){\r\n try{\r\n aux[i] = af.readInt();\r\n }catch (IOException e){\r\n status = -1;\r\n throw new AreaFileException(\"Error reading AreaFile aux block:\" + e);\r\n }\r\n }\r\n position = auxLoc + auxbytes;\r\n }\r\n\r\n // now return the Dir, as requested...\r\n status = 1;\r\n return;\r\n }", "public List<StudioFileType> getAllStudioFileTypes() throws ContestManagementException {\r\n return null;\r\n }", "private void readFileList(String mediaType){\n Log.v(TAG,\"Context = \" + mContext);\n Uri uri = null;\n if(mediaType.equals(IMAGE)) {\n uri = android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI;\n }\n else if(mediaType.equals(VIDEO)){\n uri = android.provider.MediaStore.Video.Media.EXTERNAL_CONTENT_URI;\n }\n\n if(uri == null){\n Log.v(TAG, \"ERROR: Media type error\");\n return;\n }\n else {\n String[] projection = {MediaStore.MediaColumns._ID, MediaStore.MediaColumns.DATA\n , MediaStore.MediaColumns.DISPLAY_NAME, MediaStore.MediaColumns.SIZE};\n\n Cursor cursor = mContext.getContentResolver().query(uri, projection, null, null, null);\n while (cursor != null && cursor.moveToNext()) {\n int column_index_data = cursor.getColumnIndexOrThrow(MediaStore.MediaColumns.DATA);\n String data = cursor.getString(column_index_data);\n int column_index_id = cursor.getColumnIndexOrThrow(MediaStore.MediaColumns._ID);\n int fileId = cursor.getInt(column_index_id);\n String displayName = cursor.getString(cursor.getColumnIndexOrThrow(MediaStore.MediaColumns.DISPLAY_NAME));\n long fileSize = cursor.getLong(cursor.getColumnIndexOrThrow(MediaStore.MediaColumns.SIZE));\n\n //Get information of files in friendsCameraSample folder\n if (data.contains(\"friendsCameraSample\")) {\n HashMap<String, String> info = new HashMap<>();\n info.put(OSCParameterNameMapper.FileInfo.NAME, displayName);\n info.put(OSCParameterNameMapper.FileInfo.URL, data);\n info.put(OSCParameterNameMapper.FileInfo.SIZE, String.valueOf(fileSize));\n adapter.addItem(info, fileId);\n adapter.notifyDataSetChanged();\n }\n }\n }\n }", "@Override\n\tpublic List<HumanFileDig> findAllHumanFileDig() {\n\t\treturn humanFileDigMapper.selectAllHumanFileDig();\n\t}", "public void Large_Req_detail()\n {\n\t boolean largereqpresent =lareqdetails.size()>0;\n\t if(largereqpresent)\n\t {\n\t\t// System.out.println(\"Large Request details report is PRESENT\");\n\t }\n\t else\n\t {\n\t\t System.out.println(\"Large Request details report is not present\");\n\t }\n }", "protected static boolean containsFileID(double fileID) {\n\n String sql = \"SELECT fileID FROM files\";\n\n try (Connection conn = DatabaseOperations.connect();\n Statement stmt = conn.createStatement();\n ResultSet rs = stmt.executeQuery(sql)) {\n\n // loop through the result set\n while (rs.next()) {\n if (fileID == rs.getDouble(\"fileID\")) {\n return true;\n }\n }\n } catch (SQLException e) {\n System.out.println(\"fileIDExists: \" + e.getMessage());\n }\n return false;\n\n }" ]
[ "0.5650874", "0.5439893", "0.52184105", "0.51727515", "0.50775486", "0.50757295", "0.5037671", "0.49760124", "0.49760124", "0.49604475", "0.48777038", "0.4877627", "0.48600304", "0.48305312", "0.48153985", "0.47890744", "0.47831324", "0.4780414", "0.4745086", "0.47294384", "0.47219503", "0.47115833", "0.47101673", "0.47097084", "0.4707056", "0.46999326", "0.4697965", "0.46965355", "0.46957418", "0.4684799", "0.4682104", "0.46786806", "0.46512446", "0.46474296", "0.4625266", "0.46238205", "0.4613738", "0.4586051", "0.45812416", "0.457509", "0.45743757", "0.45457837", "0.4543121", "0.4534829", "0.4529111", "0.44829392", "0.44764325", "0.44754475", "0.44740522", "0.4473685", "0.44723797", "0.4468792", "0.4465488", "0.44622457", "0.44621244", "0.44540384", "0.4438467", "0.44339806", "0.44339806", "0.44314063", "0.44278044", "0.44218183", "0.44140205", "0.44125515", "0.4396916", "0.43955162", "0.4393677", "0.43904445", "0.43885767", "0.43854177", "0.4380594", "0.43755648", "0.43616807", "0.43613654", "0.4359321", "0.43578804", "0.4355605", "0.4355605", "0.43479562", "0.4347862", "0.43412995", "0.43347144", "0.43329152", "0.43219858", "0.43144006", "0.4306689", "0.43037656", "0.4302505", "0.4301357", "0.42949522", "0.42902422", "0.42892152", "0.42866996", "0.42843464", "0.42840207", "0.4282974", "0.427482", "0.42719287", "0.427145", "0.426917" ]
0.586193
0
/ Empty temporary tables; and check if they exist.
public static boolean emptyTempTables() { ArrayList temp_tables = new ArrayList(); // Since the mrblock depends on mrfile it actually // could be skipped but this way the program will also // check if the tables exist and give an error back if any doesn't. temp_tables.add( "mrfile" ); temp_tables.add( "mrblock" ); boolean status = sql_epiII.emptyTables( temp_tables, false ); return status; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void clearTables() {\r\n // your code here\r\n\t\ttry {\r\n\t\t\tdeleteReservationStatement.executeUpdate();\r\n\t\t\tdeleteBookingStatement.executeUpdate();\r\n\t\t\tdeleteUserStatement.executeUpdate();\r\n\t\t} catch (SQLException e){\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n }", "public void clearTables()\n\t{\n\t\ttry {\n\t\t\tclearStatement.executeUpdate();\n\t\t} catch (Exception e) {\n\t\t\tif (DEBUG) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "private void deleteTempFiles() {\n\t\tfor (int i = 0; i < prevPrevTotalBuckets; i++) {\n\t\t\ttry {\n\t\t\t\tString filename = DatabaseCatalog.getInstance().getTempDirectory() + \"/\" + instanceHashcode + \"_\"\n\t\t\t\t\t\t+ (passNumber - 1) + \"_\" + i;\n\t\t\t\tFile file = new File(filename);\n\t\t\t\tfile.delete();\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public boolean dropTemporaryTableAfterUse() {\n \t\treturn true;\n \t}", "public void clearTables() {\n\t _database.delete(XREF_TABLE, null, null);\n\t _database.delete(ORDER_RECORDS_TABLE, null, null); \n\t}", "static void emptyTable () {\n Session session = null;\n Transaction transaction = null;\n try {\n session = sessionFactory.openSession();\n transaction = session.beginTransaction();\n Query query = session.createQuery(\"DELETE from ReservationsEntity \");\n query.executeUpdate();\n Query query2 = session.createQuery(\"DELETE from OrdersEntity \");\n query2.executeUpdate();\n\n Query query3 = session.createQuery(\"DELETE from TablesEntity \");\n query3.executeUpdate();\n transaction.commit();\n }\n catch (Exception e)\n {\n if (transaction != null) {\n transaction.rollback();\n }\n throw e;\n } finally {\n if (session != null) {\n session.close();\n }\n }\n }", "public void tempcheck(){\r\n \t//clear last data\r\n if(workplace!=null){\r\n \tFile temp = new File(workplace +\"/temp\");\r\n \tif(temp.exists()){\r\n \t\tFile[] dels = temp.listFiles();\r\n \t\tif(dels[0]!=null){\r\n \t\t\tfor(int i=0; i<dels.length; i++){\r\n \t\t\t\tif(dels[i].isFile()){\r\n \t\t\t\t\tdels[i].delete();\r\n \t\t\t\t}else{\r\n \t\t\t\t\tFile[] delss = dels[i].listFiles();\r\n \t\t\t\t\tif(delss[0]!=null){\r\n \t\t\t\t\t\tfor(int k=0; k<delss.length; k++){\r\n \t\t\t\t\t\t\tdelss[k].delete();\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t}\r\n \t\t\t\t\tdels[i].delete();\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t}\r\n \ttemp.delete();\r\n }\r\n }", "private void cleanup() {\n File tmpdir = new File(System.getProperty(\"java.io.tmpdir\"));\n File[] backupDirs = tmpdir.listFiles(file -> file.getName().contains(BACKUP_TEMP_DIR_PREFIX));\n if (backupDirs != null) {\n for (File file : backupDirs) {\n try {\n FileUtils.deleteDirectory(file);\n log.info(\"removed temporary backup directory {}\", file.getAbsolutePath());\n } catch (IOException e) {\n log.error(\"failed to delete the temporary backup directory {}\", file.getAbsolutePath());\n }\n }\n }\n }", "public void dropTempTable (java.lang.String tableName) { throw new RuntimeException(); }", "private void tearDown() {\n if (tempDir != null) {\n OS.deleteDirectory(tempDir);\n tempFiles.clear();\n tempDir = null;\n }\n }", "private void removeTempData(CopyTable table)\n\t{\n\t\tFile dataFile = new File(config.getTempDirectory(), table.getTempFilePrefix() + \"_data.csv\");\n\t\tFile countFile = new File(config.getTempDirectory(), table.getTempFilePrefix() + \"_count.txt\");\n\t\tFile metaDataFile = new File(config.getTempDirectory(), table.getTempFilePrefix() + \"_metadata.ser\");\n\t\t\n\t\tdataFile.delete();\n\t\tcountFile.delete();\n\t\tmetaDataFile.delete();\n\t\t\n\t\tFile tempDir = new File(config.getTempDirectory());\n\t\ttempDir.delete();\n\t}", "public void cleanup() throws GlitterException {\n if (!this.myLock) {\n try {\n BaseSQL.truncateTableWithSessionMayCommit(this.context.getStatementProvider(), this.context.getConnection(), this.context.getConfiguration().getSessionPrefix(), SQLQueryConstants.defaultGraphsTempTable);\n BaseSQL.truncateTableWithSessionMayCommit(this.context.getStatementProvider(), this.context.getConnection(), this.context.getConfiguration().getSessionPrefix(), SQLQueryConstants.namedGraphsTempTable);\n BaseSQL.truncateTableWithSessionMayCommit(this.context.getStatementProvider(), this.context.getConnection(), this.context.getConfiguration().getSessionPrefix(), SQLQueryConstants.tempGraphsTempTable);\n\n } catch (RdbException sqle) {\n if (log.isDebugEnabled()) {\n log.debug(LogUtils.RDB_MARKER, \"Error clearing temporary tables\", sqle);\n }\n }\n }\n if (this.myLock) {\n try {\n this.context.getDatasource().commit(this.context.getConnection(), false, false);\n } catch (AnzoException ae) {\n throw new GlitterException(ae.getErrorCode(), ae);\n }\n }\n }", "public int deleteUnusedTables()\n\t{\n\t\ttry\n\t\t{\n\t\t\n\t\t\tString query = \"SELECT TABLE_NAME FROM INFORMATION_SCHEMA.SYSTEM_TABLES\"\n\t\t\t\t\t\t\t+ \" WHERE TABLE_TYPE='TABLE' AND TABLE_SCHEM='PUBLIC'\";\n\t\t\t\n\t\t\tResultSet tables = executeSQLQuery(query);\n\t\t\tObject[][] items = dump(tables);\n\t\t\t\n\t\t\tSet<String> knownTables = new HashSet<String>();\n\t\t\t\n\t\t\tfor(Record<?> tmp : new CSVRecordLoader().getPlugins())\n\t\t\t{\n\t\t\t\tknownTables.add(tmp.getTableName());\n\t\t\t}\n\t\t\t\n\t\t\tint unknown = 0;\n\t\t\t\n\t\t\tfor(Object[] item : items)\n\t\t\t{\n\t\t\t\tif(! knownTables.contains(item[0].toString()))\n\t\t\t\t{\n\t\t\t\t\tunknown++;\n\t\t\t\t\tString dropQuery = \"DROP TABLE \\\"\" + item[0].toString() + \"\\\"\";\n\t\t\t\t\texecuteSQLResult(dropQuery);\n\t\t\t\t}\n\t\t\t}\t\t\n\t\t\t\n\t\t\treturn unknown;\n\t\t}catch(SQLException e)\n\t\t{\n\t\t\tm_logger.error(\"Error dropping unused tables\",e);\n\t\t\treturn -1;\n\t\t}\n\t}", "public void doEmptyTableList() {\n tableList.deleteList();\n }", "@AfterEach\n void dropAllTablesAfter() throws SQLException {\n Connection connPlayers = individualPlayerScraper.setNewConnection(\"playertest\");\n ResultSet rsTables = connPlayers.prepareStatement(\"SHOW TABLES\").executeQuery();\n while (rsTables.next()) {\n connPlayers.prepareStatement(\"DROP TABLE \" + rsTables.getString(1)).execute();\n }\n rsTables.close();\n connPlayers.close();\n }", "private void cleanTempFolder() {\n File tmpFolder = new File(getTmpPath());\n if (tmpFolder.isDirectory()) {\n String[] children = tmpFolder.list();\n for (int i = 0; i < children.length; i++) {\n if (children[i].startsWith(TMP_IMAGE_PREFIX)) {\n new File(tmpFolder, children[i]).delete();\n }\n }\n }\n }", "public void clearLifeloggingTables() throws SQLException, ClassNotFoundException {\n\t\tString sqlCommand1 = \"DELETE TABLE IF EXISTS minute\";\n\t\tString sqlCommand2 = \"DELETE TABLE IF EXISTS image\";\n\t\tStatement stmt = this.connection.createStatement();\n\t\tstmt.execute(sqlCommand1);\n\t\tstmt.execute(sqlCommand2);\n\t\tstmt.close();\n\t}", "@BeforeAll\n void dropAllTablesBefore() throws SQLException {\n Connection connPlayers = individualPlayerScraper.setNewConnection(\"playertest\");\n ResultSet rsTables = connPlayers.prepareStatement(\"SHOW TABLES\").executeQuery();\n while (rsTables.next()) {\n connPlayers.prepareStatement(\"DROP TABLE \" + rsTables.getString(1)).execute();\n }\n rsTables.close();\n connPlayers.close();\n }", "@AfterClass\n public static void teardown() {\n logger.info(\"teardown: remove the temporary directory\");\n\n // the assumption is that we only have one level of temporary files\n for (File file : directory.listFiles()) {\n file.delete();\n }\n directory.delete();\n }", "public void deleteTmpDirectory() {\n\t\tdeleteTmpDirectory(tmpDir);\n\t}", "public void DoesNeedCleaning() {\n\t\tSystem.out.println(\"Table is being cleaned right now.\");\n\t}", "public static void unloadTempData() throws Exception {\n\t\tunloadTempData(new HashSet<String>());\n\t}", "private boolean clearH2Database() {\n \tboolean result = false;\n\t\tCnfDao cnfDao = new CnfDao();\n\t\tcnfDao.setDbConnection(H2DatabaseAccess.getDbConnection());\n\n\t\ttry {\n\t\t\tresult = cnfDao.clearCnfTables();\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(\"ERROR, failed clear CNF tables in H2 database\");\n\t\t}\n\n\t\treturn result;\n\t}", "@Test\n public void testPurgeForTemporaryDb() throws Exception {\n try (MockRequestUtils.VerifiedMock ignore = mockRequest.mockQuery(\n \"query_responses/case_claim_response.xml\")) {\n Response<EntityListResponse> response = navigate(new String[]{\"1\", \"action 1\"},\n EntityListResponse.class);\n }\n\n SqlSandboxUtils.purgeTempDb(Instant.now());\n\n // verify the case storage has been cleared\n String cacheKey = \"caseclaimdomain_caseclaimuser_http://localhost:8000/a/test/phone/search\"\n + \"/_case_type=case1=case2=case3_include_closed=False\";\n SQLiteDB caseSearchDb = new CaseSearchDB(\"caseclaimdomain\", \"caseclaimuser\", null);\n String caseSearchTableName = getCaseSearchTableName(cacheKey);\n UserSqlSandbox caseSearchSandbox = new CaseSearchSqlSandbox(caseSearchTableName, caseSearchDb);\n IStorageUtilityIndexed<Case> caseSearchStorage = caseSearchSandbox.getCaseStorage();\n assertFalse(caseSearchStorage.isStorageExists(), \"Case search storage has not been cleared after purge\");\n FormplayerCaseIndexTable caseSearchIndexTable = getCaseIndexTable(caseSearchSandbox, caseSearchTableName);\n assertFalse(caseSearchIndexTable.isStorageExists(), \"Case Indexes have not been cleared after purge\");\n\n }", "public static void dropAllTables(SQLiteDatabase db, boolean ifExists) {\n TipsDao.dropTable(db, ifExists);\n }", "@After\n\tpublic void tearDown() throws Exception {\n\t\tfor (int i = 0; i < feedbacks.length; ++i) {\n\t\t\tfeedbacks[i] = null;\n\t\t}\n\t\tfeedbacks = null;\n\t\texecuteSQL(connection, \"test_files/stress/clear.sql\");\n\t\tconnection.close();\n\t\tconnection = null;\n\t}", "public void clearTable(){\n\t\tloaderImage.loadingStart();\n\t\tfullBackup.clear();\n\t\tlist.clear();\n\t\toracle.clear();\n\t\tselectionModel.clear();\n\t\tdataProvider.flush();\n\t\tdataProvider.refresh();\n\t}", "public static void dropAllTables(SQLiteDatabase db, boolean ifExists) {\n\t\tProvinceDao.dropTable(db, ifExists);\n\t\tCityDao.dropTable(db, ifExists);\n\t\tCityAreaDao.dropTable(db, ifExists);\n\t}", "@Override\n\tpublic void emptyTable() {\n\t\tresTable.deleteAll();\n\t}", "@Test (timeout=180000)\n public void testHBaseFsckClean() throws Exception {\n assertNoErrors(doFsck(conf, false));\n TableName table = TableName.valueOf(\"tableClean\");\n try {\n HBaseFsck hbck = doFsck(conf, false);\n assertNoErrors(hbck);\n\n setupTable(table);\n assertEquals(ROWKEYS.length, countRows());\n\n // We created 1 table, should be fine\n hbck = doFsck(conf, false);\n assertNoErrors(hbck);\n assertEquals(0, hbck.getOverlapGroups(table).size());\n assertEquals(ROWKEYS.length, countRows());\n } finally {\n cleanupTable(table);\n }\n }", "public void deleteTemporaryFiles() {\n if (!shouldReap()) {\n return;\n }\n\n for (File file : temporaryFiles) {\n try {\n FileHandler.delete(file);\n } catch (UncheckedIOException ignore) {\n // ignore; an interrupt will already have been logged.\n }\n }\n }", "@After\n public void tearDown() {\n jdbcTemplate.execute(\"DELETE FROM assessment_rubric;\" +\n \"DELETE FROM user_group;\" +\n \"DELETE FROM learning_process;\" +\n \"DELETE FROM learning_supervisor;\" +\n \"DELETE FROM learning_process_status;\" +\n \"DELETE FROM rubric_type;\" +\n \"DELETE FROM learning_student;\");\n }", "public static void unloadTempData(Set<String> except) throws Exception {\n\t\tfor (TableInfo table : CatalogManager.currentDB.nameToTable.values()) {\n\t\t\tif (table.tempTable && !except.contains(table.name)) {\n\t\t\t\tString tableName = table.name;\n\t\t\t\tfor (ColumnInfo colInfo : table.nameToCol.values()) {\t\t\t\t\t\n\t\t\t\t\tColumnRef colRef = new ColumnRef(\n\t\t\t\t\t\t\ttableName, colInfo.name);\n\t\t\t\t\tunloadColumn(colRef);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void dropTables()\n {\n String tableName;\n\n for (int i=0; i<tableNames.length; i++)\n {\n tableName = tableNames[i];\n System.out.println(\"Dropping table: \" + tableName);\n try\n {\n Statement statement = connect.createStatement();\n\n String sql = \"DROP TABLE \" + tableName;\n\n statement.executeUpdate(sql);\n }\n catch (SQLException e)\n {\n System.out.println(\"Error dropping table: \" + e);\n }\n }\n }", "public void DropTables() {\n\t\ttry {\n\t\t\tDesinstall_DBMS_MetaData();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void dropAllTables(SQLiteDatabase db, boolean ifExists) {\n UserDao.dropTable(db, ifExists);\n SbjectDao.dropTable(db, ifExists);\n SourceDao.dropTable(db, ifExists);\n }", "@Test\n public void cleanWithRecycleBin() throws Exception {\n assertEquals(0, recycleBinCount());\n\n // in SYSTEM tablespace the recycle bin is deactivated\n jdbcTemplate.update(\"CREATE TABLE test_user (name VARCHAR(25) NOT NULL, PRIMARY KEY(name)) tablespace USERS\");\n jdbcTemplate.update(\"DROP TABLE test_user\");\n assertTrue(recycleBinCount() > 0);\n\n flyway.clean();\n assertEquals(0, recycleBinCount());\n }", "private static void clearDB()\n {\n if(getStatus().equals(\"no database\"))\n return;\n\n clearTable(\"myRooms\");\n clearTable(\"myReservations\");\n }", "void dropAllTables();", "public static void dropAllTables(SQLiteDatabase db, boolean ifExists) {\n CriuzesDao.dropTable(db, ifExists);\n Criuzes_TMPDao.dropTable(db, ifExists);\n CabinsDao.dropTable(db, ifExists);\n Cabins_TMPDao.dropTable(db, ifExists);\n ExcursionsDao.dropTable(db, ifExists);\n Excursions_TMPDao.dropTable(db, ifExists);\n GuestsDao.dropTable(db, ifExists);\n Guests_TMPDao.dropTable(db, ifExists);\n }", "void cleanupTable(TableName tablename) throws Exception {\n if (tbl != null) {\n tbl.close();\n tbl = null;\n }\n\n ((ClusterConnection) connection).clearRegionCache();\n deleteTable(TEST_UTIL, tablename);\n }", "private static void dropTables(Connection conn)\n {\n System.out.println(\"Checking for existing tables.\");\n\n try\n {\n // Get a Statement object.\n Statement stmt = conn.createStatement();\n\n try\n {\n stmt.execute(\"DROP TABLE Cart\");\n System.out.println(\"Cart table dropped.\");\n } catch (SQLException ex)\n {\n // No need to report an error.\n // The table simply did not exist.\n }\n\n try\n {\n stmt.execute(\"DROP TABLE Products\");\n System.out.println(\"Products table dropped.\");\n } catch (SQLException ex)\n {\n // No need to report an error.\n // The table simply did not exist.\n }\n } catch (SQLException ex)\n {\n System.out.println(\"ERROR: \" + ex.getMessage());\n ex.printStackTrace();\n }\n }", "@Test\n\tpublic void emptyTRDbTest() {\n\t\tDBI dbi = TEST_ENVIRONMENT.getDbi();\n\t\tTradeRequestDao tradeRequestDao = dbi.onDemand(TradeRequestDao.class);\n\t\tint expected = 0;\n\t\tint actual = tradeRequestDao.getAll().size();\n\t\tAssert.assertEquals(\"User table should be empty to start\", expected, actual);\n\t}", "public static void dropAllTables(SQLiteDatabase db, boolean ifExists) {\n UserDao.dropTable(db, ifExists);\n TopCategoriesDao.dropTable(db, ifExists);\n CategoriesDao.dropTable(db, ifExists);\n BrandsDao.dropTable(db, ifExists);\n StoreDao.dropTable(db, ifExists);\n PostDao.dropTable(db, ifExists);\n ProductDao.dropTable(db, ifExists);\n BrandUpdatesDao.dropTable(db, ifExists);\n TipsDao.dropTable(db, ifExists);\n RelatedProductsDao.dropTable(db, ifExists);\n PostCollectionDao.dropTable(db, ifExists);\n }", "@BeforeEach\n\tpublic void cleanDataBase()\n\t{\n\t\taddRepo.deleteAll()\n\t\t.as(StepVerifier::create) \n\t\t.verifyComplete();\n\t\t\n\t\tdomRepo.deleteAll()\n\t\t.as(StepVerifier::create) \n\t\t.verifyComplete();\n\t}", "@Override public void cleanupTempCheckpointDirectory() throws IgniteCheckedException {\n try {\n try (DirectoryStream<Path> files = Files.newDirectoryStream(cpDir.toPath(), TMP_FILE_MATCHER::matches)) {\n for (Path path : files)\n Files.delete(path);\n }\n }\n catch (IOException e) {\n throw new IgniteCheckedException(\"Failed to cleanup checkpoint directory from temporary files: \" + cpDir, e);\n }\n }", "public void resetTables() {\n SQLiteDatabase db = this.getWritableDatabase();\n // Delete All Rows\n db.delete(TABLE_LOGIN, null, null);\n db.close();\n }", "@After\n public void cleanDatabaseTablesAfterTest() {\n databaseCleaner.clean();\n }", "@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}", "@Override\n public void clearTable() {\n final var query = \"TRUNCATE TABLE piano_project.pianos\";\n try(final var statement = connection.createStatement()) {\n statement.executeUpdate(query);\n } catch (SQLException throwables) {\n throwables.printStackTrace();\n }\n }", "public void wipeTable() {\n SqlStorage.wipeTable(db, TABLE_NAME);\n }", "public void removeAll()\r\n {\n db = this.getWritableDatabase(); // helper is object extends SQLiteOpenHelper\r\n db.execSQL(\"drop table \"+\"campaing\");\r\n db.execSQL(\"drop table \"+\"cafe\");\r\n db.execSQL(\"drop table \"+\"points\");\r\n\r\n db.close ();\r\n }", "@AfterClass\n\tpublic static void cleanUp() throws IOException {\n\t\tLpeFileUtils.removeDir(tempDir.getAbsolutePath());\n\t}", "public static void cleanUpCustomTempDirectories(){\n\n\t\tif(tempDirectoryList != null){\n\t\t\tlog.info(\"Removing custom temp directories\");\n\t\t\ttry {\n\t\t\t\tfor(File tempFile : tempDirectoryList)\n\t\t\t\t\tif(tempFile.exists()){\n\t\t\t\t\t\tlog.info(\"Deleting : \" + tempFile.getCanonicalPath());\n\t\t\t\t\t\tdeleteDirectory(tempFile);\n\t\t\t\t\t}\n\t\t\t\t// also remove all file references from ArrayList\n\t\t\t\ttempDirectoryList.clear();\n\t\t\t} catch (IOException e) {e.printStackTrace();}\n\t\t}\n\t\telse\n\t\t\tlog.info(\"No custom temp directory created.\");\n\t\tlog.info(\"Finished removing custom temp directories\");\n\t}", "public static void emptyTable(Connection con, String tableName) throws SQLException\r\n\t{\r\n\t Statement st = null;\r\n\t\r\n String createStr = \"CREATE TABLE \" + tableName + \" (userId INTEGER, firstName VARCHAR(30), lastName VARCHAR(30), countryCode VARCHAR(10), primary key(userID))\";\r\n \tString dropStr = \"DROP TABLE \" + tableName;\r\n \t\r\n DatabaseMetaData dbm = con.getMetaData();\r\n ResultSet tables = dbm.getTables(null, null, tableName, null);\r\n \r\n st = con.createStatement(); \r\n\r\n if (tables != null && tables.next()) {\r\n // Table exists\r\n \tst.executeUpdate(dropStr); \r\n \tSystem.out.println(\"Got rid of old table\");\r\n }\r\n\r\n st.executeUpdate(createStr);\r\n\t\r\n\t}", "public void deleteStorage() {\n deleteReportDir(reportDir_);\n reportDir_ = null;\n deleteReportDir(leftoverDir_);\n leftoverDir_ = null;\n }", "public void removeLifeloggingTables() throws SQLException {\n\n\t\tString sqlCommand1 = \"DROP TABLE IF EXISTS minute\";\n\t\tString sqlCommand2 = \"DROP TABLE IF EXISTS image\";\n\t\tStatement stmt = this.connection.createStatement();\n\n\t\tstmt.execute(sqlCommand2);\n\t\tstmt.execute(sqlCommand1);\n\t\tstmt.close();\n\t}", "public void forceTableCleanup() throws IOException\n {\n ssProxy.forceTableCleanup();\n }", "public void cleanUp();", "public void cleanUp();", "private void emptyTestDirectory() {\n // Delete the files in the /tmp/QVCSTestFiles directory.\n File tempDirectory = new File(TestHelper.buildTestDirectoryName(TEST_SUBDIRECTORY));\n File[] files = tempDirectory.listFiles();\n if (files != null) {\n for (File file : files) {\n if (file.isDirectory()) {\n File[] subFiles = file.listFiles();\n for (File subFile : subFiles) {\n if (subFile.isDirectory()) {\n File[] subSubFiles = subFile.listFiles();\n for (File subSubFile : subSubFiles) {\n subSubFile.delete();\n }\n }\n subFile.delete();\n }\n }\n file.delete();\n }\n }\n }", "public void createTempTable() throws Exception {\n Db db = getDb();\n try {\n db.enter();\n _logger.info(\"Creating temporary table t_http_log_data\");\n PreparedStatement createTable = db.prepareStatement(create_temp_table);\n db.executeUpdate(createTable);\n } catch (Exception e) {\n _logger.fatal(\"Error when creating temporary table t_http_log_data\", e);\n throw e;\n } finally {\n db.exit();\n }\n st_insert_temp_table = db.prepareStatement(sql_insert_temp_table);\n }", "private void dropMergeTables() {\n // [2012/4/30 - ysahn] Comment this when testing, if you want to leave the temp tables\n\n try {\n callSP(buildSPCall(DROP_MAP_TABLES_PROC));\n } catch (SQLException exception) {\n logger.error(\"Error dropping id mapping tables. \", exception);\n }\n\n try {\n callSP(buildSPCall(DROP_HELPER_TABLES_PROC));\n } catch (SQLException exception) {\n logger.error(\"Error dropping id mapping tables. \", exception);\n }\n }", "private void deleteTestDataSet() {\n LOG.info(\"deleting test data set...\");\n try {\n Statement stmt = _conn.createStatement();\n stmt.executeUpdate(\"DELETE FROM tc8x_pks_person\");\n stmt.executeUpdate(\"DELETE FROM tc8x_pks_employee\");\n stmt.executeUpdate(\"DELETE FROM tc8x_pks_payroll\");\n stmt.executeUpdate(\"DELETE FROM tc8x_pks_address\");\n stmt.executeUpdate(\"DELETE FROM tc8x_pks_contract\");\n stmt.executeUpdate(\"DELETE FROM tc8x_pks_category\");\n stmt.executeUpdate(\"DELETE FROM tc8x_pks_project\");\n } catch (Exception e) {\n LOG.error(\"deleteTestDataSet: exception caught\", e);\n }\n }", "public static void deleteTempMapset() {\r\n if ((getGrassMapsetFolder() != null) && (getGrassMapsetFolder().length() > 2)) {\r\n String tmpFolder;\r\n tmpFolder = new String(getGrassMapsetFolder().substring(0, getGrassMapsetFolder().lastIndexOf(File.separator)));\r\n if (new File(tmpFolder).exists()) {\r\n deleteDirectory(new File(tmpFolder));\r\n }\r\n }\r\n }", "public boolean supportsTemporaryTables() {\n \t\treturn false;\n \t}", "@After\n public void clearup() {\n try {\n pm.close();\n DriverManager.getConnection(\"jdbc:derby:memory:test_db;drop=true\");\n } catch (SQLException se) {\n if (!se.getSQLState().equals(\"08006\")) {\n // SQLState 08006 indicates a success\n se.printStackTrace();\n }\n }\n }", "public void clearHashTable()\n {\n int index;\n\n for(index = 0; index < tableSize; index++)\n {\n tableArray[index] = null;\n }\n }", "public static synchronized void cleanup() {\n if (defaultDataSourceInitialized) {\n // try to deregister bundled H2 driver\n try {\n final Enumeration<Driver> drivers = DriverManager.getDrivers();\n while (drivers.hasMoreElements()) {\n final Driver driver = drivers.nextElement();\n if (\"org.h2.Driver\".equals(driver.getClass().getCanonicalName())) {\n // deregister our bundled H2 driver\n LOG.info(\"Uninstalling bundled H2 driver\");\n DriverManager.deregisterDriver(driver);\n }\n }\n } catch (Exception e) {\n LOG.warn(\"Failed to deregister H2 driver\", e);\n }\n }\n \n dataSourcesByName.clear();\n for (int i = 0; i < dataSources.length; i++) {\n dataSources[i] = null;\n }\n for (int i = 0; i < dataSourcesNoTX.length; i++) {\n dataSourcesNoTX[i] = null;\n }\n globalDataSource = null;\n testDataSource = null;\n testDataSourceNoTX = null;\n }", "@After\n public void tearDown() {\n try(Connection con = DB.sql2o.open()) {\n String deleteClientsQuery = \"DELETE FROM clients *;\";\n String deleteStylistsQuery = \"DELETE FROM stylists *;\";\n con.createQuery(deleteClientsQuery).executeUpdate();\n con.createQuery(deleteStylistsQuery).executeUpdate();\n }\n }", "@AfterClass\n public static void cleanup() throws IOException {\n File directory = new File(TMP_DIR_BASE);\n File dirname = directory.getParentFile();\n final String basename = directory.getName() + \"[0-9]+\";\n File[] files = dirname.listFiles(new FilenameFilter() {\n @Override\n public boolean accept(File dir, String name) {\n return name.matches(basename);\n }\n });\n for (File file : files) {\n if (file.delete() == false) {\n throw new IOException(\"Can't delete \" + file);\n }\n }\n }", "@Test\n public void deleteAllLocalStorageEntries() {\n assertThat(localStorage.getLocalStorageLength(), greaterThan(0L));\n\n // delete all localStorage entries\n localStorage.clearLocalStorage();\n\n // check if number of localStorage entries is 0\n assertThat(localStorage.getLocalStorageLength(), is(0L));\n }", "public static native void deleteAllTempArrays();", "@AfterEach\n\tpublic void tearThis() throws SQLException {\n\t\tbookDaoImpl.delete(testBook);\n\t\tbranchDaoImpl.delete(testBranch);\n\t}", "@Test\n public void teardown() throws SQLException {\n PreparedStatement ps = con.prepareStatement(\"delete from airline.user where username = \\\"username\\\";\");\n ps.executeUpdate();\n this.con.close();\n this.con = null;\n this.userDAO = null;\n this.testUser = null;\n }", "public static boolean testTableClear() {\r\n table.clear();\r\n if (table.size() != 0)\r\n return false;\r\n return true;\r\n }", "@Override\r\n\tprotected void tearDown() throws Exception {\n\r\n\t\tdao.insert(\"delete from system.tables where table_id='0000001' and table_name='emp0'\");\r\n\t\tdao.insert(\"delete from system.tables where table_id='0000002' and table_name='dept0'\");\r\n\t\tdao.insert(\"delete from system.tables where table_id='0000003' and table_name='emp'\");\r\n\t\tdao.insert(\"delete from system.tables where table_id='0000004' and table_name='dept'\");\r\n\t\tdao.insert(\"delete from system.databases where database_id='00001' and database_name='database1'\");\r\n\t\tdao.insert(\"delete from system.databases where database_id='00002' and database_name='database2'\");\r\n\t\tdao.insert(\"delete from system.users where user_name='scott'\");\r\n\r\n\t\tdao.insert(\"commit\");\r\n//\t\tdao.disconnect();\r\n\t}", "private void deleteOldTables(){\n jdbcTemplate.execute(\"DROP TABLE OLDcompetence\");\n jdbcTemplate.execute(\"DROP TABLE OLDrole\");\n jdbcTemplate.execute(\"DROP TABLE OLDperson\");\n jdbcTemplate.execute(\"DROP TABLE OLDavailability\");\n jdbcTemplate.execute(\"DROP TABLE OLDcompetence_profile\");\n }", "private void resetTemporary(){\n temporaryConstants = null;\n temporaryVariables = null;\n }", "public void cleanTable() throws ClassicDatabaseException;", "public static void clearTempPartList() {\r\n\r\n tempPartList.clear();\r\n }", "public void clear() {\n\t\tjobInstanceDao.clear();\n\t\tjobExecutionDao.clear();\n\t\tstepExecutionDao.clear();\n\t\texecutionContextDao.clear();\n\t}", "private void clearAllDatabases()\n\t{\n\t\tdb.clear();\n\t\tstudent_db.clear();\n\t}", "public static void cleanUp() {\n\t\tHashDecay.stopAll();\n\t\tSystem.gc();\n\t}", "@AfterEach\n public void tearDown() {\n try {\n Statement stmtSelect = conn.createStatement();\n String sql1 = (\"DELETE FROM tirocinio WHERE CODTIROCINIO='999';\");\n stmtSelect.executeUpdate(sql1);\n String sql2 = (\"DELETE FROM tirocinante WHERE matricola='4859';\");\n stmtSelect.executeUpdate(sql2);\n String sql3 = (\"DELETE FROM enteconvenzionato WHERE partitaIva='11111111111';\");\n stmtSelect.executeUpdate(sql3);\n String sql4 = (\"DELETE FROM User WHERE email='[email protected]';\");\n stmtSelect.executeUpdate(sql4);\n String sql5 = (\"DELETE FROM User WHERE email='[email protected]';\");\n stmtSelect.executeUpdate(sql5);\n conn.commit();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "@BeforeEach\n @AfterEach\n public void clearDatabase() {\n \taddressRepository.deleteAll();\n \tcartRepository.deleteAll();\n \tuserRepository.deleteAll();\n }", "public void dropAndCreate(SQLiteDatabase db) {\n\t\tfor (TableHelper th : getTableHelpers()) {\n\t\t\tth.dropAndCreate(db);\n\t\t}\n\t}", "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}", "@AfterEach\n\tvoid clearDatabase() {\n\t\t//Clear the table\n\t\taccountRepository.deleteAll();\n\t}", "public static void dropAllTables(Database db, boolean ifExists) {\n DiaryReviewDao.dropTable(db, ifExists);\n EncourageSentenceDao.dropTable(db, ifExists);\n ImportDateDao.dropTable(db, ifExists);\n ScheduleTodoDao.dropTable(db, ifExists);\n TargetDao.dropTable(db, ifExists);\n TomatoTodoDao.dropTable(db, ifExists);\n UpTempletDao.dropTable(db, ifExists);\n UserDao.dropTable(db, ifExists);\n }", "@After\n public void deleteAfterwards() {\n DBhandlerTest db = null;\n try {\n db = new DBhandlerTest();\n } catch (Exception e) {\n e.printStackTrace();\n }\n db.deleteTable();\n }", "public void exitTemp() {\r\n tr.saveTempToFile(TemplateManager.IdToTemplate);\r\n }", "private void dropTables(SQLiteDatabase db) {\n db.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_NEWS);\n db.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_FEEDS);\n db.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_CATEGORIES);\n db.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_IMAGES);\n }", "private void clearTable(String tableName) throws SQLException {\n Connection conn = getConnection();\n String setStatement = \"DELETE FROM \" + tableName;\n Statement stm = conn.createStatement();\n stm.execute(setStatement);\n }", "@BeforeClass\n public static void clean() {\n DatabaseTest.clean();\n }", "@Test\n\tpublic void emptyDbTest() {\n\t\tDBI dbi = TEST_ENVIRONMENT.getDbi();\n\t\tUserDao userDao = dbi.onDemand(UserDao.class);\n\t\tint expected = 0;\n\t\tint actual = userDao.getAll().size();\n\t\tAssert.assertEquals(\"User table should be empty to start\", expected, actual);\n\t}", "@Override\n public void clearDB() throws Exception {\n hBaseOperation.deleteTable(this.dataTableNameString);\n hBaseOperation.createTable(this.dataTableNameString, this.columnFamily, numRegion);\n }", "void dropAllTablesForAllConnections();", "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 destroy() {\n\t\ttry {\n\t\t\tdestroy(10000);\n\t\t}\n\t\tcatch(SQLException e) {}\n\t}" ]
[ "0.64837235", "0.6454828", "0.6381821", "0.6366281", "0.6323993", "0.6272614", "0.62721854", "0.61971706", "0.61720806", "0.6133721", "0.6114087", "0.6094756", "0.60741985", "0.59984976", "0.5991789", "0.5975096", "0.5908187", "0.5892527", "0.58536005", "0.57388806", "0.5731171", "0.57185465", "0.57049847", "0.5680909", "0.56759906", "0.5667799", "0.56622654", "0.56552994", "0.56467015", "0.564588", "0.56386167", "0.5636118", "0.5632142", "0.56254524", "0.56242406", "0.5622369", "0.5618367", "0.56161636", "0.56136876", "0.56134564", "0.5606224", "0.5603867", "0.55925", "0.5592435", "0.5566692", "0.55654585", "0.55493283", "0.55408734", "0.5538173", "0.55286324", "0.55219066", "0.5512403", "0.5502228", "0.5501097", "0.5493757", "0.54899246", "0.5475715", "0.54719216", "0.5470931", "0.5470931", "0.5466916", "0.5466567", "0.546593", "0.54626065", "0.5460639", "0.54576474", "0.54568356", "0.54564726", "0.5455305", "0.5447866", "0.54470795", "0.544548", "0.54417205", "0.5434115", "0.542425", "0.542328", "0.5422833", "0.5420747", "0.54163545", "0.53907365", "0.5390585", "0.5388684", "0.53583604", "0.53575504", "0.5350839", "0.5340978", "0.5329381", "0.53104544", "0.53062326", "0.5302193", "0.5300991", "0.53005946", "0.5284403", "0.5278268", "0.527071", "0.5267174", "0.5262274", "0.525165", "0.5251551", "0.52506626" ]
0.77326787
0
Loop to convert desired list of entries in db to db, possibly overwritten existing data. This method uses transaction management.
public static ArrayList doLoop(Globals g, Classification classification, int star_version) { // boolean testing = g.getValueBoolean( "testing" ); boolean do_incremental_only = Strings.getInputBoolean( in, "Do incremental conversions only(y) or do all classified mr files (n)? :"); ArrayList entries_ref = null; ArrayList entries_user = new ArrayList(); // Reset this to get info from original table. sql_epiII.SQL_table_prefix = ""; if ( do_incremental_only ) { int max_number_days_old = Strings.getInputInt( in, "Enter the maximum number of days the entries may be old? :", null); entries_ref = getEntriesFromClassifiedMRFilesNewerThanDays( max_number_days_old ); } else { // Get the entry list in db entries_ref = getEntriesFromClassifiedMRFiles(); } sql_epiII.SQL_table_prefix = "temp_"; if ( entries_ref.size() < 1 ) { General.showOutput("None to do so returning now to main loop." ); return entries_ref; } General.showOutput("Possible entries include:" + entries_ref ); // Get the entries to do boolean single_do = Strings.getInputBoolean( in, "Do one entry(y) or consecutive entries(n)?"); String pdb_entry_id = ""; ArrayList entries_togo = new ArrayList(); boolean use_all = Strings.getInputBoolean(in, "Use all from above (y) or specify your own list(n)"); if ( ! use_all ) { String user_entry_list_string = Strings.getInputString(in, "Enter list of entries space/comma separated: ", null ); user_entry_list_string = user_entry_list_string.replace(',', ' '); // just for the heck of it. General.showDebug("Transformed to : " +user_entry_list_string); StringTokenizer tokens = new StringTokenizer( user_entry_list_string, " "); while ( tokens.hasMoreTokens() ) { pdb_entry_id = tokens.nextToken(); // Skip those that are not valid or present. if ( ! Strings.is_pdb_code(pdb_entry_id) ) { General.showWarning("Entry code given doesn't look like a PDB code"); continue; } if ( ! entries_ref.contains(pdb_entry_id) ) { General.showWarning("Entry doesn't seem to exist in the archive given."); continue; } entries_user.add( pdb_entry_id ); } } // Pick the entry to do (first) while ( ! Strings.is_pdb_code(pdb_entry_id) ) { pdb_entry_id = Strings.getInputString( in, "Give entry code (e.g.: 1brv) to do (or . for first): ", null ); if ( pdb_entry_id.equals(".") ) { pdb_entry_id = (String) entries_ref.get(0); } if ( ! Strings.is_pdb_code(pdb_entry_id) ) { General.showWarning("Entry code given doesn't look like a PDB code"); pdb_entry_id = ""; } if ( ! entries_ref.contains(pdb_entry_id) ) { General.showWarning("Entry doesn't seem to exist in the archive given."); pdb_entry_id = ""; } } // Just do this single one if ( single_do ) { entries_togo.add(pdb_entry_id); } else // Select all the entries following, starting with the one selected { // Get all entries possible or those specified by the user. if ( use_all ) { entries_togo.addAll(entries_ref); } else { entries_togo.addAll(entries_user); } // Set the selected one to the first position General.rotateCollectionToFirst(entries_togo, pdb_entry_id); // Remove the last element until done. int entries_togo_max = Strings.getInputInt( in, "Give maximum number of entries to do (0-" + entries_togo.size() + ") : ", null ); while ( entries_togo.size() > entries_togo_max ) { entries_togo.remove(entries_togo.size()-1); } General.showOutput("Entry series in the order they will be presented:"); General.showOutput(entries_togo.toString()); } boolean status = true; // Finally actually do this set. int j = 0; for (Iterator i=entries_togo.iterator(); i.hasNext();) { pdb_entry_id = i.next().toString(); General.showOutput("\n\nDoing entry " + pdb_entry_id + " " + j++); status = doEntry(pdb_entry_id, g, classification, star_version); if ( ! status ) { General.showError("doEntry failed, skipping remaining entries"); break; } } if ( ! status ) { return null; } else { return entries_togo; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\tpublic void migrateDataByBatch() {\n\t\tpool = new HTablePool(conf, 1024);\n\t\tSQLExporter sqlExporter = \n\t\t\tnew SQLExporter(url, username, password, catalog);\n\t\twhile(sqlExporter.hasNextDataTable()) {\n\t\t\tEntry entry = sqlExporter.next();\n\t\t\tString tableName = REGION + \".\" + (String) entry.getKey();\n\t\t\tList<Map<String, Object>> list = (List<Map<String, Object>>) entry.getValue();\n\t\t\t/**\n\t\t\t * table to migrate data.\n\t\t\t */\n\t\t\tHTable table = (HTable) pool.getTable(tableName);\n\t\t\t\n\t\t\t/**\n\t\t\t * set write buffer size.\n\t\t\t */\n\t\t\ttry {\n\t\t\t\ttable.setWriteBufferSize(WRITE_BUFFER_SIZE);\n\t\t\t\ttable.setAutoFlush(false);\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\tint counter = 0;\n\t\t\tList<Put> puts = new ArrayList<Put>();\n\t\t\tint size = list.size();\n\t\t\tfor (int i = 0; i < size; i++) {\n\t\t\t\t\n\t\t\t\tPut put = new Put((new Integer(i)).toString().getBytes());\n\t\t\t\t\n\t\t\t\tMap<String, Object> map = list.get(i);\n\t\t\t\tcounter ++;\n\t\t\t\t/**\n\t\t\t\t * add one row to be put.\n\t\t\t\t */\n\t\t\t\tfor (Map.Entry<String, Object> m : map.entrySet()) {\t\n\t\t\t\t\tput.add(FAMILY.getBytes(), m.getKey().getBytes(), \n\t\t\t\t\t\t\tm.getValue().toString().getBytes());\t\n\t\n\t\t\t\t}\n\t\t\t\t/**\n\t\t\t\t * add `put` to list puts. \n\t\t\t\t */\n\t\t\t\tputs.add(put);\n\t\t\t\t\n\t\t\t\tif ((counter % LIST_PUTS_COUNTER == 0) || (i == size - 1)) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\ttable.put(puts);\n\t\t\t\t\t\ttable.flushCommits();\n\t\t\t\t\t\tputs.clear();\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t} else continue;\n\t\t\t}\n\t\t}\n\t}", "@Override\n @Transactional\n public void addBulkInsertsAfterExtraction() {\n List<ScrapBook> scrapBooks = new ArrayList<ScrapBook>();\n boolean jobDone = false;\n boolean pause = false;\n while (!jobDone) {\n pause = false;\n int lineCount = 0;\n while (!pause) {\n ++lineCount;\n if (lineCount % 30 == 0) {\n scrapBooks = springJdbcTemplateExtractor.getPaginationList(\"SELECT * FROM ScrapBook\", 1, 30);\n pause = true;\n }\n }\n //convert scrapbook to book and insert into db\n convertedToBookAndInsert(scrapBooks);\n // delete all inserted scrapbooks\n springJdbcTemplateExtractor.deleteCollection(scrapBooks);\n scrapBooks = null;\n if (0 == springJdbcTemplateExtractor.findTotalScrapBook()) {\n jobDone = true;\n }\n }\n }", "private void updateDatabase() {\n\t\tAbstractSerializer serializer = new CineplexSerializer();\n\t\tArrayList<String> updatedRecords = serializer.serialize(records);\n\t\tDatabaseHandler.writeToDatabase(DATABASE_NAME, updatedRecords);\n\t}", "@Transactional \n\tpublic void updateAll() {\n\t\t\n\t\tIterator<Pharmacy> newList = pharmacyRepository1.getAllEntity().iterator();\n\t\twhile (newList.hasNext()) {\n\t\t\tPharmacy pharmacy = newList.next();\n\t\t\tlistStockInPharmacy(pharmacy);\n\t\t\t}\n\t\t\n\t}", "@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\tpublic void migrateDataByBatch(String tableName, List<Map<String, Object>> list) {\n\t\tpool = new HTablePool(conf, 1024);\n\t\tString tableNameFormated = REGION + \".\" + tableName;\n\t\t/**\n\t\t * table to migrate data.\n\t\t */\n\t\tHTable table = (HTable) pool.getTable(tableNameFormated);\n\t\t\n\t\t/**\n\t\t * set write buffer size.\n\t\t */\n\t\ttry {\n\t\t\ttable.setWriteBufferSize(WRITE_BUFFER_SIZE);\n\t\t\ttable.setAutoFlush(false);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tint counter = 0;\n\t\tList<Put> puts = new ArrayList<Put>();\n\t\tint size = list.size();\n\t\tfor (int i = 0; i < size; i++) {\n\n\t\t\tPut put = new Put((new Integer(i)).toString().getBytes());\n\n\t\t\tMap<String, Object> map = list.get(i);\n\t\t\tcounter++;\n\t\t\t/**\n\t\t\t * add one row to be put.\n\t\t\t */\n\t\t\tfor (Map.Entry<String, Object> m : map.entrySet()) {\n\t\t\t\tObject qualifier = m.getKey();\n\t\t\t\tObject value = m.getValue();\n\t\t\t\tif (qualifier != null && value !=null)\n\t\t\t\t\tput.add(FAMILY.getBytes(), qualifier.toString().getBytes(), value.toString().getBytes());\n\t\t\t\telse if (qualifier != null && value ==null)\n\t\t\t\t\tput.add(FAMILY.getBytes(), qualifier.toString().getBytes(), null);\n\t\t\t}\n\t\t\t/**\n\t\t\t * add `put` to list puts.\n\t\t\t */\n\t\t\tputs.add(put);\n\n\t\t\tif ((counter % LIST_PUTS_COUNTER == 0) || (i == size - 1)) {\n\t\t\t\ttry {\n\t\t\t\t\ttable.put(puts);\n\t\t\t\t\ttable.flushCommits();\n\t\t\t\t\tputs.clear();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t} else\n\t\t\t\tcontinue;\n\t\t}\n\t}", "private void batchImport() {\r\n m_jdbcTemplate.batchUpdate(createInsertQuery(),\r\n new BatchPreparedStatementSetter() {\r\n public void setValues(\r\n PreparedStatement ps, int i)\r\n throws SQLException {\r\n int j = 1;\r\n for (String property : m_propertyNames) {\r\n Map params = (Map) m_batch.get(\r\n i);\r\n ps.setObject(j++, params.get(\r\n property));\r\n }\r\n }\r\n\r\n public int getBatchSize() {\r\n return m_batch.size();\r\n }\r\n });\r\n }", "private static void updateRecords() {\n for (Team t: Main.getTeams()){\n //If the team already exists\n if (SqlUtil.doesTeamRecordExist(c,TABLE_NAME,t.getIntValue(Team.NUMBER_KEY))){\n //Update team record\n updateTeamRecord(t);\n } else {\n //Create a new row in database\n addNewTeam(t);\n\n }\n }\n\n }", "public void inserSinglePageItemArray(ArrayList<GameItemSingle> argList)\n {\n deletePreviousContent();\n this.getWritableDatabase().beginTransaction();\n\n\n for( GameItemSingle singlePageItem: argList)\n {\n\n ContentValues initialValues = new ContentValues();\n initialValues.put(KEY_ID,singlePageItem.get_id());\n initialValues.put(KEY_DATE,singlePageItem.get_date());\n\n initialValues.put(KEY_DATE_GMT,singlePageItem.getDate_gmt());\n initialValues.put(KEY_GUID_RENDERED,singlePageItem.getGuid_rendered());\n initialValues.put(KEY_MODIFIED,singlePageItem.get_modified());\n initialValues.put(KEY_MODIFIED_GMT,singlePageItem.getModified_gmt());\n initialValues.put(KEY_SLUG,singlePageItem.getSlug());\n initialValues.put(KEY_STATUS,singlePageItem.getStatus());\n initialValues.put(KEY_TYPE,singlePageItem.get_type());\n initialValues.put(KEY_LINK,singlePageItem.get_link());\n initialValues.put(KEY_TITLE_RENDERED,singlePageItem.getTitle_rendered());\n initialValues.put(KEY_CONTENT_RENDERED,singlePageItem.getContent_rendered());\n initialValues.put(KEY_AUTHOR,singlePageItem.getAuthor());\n initialValues.put(KEY_FEATURED_MEDIA,singlePageItem.getFeatured_media());\n initialValues.put(KEY_TEMPLATE,singlePageItem.getTemplate());\n\n initialValues.put(KEY_ACF_ANDROID_APP_URL,singlePageItem.getAcf_android_app_url());\n initialValues.put(KEY_ACF_IPHONE_APP_URL,singlePageItem.getAcf_ipone_app_url());\n initialValues.put(KEY_ACF_AMAZON_APP_URL,singlePageItem.getAcf_amazon_app_url());\n initialValues.put(KEY_ACF_WINDOWS_PHONE_APP_URL,singlePageItem.getAcf_windows_phone_app_url());\n initialValues.put(KEY_ACF_VIDEO_LINK,singlePageItem.getAcf_video_link());\n initialValues.put(KEY_ACF_SOCIAL_FB_URL ,singlePageItem.getAcf_social_fb_url());\n initialValues.put(KEY_ACF_PRESS_KIT_URL,singlePageItem.getAcf_press_kit_url());\n initialValues.put(KEY_APP_ICON,singlePageItem.getApp_icon());\n initialValues.put(KEY_ACF_STREAM_APP_URL,singlePageItem.getAcf_stream_app_url());\n initialValues.put(KEY_ACF_PRINTABLE_PDF,singlePageItem.getAcf_printable_pdf());\n initialValues.put(KEY_ACF_GAME_PRICE,singlePageItem.getAcf_game_price());\n initialValues.put(KEY_ACF_GAME_WALLPAPER,singlePageItem.getAcf_game_wallpaper());\n initialValues.put(KEY_ACF_PROMO_TEXT,singlePageItem.getAcf_promo_text());\n\n initialValues.put(KEY_SCREENSHOOT_MEDIUM1,singlePageItem.getScreenshootMedium1());\n initialValues.put(KEY_SCREENSHOOT_MEDIUM2,singlePageItem.getScreenshootMedium2());\n initialValues.put(KEY_SCREENSHOOT_MEDIUM3,singlePageItem.getScreenshootMedium3());\n initialValues.put(KEY_SCREENSHOOT_MEDIUM4,singlePageItem.getScreenshootMedium4());\n initialValues.put(KEY_SCREENSHOOT_MEDIUM5,singlePageItem.getScreenshootMedium5());\n initialValues.put(KEY_SCREENSHOOT_MEDIUM6,singlePageItem.getScreenshootMedium6());\n initialValues.put(KEY_SCREENSHOOT_MEDIUM7,singlePageItem.getScreenshootMedium7());\n initialValues.put(KEY_SCREENSHOOT_MEDIUM8,singlePageItem.getScreenshootMedium8());\n\n initialValues.put(KEY_SCREENSHOOT_FULL1,singlePageItem.getScreenshootFull1());\n initialValues.put(KEY_SCREENSHOOT_FULL2,singlePageItem.getScreenshootFull2());\n initialValues.put(KEY_SCREENSHOOT_FULL3,singlePageItem.getScreenshootFull3());\n initialValues.put(KEY_SCREENSHOOT_FULL4,singlePageItem.getScreenshootFull4());\n initialValues.put(KEY_SCREENSHOOT_FULL5,singlePageItem.getScreenshootFull5());\n initialValues.put(KEY_SCREENSHOOT_FULL6,singlePageItem.getScreenshootFull6());\n initialValues.put(KEY_SCREENSHOOT_FULL7,singlePageItem.getScreenshootFull7());\n initialValues.put(KEY_SCREENSHOOT_FULL8,singlePageItem.getScreenshootFull8());\n initialValues.put(KEY_FEATURED_IMAGE,singlePageItem.getFeatured_image());\n initialValues.put(KEY_APP_ICON,singlePageItem.getApp_icon());\n this.getWritableDatabase().insert(DATABASE_TABLE_SINGLE_PAGE, null, initialValues);\n }\n this.getWritableDatabase().setTransactionSuccessful();\n this.getWritableDatabase().endTransaction();\n }", "public void insertOrderedItems(TireList orderedItems){\n for(int i=0; i<orderedItems.listSize(); i++){\n int temp = Integer.parseInt(orderedItems.getTire(i).getStock()) - orderedItems.getTire(i).getQuantity();\n orderedItems.getTire(i).setStock(temp + \"\");\n orderedItems.getTire(i).updateTire();\n sql=\"Insert into OrderedItems (OrderID, TireID, Quantity) VALUES ('\"+newID+\"','\"+orderedItems.getTire(i).getStockID()+\"',\"+orderedItems.getTire(i).getQuantity()+\")\";\n db.insertDB(sql); \n }\n }", "void bulkInsertOrReplace (List<Consumption> entities);", "private void processTaskList(List<Task> taskList) throws SQLException, DaoException {\n for (Task currentTask : taskList) {\n processTask(currentTask);\n }\n }", "public void loadInitialData() {\n\t\t\texecuteTransaction(new Transaction<Boolean>() {\n\t\t\t\t@Override\n\t\t\t\tpublic Boolean execute(Connection conn) throws SQLException {\n\t\t\t\t\tList<Item> inventory;\n\t\t\t\t\tList<Location> locationList;\n\t\t\t\t\tList<User> userList;\n\t\t\t\t\tList<JointLocations> jointLocationsList;\n\t\t\t\t\t//List<Description> descriptionList; \n\t\t\t\t\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\tinventory = InitialData.getInventory();\n\t\t\t\t\t\tlocationList = InitialData.getLocations(); \n\t\t\t\t\t\tuserList = InitialData.getUsers();\n\t\t\t\t\t\tjointLocationsList = InitialData.getJointLocations();\n\t\t\t\t\t\t//descriptionList = //InitialData.getDescriptions();\n\t\t\t\t\t\t\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\tthrow new SQLException(\"Couldn't read initial data\", e);\n\t\t\t\t\t}\n\n\t\t\t\t\tPreparedStatement insertItem = null;\n\t\t\t\t\tPreparedStatement insertLocation = null; \n\t\t\t\t\tPreparedStatement insertUser = null;\n\t\t\t\t\tPreparedStatement insertJointLocations = null;\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\t// AD: populate locations first since location_id is foreign key in inventory table\n\t\t\t\t\t\tinsertLocation = conn.prepareStatement(\"insert into locations (description_short, description_long) values (?, ?)\" );\n\t\t\t\t\t\tfor (Location location : locationList)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tinsertLocation.setString(1, location.getShortDescription());\n\t\t\t\t\t\t\tinsertLocation.setString(2, location.getLongDescription());\n\t\t\t\t\t\t\tinsertLocation.addBatch();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tinsertLocation.executeBatch(); \n\t\t\t\t\t\t\n\t\t\t\t\t\tinsertJointLocations = conn.prepareStatement(\"insert into jointLocations (fk_location_id, location_north, location_south, location_east, location_west) values (?, ?, ?, ?, ?)\" );\n\t\t\t\t\t\tfor (JointLocations jointLocations: jointLocationsList)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tinsertJointLocations.setInt(1, jointLocations.getLocationID());\n\t\t\t\t\t\t\tinsertJointLocations.setInt(2, jointLocations.getLocationNorth());\n\t\t\t\t\t\t\tinsertJointLocations.setInt(3, jointLocations.getLocationSouth());\n\t\t\t\t\t\t\tinsertJointLocations.setInt(4, jointLocations.getLocationEast());\n\t\t\t\t\t\t\tinsertJointLocations.setInt(5, jointLocations.getLocationWest());\n\t\t\t\t\t\t\tinsertJointLocations.addBatch();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tinsertJointLocations.executeBatch();\n\t\t\t\t\t\t\n\t\t\t\t\t\tinsertItem = conn.prepareStatement(\"insert into inventory (location_id, item_name) values (?, ?)\");\n\t\t\t\t\t\tfor (Item item : inventory) \n\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t// Auto generate itemID\n\t\t\t\t\t\t\tinsertItem.setInt(1, item.getLocationID());\n\t\t\t\t\t\t\tinsertItem.setString(2, item.getName());\n\t\t\t\t\t\t\tinsertItem.addBatch();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tinsertItem.executeBatch();\n\t\t\t\t\t\t\n\t\t\t\t\t\tinsertUser = conn.prepareStatement(\"insert into users (username, password) values (?, ?)\");\n\t\t\t\t\t\tfor(User user: userList) {\n\t\t\t\t\t\t\tinsertUser.setString(1, user.getUsername());\n\t\t\t\t\t\t\tinsertUser.setString(2, user.getPassword());\n\t\t\t\t\t\t\tinsertUser.addBatch();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tinsertUser.executeBatch();\n\t\t\t\t\t\t\n\t\t\t\t\t\tSystem.out.println(\"Tables populated\");\n\t\t\t\t\t\t\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tDBUtil.closeQuietly(insertLocation);\t\n\t\t\t\t\t\tDBUtil.closeQuietly(insertItem);\n\t\t\t\t\t\tDBUtil.closeQuietly(insertUser);\n\t\t\t\t\t}\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t});\n\t\t}", "private static void insertRecordIntoDbUserTable(ArrayList<String> xmlList) throws SQLException {\n\t \n\t\tConnection dbConnection = null;\n\t\tPreparedStatement statement = null;\n\n\t\ttry {\n\t\t\tdbConnection = getDBConnection();\n\t\t\tstatement = dbConnection.prepareStatement(SQL_INSERT, Statement.RETURN_GENERATED_KEYS);\n\t\t\t\n\t\t\tint batchSize = 0;\n\t\t\t\n\t\t\tfor (int a = 0; a < xmlList.size(); a++) { // for each xml file\n\t\t\t\tArrayList<String> keywords = new ArrayList<String>(generateKeywords(xmlList.get(a))); //gets the file's keywords\n\t\t\t\tArrayList<String> xmlKeywords = new ArrayList<String>(curate(keywords)); //filter keywords\n\n\t\t\t\t //start appending keywords of that xml file to database\n\t\t\t\tif (xmlKeywords.size() == 1) { //if xml file has no keywords and thus list only consists of the file name\n\t\t\t\t\tstatement.setString(1, xmlKeywords.get(0));\n\t\t\t\t\tstatement.setString(2, \"\");\n\t\t\t\t\tstatement.addBatch();\n\t\t\t\t\tbatchSize++;\n\t\t\t\t}\n\n\t\t\t\tfor (int i = 1; i < xmlKeywords.size(); i++) { //for each keyword following the file name\n\t\t\t\t\tstatement.setString(1, xmlKeywords.get(0)); //set file name\n\t\t\t\t\tstatement.setString(2, xmlKeywords.get(i)); //set keyword\n\t\t\t\t\tstatement.addBatch();\n\t\t\t\t\tbatchSize++;\n\t\t\t\t\tif ((i) % 1000 == 0) {\n\t\t\t\t\t\tstatement.executeBatch(); // Execute every 1000 items.\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (batchSize >= 1000) {\n\t\t\t\t\tstatement.executeBatch();\n\t\t\t\t\tbatchSize = 0;\n\t\t\t\t}\n\t\t\t\t//end appending keywords for each xml file loop\n\t\t\t} //end loop of generating table for all xml files and keywords\n\t\t\tstatement.executeBatch();\n\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t} finally {\n\t\t\tif (statement != null) {\n\t\t\t\tstatement.close();\n\t\t\t}\n\t\t\tif (dbConnection != null) {\n\t\t\t\tdbConnection.close();\n\t\t\t}\n\t\t}\n\t}", "@Override\n public <T extends IEntity> void persist(Iterable<T> entityIterable) {\n startCallContext(ConnectionReason.forUpdate);\n try {\n if (entityIterable.iterator().hasNext()) {\n for (T entity : entityIterable) {\n persist(tableModel(entity.getEntityMeta()), entity);\n }\n }\n } finally {\n endCallContext();\n }\n }", "public void populateDemo(Connection connection, LocalDate start, LocalDate end) throws SQLException {\n\n DatabaseMetaData dmd = connection.getMetaData();\n ResultSet rs = dmd.getTables(null, null, \"DateList\", null);\n\n if (rs != null){\n\n while (!start.isAfter(end)){\n\n String sql = \"INSERT INTO DateList VALUES (to_date(?, 'YYYY-MM-DD'), to_date(?, 'YYYY-MM-DD'))\";\n\n String sql1 = \"INSERT INTO Information VALUES('Westin Hotel', 1, 'Single Suite', to_date(?, 'YYYY-MM-DD'), to_date(?, 'YYYY-MM-DD'), 5, 200)\";\n String sql2 = \"INSERT INTO Information VALUES('Westin Hotel', 1, 'Traditional Suite', to_date(?, 'YYYY-MM-DD'), to_date(?, 'YYYY-MM-DD'), 10, 300)\";\n String sql3 = \"INSERT INTO Information VALUES('Westin Hotel', 1, 'Presidential Suite', to_date(?, 'YYYY-MM-DD'), to_date(?, 'YYYY-MM-DD'), 1, 1000)\";\n String sql4 = \"INSERT INTO Information VALUES('Westin Hotel', 2, 'Single Suite', to_date(?, 'YYYY-MM-DD'), to_date(?, 'YYYY-MM-DD'), 5, 200)\";\n String sql5 = \"INSERT INTO Information VALUES('Westin Hotel', 2, 'Traditional Suite', to_date(?, 'YYYY-MM-DD'), to_date(?, 'YYYY-MM-DD'), 15, 400)\";\n String sql6 = \"INSERT INTO Information VALUES('Westin Hotel', 2, 'Presidential Suite', to_date(?, 'YYYY-MM-DD'), to_date(?, 'YYYY-MM-DD'), 1, 1000)\";\n String sql7 = \"INSERT INTO Information VALUES('Ritz Carlton Hotel', 1, 'Traditional Suite', to_date(?, 'YYYY-MM-DD'), to_date(?, 'YYYY-MM-DD'), 20, 800)\";\n String sql8 = \"INSERT INTO Information VALUES('Ritz Carlton Hotel', 1, 'Presidential Suite', to_date(?, 'YYYY-MM-DD'), to_date(?, 'YYYY-MM-DD'), 1, 2000)\";\n String sql9 = \"INSERT INTO Information VALUES('Ritz Carlton Hotel', 2, 'Traditional Suite', to_date(?, 'YYYY-MM-DD'), to_date(?, 'YYYY-MM-DD'), 25, 1000)\";\n String sql10 = \"INSERT INTO Information VALUES('Ritz Carlton Hotel', 2, 'Presidential Suite', to_date(?, 'YYYY-MM-DD'), to_date(?, 'YYYY-MM-DD'), 1, 2000)\";\n String sql11 = \"INSERT INTO Information VALUES('Four Seasons Hotel', 1, 'Single Suite', to_date(?, 'YYYY-MM-DD'), to_date(?, 'YYYY-MM-DD'), 10, 350)\";\n String sql12 = \"INSERT INTO Information VALUES('Four Seasons Hotel', 1, 'Twin Suite', to_date(?, 'YYYY-MM-DD'), to_date(?, 'YYYY-MM-DD'), 10, 250)\";\n\n PreparedStatement pStmt = connection.prepareStatement(sql);\n PreparedStatement pStmt1 = connection.prepareStatement(sql1);\n PreparedStatement pStmt2 = connection.prepareStatement(sql2);\n PreparedStatement pStmt3 = connection.prepareStatement(sql3);\n PreparedStatement pStmt4 = connection.prepareStatement(sql4);\n PreparedStatement pStmt5 = connection.prepareStatement(sql5);\n PreparedStatement pStmt6 = connection.prepareStatement(sql6);\n PreparedStatement pStmt7 = connection.prepareStatement(sql7);\n PreparedStatement pStmt8 = connection.prepareStatement(sql8);\n PreparedStatement pStmt9 = connection.prepareStatement(sql9);\n PreparedStatement pStmt10 = connection.prepareStatement(sql10);\n PreparedStatement pStmt11 = connection.prepareStatement(sql11);\n PreparedStatement pStmt12 = connection.prepareStatement(sql12);\n\n pStmt.clearParameters();\n pStmt1.clearParameters();\n pStmt2.clearParameters();\n pStmt3.clearParameters();\n pStmt4.clearParameters();\n pStmt5.clearParameters();\n pStmt6.clearParameters();\n pStmt7.clearParameters();\n pStmt8.clearParameters();\n pStmt9.clearParameters();\n pStmt10.clearParameters();\n pStmt11.clearParameters();\n pStmt12.clearParameters();\n\n pStmt.setString(1, start.toString());\n pStmt1.setString(1, start.toString());\n pStmt2.setString(1, start.toString());\n pStmt3.setString(1, start.toString());\n pStmt4.setString(1, start.toString());\n pStmt5.setString(1, start.toString());\n pStmt6.setString(1, start.toString());\n pStmt7.setString(1, start.toString());\n pStmt8.setString(1, start.toString());\n pStmt9.setString(1, start.toString());\n pStmt10.setString(1, start.toString());\n pStmt11.setString(1, start.toString());\n pStmt12.setString(1, start.toString());\n\n start = start.plusDays(1);\n\n pStmt.setString(2, start.toString());\n pStmt1.setString(2, start.toString());\n pStmt2.setString(2, start.toString());\n pStmt3.setString(2, start.toString());\n pStmt4.setString(2, start.toString());\n pStmt5.setString(2, start.toString());\n pStmt6.setString(2, start.toString());\n pStmt7.setString(2, start.toString());\n pStmt8.setString(2, start.toString());\n pStmt9.setString(2, start.toString());\n pStmt10.setString(2, start.toString());\n pStmt11.setString(2, start.toString());\n pStmt12.setString(2, start.toString());\n\n try {\n pStmt.executeUpdate();\n pStmt1.executeUpdate();\n pStmt2.executeUpdate();\n pStmt3.executeUpdate();\n pStmt4.executeUpdate();\n pStmt5.executeUpdate();\n pStmt6.executeUpdate();\n pStmt7.executeUpdate();\n pStmt8.executeUpdate();\n pStmt9.executeUpdate();\n pStmt10.executeUpdate();\n pStmt11.executeUpdate();\n pStmt12.executeUpdate();\n }\n catch (SQLException e) { throw e; }\n finally {\n pStmt.close();\n pStmt1.close();\n pStmt2.close();\n pStmt3.close();\n pStmt4.close();\n pStmt5.close();\n pStmt6.close();\n pStmt7.close();\n pStmt8.close();\n pStmt9.close();\n pStmt10.close();\n pStmt11.close();\n pStmt12.close();\n }\n }\n }\n else {\n System.out.println(\"ERROR: Error loading CUSTOMER Table.\");\n }\n }", "private void insertData() {\n for (int i = 0; i < 3; i++) {\n RecipeEntity books = factory.manufacturePojo(RecipeEntity.class);\n em.persist(books);\n data.add(books);\n }\n }", "protected void migrate() {\r\n java.util.Date dateNow = new java.util.Date();\r\n SQLiteBuilder builder = createBuilder();\r\n for (AbstractTable<?, ?, ?> table : tables) {\r\n if (table.migrated() < table.migrations()) {\r\n //FIXME this doesn't yet implement table updates.\r\n builder.createMigration(table).up(this);\r\n VersionRecord<DBT> v = _versions.create();\r\n v.table.set(table.helper.getTable().getRecordSource().tableName);\r\n v.version.set(1);\r\n v.updated.set(dateNow);\r\n v.insert();\r\n }\r\n }\r\n }", "public synchronized void getAllFromDbAndWriteIntoTempFiles() throws IOWrapperException, IOIteratorException{\r\n\r\n readFromDB = true;\r\n iow=new IOWrapper();\r\n iow.setupOutput(this.dbname,this.username,this.password,this.hostname,this.port);\r\n iow.setupInput(this.dbname,this.username,this.password,this.hostname,this.port);\r\n \r\n iter = iow.sendInputQuery(\"SELECT COUNT(*) FROM \"+nodetable);\r\n try {\r\n maxProgerss+=Integer.parseInt(((String[])iter.next())[0]); \r\n } catch (NullPointerException e) {maxProgerss+=100;}\r\n iter = iow.sendInputQuery(\"SELECT COUNT(*) FROM \"+edgetable);\r\n try {\r\n maxProgerss+=Integer.parseInt(((String[])iter.next())[0]);\r\n } catch (NullPointerException e) {maxProgerss+=100;}\r\n //iow.closeOutput();\r\n \r\n\r\n \r\n //nodelist\r\n iter = iow.select(nodetable,nodeCols);\r\n iow.setupOutput(Controller.NODES_TMP_FILENAME);\r\n while (iter.hasNext()) {\r\n singleProgress+=1;\r\n String[] data = (String[])iter.next();\r\n iow.writeLine(data[0]+\"\\t\"+data[1]);\r\n }\r\n iow.closeOutput();\r\n\t\r\n //edgelist\r\n iter=iow.select(edgetable,edgeCols);\r\n iow.setupOutput(Controller.EDGES_TMP_FILENAME);\r\n while (iter.hasNext()) {\r\n\t singleProgress+=1;\r\n String[] data = (String[])iter.next();\r\n iow.writeLine(data[0]+\"\\t\"+data[1]+\"\\t\"+data[2]);\r\n //System.out.println(\"wwsl: \"+data[0]+\"\\t\"+data[1]+\"\\t\"+data[2]);\r\n }\r\n iow.closeOutput();\r\n readFromDB=false;\r\n this.stillWorks=false;\r\n }", "private void updateDatabase( ) {\n\t\tList<Site> siteList = readRemoteData( );\n\n\t\t// Open the database\n\t\tEcoDatabaseHelper helper = new EcoDatabaseHelper(context_);\n\t\tSQLiteDatabase database = helper.getWritableDatabase();\n\n\t\t// Delete the current records\n\t\thelper.dropAndCreate(database);\n\n\t\t// Insert new ones\n\t\tnotifyListenersNumSites( siteList.size() );\n\t\tint siteIndex = 1;\n\n\t\t// Insert each site\n\t\tfor( Site site : siteList ) {\n\t\t\t// Add the site to the database\n\t\t\tContentValues cv = new ContentValues();\n\t\t\tcv.put(EcoDatabaseHelper.SITE_NAME, site.getName());\n\t\t\tcv.put(EcoDatabaseHelper.SITE_DESCRIPTION, site.getDescription());\n\t\t\tcv.put(EcoDatabaseHelper.SITE_TYPE, site.getType());\n\t\t\tcv.put(EcoDatabaseHelper.SITE_LINK, site.getLink());\n\t\t\tcv.put(EcoDatabaseHelper.SITE_LATITUDE, site.getLatitude());\n\t\t\tcv.put(EcoDatabaseHelper.SITE_LONGITUDE, site.getLongitude());\n\t\t\tcv.put(EcoDatabaseHelper.SITE_ICON, site.getIcon());\n\n\t\t\tif( database.insert(EcoDatabaseHelper.TABLE_SITES, null, cv) == -1 ) {\n\t\t\t\tLog.w(getClass( ).getCanonicalName(), \"Failed to insert record\" );\n\t\t\t}\n\n\t\t\t// Notify the listeners\n\t\t\tnotifyListenersSiteIndex( siteIndex );\n\t\t\t++siteIndex;\n\t\t}\n\t\tdatabase.close();\n\t}", "public void insertItemDetailsTables(List<Map<String,String>> list) {\n final long startTime = System.currentTimeMillis();\n // you can use INSERT only\n String sql = \"INSERT OR REPLACE INTO \" + SINGLA_COLORS_TABLE + \" (\"+SINGLA_ITEM_ID+\",\"+SINGLA_ITEM_CODE+\",\"+SINGLA_ITEM_NAME+\",\"+SINGLA_ITEM_IMAGE+\",\"+SINGLA_ITEM_STOCK+\",\"+SINGLA_COLOR_ID+\",\"+SINGLA_COLOR_NAME+\",\"+SINGLA_COLOR_FAMILY_ID+\",\"+SINGLA_COLOR_FAMILY_NAME+\",\"+SINGLA_MD_STOCK+\",\"+SINGLA_RATE+\",\"+SINGLA_MD_RATE+\",\"+SINGLA_SIZE_ID+\",\"+SINGLA_SIZE_NAME+\",\"+SINGLA_UNIT+\",\"+SINGLA_ATTR1+\",\"+SINGLA_ATTR2+\",\"+SINGLA_ATTR3+\",\"+SINGLA_ATTR4+\",\"+SINGLA_ATTR5+\",\"+SINGLA_ATTR6+\",\"+SINGLA_ATTR7+\",\"+SINGLA_ATTR8+\",\"+SINGLA_ATTR9+\",\"+SINGLA_ATTR10+\",\"+SINGLA_MD_QTY+\") VALUES ( ?, ?,?, ?,?, ?,?, ?,?, ?,?, ?,?, ?,?, ?,?, ?,?, ?,?, ?,?, ?,?, ? )\";\n DatabaseSqliteRootHandler rootHandler = new DatabaseSqliteRootHandler(context);\n SQLiteDatabase db = rootHandler.getWritableDatabase();\n db.execSQL(\"PRAGMA synchronous=OFF\");\n db.setLockingEnabled(false);\n db.beginTransactionNonExclusive();\n // db.beginTransaction();\n SQLiteStatement stmt = db.compileStatement(sql);\n for(int x=0; x<list.size(); x++){\n\n stmt.bindString(1, list.get(x).get(\"ItemID\"));\n stmt.bindString(2, list.get(x).get(\"ItemCode\"));\n stmt.bindString(3, list.get(x).get(\"ItemName\"));\n stmt.bindString(4, list.get(x).get(\"ItemImage\"));\n stmt.bindString(5, (list.get(x).get(\"ItemStock\")==null?\"0\":list.get(x).get(\"ItemStock\")));\n stmt.bindString(6, list.get(x).get(\"ColorID\"));\n stmt.bindString(7, list.get(x).get(\"Color\"));\n stmt.bindString(8, list.get(x).get(\"ColorFamilyID\"));\n stmt.bindString(9, list.get(x).get(\"ColorFamily\"));\n stmt.bindString(10, list.get(x).get(\"MDStock\"));\n stmt.bindString(11, list.get(x).get(\"Rate\"));\n stmt.bindString(12, list.get(x).get(\"MDRate\"));\n stmt.bindString(13, list.get(x).get(\"SizeID\"));\n stmt.bindString(14, list.get(x).get(\"Size\"));\n stmt.bindString(15, list.get(x).get(\"Unit\"));\n stmt.bindString(16, list.get(x).get(\"Attr1\"));\n stmt.bindString(17, list.get(x).get(\"Attr2\"));\n stmt.bindString(18, list.get(x).get(\"Attr3\"));\n stmt.bindString(19, list.get(x).get(\"Attr4\"));\n stmt.bindString(20, list.get(x).get(\"Attr5\"));\n stmt.bindString(21, list.get(x).get(\"Attr6\"));\n stmt.bindString(22, list.get(x).get(\"Attr7\"));\n stmt.bindString(23, list.get(x).get(\"Attr8\"));\n stmt.bindString(24, list.get(x).get(\"Attr9\"));\n stmt.bindString(25, list.get(x).get(\"Attr10\"));\n stmt.bindString(26, list.get(x).get(\"BookQty\"));\n\n stmt.execute();\n stmt.clearBindings();\n }\n db.setTransactionSuccessful();\n db.endTransaction();\n db.setLockingEnabled(true);\n db.execSQL(\"PRAGMA synchronous=NORMAL\");\n db.close();\n final long endtime = System.currentTimeMillis();\n Log.e(\"Time:\", \"\" + String.valueOf(endtime - startTime));\n }", "private void actuallyWriteData() {\r\n\t\t// Get rid of old data. Getting rid of trips, trip patterns, and blocks\r\n\t\t// is a bit complicated. Need to delete them in proper order because\r\n\t\t// of the foreign keys. Because appear to need to use plain SQL\r\n\t\t// to do so successfully (without reading in objects and then\r\n\t\t// deleting them, which takes too much time and memory). Therefore\r\n\t\t// deleting of this data is done here before writing the data.\r\n\t\tlogger.info(\"Deleting old blocks and associated trips from database...\");\r\n\t\tBlock.deleteFromSandboxRev(session);\r\n\r\n\t\tlogger.info(\"Deleting old trips from database...\");\r\n\t\tTrip.deleteFromSandboxRev(session);\r\n\r\n\t\tlogger.info(\"Deleting old trip patterns from database...\");\r\n\t\tTripPattern.deleteFromSandboxRev(session);\r\n\t\t\r\n\t\t// Now write the data to the database.\r\n\t\t// First write the Blocks. This will also write the Trips, TripPatterns,\r\n\t\t// Paths, and TravelTimes since those all have been configured to be\r\n\t\t// cascade=CascadeType.ALL .\r\n\t\tlogger.info(\"Saving {} blocks (plus associated trips) to database...\", \r\n\t\t\t\tgtfsData.getBlocks().size());\r\n\t\tint c = 0;\r\n\t\tfor (Block block : gtfsData.getBlocks()) {\r\n\t\t\tlogger.debug(\"Saving block #{} with blockId={} serviceId={} blockId={}\",\r\n\t\t\t\t\t++c, block.getId(), block.getServiceId(), block.getId());\r\n\t\t\twriteObject(block);\r\n\t\t}\r\n\t\t\r\n\t\tlogger.info(\"Saving routes to database...\");\r\n\t\tRoute.deleteFromSandboxRev(session);\r\n\t\tfor (Route route : gtfsData.getRoutes()) {\r\n\t\t\twriteObject(route);\r\n\t\t}\r\n\t\t\r\n\t\tlogger.info(\"Saving stops to database...\");\r\n\t\tStop.deleteFromSandboxRev(session);\r\n\t\tfor (Stop stop : gtfsData.getStops()) {\r\n\t\t\twriteObject(stop);\r\n\t\t}\r\n\t\t\r\n\t\tlogger.info(\"Saving agencies to database...\");\r\n\t\tAgency.deleteFromSandboxRev(session);\r\n\t\tfor (Agency agency : gtfsData.getAgencies()) {\r\n\t\t\twriteObject(agency);\r\n\t\t}\r\n\r\n\t\tlogger.info(\"Saving calendars to database...\");\r\n\t\tCalendar.deleteFromSandboxRev(session);\r\n\t\tfor (Calendar calendar : gtfsData.getCalendars()) {\r\n\t\t\twriteObject(calendar);\r\n\t\t}\r\n\t\t\r\n\t\tlogger.info(\"Saving calendar dates to database...\");\r\n\t\tCalendarDate.deleteFromSandboxRev(session);\r\n\t\tfor (CalendarDate calendarDate : gtfsData.getCalendarDates()) {\r\n\t\t\twriteObject(calendarDate);\r\n\t\t}\r\n\t\t\r\n\t\tlogger.info(\"Saving fare rules to database...\");\r\n\t\tFareRule.deleteFromSandboxRev(session);\r\n\t\tfor (FareRule fareRule : gtfsData.getFareRules()) {\r\n\t\t\twriteObject(fareRule);\r\n\t\t}\r\n\t\t\r\n\t\tlogger.info(\"Saving fare attributes to database...\");\r\n\t\tFareAttribute.deleteFromSandboxRev(session);\r\n\t\tfor (FareAttribute fareAttribute : gtfsData.getFareAttributes()) {\r\n\t\t\twriteObject(fareAttribute);\r\n\t\t}\r\n\t\t\r\n\t\tlogger.info(\"Saving frequencies to database...\");\r\n\t\tFrequency.deleteFromSandboxRev(session);\r\n\t\tfor (Frequency frequency : gtfsData.getFrequencies()) {\r\n\t\t\twriteObject(frequency);\r\n\t\t}\r\n\t\t\r\n\t\tlogger.info(\"Saving transfers to database...\");\r\n\t\tTransfer.deleteFromSandboxRev(session);\r\n\t\tfor (Transfer transfer : gtfsData.getTransfers()) {\r\n\t\t\twriteObject(transfer);\r\n\t\t}\r\n\t}", "void insertBatch(List<InspectionAgency> recordLst);", "@Execution\n public void migrate() {\n Comparator<Work> compareEndDates = Comparator.comparing(Work::getEndDate,\n Comparator.nullsFirst(Comparator.reverseOrder()));\n\n for (FormRPartB formRPartB : mongoTemplate.findAll(FormRPartB.class)) {\n List<Work> originalList = new ArrayList<>(formRPartB.getWork());\n formRPartB.getWork().sort(compareEndDates);\n if (!formRPartB.getWork().equals(originalList)) {\n FormRPartBDto updatedFormDto = formMapper.toDto(formRPartB);\n formService.save(updatedFormDto);\n log.info(\"Updated work placement ordering for form id [{}] for trainee [{}]\",\n formRPartB.getId(), formRPartB.getTraineeTisId());\n }\n }\n }", "void populateTable(List<String[]> entries) throws SQLException;", "@SuppressWarnings(\"serial\")\n\t@Test\n\tpublic void updateCollection() {\n\t\tdb.close();\n\t\tEmbeddedConfiguration config = Db4oEmbedded.newConfiguration();\n\t\tconfig.common().objectClass(Car.class).cascadeOnUpdate(true);\n\t\tdb = Db4oEmbedded.openFile(config, DB4OFILENAME);\n\t\tObjectSet<Car> results = db.query(new Predicate<Car>() {\n\t\t\tpublic boolean match(Car candidate) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t});\n\n\t\tAssert.assertTrue(results.hasNext());\n\n\t\tCar car = results.next();\n\n\t\tcar.getHistory().remove(0);\n\t\tdb.store(car.getHistory());\n\t\tresults = db.query(new Predicate<Car>() {\n\t\t\tpublic boolean match(Car candidate) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t});\n\n\t\twhile (results.hasNext()) {\n\t\t\tcar = results.next();\n\t\t\tfor (int idx = 0; idx < car.getHistory().size(); idx++) {\n\t\t\t\tSystem.out.println(car.getHistory().get(idx));\n\t\t\t}\n\t\t}\n\n\t}", "public void writeToDatabase(List<Page> pageList) {\n\t\tDbConnector db = null;\n\t\ttry {\n\t\t\tdb = new DbConnector();\n\t\t} catch (ClassNotFoundException | SQLException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tfor (Page page : pageList) {\n\t\t\ttry {\n\t\t\t\tdb.executeUpdate(SqlConstants.PAGE_INSERT, Arrays.asList(String.valueOf(page.getPageId()),\n\t\t\t\t\t\tpage.getTitle(), String.valueOf(page.getNs()), \"EN\"));\n\t\t\t\tdb.executeUpdate(SqlConstants.PAGE_CONTENT_INSERT,\n\t\t\t\t\t\tArrays.asList(String.valueOf(page.getPageId()), page.getExtract()));\n\t\t\t\tint position = 0;\n\t\t\t\tfor (String key : page.getExtractMap().keySet()) {\n\t\t\t\t\tString fullText = \"\";\n\t\t\t\t\tLinkedHashMap<String, String> textMap = page.getExtractMap().get(key);\n\t\t\t\t\tfor (String textMapKey : textMap.keySet()) {\n\t\t\t\t\t\tfullText += textMap.get(textMapKey);\n\t\t\t\t\t}\n\t\t\t\t\tdb.executeUpdate(SqlConstants.PAGE_EXTRACT_INSERT,\n\t\t\t\t\t\t\tArrays.asList(String.valueOf(page.getPageId()), key, fullText, String.valueOf(position)));\n\t\t\t\t\tposition++;\n\t\t\t\t}\n\t\t\t} catch (SQLException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\ttry {\n\t\t\tdb.close();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\n public void writeToDb(List<String> data) {\n\n try {\n openConnection();\n if (validateData((ArrayList<String>) data)) {\n for (String datum : data) {\n bufferedWriter.write(getDate() + \" - \" + datum);\n bufferedWriter.newLine();\n }\n bufferedWriter.write(\"==================\\n\");\n System.out.println(\"All data is written to MS SQL DB\");\n closeConnection();\n }\n } catch (IOException e) {\n System.err.println(\"ERROR!!!\");\n e.printStackTrace();\n }\n\n }", "private void inserts() {\n DBPeer.fetchTableRows();\n DBPeer.fetchTableIndexes();\n \n Map<Number160, Data> tabRows = DBPeer.getTabRows();\n\t\tMap<Number160, Data> tabIndexes = DBPeer.getTabIndexes();\n\t\t\n String tabName = null;\n Number160 tabKey = null;\n FreeBlocksHandler freeBlocks = null;\n Map<String, IndexHandler> indexHandlers = new HashMap<>();\n TableRows tr = null;\n TableIndexes ti = null;\n \n logger.trace(\"INSERT-WHOLE\", \"BEGIN\", Statement.experiment);\n \n for (Insert ins: inserts) {\n \n if (tabName == null) {\n \ttabName = ins.getTabName();\n \ttabKey = Number160.createHash(tabName);\n \tfreeBlocks = new FreeBlocksHandler(tabName);\n \ttry {\n \t\t\t\ttr = (TableRows) tabRows.get(tabKey).getObject();\n \t\t\t\tti = (TableIndexes) tabIndexes.get(tabKey).getObject();\n \t\t\t} catch (ClassNotFoundException | IOException e) {\n \t\t\t\tlogger.error(\"Data error\", e);\n \t\t\t}\n \tfor (String index: ti.getIndexes()) {\n \t\tindexHandlers.put(index, new IndexHandler(ins.getPeer()));\n \t}\n \tfor (String index: ti.getUnivocalIndexes()) {\n \t\tindexHandlers.put(index, new IndexHandler(ins.getPeer()));\n \t}\n } else if (!tabName.equals(ins.getTabName())) {\n \t\t\ttry {\n \t\t\t\ttabRows.put(tabKey, new Data(tr));\n \t\t\ttabIndexes.put(tabKey, new Data(ti));\n \t\t\ttabName = ins.getTabName();\n \ttabKey = Number160.createHash(tabName);\n \t\t\t\ttr = (TableRows) tabRows.get(tabKey).getObject();\n \t\t\t\tti = (TableIndexes) tabIndexes.get(tabKey).getObject();\n \t\t\t\tfreeBlocks.update();\n \tfreeBlocks = new FreeBlocksHandler(tabName);\n \tindexHandlers.clear();\n \tfor (String index: ti.getIndexes()) {\n \t\tindexHandlers.put(index, new IndexHandler(ins.getPeer()));\n \t}\n \tfor (String index: ti.getUnivocalIndexes()) {\n \t\tindexHandlers.put(index, new IndexHandler(ins.getPeer()));\n \t}\n \t\t\t} catch (ClassNotFoundException | IOException e) {\n \t\t\t\tlogger.error(\"Data error\", e);\n \t\t\t}\n } \n \n ins.init(freeBlocks, indexHandlers, tr, ti);\n \n }\n \n boolean done = false;\n while (!done) {\n \tint countTrue = 0;\n \tfor (Insert ins: inserts) {\n \t\tif (ins.getDone()) {\n \t\t\tcountTrue++;\n \t\t}\n \t}\n \tif (countTrue == inserts.size()) {\n \t\tdone = true;\n \t}\n }\n \n freeBlocks.update();\n\n try {\n\t\t\ttabRows.put(tabKey, new Data(tr));\n\t\t\ttabIndexes.put(tabKey, new Data(ti));\n\t\t} catch (IOException e) {\n\t\t\tlogger.error(\"Data error\", e);\n\t\t}\n \n DBPeer.updateTableRows();\n DBPeer.updateTableIndexes();\n \n logger.trace(\"INSERT-WHOLE\", \"END\", Statement.experiment);\n }", "public static void populateDB() throws HibernateException, IOException {\n\t\tif(prev == DBMode.DB)\n\t\t\treturn;\n\t\t\n\t\t// if the db method was not last run, truncate the db before run\n\t\ttruncateDB();\n\t\t\t\n\t\tSession session = HibernateUtil.getSession().openSession();\n\t\tTransaction tx = session.beginTransaction();\n\t\ttry {\n\n\t\t\t//////////////////////////////////////////////////// ,\n\t\t\t//// , This section is for adding Dummy Values////////\n\t\t\t//////////////////////////////////////////////////// ,\n\n\t\t\t// INSERT DUMMY VALUES IntegerO TF_END_CLIENT TABLE\n\t\t\tpopulateEndClient(1, \"Accenture\", session);\n\t\t\tpopulateEndClient(2, \"Infosys\", session);\n\t\t\tpopulateEndClient(3, \"Federal Reserve\", session);\n\t\t\tpopulateEndClient(4, \"Fannie Mae\", session);\n\t\t\tpopulateEndClient(5, \"Revature\", session);\n\t\t\tpopulateEndClient(6, \"Sallie Mae\", session);\n\n\t\t\t// INSERT DUMMY VALUES IntegerO TF_CLIENT TABLE\n\t\t\tpopulateClient(1, \"Accenture\", session);\n\t\t\tpopulateClient(2, \"Infosys\", session);\n\t\t\tpopulateClient(3, \"AFS\", session);\n\t\t\tpopulateClient(4, \"Hexaware\", session);\n\t\t\tpopulateClient(5, \"Revature\", session);\n\n\t\t\t// INSERT DUMMY VALUES IntegerO TF_Interview_TYPE TABLE\n\t\t\tpopulateInterviewType(1, \"Phone\", session);\n\t\t\tpopulateInterviewType(2, \"Online\", session);\n\t\t\tpopulateInterviewType(3, \"On, Site\", session);\n\t\t\tpopulateInterviewType(4, \"Skype\", session);\n\t\t\t// INSERT DUMMY VALUES IntegerO TF_CURRICULUM TABLE\n\t\t\tpopulateCurriculum(1, \"JTA\", session);\n\t\t\tpopulateCurriculum(2, \"Java\", session);\n\t\t\tpopulateCurriculum(3, \".Net\", session);\n\t\t\tpopulateCurriculum(4, \"PEGA\", session);\n\t\t\tpopulateCurriculum(5, \"DynamicCRM\", session);\n\t\t\tpopulateCurriculum(6, \"Salesforce\", session);\n\t\t\tpopulateCurriculum(7, \"Microservices\", session);\n\n\t\t\t// INSERT DUMMY VALUES IntegerO TF_MARKETING_STATUS\n\t\t\tpopulateMarketingStatus(1, \"MAPPED, TRAINING\", session);\n\t\t\tpopulateMarketingStatus(2, \"MAPPED, RESERVED\", session);\n\t\t\tpopulateMarketingStatus(3, \"MAPPED, SELECTED\", session);\n\t\t\tpopulateMarketingStatus(4, \"MAPPED, CONFIRMED\", session);\n\t\t\tpopulateMarketingStatus(5, \"MAPPED, DEPLOYED\", session);\n\n\t\t\tpopulateMarketingStatus(6, \"UNMAPPED, TRAINING\", session);\n\t\t\tpopulateMarketingStatus(7, \"UNMAPPED, OPEN\", session);\n\t\t\tpopulateMarketingStatus(8, \"UNMAPPED, SELECTED\", session);\n\t\t\tpopulateMarketingStatus(9, \"UNMAPPED, CONFIRMED\", session);\n\t\t\tpopulateMarketingStatus(10, \"UNMAPPED, DEPLOYED\", session);\n\t\t\tpopulateMarketingStatus(11, \"DIRECTLY PLACED\", session);\n\t\t\tpopulateMarketingStatus(12, \"TERMINATED\", session);\n\n\t\t\t// INSERT DUMMY VALUES IntegerO TF_BATCH_LOCATION\n\t\t\tpopulateBatchLocation(1, \"Revature LLC, 11730 Plaza America Drive, 2nd Floor | Reston, VA 20190\", session);\n\t\t\tpopulateBatchLocation(2, \"UMUC\", session);\n\t\t\tpopulateBatchLocation(3, \"USF\", session);\n\t\t\tpopulateBatchLocation(4, \"SkySong Innovation Center, 1475 N. Scottsdale Road, Scottsdale, AZ 85257\",\n\t\t\t\t\tsession);\n\t\t\tpopulateBatchLocation(5,\n\t\t\t\t\t\"Tech Incubator at Queens College, 65, 30 Kissena Blvd, CEP Hall 2, Queens, NY 11367\", session);\n\t\t\tpopulateBatchLocation(6, \"CUNY, SPS 119 West 31st Street, New York, NY 10001\", session);\n\n\t\t\t// INSERT DUMMY VALUES IntegerO BATCH\n\t\t\tpopulateBatch(1, \"1712 Dec04 AP, USF\", LocalDate.of(2017, 12, 4), LocalDate.of(2018, 2, 16), 2, 3, session);\n\t\t\tpopulateBatch(2, \"1710 Oct09 PEGA\", LocalDate.of(2017, 10, 9), LocalDate.of(2017, 12, 15), 4, 1, session);\n\t\t\tpopulateBatch(3, \"1709 Sept11 JTA\", LocalDate.of(2017, 9, 11), LocalDate.of(2017, 11, 17), 1, 1, session);\n\t\t\tpopulateBatch(4, \"1707 Jul24 Java\", LocalDate.of(2017, 7, 24), LocalDate.of(2017, 9, 29), 2, 1, session);\n\t\t\tpopulateBatch(5, \"1707 Jul10 PEGA\", LocalDate.of(2017, 7, 10), LocalDate.of(2017, 9, 15), 4, 1, session);\n\n\t\t\tpopulateBatch(6, \"1701 Jan09 Java\", LocalDate.of(2017, 1, 9), LocalDate.of(2017, 3, 17), 2, 1, session);\n\t\t\tpopulateBatch(7, \"1701 Jan30 NET\", LocalDate.of(2017, 1, 30), LocalDate.of(2017, 4, 17), 3, 1, session);\n\t\t\tpopulateBatch(8, \"1709 Sep18 Salesforce\", LocalDate.of(2017, 9, 18), LocalDate.of(2017, 12, 8), 6, 1,\n\t\t\t\t\tsession);\n\t\t\tpopulateBatch(9, \"1709 Sep25 Java AP, CUNY\", LocalDate.of(2017, 9, 25), LocalDate.of(2017, 12, 1), 2, 6,\n\t\t\t\t\tsession);\n\t\t\tpopulateBatch(10, \"1712 Dec04, 2\", LocalDate.of(2017, 12, 4), LocalDate.of(2018, 2, 9), 2, 1, session);\n\n\t\t\t// INSERT DUMMY VALUES IntegerO ASSOCIATES\n\t\t\t// populateAssociate(admin.tf_associate_seq.nextval, \"name\", \"name\", status,\n\t\t\t// batch, session);\n\n\t\t\t// 1712 Dec04 AP, USF\n\t\t\tpopulateAssociate(1, \"Frank\", \"Hind\", 1, 2, 1, 0, session);\n\t\t\tpopulateAssociate(2, \"Thomas\", \"Page\", 1, 2, 1, 0, session);\n\t\t\tpopulateAssociate(3, \"Lucas\", \"Normand\", 1, 2, 1, 0, session);\n\t\t\tpopulateAssociate(4, \"Jhonnie\", \"Cole\", 1, 2, 1, 0, session);\n\t\t\tpopulateAssociate(5, \"Ramona\", \"Reyes\", 1, 2, 1, 0, session);\n\t\t\tpopulateAssociate(6, \"Grace\", \"Noland\", 1, 2, 1, 0, session);\n\t\t\tpopulateAssociate(7, \"Casey\", \"Morton\", 1, 2, 1, 0, session);\n\t\t\tpopulateAssociate(8, \"Gustavo\", \"Brady\", 1, 2, 1, 0, session);\n\t\t\tpopulateAssociate(9, \"Glen\", \"Holloway\", 1, 2, 1, 0, session);\n\t\t\tpopulateAssociate(10, \"Leeroy\", \"Jenkins\", 1, 2, 1, 0, session);\n\t\t\tpopulateAssociate(11, \"Jeanne\", \"Watts\", 1, 2, 1, 0, session);\n\t\t\tpopulateAssociate(12, \"Carol\", \"Ruiz\", 1, 2, 1, 0, session);\n\n\t\t\t// 1710 Oct09 PEGA\n\t\t\tpopulateAssociate(13, \"Trevor\", \"Hampton\", 1, 2, 4, 1, session);\n\t\t\tpopulateAssociate(14, \"Jennie\", \"Hudson\", 1, 2, 4, 1, session);\n\t\t\tpopulateAssociate(15, \"David\", \"Haynes\", 1, 2, 4, 1, session);\n\t\t\tpopulateAssociate(16, \"Ira\", \"Mullins\", 1, 2, 4, 1, session);\n\t\t\tpopulateAssociate(17, \"Alexandra\", \"Mitchell\", 1, 2, 4, 1, session);\n\t\t\tpopulateAssociate(18, \"Bradley\", \"Harris\", 1, 2, 4, 1, session);\n\t\t\tpopulateAssociate(19, \"Gerardo\", \"Roy\", 1, 2, 4, 1, session);\n\t\t\tpopulateAssociate(20, \"Jacob\", \"Cortez\", 1, 2, 4, 1, session);\n\t\t\tpopulateAssociate(21, \"Kathryn\", \"Young\", 1, 2, 4, 1, session);\n\t\t\tpopulateAssociate(22, \"Allen\", \"Walker\", 1, 2, 4, 1, session);\n\t\t\tpopulateAssociate(23, \"Gustavo\", \"Reed\", 1, 2, 4, 1, session);\n\t\t\tpopulateAssociate(24, \"Robin\", \"Norton\", 1, 2, 4, 1, session);\n\t\t\tpopulateAssociate(25, \"Julia\", \"Drake\", 1, 2, 4, 1, session);\n\t\t\tpopulateAssociate(26, \"Joan\", \"Evans\", 1, 2, 4, 1, session);\n\t\t\tpopulateAssociate(27, \"Larry\", \"Holl\", 1, 2, 4, 1, session);\n\n\t\t\t// 1709 Sept11 JTA\n\t\t\tpopulateAssociate(28, \"Vito\", \"Plante\", 1, 1, 1, 2, session);\n\t\t\tpopulateAssociate(29, \"Crystal\", \"Couch\", 1, 1, 1, 2, session);\n\t\t\tpopulateAssociate(30, \"Adam\", \"Collins\", 1, 1, 1, 2, session);\n\t\t\tpopulateAssociate(31, \"Bert\", \"Bryant\", 1, 1, 1, 2, session);\n\t\t\tpopulateAssociate(32, \"Nicholas\", \"Griffin\", 1, 1, 1, 2, session);\n\t\t\tpopulateAssociate(33, \"Joe\", \"Cook\", 1, 1, 1, 2, session);\n\t\t\tpopulateAssociate(34, \"Andrew\", \"Bennet\", 1, 1, 1, 2, session);\n\t\t\tpopulateAssociate(35, \"Phillip\", \"Henderson\", 1, 1, 1, 2, session);\n\t\t\tpopulateAssociate(36, \"Gary\", \"Ward\", 1, 1, 1, 2, session);\n\t\t\tpopulateAssociate(37, \"Bruce\", \"Long\", 1, 1, 1, 2, session);\n\t\t\tpopulateAssociate(38, \"Russel\", \"Peters\", 1, 1, 1, 2, session);\n\t\t\tpopulateAssociate(39, \"Emily\", \"Baker\", 1, 1, 1, 2, session);\n\t\t\tpopulateAssociate(40, \"Jake\", \"King\", 1, 1, 1, 2, session);\n\t\t\tpopulateAssociate(41, \"Jamie\", \"Campbell\", 1, 1, 1, 2, session);\n\t\t\tpopulateAssociate(42, \"Larry\", \"Hughes\", 1, 1, 1, 2, session);\n\n\t\t\t// 1707 Jul24 Java\n\t\t\tpopulateAssociate(43, \"Carlos\", \"Adams\", 5, 2, 2, 3, session);\n\t\t\tpopulateAssociate(44, \"Victor\", \"Bailey\", 5, 2, 2, 3, session);\n\t\t\tpopulateAssociate(45, \"Harold\", \"Cartor\", 5, 2, 2, 3, session);\n\t\t\tpopulateAssociate(46, \"Judith\", \"Rivera\", 5, 2, 2, 3, session);\n\t\t\tpopulateAssociate(47, \"Maria\", \"Smith\", 5, 2, 2, 3, session);\n\t\t\tpopulateAssociate(48, \"Steven\", \"Simmons\", 5, 2, 2, 3, session);\n\t\t\tpopulateAssociate(49, \"Donna\", \"Hall\", 5, 2, 2, 3, session);\n\t\t\tpopulateAssociate(50, \"Samuel\", \"Price\", 7, 2, 2, 3, session);\n\t\t\tpopulateAssociate(51, \"Jean\", \"Jackson\", 7, 2, 2, 3, session);\n\t\t\tpopulateAssociate(52, \"Adam\", \"Stewart\", 4, 2, 2, 3, session);\n\t\t\tpopulateAssociate(53, \"Gary\", \"Nelson\", 4, 2, 2, 3, session);\n\t\t\tpopulateAssociate(54, \"Peter\", \"Morgan\", 4, 2, 2, 3, session);\n\n\t\t\t// 1707 Jul10 Pega\n\t\t\tpopulateAssociate(55, \"Jack\", \"Morris\", 5, 3, 4, 4, session);\n\t\t\tpopulateAssociate(56, \"Randy\", \"Parker\", 5, 3, 4, 4, session);\n\t\t\tpopulateAssociate(57, \"Justin\", \"Flores\", 5, 3, 4, 4, session);\n\t\t\tpopulateAssociate(58, \"Richard\", \"Gray\", 5, 3, 4, 4, session);\n\t\t\tpopulateAssociate(59, \"Jesse\", \"Turner\", 4, 3, 4, 4, session);\n\t\t\tpopulateAssociate(60, \"John\", \"Baker\", 5, 3, 4, 4, session);\n\t\t\tpopulateAssociate(61, \"Benjamin\", \"Jones\", 5, 3, 4, 4, session);\n\t\t\tpopulateAssociate(62, \"Todd\", \"Torres\", 7, 3, 4, 4, session);\n\t\t\tpopulateAssociate(63, \"Kathleen\", \"Kelly\", 7, 3, 4, 4, session);\n\t\t\tpopulateAssociate(64, \"Sara\", \"Long\", 7, 3, 4, 4, session);\n\t\t\tpopulateAssociate(65, \"Linda\", \"Russell\", 7, 3, 4, 4, session);\n\t\t\tpopulateAssociate(66, \"Brenda\", \"Wilson\", 10, 3, 4, 4, session);\n\t\t\tpopulateAssociate(67, \"Betty\", \"Green\", 10, 3, 4, 4, session);\n\t\t\tpopulateAssociate(68, \"Bobby\", \"Edwards\", 10, 3, 4, 4, session);\n\t\t\tpopulateAssociate(69, \"Marilyn\", \"Allens\", 10, 3, 4, 4, session);\n\n\t\t\t// batch 7\n\t\t\tpopulateAssociate(70, \"Willoughby\", \"Sherwood\", 1, 3, 6, 7, session);\n\t\t\tpopulateAssociate(71, \"Tomi\", \"Nikkole\", 1, 3, 6, 7, session);\n\t\t\tpopulateAssociate(72, \"Newt\", \"Jaki\", 1, 3, 6, 7, session);\n\t\t\tpopulateAssociate(73, \"Darnell\", \"Mervyn\", 1, 3, 6, 7, session);\n\t\t\tpopulateAssociate(74, \"Claire\", \"Connor\", 1, 3, 6, 7, session);\n\t\t\tpopulateAssociate(75, \"Edmonde\", \"Sora\", 1, 3, 6, 7, session);\n\t\t\tpopulateAssociate(76, \"Kaitlyn\", \"Abbie\", 1, 3, 6, 7, session);\n\t\t\tpopulateAssociate(77, \"Natsuko\", \"Lily\", 1, 3, 6, 7, session);\n\t\t\tpopulateAssociate(78, \"Ben\", \"Gabrielle\", 1, 3, 6, 7, session);\n\t\t\tpopulateAssociate(79, \"Alberta\", \"Arienne\", 1, 3, 6, 7, session);\n\t\t\tpopulateAssociate(80, \"Merline\", \"Thom\", 1, 3, 6, 7, session);\n\t\t\tpopulateAssociate(81, \"Hachirou\", \"Kasumi\", 1, 3, 6, 7, session);\n\n\t\t\t// batch 6\n\t\t\tpopulateAssociate(82, \"Leigh\", \"Jordon\", 10, 1, 3, 6, session);\n\t\t\tpopulateAssociate(83, \"Amity\", \"Brandi\", 10, 1, 3, 6, session);\n\t\t\tpopulateAssociate(84, \"Merlyn\", \"Ros\", 10, 1, 3, 6, session);\n\t\t\tpopulateAssociate(85, \"Primula\", \"Gyles\", 10, 1, 3, 6, session);\n\t\t\tpopulateAssociate(86, \"Ethel\", \"Jemima\", 10, 1, 3, 6, session);\n\t\t\tpopulateAssociate(87, \"Jonelle\", \"Eugenie\", 10, 1, 3, 6, session);\n\t\t\tpopulateAssociate(88, \"Evangelina\", \"Harlan\", 10, 1, 3, 6, session);\n\t\t\tpopulateAssociate(89, \"Anjelica\", \"Babs\", 10, 1, 3, 6, session);\n\t\t\tpopulateAssociate(90, \"Jerred\", \"Yuko\", 10, 1, 3, 6, session);\n\t\t\tpopulateAssociate(91, \"Cecile\", \"Colton\", 10, 1, 3, 6, session);\n\t\t\tpopulateAssociate(92, \"Ulla\", \"Gilbert\", 10, 1, 3, 6, session);\n\t\t\tpopulateAssociate(93, \"Teija\", \"Mariko\", 10, 1, 3, 6, session);\n\n\t\t\t// batch 5\n\t\t\tpopulateAssociate(94, \"Maryann\", \"Zechariah\", 10, 2, 2, 5, session);\n\t\t\tpopulateAssociate(95, \"Nichola\", \"Dennis\", 10, 2, 2, 5, session);\n\t\t\tpopulateAssociate(96, \"Githa\", \"Nyree\", 10, 2, 2, 5, session);\n\t\t\tpopulateAssociate(97, \"Chelsey\", \"Gwyneth\", 10, 2, 2, 5, session);\n\t\t\tpopulateAssociate(98, \"Jepson\", \"Orson\", 10, 2, 2, 5, session);\n\t\t\tpopulateAssociate(99, \"Careen\", \"Jeffery\", 10, 2, 2, 5, session);\n\t\t\tpopulateAssociate(100, \"Malachi\", \"Nic\", 10, 2, 2, 5, session);\n\t\t\tpopulateAssociate(101, \"Farran\", \"Sawyer\", 10, 2, 2, 5, session);\n\t\t\tpopulateAssociate(102, \"Desiree\", \"Gayelord\", 10, 2, 2, 5, session);\n\t\t\tpopulateAssociate(103, \"Mae\", \"Lorrie\", 10, 2, 2, 5, session);\n\t\t\tpopulateAssociate(104, \"Jon\", \"Hamilton\", 10, 2, 2, 5, session);\n\t\t\tpopulateAssociate(105, \"Marshal\", \"Parnel\", 10, 2, 2, 5, session);\n\n\t\t\t// batch 8\n\t\t\tpopulateAssociate(106, \"Ayame\", \"Shun\", 1, 4, 2, 8, session);\n\t\t\tpopulateAssociate(107, \"Katashi\", \"He\", 1, 4, 2, 8, session);\n\t\t\tpopulateAssociate(108, \"Jiahao\", \"Shiro\", 1, 4, 2, 8, session);\n\t\t\tpopulateAssociate(109, \"Naoko\", \"Hikaru\", 1, 4, 2, 8, session);\n\t\t\tpopulateAssociate(110, \"Chihiro\", \"Moriko\", 1, 4, 2, 8, session);\n\t\t\tpopulateAssociate(111, \"Bai\", \"Kazuo\", 1, 4, 2, 8, session);\n\t\t\tpopulateAssociate(112, \"Etsuko\", \"Fang\", 1, 4, 2, 8, session);\n\t\t\tpopulateAssociate(113, \"Hideki\", \"Qing\", 1, 4, 2, 8, session);\n\t\t\tpopulateAssociate(114, \"Masaru\", \"Ayako\", 1, 4, 2, 8, session);\n\t\t\tpopulateAssociate(115, \"Megumi\", \"Mari\", 1, 4, 2, 8, session);\n\t\t\tpopulateAssociate(116, \"Hiroko\", \"Hiroshi\", 1, 4, 2, 8, session);\n\t\t\tpopulateAssociate(117, \"Sumiko\", \"Mai\", 1, 4, 2, 8, session);\n\n\t\t\t// batch9\n\t\t\tpopulateAssociate(118, \"Kanon\", \"Bai\", 1, 5, null, 9, session);\n\t\t\tpopulateAssociate(119, \"Hikaru\", \"Yuu\", 1, 5, null, 9, session);\n\t\t\tpopulateAssociate(120, \"Shiori\", \"Takeshi\", 1, 5, null, 9, session);\n\t\t\tpopulateAssociate(121, \"Jianhong\", \"Youta\", 1, 5, null, 9, session);\n\t\t\tpopulateAssociate(122, \"Goro\", \"Bai\", 1, 5, null, 9, session);\n\t\t\tpopulateAssociate(123, \"Shufen\", \"Miyu\", 1, 5, null, 9, session);\n\t\t\tpopulateAssociate(124, \"Kenji\", \"He\", 1, 5, null, 9, session);\n\t\t\tpopulateAssociate(125, \"Ren\", \"Hayate\", 1, 5, null, 9, session);\n\t\t\tpopulateAssociate(126, \"Momoko\", \"Miki\", 1, 5, null, 9, session);\n\t\t\tpopulateAssociate(127, \"Takashi\", \"Ling\", 1, 5, null, 9, session);\n\t\t\tpopulateAssociate(128, \"Setsuko\", \"Yuuki\", 1, 5, null, 9, session);\n\t\t\tpopulateAssociate(129, \"Megumi\", \"Kato\", 1, 5, null, 9, session);\n\n\t\t\t// INSERT DUMMY VALUES IntegerO Interview\n\t\t\t// populateInterview(admin.tf_Interview_seq.nextval, date, feedback, client,\n\t\t\t// endclient, Integertype, associd, session);\n\n\t\t\t// batch 6\n\t\t\tpopulateInterview(1, LocalDateTime.of(2017, 4, 23, 12, 0, 0), \"Good\", 2, 3, 3, 82, session);\n\t\t\tpopulateInterview(2, LocalDateTime.of(2017, 4, 23, 12, 0, 0), \"Good\", 2, 3, 3, 83, session);\n\t\t\tpopulateInterview(3, LocalDateTime.of(2017, 4, 23, 12, 0, 0), \"Good\", 2, 3, 3, 84, session);\n\t\t\tpopulateInterview(4, LocalDateTime.of(2017, 4, 24, 12, 0, 0), \"Good\", 2, 3, 3, 85, session);\n\t\t\tpopulateInterview(5, LocalDateTime.of(2017, 4, 24, 12, 0, 0), \"Good\", 2, 3, 3, 86, session);\n\t\t\tpopulateInterview(6, LocalDateTime.of(2017, 7, 15, 12, 0, 0), \"Good\", 2, 3, 1, 87, session);\n\t\t\tpopulateInterview(7, LocalDateTime.of(2017, 7, 15, 12, 0, 0), \"Good\", 2, 3, 1, 88, session);\n\t\t\tpopulateInterview(8, LocalDateTime.of(2017, 7, 15, 12, 0, 0), \"Good\", 2, 3, 4, 89, session);\n\t\t\tpopulateInterview(9, LocalDateTime.of(2017, 7, 15, 12, 0, 0), \"Good\", 2, 3, 4, 90, session);\n\t\t\tpopulateInterview(10, LocalDateTime.of(2017, 7, 18, 12, 0, 0), \"Good\", 2, 3, 1, 91, session);\n\t\t\tpopulateInterview(11, LocalDateTime.of(2017, 7, 18, 12, 0, 0), \"Good\", 2, 3, 1, 92, session);\n\t\t\tpopulateInterview(12, LocalDateTime.of(2017, 7, 18, 12, 0, 0), \"Good\", 2, 3, 1, 93, session);\n\n\t\t\t// batch5\n\t\t\tpopulateInterview(13, LocalDateTime.of(2017, 3, 18, 12, 0, 0), \"Good\", 1, 6, 1, 94, session);\n\t\t\tpopulateInterview(14, LocalDateTime.of(2017, 3, 18, 12, 0, 0), \"Good\", 1, 6, 4, 95, session);\n\t\t\tpopulateInterview(15, LocalDateTime.of(2017, 3, 18, 12, 0, 0), \"Good\", 1, 6, 4, 96, session);\n\t\t\tpopulateInterview(16, LocalDateTime.of(2017, 3, 18, 12, 0, 0), \"Good\", 1, 6, 1, 97, session);\n\t\t\tpopulateInterview(17, LocalDateTime.of(2017, 3, 21, 12, 0, 0), \"Good\", 1, 6, 4, 98, session);\n\t\t\tpopulateInterview(18, LocalDateTime.of(2017, 3, 21, 12, 0, 0), \"Good\", 1, 6, 1, 99, session);\n\t\t\tpopulateInterview(19, LocalDateTime.of(2017, 3, 21, 12, 0, 0), \"Good\", 1, 6, 1, 100, session);\n\t\t\tpopulateInterview(20, LocalDateTime.of(2017, 3, 21, 12, 0, 0), \"Good\", 1, 6, 4, 101, session);\n\t\t\tpopulateInterview(21, LocalDateTime.of(2017, 3, 21, 12, 0, 0), \"Good\", 2, 3, 1, 102, session);\n\t\t\tpopulateInterview(22, LocalDateTime.of(2017, 3, 21, 12, 0, 0), \"Good\", 2, 3, 1, 103, session);\n\t\t\tpopulateInterview(23, LocalDateTime.of(2017, 3, 21, 12, 0, 0), \"Good\", 2, 3, 1, 104, session);\n\t\t\tpopulateInterview(24, LocalDateTime.of(2017, 3, 21, 12, 0, 0), \"Good\", 2, 3, 1, 105, session);\n\n\t\t\t// batch, 4\n\t\t\tpopulateInterview(25, LocalDateTime.of(2017, 9, 27, 12, 0, 0), \"Good\", 3, 4, 3, 55, session);\n\t\t\tpopulateInterview(26, LocalDateTime.of(2017, 9, 27, 12, 0, 0), \"Good\", 3, 4, 3, 56, session);\n\t\t\tpopulateInterview(27, LocalDateTime.of(2017, 9, 27, 12, 0, 0), \"Good\", 3, 4, 3, 57, session);\n\t\t\tpopulateInterview(28, LocalDateTime.of(2017, 9, 27, 12, 0, 0), \"Good\", 3, 4, 3, 58, session);\n\t\t\tpopulateInterview(29, LocalDateTime.of(2017, 9, 27, 12, 0, 0), \"Good\", 3, 4, 3, 59, session);\n\t\t\tpopulateInterview(30, LocalDateTime.of(2017, 9, 27, 12, 0, 0), \"Good\", 3, 4, 3, 60, session);\n\t\t\tpopulateInterview(31, LocalDateTime.of(2017, 9, 27, 12, 0, 0), \"Good\", 3, 4, 3, 61, session);\n\n\t\t\tpopulateInterview(32, LocalDateTime.of(2017, 9, 27, 12, 0, 0), \"No Good\", 3, 4, 3, 62, session);\n\t\t\tpopulateInterview(33, LocalDateTime.of(2017, 9, 27, 12, 0, 0), \"No Good\", 3, 4, 3, 63, session);\n\t\t\tpopulateInterview(34, LocalDateTime.of(2017, 9, 27, 12, 0, 0), \"No Good\", 3, 4, 3, 64, session);\n\t\t\tpopulateInterview(35, LocalDateTime.of(2017, 9, 27, 12, 0, 0), \"No Good\", 3, 4, 3, 65, session);\n\n\t\t\tpopulateInterview(36, LocalDateTime.of(2017, 9, 27, 12, 0, 0), \"Good\", 1, 6, 3, 66, session);\n\t\t\tpopulateInterview(37, LocalDateTime.of(2017, 9, 27, 12, 0, 0), \"Good\", 1, 6, 3, 67, session);\n\t\t\tpopulateInterview(38, LocalDateTime.of(2017, 9, 27, 12, 0, 0), \"Good\", 1, 6, 3, 68, session);\n\t\t\tpopulateInterview(39, LocalDateTime.of(2017, 9, 27, 12, 0, 0), \"Good\", 1, 6, 3, 69, session);\n\n\t\t\t// batch3\n\t\t\tpopulateInterview(40, LocalDateTime.of(2017, 11, 1, 12, 0, 0), \"Good\", 2, 2, 3, 43, session);\n\t\t\tpopulateInterview(41, LocalDateTime.of(2017, 11, 1, 12, 0, 0), \"Good\", 2, 2, 3, 44, session);\n\t\t\tpopulateInterview(42, LocalDateTime.of(2017, 11, 1, 12, 0, 0), \"Good\", 2, 2, 3, 45, session);\n\t\t\tpopulateInterview(43, LocalDateTime.of(2017, 11, 1, 12, 0, 0), \"Good\", 2, 2, 3, 46, session);\n\t\t\tpopulateInterview(44, LocalDateTime.of(2017, 11, 1, 12, 0, 0), \"Good\", 2, 2, 3, 47, session);\n\t\t\tpopulateInterview(45, LocalDateTime.of(2017, 11, 1, 12, 0, 0), \"Good\", 2, 2, 3, 48, session);\n\t\t\tpopulateInterview(46, LocalDateTime.of(2017, 11, 1, 12, 0, 0), \"Good\", 2, 2, 3, 49, session);\n\t\t\tpopulateInterview(47, LocalDateTime.of(2017, 11, 1, 12, 0, 0), \"No Good\", 2, 2, 3, 50, session);\n\t\t\tpopulateInterview(48, LocalDateTime.of(2017, 11, 1, 12, 0, 0), \"No Good\", 2, 2, 3, 51, session);\n\t\t\tpopulateInterview(49, LocalDateTime.of(2017, 11, 1, 12, 0, 0), \"Good\", 2, 2, 3, 52, session);\n\t\t\tpopulateInterview(50, LocalDateTime.of(2017, 11, 1, 12, 0, 0), \"Good\", 2, 2, 3, 53, session);\n\t\t\tpopulateInterview(51, LocalDateTime.of(2017, 11, 1, 12, 0, 0), \"Good\", 2, 2, 3, 54, session);\n\n\t\t\t// INSERT DUMMY VALUES IntegerO PLACEMENT\n\t\t\t// populatePlacement(admin.tf_placement_seq.nextval, start, end, client,\n\t\t\t// endclient, assoc, session);\n\n\t\t\t// batch 6\n\t\t\tpopulatePlacement(1, LocalDate.of(2017, 4, 23), LocalDate.of(2018, 4, 23), 2, 3, 82, session);\n\t\t\tpopulatePlacement(2, LocalDate.of(2017, 4, 23), LocalDate.of(2018, 4, 23), 2, 3, 83, session);\n\t\t\tpopulatePlacement(3, LocalDate.of(2017, 4, 23), LocalDate.of(2018, 4, 23), 2, 3, 84, session);\n\t\t\tpopulatePlacement(4, LocalDate.of(2017, 4, 24), LocalDate.of(2018, 4, 23), 2, 3, 85, session);\n\t\t\tpopulatePlacement(5, LocalDate.of(2017, 4, 24), LocalDate.of(2018, 4, 23), 2, 3, 86, session);\n\t\t\tpopulatePlacement(6, LocalDate.of(2017, 7, 15), LocalDate.of(2018, 4, 23), 2, 3, 87, session);\n\t\t\tpopulatePlacement(7, LocalDate.of(2017, 7, 15), LocalDate.of(2018, 4, 23), 2, 3, 88, session);\n\t\t\tpopulatePlacement(8, LocalDate.of(2017, 7, 15), LocalDate.of(2018, 4, 23), 2, 3, 89, session);\n\t\t\tpopulatePlacement(9, LocalDate.of(2017, 7, 15), LocalDate.of(2018, 4, 23), 2, 3, 90, session);\n\t\t\tpopulatePlacement(10, LocalDate.of(2017, 7, 18), LocalDate.of(2018, 4, 23), 2, 3, 91, session);\n\t\t\tpopulatePlacement(11, LocalDate.of(2017, 7, 18), LocalDate.of(2018, 4, 23), 2, 3, 92, session);\n\t\t\tpopulatePlacement(12, LocalDate.of(2017, 7, 18), LocalDate.of(2018, 4, 23), 2, 3, 93, session);\n\n\t\t\t// batch 5\n\t\t\tpopulatePlacement(13, LocalDate.of(2017, 4, 18), LocalDate.of(2018, 4, 18), 1, 6, 94, session);\n\t\t\tpopulatePlacement(14, LocalDate.of(2017, 4, 18), LocalDate.of(2018, 4, 18), 1, 6, 95, session);\n\t\t\tpopulatePlacement(15, LocalDate.of(2017, 4, 18), LocalDate.of(2018, 4, 18), 1, 6, 96, session);\n\t\t\tpopulatePlacement(16, LocalDate.of(2017, 4, 18), LocalDate.of(2018, 4, 18), 1, 6, 97, session);\n\t\t\tpopulatePlacement(17, LocalDate.of(2017, 4, 18), LocalDate.of(2018, 4, 18), 1, 6, 98, session);\n\t\t\tpopulatePlacement(18, LocalDate.of(2017, 4, 18), LocalDate.of(2018, 4, 18), 1, 6, 99, session);\n\t\t\tpopulatePlacement(19, LocalDate.of(2017, 4, 18), LocalDate.of(2018, 4, 18), 1, 6, 100, session);\n\t\t\tpopulatePlacement(20, LocalDate.of(2017, 4, 18), LocalDate.of(2018, 4, 18), 1, 6, 101, session);\n\t\t\tpopulatePlacement(21, LocalDate.of(2017, 4, 18), LocalDate.of(2018, 4, 18), 2, 3, 102, session);\n\t\t\tpopulatePlacement(22, LocalDate.of(2017, 4, 18), LocalDate.of(2018, 4, 18), 2, 3, 103, session);\n\t\t\tpopulatePlacement(23, LocalDate.of(2017, 4, 18), LocalDate.of(2018, 4, 18), 2, 3, 104, session);\n\t\t\tpopulatePlacement(24, LocalDate.of(2017, 4, 18), LocalDate.of(2018, 4, 18), 2, 3, 105, session);\n\n\t\t\t// batch 4\n\t\t\tpopulatePlacement(25, LocalDate.of(2017, 10, 15), LocalDate.of(2018, 4, 15), 3, 4, 55, session);\n\t\t\tpopulatePlacement(26, LocalDate.of(2017, 10, 15), LocalDate.of(2018, 4, 15), 3, 4, 56, session);\n\t\t\tpopulatePlacement(27, LocalDate.of(2017, 10, 15), LocalDate.of(2018, 4, 15), 3, 4, 57, session);\n\t\t\tpopulatePlacement(28, LocalDate.of(2017, 10, 15), LocalDate.of(2018, 4, 15), 3, 4, 58, session);\n\t\t\tpopulatePlacement(29, LocalDate.of(2017, 10, 15), LocalDate.of(2018, 4, 15), 3, 4, 59, session);\n\t\t\tpopulatePlacement(30, LocalDate.of(2017, 10, 15), LocalDate.of(2018, 4, 15), 3, 4, 60, session);\n\t\t\tpopulatePlacement(31, LocalDate.of(2017, 10, 15), LocalDate.of(2018, 4, 15), 3, 4, 61, session);\n\t\t\tpopulatePlacement(32, LocalDate.of(2017, 10, 15), LocalDate.of(2018, 10, 15), 1, 6, 62, session);\n\t\t\tpopulatePlacement(33, LocalDate.of(2017, 10, 15), LocalDate.of(2018, 10, 15), 1, 6, 63, session);\n\t\t\tpopulatePlacement(34, LocalDate.of(2017, 10, 15), LocalDate.of(2018, 10, 15), 1, 6, 64, session);\n\t\t\tpopulatePlacement(35, LocalDate.of(2017, 10, 15), LocalDate.of(2018, 10, 15), 1, 6, 65, session);\n\n\t\t\t// batch 3\n\n\t\t\tpopulatePlacement(36, LocalDate.of(2017, 11, 6), LocalDate.of(2018, 11, 6), 2, 2, 43, session);\n\t\t\tpopulatePlacement(37, LocalDate.of(2017, 11, 6), LocalDate.of(2018, 11, 6), 2, 2, 44, session);\n\t\t\tpopulatePlacement(38, LocalDate.of(2017, 11, 6), LocalDate.of(2018, 11, 6), 2, 2, 45, session);\n\t\t\tpopulatePlacement(39, LocalDate.of(2017, 11, 6), LocalDate.of(2018, 11, 6), 2, 2, 46, session);\n\t\t\tpopulatePlacement(40, LocalDate.of(2017, 11, 6), LocalDate.of(2018, 11, 6), 2, 2, 47, session);\n\t\t\tpopulatePlacement(41, LocalDate.of(2017, 11, 6), LocalDate.of(2018, 11, 6), 2, 2, 47, session);\n\t\t\tpopulatePlacement(42, LocalDate.of(2017, 11, 6), LocalDate.of(2018, 11, 6), 2, 2, 49, session);\n\t\t\tpopulatePlacement(43, LocalDate.of(2017, 11, 6), LocalDate.of(2018, 11, 6), 2, 2, 52, session);\n\t\t\tpopulatePlacement(44, LocalDate.of(2017, 11, 6), LocalDate.of(2018, 11, 6), 2, 2, 53, session);\n\t\t\tpopulatePlacement(45, LocalDate.of(2017, 11, 6), LocalDate.of(2018, 11, 6), 2, 2, 54, session);\n\n\t\t\tsession.flush();\n\t\t\ttx.commit();\n\n\t\t\tprev = DBMode.DB;\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\ttx.rollback();\n\t\t\tthrow new IOException(\"Could not populate DB\", e);\n\t\t} finally {\n\t\t\tsession.close();\n\t\t}\n\t}", "private void convertAuthorsToPerson() {\n List<Object[]> authors = jdbcTemplate.query(\"SELECT * FROM T_AUTHORS\", new AuthorRowMapper());\n\n String query = \"INSERT INTO \" + IDaoPersons.TABLE + \"(NAME, FIRST_NAME, NOTE, THE_COUNTRY_FK, TYPE) VALUES (?,?,?,?,?)\";\n\n for (Object[] author : authors) {\n jdbcTemplate.update(query, author[0], author[1], author[2], author[3], IAuthorsService.PERSON_TYPE);\n }\n\n jdbcTemplate.update(\"DROP TABLE IF EXISTS T_AUTHORS\");\n }", "public void save()\n\t{\t\n\t\tfor (Preis p : items) {\n\t\t\titmDAO.create(p.getItem());\n\t\t\tprcDAO.create(p);\n\t\t}\n\t\tstrDAO.create(this);\n\t}", "private void insertData() {\n PodamFactory factory = new PodamFactoryImpl();\n for (int i = 0; i < 3; i++) {\n ViajeroEntity entity = factory.manufacturePojo(ViajeroEntity.class);\n\n em.persist(entity);\n data.add(entity);\n }\n }", "void insertBatch(List<TABLE41> recordLst);", "private void processRecords()\n {\n // This is the way to connect the file to an inputstream in android\n InputStream inputStream = getResources().openRawResource(R.raw.products);\n\n Scanner scanner = new Scanner(inputStream);\n\n\n // skipping first row by reading it before loop and displaying it as column names\n String[] tableRow = scanner.nextLine().split(\",\");\n\n //Log.e(\"COLUMN NAMES\", Arrays.toString(tableRow));\n //Log.e(\"COLUMN NAMES SIZE\", String.valueOf(tableRow.length));\n\n\n // --- Truncate table (delete all rows and reset auto increment --\n // this line of code will be useful because for now we are forced to read file\n // everytime we open app, this way we do not have duplicate data.\n db.resetTable();\n\n while (scanner.hasNextLine())\n {\n tableRow = scanner.nextLine().split(\",\");\n //Log.e(\"COLUMN VALUES\", Arrays.toString(tableRow));\n //Log.e(\"COLUMN VALUES SIZE\", String.valueOf(tableRow.length));\n\n /*\n * Possible Change:\n * On each iteration a new Product() can be created and call the setter to set\n * its fields to the elements of the String array, example\n * product = new Product();\n * product.setNumber(tableRow[0]);\n * product.setBusinessName(tableRow[1]);\n * ...\n * db.insertData(product); // because the new insertData method would expect a\n * Product object instead\n *\n */\n\n // insert data\n if (db.insertData(tableRow))\n {\n //Log.e(\"Insert\", \"SUCCESSFUL INSERT AT \" + tableRow[0]);\n }\n else\n {\n //Log.e(\"Insert\", \"UNSUCCESSFUL INSERT\");\n }\n\n }\n }", "@Override\n public int bathSave(List<T> entitys) throws Exception {\n return mapper.insertList(entitys);\n }", "public List<Long> createOrUpdate(MigrationType type, List<DatabaseObject<?>> batch);", "private void saveRecords() {\r\n// for (int i = 0; i < reviewRecords.size(); i++) {\r\n// ReviewRecords get = reviewRecords.get(i);\r\n// if (!get.toString().startsWith(\"null\")) {\r\n// Logs.e(get.toString());\r\n// }\r\n//\r\n// }\r\n\r\n SQLiteJDBC sqliteJDBC = new SQLiteJDBC(GlobalParameters.WORKING_REVIEW_DB_PATH);\r\n StringBuilder sqlTableItems = new StringBuilder();\r\n\r\n sqlTableItems.append(\" (\").append(\"StockCode\").append(\" TEXT PRIMARY KEY NOT NULL,\")\r\n .append(\"StockName\").append(\" TEXT, \")\r\n .append(\"Reference\").append(\" TEXT, \")\r\n .append(\"Methods\").append(\" TEXT, \")\r\n .append(\"ObStartDate\").append(\" TEXT, \")\r\n .append(\"Comments\").append(\" TEXT)\");\r\n\r\n// sqlTableItems.append(\" (\").append(\"StockCode\").append(\" TEXT PRIMARY KEY NOT NULL,\")\r\n// .append(\"StockName\").append(\" TEXT, \")\r\n// .append(\"Reference\").append(\" TEXT, \")\r\n// .append(\"Methods\").append(\" TEXT, \")\r\n// .append(\"ObStartDate\").append(\" TEXT, \")\r\n// .append(\"ObStartPrice\").append(\" TEXT, \")\r\n// .append(\"ObEndDate\").append(\" TEXT, \")\r\n// .append(\"ObEndPrice\").append(\" TEXT, \")\r\n// .append(\"Profit\").append(\" TEXT, \")\r\n// .append(\"Efficency\").append(\" TEXT, \")\r\n// .append(\"Comments\").append(\" TEXT)\");\r\n String tableName = \"Review\";\r\n sqliteJDBC.createTable(tableName, sqlTableItems.toString());\r\n sqliteJDBC.insertColumns(tableName, colNames, getListData());\r\n\r\n }", "private void insertData() {\r\n PodamFactory factory = new PodamFactoryImpl();\r\n for (int i = 0; i < 3; i++) {\r\n MonitoriaEntity entity = factory.manufacturePojo(MonitoriaEntity.class);\r\n\r\n em.persist(entity);\r\n data.add(entity);\r\n }\r\n }", "@SuppressWarnings(\"deprecation\")\n\tpublic void writeTable()\n\t{\n\t\tIterator<WPPost> itr = readValues.iterator();\n\t\t\n\t\twhile(itr.hasNext())\n\t\t{\n\t\t\tWPPost post = itr.next();\n\t\t\tPreparedStatement prStm;\n\t\t\tint res = 0;\n\t\t\t\n\t\t\ttry \n\t\t\t{\n\t\t\t\tif(post.getPostDateGMT() == null)\n\t\t\t\t{\n\t\t\t\t\tpost.setPostDateGMT(new Timestamp(0));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(post.getPostModifiedGMT() == null)\n\t\t\t\t{\n\t\t\t\t\tpost.setPostModifiedGMT(new Timestamp(0));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tprStm = conn.prepareStatement(WRITE_STATEMENT);\n\t\t\t\tprStm.setInt(1, post.getId());\n\t\t\t\tprStm.setInt(2, post.getPostAuthor());\n\t\t\t\tprStm.setTimestamp(3, post.getPostDate());\n\t\t\t\tprStm.setTimestamp(4, post.getPostDateGMT());\n\t\t\t\tprStm.setString(5, post.getPostContent());\n\t\t\t\tprStm.setString(6, post.getPostTitle());\n\t\t\t\tprStm.setString(7, post.getPostExcerpt());\n\t\t\t\tprStm.setString(8, post.getPostStatus());\n\t\t\t\tprStm.setString(9, post.getCommentStatus());\n\t\t\t\tprStm.setString(10, post.getPingStatus());\n\t\t\t\tprStm.setString(11, post.getPostPassword());\n\t\t\t\tprStm.setString(12, post.getPostName());\n\t\t\t\tprStm.setString(13, post.getToPing());\n\t\t\t\tprStm.setString(14, post.getPinged());\n\t\t\t\tprStm.setTimestamp(15, post.getPostModified());\n\t\t\t\tprStm.setTimestamp(16, post.getPostModifiedGMT());\n\t\t\t\tprStm.setString(17, post.getPostContentFiltered());\n\t\t\t\tprStm.setInt(18, post.getPostParent());\n\t\t\t\tprStm.setString(19, post.getGuid());\n\t\t\t\tprStm.setInt(20, post.getMenuOrder());\n\t\t\t\tprStm.setString(21, post.getPostType());\n\t\t\t\tprStm.setString(22, post.getPostMimeType());\n\t\t\t\tprStm.setInt(23, post.getCommentCount());\n\t\t\t\t\n\t\t\t\tres = prStm.executeUpdate();\n\t\t\t\t\n\t\t\t\tif(res == 0)\n\t\t\t\t{\n\t\t\t\t\ttry \n\t\t\t\t\t{\n\t\t\t\t\t\tthrow new WriteWPPostException(post.toString());\n\t\t\t\t\t} \n\t\t\t\t\tcatch (WriteWPPostException e) \n\t\t\t\t\t{\n\t\t\t\t\t\t//e.printStackTrace(); // TODO Debug Mode! Delete This!\n\t\t\t\t\t\tthis.rowsWithErrors.add(post);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} \n\t\t\tcatch (SQLException e1) \n\t\t\t{\n\t\t\t\t//e1.printStackTrace(); // TODO Debug Mode! Delete This!\n\t\t\t\tthis.rowsWithErrors.add(post);\n\t\t\t}\n\t\t}\n\t}", "private void creates() {\n \tDBPeer.fetchTableColumns();\n \tDBPeer.fetchTableRows();\n \tDBPeer.fetchTableIndexes();\n \t\n for (int i = 0; i < creates.size(); i++) {\n creates.get(i).init();\n }\n \n DBPeer.updateTableColumns();\n DBPeer.updateTableRows();\n DBPeer.updateTableIndexes();\n }", "private void addSomeItemsToDB () throws Exception {\n/*\n Position pos;\n Course course;\n Ingredient ing;\n\n PositionDAO posdao = new PositionDAO();\n CourseDAO coursedao = new CourseDAO();\n IngredientDAO ingdao = new IngredientDAO();\n\n ing = new Ingredient(\"Mozzarella\", 10,30);\n ingdao.insert(ing);\n\n // Salads, Desserts, Main course, Drinks\n pos = new Position(\"Pizza\");\n posdao.insert(pos);\n\n course = new Course(\"Salads\", \"Greek\", \"Cucumber\", \"Tomato\", \"Feta\");\n coursedao.insert(course);\n\n ing = new Ingredient(\"-\", 0,0);\n ingdao.insert(ing);\n */\n }", "@Transactional\n public ApiResponse saveItems(List<Df00201VO> itemList) {\n\n List<DfDegree> dfDegreeList = ModelMapperUtils.mapList(itemList, DfDegree.class);\n\n DfDegree orgDfDegree = null;\n int degree = 0;\n\n for (DfDegree dfDegree : dfDegreeList) {\n if (dfDegree.isCreated() || dfDegree.isModified()) {\n orgDfDegree = repository.findOne(dfDegree.getId());\n\n if (mapper.checkDegree(dfDegree.getDisposalFreezeEventUuid()) >= dfDegree.getDegree()){\n if(dfDegree.isCreated()) {\n return ApiResponse.error(ApiStatus.SYSTEM_ERROR, CommonMessageUtils.getMessage(\"DF002_05\"));\n }else if(dfDegree.isModified()){\n if(orgDfDegree.getDegree() != dfDegree.getDegree()){\n return ApiResponse.error(ApiStatus.SYSTEM_ERROR, CommonMessageUtils.getMessage(\"DF002_05\"));\n }\n }\n }\n\n if(dfDegree.isCreated()){ //disposalFreezeDegreeUuid 없을때\n degree = jdbcTemplate.queryForObject(\"select FC_DF_DEGREE_NUMBER('\"+ dfDegree.getDisposalFreezeEventUuid() +\"') from dual\", Integer.class);\n dfDegree.setDegree(degree);\n dfDegree.setStatusUuid(CommonCodeUtils.getCodeDetailUuid(\"CD115\",\"Draft\"));\n }\n\n if(dfDegree.isModified()) {\n dfDegree.setInsertDate(orgDfDegree.getInsertDate());\n dfDegree.setInsertUuid(orgDfDegree.getInsertUuid());\n\n if(dfDegree.getEndYn().equals(\"Y\")){\n dfDegree.setTerminatorUuid(SessionUtils.getCurrentLoginUserUuid());\n dfDegree.setEndDate(Timestamp.valueOf(DateUtils.convertToString(LocalDateTime.now(), DateUtils.DATE_TIME_PATTERN)));\n }else{\n dfDegree.setTerminatorUuid(\"\");\n dfDegree.setEndDate(null);\n }\n }\n\n repository.save(dfDegree);\n } else if (dfDegree.isDeleted()) {\n if (mapper.checkDegree(dfDegree.getDisposalFreezeEventUuid()) > 0) {\n return ApiResponse.error(ApiStatus.SYSTEM_ERROR, CommonMessageUtils.getMessage(\"DF002_05\"));\n } else {\n repository.delete(dfDegree);\n }\n }\n\n }\n return ApiResponse.of(ApiStatus.SUCCESS, \"SUCCESS\");\n }", "public void restoreDatabase(Transaction[] transactionList) {\n databaseHandler.cleanTransactionDatabase();\n this.transactionList.clear();\n for (Transaction transaction : transactionList) {\n addTransaction(transaction.transactionAccountNumber,\n transaction.transactionAmount,\n transaction.transactionType, transaction.transactionJournalEntry, transaction.transactionTimestamp);\n }\n }", "public static void updateDatabase(){\n\t\ttry {\n\t\t\tPrintWriter pwFLU = new PrintWriter(filePath);\n\t\t\tfor(Entry<String, Pair<FileID, Integer>> entry : Peer.fileList.entrySet()){\n\t\t\t\tString path = entry.getKey();\n\t\t\t\tPair<FileID, Integer> pair = entry.getValue();\n\t\t\t\tpwFLU.println(path + \"|\" + pair.getFirst().toString() + \"|\" + pair.getSecond());\n\t\t\t}\n\t\t\tpwFLU.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t/*\n\t\t * UPDATE THE CHUNKS\n\t\t */\n\t\ttry {\n\t\t\tPrintWriter pwCLU = new PrintWriter(chunkPath);\n\t\t\tfor(ChunkInfo ci : Peer.chunks){\n\t\t\t\tpwCLU.println(ci.getFileId() + \"|\" + ci.getChunkNo() + \"|\" + ci.getDesiredRD() + \"|\" + ci.getActualRD());\n\t\t\t}\n\t\t\tpwCLU.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void saveCurrencyListToDb() {\n LOGGER.info(\"SAVING CURRENCY LIST TO DB.\");\n List<Currency> currencyList = currencyService.fetchCurrencyFromCRB();\n currencyRepository.saveAll(currencyList);\n }", "private void insertData() {\n\n for (int i = 0; i < 3; i++) {\n ProveedorEntity proveedor = factory.manufacturePojo(ProveedorEntity.class);\n BonoEntity entity = factory.manufacturePojo(BonoEntity.class);\n int noOfDays = 8;\n Date dateOfOrder = new Date();\n Calendar calendar = Calendar.getInstance();\n calendar.setTime(dateOfOrder);\n calendar.add(Calendar.DAY_OF_YEAR, noOfDays);\n Date date = calendar.getTime();\n entity.setExpira(date);\n noOfDays = 1;\n calendar = Calendar.getInstance();\n calendar.setTime(dateOfOrder);\n calendar.add(Calendar.DAY_OF_YEAR, noOfDays);\n date = calendar.getTime();\n entity.setAplicaDesde(date);\n entity.setProveedor(proveedor);\n em.persist(entity);\n ArrayList lista=new ArrayList<>();\n lista.add(entity);\n proveedor.setBonos(lista);\n em.persist(proveedor);\n pData.add(proveedor);\n data.add(entity); \n }\n }", "private void saveToDb(long subcategoryId) {\n\n for (NewsClass item : newsList)\n item.save();\n\n }", "@Override\n public void run() {\n addDelay();\n\n AppDatabase appDatabase = AppDatabase.getInstance(appContext, executors);\n\n List<WeatherEntry> weathers = DataGenerator.generateWeathers();\n\n Log.d(TAG, \"Codelab AppDatabase insertAll - begin\");\n\n insertAll(appDatabase, weathers);\n\n // notify that the database was created and it's ready to be used\n appDatabase.setDatabaseCreated();\n }", "public void convertCsvDataToSQLScrip(List<CorruptionIndex> data, String destinationFile){\n\n }", "public void normalize()\n\t{\n\t\tlong last_entity_id = getLastEntityId(getEntityName());\n\t\t\n\t\t/* Clear db of any id's greater than id for this entity. Keep things clean */\n\t\t\n\t\t/* Save new entries for that entity */\n\t\tprocessNewRows(last_entity_id);\n\t\t\n\t\t/* Update session info */\n\t}", "public void persistData(RatingData[] data) {\n //start by setting long_comp_result\n //TODO: maybe remove old_rating / vol and move to the record creation?\n String sqlStr = \"update long_comp_result set rated_ind = 1, \" +\n \"old_rating = (select rating from algo_rating \" +\n \" where coder_id = long_comp_result.coder_id and algo_rating_type_id = 3), \" +\n \"old_vol = (select vol from algo_rating \" +\n \" where coder_id = long_comp_result.coder_id and algo_rating_type_id = 3), \" +\n \"new_rating = ?, \" +\n \"new_vol = ? \" +\n \"where round_id = ? and coder_id = ?\";\n PreparedStatement psUpdate = null;\n PreparedStatement psInsert = null;\n \n try {\n psUpdate = conn.prepareStatement(sqlStr);\n for(int i = 0; i < data.length; i++) {\n psUpdate.clearParameters();\n psUpdate.setInt(1, data[i].getRating());\n psUpdate.setInt(2, data[i].getVolatility());\n psUpdate.setInt(3, roundId);\n psUpdate.setInt(4, data[i].getCoderID());\n psUpdate.executeUpdate();\n }\n \n psUpdate.close();\n //update algo_rating\n String updateSql = \"update algo_rating set rating = ?, vol = ?,\" +\n \" round_id = ?, num_ratings = num_ratings + 1 \" +\n \"where coder_id = ? and algo_rating_type_id = 3\";\n \n psUpdate = conn.prepareStatement(updateSql);\n \n String insertSql = \"insert into algo_rating (rating, vol, round_id, coder_id, algo_rating_type_id, num_ratings) \" +\n \"values (?,?,?,?,3,1)\";\n \n psInsert = conn.prepareStatement(insertSql);\n \n for(int i = 0; i < data.length; i++) {\n psUpdate.clearParameters();\n psUpdate.setInt(1, data[i].getRating());\n psUpdate.setInt(2, data[i].getVolatility());\n psUpdate.setInt(3, roundId);\n psUpdate.setInt(4, data[i].getCoderID());\n if(psUpdate.executeUpdate() == 0) {\n psInsert.clearParameters();\n psInsert.setInt(1, data[i].getRating());\n psInsert.setInt(2, data[i].getVolatility());\n psInsert.setInt(3, roundId);\n psInsert.setInt(4, data[i].getCoderID());\n psInsert.executeUpdate();\n }\n }\n \n psUpdate.close();\n psInsert.close();\n \n //mark the round as rated\n psUpdate = conn.prepareStatement(\"update round set rated_ind = 1 where round_id = ?\");\n psUpdate.setInt(1, roundId);\n psUpdate.executeUpdate();\n \n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n DBMS.close(psUpdate);\n DBMS.close(psInsert);\n }\n }", "private static void insertListsInDataBase () throws SQLException {\n //Create object ActionsWithRole for working with table role\n ActionsCRUD<Role,Integer> actionsWithRole = new ActionsWithRole();\n for (Role role : roles) {\n actionsWithRole.create(role);\n }\n //Create object ActionsWithUsers for working with table users\n ActionsCRUD<User,Integer> actionsWithUsers = new ActionsWithUsers();\n for (User user : users) {\n actionsWithUsers.create(user);\n }\n //Create object ActionsWithAccount for working with table account\n ActionsCRUD<Account,Integer> actionsWithAccount = new ActionsWithAccount();\n for (Account account : accounts) {\n actionsWithAccount.create(account);\n }\n //Create object ActionsWithPayment for working with table payment\n ActionsCRUD<Payment,Integer> actionsWithPayment = new ActionsWithPayment();\n for (Payment payment : payments) {\n actionsWithPayment.create(payment);\n }\n }", "void addBatch() throws SQLException;", "public static void ProcessTransaction(){\r\n\t Iterator<String> iter = masterEventsFile.iterator();\r\n\t //this uses the deletePastEvents method to delete all the past events in the masterEventsFile\r\n\t while (iter.hasNext()){\r\n\t\t String e = iter.next();\r\n\t \r\n\t //for (String e : masterEventsFile){\r\n\t\t Event CheckEvent = new Event(e);\r\n\t\t boolean pastDate = deletePastEvents(CheckEvent);\r\n\t\t if (!pastDate){\r\n\t\t\t break;\r\n\t\t } \r\n\t }\r\n\t //makes each line of the masterEventFile into an Event object for easier processing\r\n\t for (String e : masterEventsFile){\r\n\t\t Event event = new Event(e);\r\n\t\t alteredEventsFile.add(event);\r\n\t }\r\n\t //makes each line into a Transaction object for easier processing\r\n\t for (String t: mergedEventTransactionFile){\r\n\t\t Transaction transaction= new Transaction(t);\r\n\t\t allTransactions.add(transaction);\r\n\t }\r\n\t \r\n\t //Iterates through each Transaction processing them one at a time based on their id\r\n\t for (Transaction t: allTransactions){\r\n\t\t //process sell, return, create, add, delete,end\r\n\t\t if(t.id == 00){\r\n\t\t\t break;\r\n\t\t }\r\n\t\t Event changeEvent = findEvent(t.name);\r\n\t\t if (changeEvent != null){\r\n\t\t\t if (t.id == 01){\t\t\t\t\t\t//sell transaction\r\n\t\t\t\t if((changeEvent.ticket -t.ticket)<0){\r\n\t\t\t\t\t System.out.println(\"Sell transaction could not be performed, not enough tickets\"); //Contraints: no event should ever have a negative nmber of ticekts\r\n\t\t\t\t }else{\r\n\t\t\t\t\t changeEvent.ticket = changeEvent.ticket -t.ticket;\r\n\t\t\t\t }\r\n\t\t\t }else if (t.id == 02){\t\t\t\t//return transaction\r\n\t\t\t\t changeEvent.ticket =changeEvent.ticket + t.ticket;\r\n\t\t\t }else if (t.id == 04){\t\t\t\t//add transaction\r\n\t\t\t\t changeEvent.ticket += t.ticket;\t\r\n\t\t\t }else if (t.id == 05){\t\t\t\t//delete transaction\r\n\t\t\t\t changeEvent = null;\r\n\t\t\t }\r\n\t\t }else{\t\t\t\t\t\t\t\t//constraint: a new event must have a name different from all existing events\r\n\t\t\t if(t.id == 03){\t\t\t\t\t\t//create transaction\r\n\t\t\t\t Event newEvent = new Event (t.getEventLine());\r\n\t\t\t\t InsertEvent(newEvent);\t\t//constraint: <asterEventFile must be kept in ascending order by date\r\n\t\t\t }\r\n\t\t }\r\n\t }\r\n\t \r\n\t String newMasterEventsFile = \"\";\r\n\t String newCurrentEventsFile = \"\"\r\n\t\t\t ;\r\n\t // creates two strings in proper format for output to currenteventsFile and MasterEventsFile\r\n\t for (Event e: alteredEventsFile){\t\t\t\t\t\t\t\t//assumes correct input... constraint:every line is exactly 33 characters(plus newline)\r\n\t\t newMasterEventsFile += e.getEventLine() +\"\\n\";\r\n\t\t newCurrentEventsFile += e.getCurrentEventLine() + \"\\n\";\r\n\t }\r\n\t \r\n\t //does file output stuff\r\n\t try{\r\n\t\t endBackEnd(newMasterEventsFile, newCurrentEventsFile);\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n }", "public static void bulkInsert(SQLiteDatabase db, ArrayList<NewsItemClass> newsItems) {\n\n db.beginTransaction();\n try {\n for (NewsItemClass a : newsItems) {\n ContentValues cv = new ContentValues();\n cv.put(COLUMN_NEWS_SOURCE, a.getnAuthor());\n cv.put(COLUMN_NEWS_AUTHOR, a.getnAuthor());\n cv.put(COLUMN_NEWS_TITLE, a.getnTitle());\n cv.put(COLUMN_NEWS_DESCRIPTION, a.getnDescription());\n cv.put(COLUMN_NEWS_URL, a.getnUrl());\n cv.put(COLUMN_NEWS_URL_TO_IMAGE, a.getnUrlToImage());\n cv.put(COLUMN_NEWS_PUBLISHED_AT, a.getnPublishedAt());\n db.insert(TABLE_NAME, null, cv);\n }\n db.setTransactionSuccessful();\n } finally {\n db.endTransaction();\n db.close();\n }\n }", "private void bulkInsertIntoDataAnalyzing(ArrayList<DataInfo> tmp) {\r\n sqliteDBHelper.insertIntoDataAnalyzingBulk(tmp);\r\n sqliteDBHelper.insertIntoScannedAppsBulk(tmp);\r\n }", "@Override\n\tpublic void saveOrUpdateAll(Collection<Contract> entitys) {\n\t\tcontractDao.save(entitys);\n\t}", "private void insertData() \n {\n for(int i = 0; i < 2; i++){\n RazaEntity razaEntity = factory.manufacturePojo(RazaEntity.class);\n em.persist(razaEntity);\n razaData.add(razaEntity);\n }\n for (int i = 0; i < 3; i++) {\n EspecieEntity especieEntity = factory.manufacturePojo(EspecieEntity.class);\n if(i == 0)\n {\n especieEntity.setRazas(razaData);\n }\n em.persist(especieEntity);\n especieData.add(especieEntity);\n }\n }", "private void insertData() {\n PodamFactory factory = new PodamFactoryImpl();\n for (int i = 0; i < 3; i++) {\n VueltasConDemoraEnOficinaEntity entity = factory.manufacturePojo(VueltasConDemoraEnOficinaEntity.class);\n \n em.persist(entity);\n data.add(entity);\n }\n }", "public synchronized void writeFromFileIntoDB()throws IOWrapperException, IOIteratorException{\r\n \r\n fromFile_Name=Controller.CLASSES_TMP_FILENAME;\r\n iow_ReadFromFile = new IOWrapper();\r\n \r\n //System.out.println(\"Readin' from \"+fromFile_Name);\r\n \r\n iow_ReadFromFile.setupInput(fromFile_Name,0);\r\n \r\n iter_ReadFromFile = iow_ReadFromFile.getLineIterator();\r\n iow_ReadFromFile.setupOutput(this.dbname,this.username,this.password,this.hostname,this.port);\r\n \r\n iow_ReadFromFile.sendOutputQuery(\"DROP TABLE IF EXISTS \"+outtable);\r\n \r\n iow_ReadFromFile.sendOutputQuery(\r\n \"CREATE TABLE IF NOT EXISTS \"\r\n +outtable+\" (\"\r\n +Controller.COLUMN_NAMES_FOR_DB_OUT[0]+\" int(10) NOT NULL AUTO_INCREMENT, \"//wort_nr\r\n +Controller.COLUMN_NAMES_FOR_DB_OUT[1]+\" varchar(225), \"//wort_alph\r\n +Controller.COLUMN_NAMES_FOR_DB_OUT[2]+\" int(10), \"//krankheit \r\n +Controller.COLUMN_NAMES_FOR_DB_OUT[3]+\" int(10), \"//farbe1 \r\n +Controller.COLUMN_NAMES_FOR_DB_OUT[4]+\" real(8,2), \"//farbe1prozent\r\n +Controller.COLUMN_NAMES_FOR_DB_OUT[5]+\" int(10), \"//farbe2\r\n +Controller.COLUMN_NAMES_FOR_DB_OUT[6]+\" real(8,2), \"//farbe2prozent\r\n +\"PRIMARY KEY (\"+Controller.COLUMN_NAMES_FOR_DB_OUT[0]+\")) \"\r\n +\"ENGINE=MyISAM\"\r\n );\r\n while(iter_ReadFromFile.hasNext()){\r\n singleProgress+=1;\r\n String[] data = (String[])iter_ReadFromFile.next();\r\n \r\n //System.out.println(\"--> processing line \"+data);\r\n //escape quotes ' etc for SQL query\r\n if(data[1].matches(\".*'.*\")||data[1].matches(\".*\\\\.*\")){\r\n int sl = data[1].length();\r\n String escapedString = \"\";\r\n \r\n for (int i = 0; i < sl; i++) {\r\n char ch = data[1].charAt(i);\r\n switch (ch) {\r\n case '\\'':\r\n escapedString +='\\\\';\r\n escapedString +='\\'';\r\n break;\r\n case '\\\\':\r\n escapedString +='\\\\';\r\n escapedString +='\\\\';\r\n break;\r\n default :\r\n escapedString +=ch;\r\n break;\r\n }\r\n }\r\n data[1]=escapedString;\r\n }\r\n \r\n String insertStatement=\"INSERT INTO \"\r\n +outtable+\" (\"\r\n +Controller.COLUMN_NAMES_FOR_DB_OUT[0]+\", \"//node id\r\n +Controller.COLUMN_NAMES_FOR_DB_OUT[1]+\", \"//label\r\n +Controller.COLUMN_NAMES_FOR_DB_OUT[2]+\", \"//class id \r\n +Controller.COLUMN_NAMES_FOR_DB_OUT[3]+\", \"//class id 1 \r\n +Controller.COLUMN_NAMES_FOR_DB_OUT[4]+\", \"//percent\r\n +Controller.COLUMN_NAMES_FOR_DB_OUT[5]+\", \"//class id 2\r\n +Controller.COLUMN_NAMES_FOR_DB_OUT[6]+\") \"//percent \r\n +\"VALUES ('\"\r\n +data[0]+\"', '\"\r\n +data[1]+\"', '\"\r\n +data[2]+\"', '\"\r\n +data[3]+\"', '\"\r\n +data[4]+\"', '\"\r\n +data[5]+\"', '\"\r\n +data[6]+\"')\";\r\n \r\n //System.out.println(\"Sending insert statement:\"+insertStatement);\r\n iow_ReadFromFile.sendOutputQuery(insertStatement);\r\n }\r\n \r\n \r\n //iow_ReadFromFile.closeOutput();\r\n \r\n this.stillWorks=false;\r\n writeIntoDB=false;\r\n System.out.println(\"*\\tData written into database.\");\r\n\t}", "public void writeDataToDatabase(List<Company> cl){\n\t\tjdbcTemplate.update(\"CREATE TABLE IF NOT EXISTS \" + table + \" (date varchar(40), security varchar(100), weighting float(53));\");\n\t\tfor(Company c : cl){\n\t\t\tthis.writeCompany(c.getDate(), c.getSecurity() ,c.getWeighting());\n\t\t}\n\t}", "public void insertIntoDb(JSONObject data) {\n shortlistedSuppliersData.clear();\r\n shortlistedInventoryDetailsData.clear();\r\n basicSupplierData.clear();\r\n inventoryActivityAssignmentData.clear();\r\n inventoryActivityData.clear();\r\n\r\n if ( data == null)\r\n return;\r\n\r\n try {\r\n // handling shortlisted suppliers here\r\n JSONObject shortlistedSuppliers = data.getJSONObject(\"shortlisted_suppliers\");\r\n Iterator<?> shortlistedSupplierKeys = shortlistedSuppliers.keys();\r\n\r\n while ( shortlistedSupplierKeys.hasNext() ) {\r\n\r\n String shortlistedSupplierId = (String)shortlistedSupplierKeys.next();\r\n if ( shortlistedSuppliers.get(shortlistedSupplierId) instanceof JSONObject ) {\r\n\r\n JSONObject shortlistedSupplier = (JSONObject)shortlistedSuppliers.get(shortlistedSupplierId);\r\n String supplierContentType = shortlistedSupplier.getString(\"content_type_id\");\r\n\r\n ShortlistedSuppliersTable shortlistedSupplierObject =\r\n getShortlistedSupplierData(shortlistedSupplier, shortlistedSupplierId);\r\n\r\n if (shortlistedSupplierObject == null)\r\n continue;\r\n\r\n // work for BasicSupplier Data\r\n JSONObject supplierDetail = shortlistedSupplier.getJSONObject(\"supplier_detail\");\r\n BasicSupplierTable instance = getBasicSupplierData(supplierDetail, supplierContentType);\r\n if ( instance != null ) {\r\n basicSupplierData.add(instance);\r\n }\r\n\r\n //Log.e(\"In assigned Frag\",supplierDetail.toString());\r\n contactTableEntryList = ContactsTable.getContactDetails(supplierDetail);\r\n\r\n shortlistedSuppliersData.add(shortlistedSupplierObject);\r\n }\r\n }\r\n\r\n // handling shortlisted inventories here\r\n JSONObject shortlistedInventories = data.getJSONObject(\"shortlisted_inventories\");\r\n Iterator<?> shortlistedInventoryKeys = shortlistedInventories.keys();\r\n\r\n while ( shortlistedInventoryKeys.hasNext() ) {\r\n\r\n String shortlistedInventoryId = (String)shortlistedInventoryKeys.next();\r\n JSONObject shortlistedInventory = (JSONObject)shortlistedInventories.get(shortlistedInventoryId);\r\n\r\n ShortlistedInventoryDetailsTable instance = getShortlistedInventoryDetailsTableInstance(shortlistedInventory, shortlistedInventoryId);\r\n if ( instance == null)\r\n continue;\r\n shortlistedInventoryDetailsData.add(instance);\r\n }\r\n\r\n // handle inventory activities\r\n JSONObject inventoryActivities = data.getJSONObject(\"inventory_activities\");\r\n Iterator<?> inventoryActivityKeys = inventoryActivities.keys();\r\n\r\n while ( inventoryActivityKeys.hasNext() ) {\r\n\r\n String inventoryActivityId = (String)inventoryActivityKeys.next();\r\n JSONObject inventoryActivity = (JSONObject)inventoryActivities.get(inventoryActivityId);\r\n\r\n InventoryActivityTable inventoryActivityTable = getInventoryActivityInstance(inventoryActivity, inventoryActivityId);\r\n if (inventoryActivityTable == null)\r\n continue;\r\n inventoryActivityData.add(inventoryActivityTable);\r\n }\r\n\r\n // handling inventory activity assignment here\r\n\r\n JSONObject inventoryActivityAssignment = data.getJSONObject(\"inventory_activity_assignment\");\r\n Iterator<?> inventoryActivityAssignmentKeys = inventoryActivityAssignment.keys();\r\n\r\n while( inventoryActivityAssignmentKeys.hasNext() ) {\r\n\r\n String inventoryActivityAssignmentId = (String)inventoryActivityAssignmentKeys.next();\r\n JSONObject inventoryActivityAssignmentObject = (JSONObject)inventoryActivityAssignment.get(inventoryActivityAssignmentId);\r\n\r\n InventoryActivityAssignmentTable instance = getInventoryActivityAssignmentInstance(inventoryActivityAssignmentObject, inventoryActivityAssignmentId);\r\n if ( instance == null)\r\n continue;\r\n inventoryActivityAssignmentData.add(instance);\r\n\r\n }\r\n }\r\n catch (Exception e) {\r\n Log.d(\"insertIntoDb\", e.getMessage());\r\n }\r\n\r\n DataBaseHandler db = DataBaseHandler.getInstance(getContext());\r\n try {\r\n // bulk insert them all.\r\n\r\n ShortlistedSuppliersTable.insertBulk(db, shortlistedSuppliersData);\r\n ShortlistedInventoryDetailsTable.insertBulk(db, shortlistedInventoryDetailsData);\r\n BasicSupplierTable.insertBulk(db, basicSupplierData);\r\n InventoryActivityTable.insertBulk(db, inventoryActivityData);\r\n InventoryActivityAssignmentTable.insertBulk(db, inventoryActivityAssignmentData);\r\n ContactsTable.insertBulk(db,contactTableEntryList);\r\n\r\n Log.d(\"ShortlistedSuppTable\", Integer.toString( db.getTotalCount(ShortlistedSuppliersTable.getTableName())));\r\n Log.d(\"shortInvDetail\", Integer.toString( db.getTotalCount(ShortlistedInventoryDetailsTable.getTableName()))) ;\r\n Log.d(\"BasicSuppData\", Integer.toString(db.getTotalCount(BasicSupplierTable.getTableName()))) ;\r\n Log.d(\"InvActivity\", Integer.toString(db.getTotalCount(InventoryActivityTable.getTableName()))) ;\r\n Log.d(\"InvActivityAssignment\", Integer.toString(db.getTotalCount(InventoryActivityAssignmentTable.getTableName()))) ;\r\n\r\n }\r\n catch (Exception e) {\r\n Log.d(\"insertIntoDb\", e.getMessage());\r\n }\r\n finally {\r\n\r\n }\r\n }", "public void createDespesaDetalhe(ArrayList<PagamentoDespesasDetalhe> listaDespesasInseridas, int idDespesa) throws Exception {\n\r\n for(int i=0; i < listaDespesasInseridas.size(); i++){\r\n \r\n open(); //abre conexão com o banco de dados\r\n\r\n //define comando para o banco de dados\r\n stmt = con.prepareStatement(\"INSERT INTO pagamentoDespesasDetalhe(valor, dataPagamento, status, idDespesas, idFormaPagamento) VALUES (?,?,?,?,?)\");\r\n\r\n //atribui os valores das marcações do comando acima \r\n stmt.setFloat(1, listaDespesasInseridas.get(i).getValor());\r\n stmt.setString(2, listaDespesasInseridas.get(i).getDataPagamento());\r\n stmt.setInt(3, listaDespesasInseridas.get(i).getStatus());\r\n stmt.setInt(4, idDespesa);\r\n stmt.setInt(5, listaDespesasInseridas.get(i).getIdFormaPagamento());\r\n\r\n stmt.execute();//executa insert no banco de dados\r\n\r\n close();//fecha conexão com o banco de dados\r\n \r\n } \r\n\r\n }", "void flushDB();", "private void arrangeData() {\r\n\t\ttry {\r\n\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"dd/MM/yyyy HH:mm:ss\"), literalSdf = new SimpleDateFormat(\"EEE MMM dd HH:mm:ss zzz yyyy\", Locale.ENGLISH);\r\n\t\t\tList<Csv> list = HibernateUtil.readAllCsv();\r\n\t\t\tfor (Csv csv : list) {\r\n\t\t\t\t// Se non esiste il progetto lo creo\r\n\t\t\t\tProject pForName = HibernateUtil.readProjectForName(csv.getProgettoPolarion());\r\n\t\t\t\tif (pForName == null) {\r\n\t\t\t\t\tpForName = new Project();\r\n\t\t\t\t\tpForName.setNome(csv.getProgettoPolarion());\r\n\t\t\t\t\tHibernateUtil.save(pForName);\r\n\t\t\t\t}\r\n\t\t\t\tRelease releaseDiProgetto = null;\r\n\t\t\t\tif (csv.getColonnaB() != null && csv.getColonnaB().length() > 0) {\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * ColonnaB\r\n\t\t\t\t\t * \r\n\t\t\t\t\t * idReleaseDiProgetto; titleReleaseDiProgetto;\r\n\t\t\t\t\t * priorityReleaseDiProgetto; severityReleaseDiProgetto;\r\n\t\t\t\t\t * progettoPolarion; versione; link; release;\r\n\t\t\t\t\t * dataCreazioneReleaseDiProgetto;\r\n\t\t\t\t\t * dataUltimoAggiornamentoReleaseDP\r\n\t\t\t\t\t */\r\n\t\t\t\t\tString[] bElements = csv.getColonnaB().split(Pattern.quote(\";\"));\r\n\t\t\t\t\treleaseDiProgetto = HibernateUtil.readRelease(bElements[0].trim());\r\n\t\t\t\t\tboolean toUpdate = false, toSave = false;\r\n\r\n\t\t\t\t\tif (releaseDiProgetto == null) {\r\n\t\t\t\t\t\treleaseDiProgetto = new Release();\r\n\t\t\t\t\t\treleaseDiProgetto.setIdPolarion(bElements[0].trim());\r\n\t\t\t\t\t\ttoSave = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (releaseDiProgetto.getTitolo() == null\r\n\t\t\t\t\t\t\t|| !releaseDiProgetto.getTitolo().equals(bElements[1].trim())) {\r\n\t\t\t\t\t\treleaseDiProgetto.setTitolo(bElements[1].trim());\r\n\t\t\t\t\t\tif (!toSave)\r\n\t\t\t\t\t\t\ttoUpdate = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (bElements[2] != null && bElements[2].trim().length() > 0) {\r\n\t\t\t\t\t\tif (!toSave && releaseDiProgetto.getPriority() != null\r\n\t\t\t\t\t\t\t\t&& releaseDiProgetto.getPriority().getValore() != Float.parseFloat(bElements[2].trim()))\r\n\t\t\t\t\t\t\ttoUpdate = true;\r\n\t\t\t\t\t\tif (toSave || toUpdate)\r\n\t\t\t\t\t\t\treleaseDiProgetto\r\n\t\t\t\t\t\t\t\t\t.setPriority(HibernateUtil.readPriority(Float.parseFloat(bElements[2].trim())));\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (bElements[3] != null && bElements[3].trim().length() > 0) {\r\n\t\t\t\t\t\tif (!toSave && releaseDiProgetto.getSeverity() != null\r\n\t\t\t\t\t\t\t\t&& !releaseDiProgetto.getSeverity().getNome().equals(bElements[3].trim()))\r\n\t\t\t\t\t\t\ttoUpdate = true;\r\n\t\t\t\t\t\tif (toSave || toUpdate)\r\n\t\t\t\t\t\t\treleaseDiProgetto.setSeverity(HibernateUtil.readSeverity(bElements[3].trim()));\r\n\t\t\t\t\t}\r\n\t\t\t\t\treleaseDiProgetto.setProject(pForName);\r\n\t\t\t\t\tif (bElements[5] != null && bElements[5].trim().length() > 0) {\r\n\t\t\t\t\t\tif (!toSave && releaseDiProgetto.getVersione() != null\r\n\t\t\t\t\t\t\t\t&& !releaseDiProgetto.getVersione().equals(bElements[5].trim()))\r\n\t\t\t\t\t\t\ttoUpdate = true;\r\n\t\t\t\t\t\treleaseDiProgetto.setVersione(bElements[5].trim());\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (bElements[6] != null && bElements[6].trim().length() > 0) {\r\n\t\t\t\t\t\tif (!toSave && releaseDiProgetto.getLink() != null\r\n\t\t\t\t\t\t\t\t&& !releaseDiProgetto.getLink().equals(bElements[6].trim()))\r\n\t\t\t\t\t\t\ttoUpdate = true;\r\n\t\t\t\t\t\treleaseDiProgetto.setLink(bElements[6].trim());\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (bElements[7] != null && bElements[7].trim().length() > 0) {\r\n\t\t\t\t\t\tif (!toSave && releaseDiProgetto.getType() != null\r\n\t\t\t\t\t\t\t\t&& !releaseDiProgetto.getType().equals(bElements[6].trim()))\r\n\t\t\t\t\t\t\ttoUpdate = true;\r\n\t\t\t\t\t\treleaseDiProgetto.setType(bElements[7].trim());\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (bElements[8] != null && bElements[8].trim().length() > 0) {\r\n\t\t\t\t\t\tDate dataCreazione = sdf.parse(bElements[8].trim());\r\n\t\t\t\t\t\tif (!toSave && releaseDiProgetto.getDataCreazione() != null\r\n\t\t\t\t\t\t\t\t&& !releaseDiProgetto.getDataCreazione().equals(dataCreazione))\r\n\t\t\t\t\t\t\ttoUpdate = true;\r\n\t\t\t\t\t\treleaseDiProgetto.setDataCreazione(dataCreazione);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (bElements[9] != null && bElements[9].trim().length() > 0) {\r\n\t\t\t\t\t\tDate dataUltimoAggiornamento = sdf.parse(bElements[9].trim());\r\n\t\t\t\t\t\tif (!toSave && releaseDiProgetto.getDataUpdate() != null\r\n\t\t\t\t\t\t\t\t&& !releaseDiProgetto.getDataUpdate().equals(dataUltimoAggiornamento))\r\n\t\t\t\t\t\t\ttoUpdate = true;\r\n\t\t\t\t\t\treleaseDiProgetto.setDataUpdate(dataUltimoAggiornamento);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (toSave)\r\n\t\t\t\t\t\tHibernateUtil.save(releaseDiProgetto);\r\n\t\t\t\t\telse if (toUpdate)\r\n\t\t\t\t\t\tHibernateUtil.update(Release.class, releaseDiProgetto);\r\n\r\n\t\t\t\t}\r\n\t\t\t\tif (csv.getColonnaC() != null && csv.getColonnaC().length() > 0) {\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * ColonnaC\r\n\t\t\t\t\t * \r\n\t\t\t\t\t * progettoRelease\r\n\t\t\t\t\t */\r\n\t\t\t\t\tString regex = Pattern.quote(\"(\") + \"(.*?)\" + Pattern.quote(\")\");\r\n\t\t\t\t\tPattern pattern = Pattern.compile(regex);\r\n\t\t\t\t\tMatcher matcher = pattern.matcher(csv.getColonnaC());\r\n\t\t\t\t\twhile (matcher.find()) {\r\n\t\t\t\t\t\tString[] history = matcher.group(1).split(Pattern.quote(\"^\"));\r\n\r\n\t\t\t\t\t\tStatus status = null;\r\n\t\t\t\t\t\tif (history.length > 0)\r\n\t\t\t\t\t\t\tstatus = HibernateUtil.readStatus(history[0].trim());\r\n\t\t\t\t\t\tDate dataUpdate = null;\r\n\t\t\t\t\t\tif (history.length > 1)\r\n\t\t\t\t\t\t\tdataUpdate = sdf.parse(history[1]);\r\n\t\t\t\t\t\tUser user = null;\r\n\t\t\t\t\t\tif (history.length > 2)\r\n\t\t\t\t\t\t\tuser = HibernateUtil.readUser(history[2].trim());\r\n\r\n\t\t\t\t\t\tReleaseHistory rHistory = HibernateUtil.readReleaseHistory(releaseDiProgetto, status,\r\n\t\t\t\t\t\t\t\tdataUpdate, user);\r\n\t\t\t\t\t\tif (rHistory == null) {\r\n\t\t\t\t\t\t\trHistory = new ReleaseHistory();\r\n\t\t\t\t\t\t\trHistory.setRelease(releaseDiProgetto);\r\n\t\t\t\t\t\t\trHistory.setStatus(status);\r\n\t\t\t\t\t\t\trHistory.setDataUpdate(dataUpdate);\r\n\t\t\t\t\t\t\trHistory.setUser(user);\r\n\t\t\t\t\t\t\tHibernateUtil.save(rHistory);\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\tif (csv.getColonnaD() != null && csv.getColonnaD().length() > 0) {\r\n\t\t\t\t\t// TODO D\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * ColonnaD\r\n\t\t\t\t\t * \r\n\t\t\t\t\t * progettoSviluppo\r\n\t\t\t\t\t */\r\n\t\t\t\t}\r\n\t\t\t\tif (csv.getColonnaE() != null && csv.getColonnaE().length() > 0) {\r\n\t\t\t\t\t// TODO E\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * ColonnaE\r\n\t\t\t\t\t * \r\n\t\t\t\t\t * progettoMev\r\n\t\t\t\t\t */\r\n\t\t\t\t}\r\n\t\t\t\tif (csv.getColonnaF() != null && csv.getColonnaF().length() > 0) {\r\n\t\t\t\t\t// TODO F\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * ColonnaF\r\n\t\t\t\t\t * \r\n\t\t\t\t\t * progettoDocumento\r\n\t\t\t\t\t */\r\n\t\t\t\t}\r\n\t\t\t\tif (csv.getColonnaG() != null && csv.getColonnaG().length() > 0) {\r\n\t\t\t\t\t// TODO G\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * ColonnaG\r\n\t\t\t\t\t * \r\n\t\t\t\t\t * progettoRds\r\n\t\t\t\t\t */\r\n\t\t\t\t}\r\n\t\t\t\tif (csv.getColonnaH() != null && csv.getColonnaH().length() > 0) {\r\n\t\t\t\t\t// TODO H\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * ColonnaH\r\n\t\t\t\t\t * \r\n\t\t\t\t\t * progettoDefect\r\n\t\t\t\t\t */\r\n\t\t\t\t}\r\n\t\t\t\tif (csv.getColonnaI() != null && csv.getColonnaI().length() > 0) {\r\n\t\t\t\t\t// TODO I\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * ColonnaI\r\n\t\t\t\t\t * \r\n\t\t\t\t\t * progettoAnomalia\r\n\t\t\t\t\t */\r\n\t\t\t\t}\r\n\t\t\t\tReleaseIt releaseIT = null;\r\n\t\t\t\tif (csv.getColonnaJ() != null && csv.getColonnaJ().length() > 0) {\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * ColonnaJ\r\n\t\t\t\t\t * \r\n\t\t\t\t\t * progettoReleaseIt\r\n\t\t\t\t\t */\r\n\t\t\t\t\tboolean hasLinkedItem = false;\r\n\t\t\t\t\tif (csv.getColonnaJ().startsWith(\"<\") && csv.getColonnaJ().endsWith(\">\")) {\r\n\t\t\t\t\t\tcsv.setColonnaJ(csv.getColonnaJ().substring(1, csv.getColonnaJ().length() - 1));\r\n\t\t\t\t\t\thasLinkedItem = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tString[] elements = csv.getColonnaJ().split(Pattern.quote(\"|\"));\r\n\t\t\t\t\tif (hasLinkedItem) {\r\n\t\t\t\t\t\tLinkedItemId lIId = new LinkedItemId();\r\n\t\t\t\t\t\tlIId.setIdPolarionPadre(releaseDiProgetto.getIdPolarion());\r\n\t\t\t\t\t\tlIId.setIdPolarionFiglio(elements[1]);\r\n\t\t\t\t\t\tLinkedItem li = HibernateUtil.readLinkedItem(lIId);\r\n\t\t\t\t\t\tif (li == null) {\r\n\t\t\t\t\t\t\tli = new LinkedItem();\r\n\t\t\t\t\t\t\tli.setId(lIId);\r\n\t\t\t\t\t\t\tHibernateUtil.save(li);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\treleaseIT = HibernateUtil.readReleaseIT(elements[1].trim());\r\n\t\t\t\t\tboolean toSave = false;\r\n\t\t\t\t\tif (releaseIT == null || !releaseIT.getTitolo().equals(elements[2].trim())) {\r\n\t\t\t\t\t\tif (releaseIT == null) {\r\n\t\t\t\t\t\t\treleaseIT = new ReleaseIt();\r\n\t\t\t\t\t\t\treleaseIT.setIdPolarion(elements[1].trim());\r\n\t\t\t\t\t\t\ttoSave = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\treleaseIT.setTitolo(elements[2].trim());\r\n\t\t\t\t\t\tif (elements[3] != null && elements[3].trim().length() > 0){\r\n\t\t\t\t\t\t\tDate d = null;\r\n\t\t\t\t\t\t\ttry{ \r\n\t\t\t\t\t\t\t\td = sdf.parse(elements[3].trim());\r\n\t\t\t\t\t\t\t}catch(ParseException pe){\r\n\t\t\t\t\t\t\t\td = literalSdf.parse(elements[3].trim());\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\treleaseIT.setDataInizio(d);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (elements[4] != null && elements[4].trim().length() > 0){\r\n\t\t\t\t\t\t\ttry{\r\n\t\t\t\t\t\t\t\treleaseIT.setDataFine(sdf.parse(elements[4].trim()));\r\n\t\t\t\t\t\t\t}catch(ParseException pe){\r\n\t\t\t\t\t\t\t\treleaseIT.setDataFine(literalSdf.parse(elements[4].trim()));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (toSave)\r\n\t\t\t\t\t\t\tHibernateUtil.save(releaseIT);\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tHibernateUtil.update(ReleaseIt.class, releaseIT);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (elements.length > 5 && elements[5] != null && elements[5].trim().length() > 0) {\r\n\t\t\t\t\t\tString regex = Pattern.quote(\"(\") + \"(.*?)\" + Pattern.quote(\")\");\r\n\t\t\t\t\t\tPattern pattern = Pattern.compile(regex);\r\n\t\t\t\t\t\tMatcher matcher = pattern.matcher(elements[5].trim());\r\n\t\t\t\t\t\tboolean isFirstRow = true;\r\n\t\t\t\t\t\t// formato sdf per Thu Feb 18 00:00:00 CET 2016\r\n\t\t\t\t\t\twhile (matcher.find()) {\r\n\t\t\t\t\t\t\tString[] history = matcher.group(1).split(Pattern.quote(\"^\"));\r\n\t\t\t\t\t\t\tStatus status = HibernateUtil.readStatus(history[0].trim());\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tDate dataUpdate = null;\r\n\t\t\t\t\t\t\ttry{\r\n\t\t\t\t\t\t\t\tdataUpdate = sdf.parse(history[1]);\r\n\t\t\t\t\t\t\t}catch(ParseException pe){\r\n\t\t\t\t\t\t\t\tdataUpdate = literalSdf.parse(history[1]);\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tif (isFirstRow && releaseIT.getDataCreazione() == null) {\r\n\t\t\t\t\t\t\t\treleaseIT.setDataCreazione(dataUpdate);\r\n\t\t\t\t\t\t\t\tHibernateUtil.update(ReleaseIt.class, releaseIT);\r\n\t\t\t\t\t\t\t\tisFirstRow = false;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tReleaseitHistory rItHistory = null;\r\n\t\t\t\t\t\t\tif (history.length > 2) {\r\n\t\t\t\t\t\t\t\tUser user = HibernateUtil.readUser(history[2].trim());\r\n\t\t\t\t\t\t\t\trItHistory = HibernateUtil.readReleaseItHistory(releaseIT, status, dataUpdate,\r\n\t\t\t\t\t\t\t\t\t\tuser);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif (rItHistory == null) {\r\n\t\t\t\t\t\t\t\trItHistory = new ReleaseitHistory();\r\n\t\t\t\t\t\t\t\trItHistory.setReleaseIt(releaseIT);\r\n\t\t\t\t\t\t\t\trItHistory.setStatus(status);\r\n\t\t\t\t\t\t\t\trItHistory.setDataUpdate(dataUpdate);\r\n\t\t\t\t\t\t\t\tHibernateUtil.save(rItHistory);\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\tif (csv.getColonnaK() != null && csv.getColonnaK().length() > 0) {\r\n\t\t\t\t\t// TODO K\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * ColonnaK\r\n\t\t\t\t\t * \r\n\t\t\t\t\t * taskInfo\r\n\t\t\t\t\t */\r\n\t\t\t\t}\r\n\t\t\t\tif (csv.getColonnaL() != null && csv.getColonnaL().length() > 0) {\r\n\t\t\t\t\t// TODO L\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * ColonnaL\r\n\t\t\t\t\t * \r\n\t\t\t\t\t * workRecordInfo\r\n\t\t\t\t\t */\r\n\t\t\t\t}\r\n\t\t\t\tif (csv.getColonnaM() != null && csv.getColonnaM().length() > 0) {\r\n\t\t\t\t\t// TODO M\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * ColonnaM\r\n\t\t\t\t\t * \r\n\t\t\t\t\t * infoTestcase\r\n\t\t\t\t\t */\r\n\t\t\t\t}\r\n\t\t\t\tif (csv.getColonnaN() != null && csv.getColonnaN().length() > 0) {\r\n\t\t\t\t\t// TODO N\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * ColonnaN\r\n\t\t\t\t\t * \r\n\t\t\t\t\t * infoChecklist\r\n\t\t\t\t\t */\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tLogger.getLogger(Scheduler.class.getName()).log(Level.SEVERE, null, e);\r\n\t\t}\r\n\t}", "private void save_items(Connection connection, String table_name, String[] columns,\r\n int url_id, LinkedList<String> values) throws SQLException{\r\n \r\n PreparedStatement prep_state = create_prepared_insert(connection, table_name, columns);\r\n Iterator values_it = values.iterator();\r\n \r\n int counter = 1;\r\n while(values_it.hasNext()){\r\n String word = (String) values_it.next();\r\n String[] storing_values = {Integer.toString(url_id), word};\r\n set_strings(prep_state, storing_values);\r\n \r\n prep_state.addBatch();\r\n \r\n if(counter % batch_limit == 0){\r\n prep_state.executeBatch();\r\n }\r\n }\r\n \r\n prep_state.executeBatch();\r\n \r\n close_prepared_statement(prep_state);\r\n }", "List<T> saveOrUpdateList(final List<T> entitiesList);", "public void persistAll(final Collection<? extends Object> objs) {\n txTemplate.execute(new TransactionCallbackWithoutResult() {\n @Override\n public void doInTransactionWithoutResult(TransactionStatus status) {\n HibernateTemplate ht = getHibernateTemplate();\n ht.saveOrUpdateAll(objs);\n }\n });\n }", "private void updateSuiteItems(String rowDatas, CustomSuite newCustomSuite) {\n List<SuiteItem> suiteItems = newCustomSuite.suiteItems;\n //创建一个List容器记录原来的 明细ID\n List<Long> itemIds = new ArrayList<>();\n for (SuiteItem suiteItem : suiteItems) {\n if(!suiteItem.deleted)\n itemIds.add(suiteItem.id);\n }\n\n String[] rowData = rowDatas.split(\";\");\n SuiteItem suiteItem;\n CustomStockItem customStockItem;\n for (String data : rowData) {\n String[] datas = data.split(\",\");\n if (datas.length > 1) {\n long id = Long.valueOf(datas[0]);\n if (id != 0) {\n if(itemIds.contains(id)){\n //update\n suiteItem = suiteItemRepository.findOne(id);\n if (datas[2].equals(\"true\")) {\n suiteItem.times = -1;\n } else {\n suiteItem.times = Integer.valueOf(datas[3]);\n }\n suiteItem.cost = Double.valueOf(datas[4]);\n itemIds.remove(id);//更新一个后 从Id集合中移除\n }\n } else {\n //新增\n\n customStockItem = customStockItemRepository.findOne(Long.valueOf(datas[1]));\n\n List<SuiteItem> isHasOne = suiteItemRepository.findBySkuItemAndCostAndDeleted(customStockItem, Double.valueOf(datas[4]), true);\n if(isHasOne != null && isHasOne.size()>0 ){\n isHasOne.get(0).deleted = false;\n if (datas[2].equals(\"true\")) {\n isHasOne.get(0).times = -1;\n } else {\n isHasOne.get(0).times = Integer.valueOf(datas[3]);\n }\n }else{\n suiteItem = new SuiteItem();\n suiteItem.skuItem = customStockItem;\n if (datas[2].equals(\"true\")) {\n suiteItem.times = -1;\n } else {\n suiteItem.times = Integer.valueOf(datas[3]);\n }\n suiteItem.cost = Double.valueOf(datas[4]);\n suiteItems.add(suiteItem);\n suiteItemRepository.save(suiteItem);\n }\n }\n }\n }\n //rowData操作完成\n for (Long itemId : itemIds) {\n SuiteItem deleteOne = suiteItemRepository.findOne(itemId);\n deleteOne.deleted = true;\n }\n// return suiteItems;\n }", "Collection<E> save(Iterable<E> entities);", "public void updateDatabase()\n\t{\n\t\tCSVRecordLoader ldr = new CSVRecordLoader();\n\t\tfor(Record<?> cr : ldr.getRecordPluginManagers())\n\t\t{\n\t\t\tcr.updateTable();\n\t\t}\n\t}", "public void save() {\n //write lift information to datastore\n LiftDataAccess lda = new LiftDataAccess();\n ArrayList<Long>newKeys = new ArrayList<Long>();\n for (Lift l : lift) {\n newKeys.add(lda.insert(l));\n }\n\n //write resort information to datastore\n liftKeys = newKeys;\n dao.update(this);\n }", "@Test\n public void ItemMapperTest(){\n// item.setItemCode(UUID.randomUUID().toString().substring(0,5));\n// itemMapper.updateByPrimaryKeySelective(item);\n// System.out.println(item.toString());\n\n ItemMapper itemMapper1 = sqlSession.getMapper(ItemMapper.class);\n//\n for(int i=22;i<25;i++){\n Item item1 = new Item(UUID.randomUUID().toString().substring(0,5),\"米\",\"无\",new Date(),new Date());\n// item1.setItemId((long)i);\n// Item item1 = new Item();\n item1.setItemId((long)i);\n item1.setItemCode(\"ITEM00\"+i);\n itemMapper1.insertBatch(item1);\n// System.out.println(itemMapper1.selectByPrimaryKey((long)i).toString());\n }\n }", "protected void persist(T[] items) {\n\t\tSession session = null;\n\t\ttry {\n\t\t\tsession = mDbHelper.beginTransaction();\n\n\t\t\tfor (T item : items) {\n\t\t\t\tsession.persist(item);\n\t\t\t}\n\n\t\t\tmDbHelper.endTransaction(session);\n\t\t} catch (Exception e) {\n\t\t\tmDbHelper.cancelTransaction(session);\n\t\t\tAppLogger.error(e, \"Failed to execute persist\");\n\t\t}\n\t}", "private void persistEntities(List<Entity> entities) {\n jdbcTemplate.batchUpdate(\n \"insert into entity (id, num, realm, shard, timestamp_range, type) \"\n + \"values (?, ?, ?, ?, ?::int8range, ?::entity_type)\",\n entities,\n entities.size(),\n (ps, entity) -> {\n ps.setLong(1, entity.getId());\n ps.setLong(2, entity.getNum());\n ps.setLong(3, entity.getRealm());\n ps.setLong(4, entity.getShard());\n ps.setString(5, PostgreSQLGuavaRangeType.INSTANCE.asString(entity.getTimestampRange()));\n ps.setString(6, entity.getType().toString());\n });\n\n jdbcTemplate.batchUpdate(\n \"insert into entity_history (id, num, realm, shard, timestamp_range, type) \"\n + \"values (?, ?, ?, ?, ?::int8range, ?::entity_type)\",\n entities,\n entities.size(),\n (ps, entity) -> {\n ps.setLong(1, entity.getId());\n ps.setLong(2, entity.getNum());\n ps.setLong(3, entity.getRealm());\n ps.setLong(4, entity.getShard());\n ps.setString(5, PostgreSQLGuavaRangeType.INSTANCE.asString(entity.getTimestampRange()));\n ps.setString(6, entity.getType().toString());\n });\n }", "private void updates() {\n \tDBPeer.fetchTableRows();\n DBPeer.fetchTableIndexes();\n \n for (Update update: updates) {\n \tupdate.init();\n }\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic List<Long> insertAll(List<?> list) throws Exception {\n\t\tSQLiteDatabase db = getWritableDatabase();\n\t\ttry {\n\t\t\tList result = new ArrayList();\n\t\t\tfor (Iterator localIterator = list.iterator(); localIterator\n\t\t\t\t\t.hasNext();) {\n\t\t\t\tObject o = localIterator.next();\n\t\t\t\tresult.add(Long.valueOf(insert(db, o)));\n\t\t\t}\n\t\t\tList localList1 = result;\n\t\t\treturn localList1;\n\t\t} finally {\n\t\t\tif (!db.inTransaction())\n\t\t\t\tdb.close();\n\t\t}\n\t}", "@Test\r\n\tpublic void testPLFM_1978_createOrUpdateBatch(){\n\t\tList<DBOFileHandle> list = new LinkedList<DBOFileHandle>();\r\n\t\t// pass the empty list should return an empty result\r\n\t\tList<Long> results = migratableTableDAO.createOrUpdateBatch(list);\r\n\t\tassertNotNull(results);\r\n\t\tassertEquals(0, results.size());\r\n\t}", "public int toDatabase()\r\n\t{\r\n\t\tRationaleDB db = RationaleDB.getHandle();\r\n\t\tConnection conn = db.getConnection();\r\n\t\t\r\n\t\tint ourid = 0;\r\n\r\n\t\t// Update Event To Inform Subscribers Of Changes\r\n\t\t// To Rationale\r\n\t\tRationaleUpdateEvent l_updateEvent;\t\t\r\n\t\t\r\n\t\t//find out if this tradeoff is already in the database\r\n\t\tStatement stmt = null; \r\n\t\tResultSet rs = null; \r\n\t\t\r\n//\t\tSystem.out.println(\"Saving to the database\");\r\n\t\t\r\n\t\ttry {\r\n\t\t\tstmt = conn.createStatement(); \r\n\t\t\t\r\n\t\t\t//now we need to find our ontology entries, and that's it!\r\n\t\t\tString findQuery3 = \"SELECT id FROM OntEntries where name='\" +\r\n\t\t\tRationaleDBUtil.escape(this.ont1.getName()) + \"'\";\r\n\t\t\trs = stmt.executeQuery(findQuery3); \r\n//\t\t\t***\t\t\tSystem.out.println(findQuery3);\r\n\t\t\tint ontid1;\r\n\t\t\tif (rs.next())\r\n\t\t\t{\r\n\t\t\t\tontid1 = rs.getInt(\"id\");\r\n//\t\t\t\trs.close();\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tontid1 = 0;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//now we need to find our ontology entries\r\n\t\t\tString findQuery4 = \"SELECT id FROM OntEntries where name='\" +\r\n\t\t\tRationaleDBUtil.escape(this.ont2.getName()) + \"'\";\r\n\t\t\trs = stmt.executeQuery(findQuery4); \r\n//\t\t\t***\t\t\tSystem.out.println(findQuery4);\r\n\t\t\tint ontid2;\r\n\t\t\tif (rs.next())\r\n\t\t\t{\r\n\t\t\t\tontid2 = rs.getInt(\"id\");\r\n//\t\t\t\trs.close();\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tontid2 = 0;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tString trade;\r\n\t\t\tif (tradeoff)\r\n\t\t\t{\r\n\t\t\t\ttrade = \"Tradeoff\";\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\ttrade = \"Co-Occurrence\";\r\n\t\t\t}\r\n\t\t\tString sym;\r\n\t\t\tsym = new Boolean(symmetric).toString();\r\n\t\t\t\r\n\t\t\t/*\r\n\t\t\t String findQuery = \"SELECT id FROM tradeoffs where name='\" +\r\n\t\t\t this.name + \"'\";\r\n\t\t\t System.out.println(findQuery);\r\n\t\t\t rs = stmt.executeQuery(findQuery); \r\n\t\t\t \r\n\t\t\t if (rs.next())\r\n\t\t\t {\r\n\t\t\t System.out.println(\"already there\");\r\n\t\t\t ourid = rs.getInt(\"id\");\r\n\t\t\t //\t\t\t\trs.close();\r\n\t\t\t */\r\n\t\t\t\r\n\t\t\tif (this.id > 0)\r\n\t\t\t{\t\t\t\t\r\n\t\t\t\t//now, update it with the new information\r\n\t\t\t\tString updateOnt = \"UPDATE Tradeoffs \" +\r\n\t\t\t\t\"SET name = '\" +\r\n\t\t\t\tRationaleDBUtil.escape(this.name) + \"', \" +\r\n\t\t\t\t\"description = '\" +\r\n\t\t\t\tRationaleDBUtil.escape(this.description) + \"', \" +\r\n\t\t\t\t\"type = '\" + \r\n\t\t\t\ttrade + \"', \" +\r\n\t\t\t\t\"symmetric = '\" +\r\n\t\t\t\tsym + \"', \" +\r\n\t\t\t\t\"ontology1 = \" + new Integer(ontid1).toString() + \", \" +\r\n\t\t\t\t\"ontology2 = \" + new Integer(ontid2).toString() +\r\n\t\t\t\t\" WHERE \" +\r\n\t\t\t\t\"id = \" + this.id + \" \" ;\r\n//\t\t\t\tSystem.out.println(updateOnt);\r\n\t\t\t\tstmt.execute(updateOnt);\r\n\t\t\t\t\r\n\t\t\t\tourid = this.id;\r\n\t\t\t\t\r\n\t\t\t\tl_updateEvent = m_eventGenerator.MakeUpdated();\r\n\t\t\t\t//\t\t\tSystem.out.println(\"sucessfully added?\");\r\n\t\t\t}\r\n\t\t\telse \r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\t//now, we have determined that the tradeoff is new\r\n\t\t\t\t\r\n\t\t\t\tString newArgSt = \"INSERT INTO Tradeoffs \" +\r\n\t\t\t\t\"(name, description, type, symmetric, ontology1, ontology2) \" +\r\n\t\t\t\t\"VALUES ('\" +\r\n\t\t\t\tRationaleDBUtil.escape(this.name) + \"', '\" +\r\n\t\t\t\tRationaleDBUtil.escape(this.description) + \"', '\" +\r\n\t\t\t\ttrade + \"', '\" +\r\n\t\t\t\tsym + \"', \" +\r\n\t\t\t\tnew Integer(ontid1).toString() + \", \" +\r\n\t\t\t\tnew Integer(ontid2).toString() + \")\";\r\n\t\t\t\t\r\n//\t\t\t\tSystem.out.println(newArgSt);\r\n\t\t\t\tstmt.execute(newArgSt); \r\n//\t\t\t\tSystem.out.println(\"inserted stuff\");\r\n\t\t\t\t\r\n//\t\t\t\tnow, we need to get our ID\r\n\t\t\t\tString findQuery2 = \"SELECT id FROM tradeoffs where name='\" +\r\n\t\t\t\tRationaleDBUtil.escape(this.name) + \"'\";\r\n\t\t\t\trs = stmt.executeQuery(findQuery2); \r\n\t\t\t\t\r\n\t\t\t\tif (rs.next())\r\n\t\t\t\t{\r\n\t\t\t\t\tourid = rs.getInt(\"id\");\r\n\t\t\t\t\trs.close();\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tourid = -1;\r\n\t\t\t\t}\r\n\t\t\t\tthis.id = ourid;\r\n\t\t\t\t\r\n\t\t\t\tl_updateEvent = m_eventGenerator.MakeCreated();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tm_eventGenerator.Broadcast(l_updateEvent);\r\n\t\t} catch (SQLException ex) {\r\n\t\t\tRationaleDB.reportError(ex, \"Tradeoff.toDatabase\", \"SQL Error\");\r\n\t\t}\r\n\t\t\r\n\t\tfinally { \r\n\t\t\tRationaleDB.releaseResources(stmt, rs);\r\n\t\t}\r\n\t\t\r\n\t\treturn ourid;\t\r\n\t\t\r\n\t}", "public void setRouteCapacaties(ArrayList theCommodities, int aCapacity){ \n //construct sql query\n String theCapacityEnquiery = \"select commodity from route_capacity where route = \"+id+\";\";\n ResultSet theExistingCapcacaties = NRFTW_Trade.dBQuery(theCapacityEnquiery);\n ArrayList theExisitingCapacityStrings = new ArrayList(); \n try{\n //unpack results\n while(theExistingCapcacaties.next()){\n \n theExisitingCapacityStrings.add(theExistingCapcacaties.getString(1));\n }\n }catch(SQLException ex){\n System.out.println(ex);\n }\n //make sure existing capacaties use set rather than insert queries \n //itterate through the existing capacaties\n //for each, write a \"Set\" query\n //delete relevent comodity from the Commodities\n String theCapacityUpdateQuery = \"update route_capacity set rate = \"+aCapacity+\" where route = \"+id+\" and commodity in('\";\n String theCapacityInsertQuery = \"insert into route_capacity(route, commodity, rate) values \";\n int insertCount = 0;\n int updateCount = 0;\n // for each commodity\n for(Iterator<Commodity> commodityItterator = theCommodities.iterator(); commodityItterator.hasNext();){\n Commodity aCommodity = commodityItterator.next();\n if(theExisitingCapacityStrings.contains(aCommodity.theName)){\n if(updateCount > 0){\n theCapacityUpdateQuery += \",'\";\n }\n theCapacityUpdateQuery += aCommodity.theName+\"'\";\n updateCount = updateCount+1;\n }else{\n if(insertCount > 0){\n theCapacityInsertQuery += \",\";\n }\n theCapacityInsertQuery += \"(\"+id+\",'\"+aCommodity.theName+\"',\"+aCapacity+\")\";\n insertCount = insertCount+1; \n }\n }\n theCapacityInsertQuery += \";\";\n theCapacityUpdateQuery += \");\";\n if(insertCount >0){\n NRFTW_Trade.dBUpdate(theCapacityInsertQuery);\n }\n if(updateCount >0){\n NRFTW_Trade.dBUpdate(theCapacityUpdateQuery);\n }\n // insert line in route_capacaties\n //update db\n }", "@Override\n public void beginDatabaseBatchWrite() throws BlockStoreException {\n if (!autoCommit) {\n return;\n }\n if (instrument)\n beginMethod(\"beginDatabaseBatchWrite\");\n\n batch = db.createWriteBatch();\n uncommited = new HashMap<ByteBuffer, byte[]>();\n uncommitedDeletes = new HashSet<ByteBuffer>();\n utxoUncommittedCache = new HashMap<ByteBuffer, UTXO>();\n utxoUncommittedDeletedCache = new HashSet<ByteBuffer>();\n autoCommit = false;\n if (instrument)\n endMethod(\"beginDatabaseBatchWrite\");\n }", "public void saveOrderDayInfos(OrderDayInfo[] orderDayInfos) {\n\t\ttry {\r\n\t\t\tgetSqlMapClientTemplate().getSqlMapClient().startBatch();\r\n\r\n\t\t\tfor(int i = 0;i < orderDayInfos.length;i++){\r\n\t\t\t\t OrderDayInfo orderDayInfo = orderDayInfos[i];\r\n\t\t\t\t\r\n\t\t\t\t\tLong id = orderDayInfo.getId(); \r\n\t\t\t\t\tint dayTimes = orderDayInfo.getAdDayTimes().intValue();\r\n\t\t\t\t\tboolean isNew = (id == null || id.longValue() == 0) ? true : false;\r\n\t\t\t\t\tint need=orderDayInfo.getNeedPublish().intValue();\r\n\t\t\t\t\t\r\n//\t\t\t\t\tSystem.out.println(\"saveOrderDayInfos isNew >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>needCal>>>>>>\" + isNew);\r\n//\t\t\t\t\tSystem.out.println(\"saveOrderDayInfos dayTimes >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>needCal>>>>>>\" + dayTimes);\r\n//\t\t\t\t\tSystem.out.println(\"saveOrderDayInfos need >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>needCal>>>>>>\" + need);\r\n\t\t\t\t\tif (isNew && dayTimes > 0&& need!=1) {\r\n\t\t\t\t\t\t getSqlMapClientTemplate().getSqlMapClient().insert(\"addOrderDayInfo\", orderDayInfo);\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 for(int i = 0;i < orderDayInfos.length;i++){\r\n\t\t\t\tOrderDayInfo orderDayInfo = orderDayInfos[i];\r\n\t\t\t\t \r\n\t\t\t\tLong id = orderDayInfo.getId();\r\n\t\t\t\tint dayTimes = orderDayInfo.getAdDayTimes().intValue();\r\n\t\t\t\tboolean isNew = (id == null || id.longValue() == 0) ? true\r\n\t\t\t\t\t\t: false;\r\n\r\n\t\t\t\tif (!isNew && dayTimes == 0) {\r\n\t\t\t\t\tgetSqlMapClientTemplate().getSqlMapClient().update(\r\n\t\t\t\t\t\t\t\"deleteOrderDayInfo\", id);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\t\t\t\r\n\t\t\t\r\n\t\t\tfor(int i = 0;i < orderDayInfos.length;i++){\r\n\t\t\t\t \tOrderDayInfo orderDayInfo = orderDayInfos[i];\r\n\t\t\t\t\tLong id = orderDayInfo.getId();\r\n\t\t\t\t\tint dayTimes = orderDayInfo.getAdDayTimes().intValue();\r\n\t\t\t\t\tboolean isNew = (id == null || id.longValue() == 0) ? true : false;\t\t\t\t \r\n\t\t\t\t \r\n\t\t\t\t\tif (!isNew && dayTimes > 0) {\r\n\t\t\t\t\t\tgetSqlMapClientTemplate().getSqlMapClient().update(\"updateOrderDayInfo\", orderDayInfo);\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t}\t\r\n\t\t\t//updateDayInfo\r\n\t\t\tfor(int i = 0;i < orderDayInfos.length;i++){\r\n\t\t\t\t OrderDayInfo orderDayInfo = orderDayInfos[i];\r\n//\t\t\t\t System.out.println(orderDayInfo.getDayInfo().getId()+\"???\"+orderDayInfo.getDayInfo().getUsed());\r\n\t\t\t\t if(orderDayInfo.getNeedPublish().intValue()!=1)\r\n\t\t\t\t\t \tgetSqlMapClientTemplate().getSqlMapClient().update(\"updateDayInfo-saveOrderDetail\", orderDayInfo.getDayInfo());\r\n\t\t\t}\r\n\t\t\tgetSqlMapClientTemplate().getSqlMapClient().executeBatch();\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public static void saveOrUpdateSchoolData(Context context, List<SchoolModel> schoolDataList) {\n\n if(schoolDataList!=null && schoolDataList.size()>0) {\n for (SchoolModel schoolModel : schoolDataList) {\n\n ContentResolver resolver;\n resolver = context.getContentResolver();\n ContentValues values = prepareData(schoolModel);\n\n Cursor cursor;\n String condition = SchoolTable.Cols.ID + \"= '\" + schoolModel.getId() + \"'\";\n cursor = context.getContentResolver().query(SchoolTable.URI, null, condition, null, null);\n\n if (cursor != null && cursor.getCount() != 0) {\n resolver.update(SchoolTable.URI, values, condition, null);\n } else {\n resolver.insert(SchoolTable.URI, values);\n }\n }\n }\n }", "private void insertData() {\n for (int i = 0; i < 3; i++) {\n PodamFactory factory = new PodamFactoryImpl();\n VisitaEntity entity = factory.manufacturePojo(VisitaEntity.class);\n em.persist(entity);\n data.add(entity);\n }\n }", "public void setAchievments(ArrayList<Achievment> arrayList) {\r\n\t\tDB db = new DB();\r\n\t\tTransaction trans = db.session.beginTransaction();\r\n\t\ttry {\r\n\t\t\tfor (Achievment achiev : arrayList)\r\n\t\t\t\tdb.session.saveOrUpdate(achiev);\r\n\t\t\ttrans.commit();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\ttrans.rollback();\r\n\t\t}\r\n\t}", "public void saveAll() {\n\n if (schedule != null) {\n\n readWrite.save(schedule, buddies);\n }\n if (finalsList != null) {\n\n readWrite.save(finalsList, finalsTerm);\n }\n }", "private static void deploy(SQLiteDatabase sqlLiteDb, InputStreamReader dbReader) throws IOException {\n String sqlLine = null;\n StringBuffer sqlBuffer = new StringBuffer();\n BufferedReader bufferedReader = new BufferedReader(dbReader);\n\n sqlLiteDb.beginTransaction();\n try {\n while ((sqlLine = bufferedReader.readLine()) != null) {\n String sql = sqlLine.trim();\n if (!isIgnoreSQL(sql)) {\n if (sql.endsWith(\";\")) {\n sqlBuffer.append(sql);\n String execSQL = sqlBuffer.toString();\n Log.d(TAG, \"running sql=>\" + execSQL);\n sqlLiteDb.execSQL(execSQL);\n sqlBuffer.delete(0, sqlBuffer.length());\n } else {\n if (sqlBuffer.length() > 0) {\n sqlBuffer.append(' ');\n }\n sqlBuffer.append(sql);\n }\n }\n }\n sqlLiteDb.setTransactionSuccessful();\n } finally {\n sqlLiteDb.endTransaction();\n }\n }", "public void getExistingData() {\n SQLiteDatabase db = databaseHelper.getReadableDatabase();\n\n /* Get day ids and dates */\n String[] projection = {TableConstants.DayId, TableConstants.DayDate};\n\n /* Create an arraylist of the dates and Dayid*/\n ArrayList<String> dates = new ArrayList<>();\n ArrayList<Integer> dayIds = new ArrayList<>();\n\n /* Query the exercise table based on the exercise id to get all the associated exercises */\n Cursor c = db.query(TableConstants.DayTableName, projection,\n TableConstants.ExerciseId + \" = \" + exerciseId, null, null, null, null);\n\n c.moveToFirst();\n\n /* Insert the dayId and dates into their arrays */\n while (!c.isAfterLast()) {\n dayIds.add(c.getInt(0));\n dates.add(c.getString(1));\n c.moveToNext();\n }\n\n\n Log.e(TAG, \"Daysize = \" + dayIds.size());\n\n db = databaseHelper.getReadableDatabase();\n\n /* Get the sets for each day */\n int i = 0;\n for (Integer dayId : dayIds) {\n /* Query the sets table based on dayId */\n String[] projection2 = {TableConstants.LiftSetsId, TableConstants.LiftSetReps, TableConstants.LiftSetWeight};\n c = db.query(TableConstants.LiftSetsTableName, projection2, TableConstants.DayId + \" = \"\n + dayId, null, null, null, null);\n\n\n ArrayList<LiftSet> liftSets = new ArrayList<>();\n\n /* Add all lifts for the day into a new array */\n c.moveToFirst();\n while (!c.isAfterLast()) {\n liftSets.add(new LiftSet(1, c.getInt(0), c.getInt(1), c.getDouble(2)));\n Log.e(TAG, \"HERE\");\n c.moveToNext();\n }\n\n /* Add the lift set and date to pastLiftSets */\n pastLiftItems.add(0, new PastLiftItem(liftSets, dates.get(i++)));\n\n c.close();\n }\n db.close();\n }", "protected void insertDataIntoRecordings(Collection<Track> tracks) {\n\t\t// what happens if data already there?\n\t\t// big issue :(\n\t\t\n\t\t\ttry {\n\t\t\t\tPreparedStatement prep = conn.prepareStatement(\"INSERT INTO Recordings values (?, ?);\");\n\t\t\t\t\n\t\t\t\tfor (Track t : tracks) {\n\t\t\t\t\tprep.setString(1, t.getArtist());\n\t\t\t\t\tprep.setString(2, t.getName());\n\t\t\t\t\tprep.addBatch();\n\t\t\t\t\tSystem.out.println(\"Added \" +t.getArtist()+ \", \" +t.getName()+\" to recordings\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tconn.setAutoCommit(false);\n\t \tprep.executeBatch();\n\t \tconn.setAutoCommit(true);\n\t \t\n\t\t\t} catch (SQLException e) {\n\t\t\t\tSystem.out.println(\"Something went wrong with inserting batched data into Recordings\");\n\t\t\t\tSystem.out.println(\"Check System.err for details\");\n\t\t\t\te.printStackTrace(System.err);\n\t\t\t}\n\t\t\t\n\t}", "private void insertData() {\n \n for (int i = 0; i < 4; i++) {\n EmpleadoEntity entity = factory.manufacturePojo(EmpleadoEntity.class);\n entity.setSolicitudes(new ArrayList<>());\n entity.setPropuestas(new ArrayList<>());\n entity.setInvitaciones(new ArrayList<>());\n entity.setTipoEmpleado(TipoEmpleado.TRADUCTOR);\n if(i == 0)\n {\n SolicitudEntity solicitud = factory.manufacturePojo(SolicitudEntity.class);\n em.persist(solicitud);\n entity.getSolicitudes().add(solicitud);\n solicitud.setEmpleado(entity);\n solicitudesData.add(solicitud);\n }\n else if (i == 1)\n {\n InvitacionEntity invitacion = factory.manufacturePojo(InvitacionEntity.class);\n em.persist(invitacion);\n entity.getInvitaciones().add(invitacion); \n invitacion.setEmpleado(entity);\n invitacionesData.add(invitacion);\n }\n else if (i == 2){\n PropuestaEntity propuesta = factory.manufacturePojo(PropuestaEntity.class);\n em.persist(propuesta);\n entity.getPropuestas().add(propuesta);\n propuesta.setEmpleado(entity);\n propuestasData.add(propuesta);\n }\n em.persist(entity);\n data.add(entity);\n }\n }", "public void insertPlaylistTabData(ArrayList<PlaylistDto> playlistDtoArrayList, SQLiteDatabase database,long categoriesId) {\n try {\n database.enableWriteAheadLogging();\n ContentValues initialValues;\n\n for (PlaylistDto playlistDto : playlistDtoArrayList) {\n if(!isPlaylistAvailableInDB(database,playlistDto.getPlaylistId())) {\n initialValues = new ContentValues();\n initialValues.put(KEY_PLAYLIST_NAME, playlistDto.getPlaylistName());\n initialValues.put(KEY_PLAYLIST_ID, playlistDto.getPlaylistId());\n initialValues.put(KEY_PLAYLIST_THUMB_URL, playlistDto.getPlaylistThumbnailUrl());\n initialValues.put(KEY_PLAYLIST_SHORT_DESC, playlistDto.getPlaylistShortDescription());\n initialValues.put(KEY_PLAYLIST_LONG_DESC, playlistDto.getPlaylistLongDescription());\n initialValues.put(KEY_PLAYLIST_TAGS, playlistDto.getPlaylistTags());\n initialValues.put(KEY_PLAYLIST_REFERENCE_ID, playlistDto.getPlaylistReferenceId());\n initialValues.put(KEY_CATEGORIES_ID, categoriesId);\n initialValues.put(KEY_PLAYLIST_MODIFIED, playlistDto.getPlaylist_modified());\n\n database.insert(PLAYLIST_DATA_TABLE, null, initialValues);\n }\n else\n {\n ContentValues updateInitialValues = new ContentValues();\n updateInitialValues.put(KEY_PLAYLIST_NAME, playlistDto.getPlaylistName());\n updateInitialValues.put(KEY_PLAYLIST_ID, playlistDto.getPlaylistId());\n updateInitialValues.put(KEY_PLAYLIST_THUMB_URL, playlistDto.getPlaylistThumbnailUrl());\n updateInitialValues.put(KEY_PLAYLIST_SHORT_DESC, playlistDto.getPlaylistShortDescription());\n updateInitialValues.put(KEY_PLAYLIST_LONG_DESC, playlistDto.getPlaylistLongDescription());\n updateInitialValues.put(KEY_PLAYLIST_TAGS, playlistDto.getPlaylistTags());\n updateInitialValues.put(KEY_PLAYLIST_REFERENCE_ID, playlistDto.getPlaylistReferenceId());\n updateInitialValues.put(KEY_CATEGORIES_ID, categoriesId);\n updateInitialValues.put(KEY_PLAYLIST_MODIFIED, playlistDto.getPlaylist_modified());\n\n database.update(PLAYLIST_DATA_TABLE, updateInitialValues, KEY_PLAYLIST_ID + \"=?\",\n new String[]{\"\" + playlistDto.getPlaylistId()});\n }\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "protected void save(T[] items) {\n\t\tSession session = null;\n\t\ttry {\n\t\t\tsession = mDbHelper.beginTransaction();\n\n\t\t\tfor (T item : items) {\n\t\t\t\tsession.save(item);\n\t\t\t}\n\n\t\t\tmDbHelper.endTransaction(session);\n\t\t} catch (Exception e) {\n\t\t\tmDbHelper.cancelTransaction(session);\n\t\t\tAppLogger.error(e, \"Failed to execute save\");\n\t\t}\n\t}", "public static void populateDBSF() throws HibernateException, IOException {\n\t\tif(prev == DBMode.SF)\n\t\t\treturn;\n\t\t\n\t\t// if the salesforce method was not run previously, truncate the DB before run\n\t\ttruncateDB();\n\t\t\n\t\tSession session = HibernateUtil.getSession().openSession();\n\t\tTransaction tx = session.beginTransaction();\n\t\ttry {\n\n\t\t\t// INSERT DUMMY VALUES IntegerO TF_BATCH_LOCATION\n\t\t\tpopulateBatchLocation(1, \"Revature LLC, 11730 Plaza America Drive, 2nd Floor | Reston, VA 20190\", session);\n\t\t\tpopulateBatchLocation(2, \"UMUC\", session);\n\t\t\tpopulateBatchLocation(3, \"USF\", session);\n\t\t\tpopulateBatchLocation(4, \"SkySong Innovation Center, 1475 N. Scottsdale Road, Scottsdale, AZ 85257\",\n\t\t\t\t\tsession);\n\t\t\tpopulateBatchLocation(5,\n\t\t\t\t\t\"Tech Incubator at Queens College, 65, 30 Kissena Blvd, CEP Hall 2, Queens, NY 11367\", session);\n\t\t\tpopulateBatchLocation(6, \"CUNY, SPS 119 West 31st Street, New York, NY 10001\", session);\n\n\t\t\t// INSERT DUMMY VALUES IntegerO TF_Interview_TYPE TABLE\n\t\t\tpopulateInterviewType(1, \"Phone\", session);\n\t\t\tpopulateInterviewType(2, \"Online\", session);\n\t\t\tpopulateInterviewType(3, \"On, Site\", session);\n\t\t\tpopulateInterviewType(4, \"Skype\", session);\n\n\t\t\t// INSERT DUMMY VALUES IntegerO TF_CURRICULUM TABLE\n\t\t\tpopulateCurriculum(1, \"JTA\", session);\n\t\t\tpopulateCurriculum(2, \"Java\", session);\n\t\t\tpopulateCurriculum(3, \".Net\", session);\n\t\t\tpopulateCurriculum(4, \"PEGA\", session);\n\t\t\tpopulateCurriculum(5, \"DynamicCRM\", session);\n\t\t\tpopulateCurriculum(6, \"Salesforce\", session);\n\t\t\tpopulateCurriculum(7, \"Microservices\", session);\n\t\t\tpopulateCurriculum(8, \"SEED\", session);\n\t\t\tpopulateCurriculum(9, \"Oracle Fusion\", session);\n\n\t\t\t// INSERT DUMMY VALUES IntegerO TF_MARKETING_STATUS\n\t\t\tpopulateMarketingStatus(1, \"MAPPED, TRAINING\", session);\n\t\t\tpopulateMarketingStatus(2, \"MAPPED, RESERVED\", session);\n\t\t\tpopulateMarketingStatus(3, \"MAPPED, SELECTED\", session);\n\t\t\tpopulateMarketingStatus(4, \"MAPPED, CONFIRMED\", session);\n\t\t\tpopulateMarketingStatus(5, \"MAPPED, DEPLOYED\", session);\n\n\t\t\tpopulateMarketingStatus(6, \"UNMAPPED, TRAINING\", session);\n\t\t\tpopulateMarketingStatus(7, \"UNMAPPED, OPEN\", session);\n\t\t\tpopulateMarketingStatus(8, \"UNMAPPED, SELECTED\", session);\n\t\t\tpopulateMarketingStatus(9, \"UNMAPPED, CONFIRMED\", session);\n\t\t\tpopulateMarketingStatus(10, \"UNMAPPED, DEPLOYED\", session);\n\t\t\tpopulateMarketingStatus(11, \"DIRECTLY PLACED\", session);\n\t\t\tpopulateMarketingStatus(12, \"TERMINATED\", session);\n\n\t\t\tpopulateClient(0, \"22nd Century Staffing Inc\", session);\n\t\t\tpopulateClient(1, \"22nd Century Technologies\", session);\n\t\t\tpopulateClient(2, \"3 Edge USA Group, LLC\", session);\n\t\t\tpopulateClient(3, \"3 S Business Corporation Inc (BlackListed)\", session);\n\t\t\tpopulateClient(4, \"9to9 Software Solutions, LLC\", session);\n\t\t\tpopulateClient(5, \"A.C.Coy Corporation\", session);\n\t\t\tpopulateClient(6, \"A1 KAISER, Inc\", session);\n\t\t\tpopulateClient(7, \"AAA Global Technologies, LLC\", session);\n\t\t\tpopulateClient(8, \"Aalacom Consulting\", session);\n\t\t\tpopulateClient(9, \"ABB Ltd. (North America)\", session);\n\t\t\tpopulateClient(10, \"ABBTECH\", session);\n\t\t\tpopulateClient(11, \"Accelerated Innovators, Inc\", session);\n\t\t\tpopulateClient(12, \"ACCEL Integerernational, Inc\", session);\n\t\t\tpopulateClient(13, \"Accenture , Cigna\", session);\n\t\t\tpopulateClient(14, \"Accenture , Fannie Mae\", session);\n\t\t\tpopulateClient(15, \"Accenture , Highmark\", session);\n\t\t\tpopulateClient(16, \"Accenture , Kohls\", session);\n\t\t\tpopulateClient(17, \"Accenture Federal Services\", session);\n\t\t\tpopulateClient(18, \"Accenture Federal Services , Department of Education\", session);\n\t\t\tpopulateClient(19, \"Accenture LLP (Commercial)\", session);\n\t\t\tpopulateClient(20, \"Accenture Plc.\", session);\n\t\t\tpopulateClient(21, \"Access Staffing\", session);\n\t\t\tpopulateClient(22, \"Access Technology Solutions, Inc\", session);\n\t\t\tpopulateClient(23, \"Acclaim Systems Inc\", session);\n\t\t\tpopulateClient(24, \"ACLAT, Inc.\", session);\n\t\t\tpopulateClient(25, \"ACROSS Borders, LLC\", session);\n\t\t\tpopulateClient(26, \"ACS Group\", session);\n\t\t\tpopulateClient(27, \"Acuity, Inc.\", session);\n\t\t\tpopulateClient(28, \"Acumen Solutions, Inc\", session);\n\t\t\tpopulateClient(29, \"Adaequare, Inc\", session);\n\t\t\tpopulateClient(30, \"Adam Information Technologies, LLC\", session);\n\t\t\tpopulateClient(31, \"Adbakx, LLC\", session);\n\t\t\tpopulateClient(32, \"ADDON Technologies, Inc\", session);\n\t\t\tpopulateClient(33, \"Adecco Engineering & Technical\", session);\n\t\t\tpopulateClient(34, \"Adept Computer Consultants, Inc.\", session);\n\t\t\tpopulateClient(35, \"ADP\", session);\n\t\t\tpopulateClient(36, \"AdroIT Software & Consulting Inc\", session);\n\t\t\tpopulateClient(37, \"Adroix Corp (BlackListed)\", session);\n\t\t\tpopulateClient(38, \"ADVANSOFT IntegerERNATIONAL, INC\", session);\n\t\t\tpopulateClient(39, \"Advantage IT, Inc\", session);\n\t\t\tpopulateClient(40, \"Advent Global Solutions, Inc\", session);\n\t\t\tpopulateClient(41, \"AEGIS\", session);\n\t\t\tpopulateClient(42, \"AespaTech LLC\", session);\n\t\t\tpopulateClient(43, \"Aetna, Inc\", session);\n\t\t\tpopulateClient(44, \"AET Solutions, Inc (Anjani Etech Solutions)\", session);\n\t\t\tpopulateClient(45, \"AFC Management Services\", session);\n\t\t\tpopulateClient(46, \"Affuel Systems Group, Inc\", session);\n\t\t\tpopulateClient(47, \"Ageatia Technology Consultancy Services, Inc.\", session);\n\t\t\tpopulateClient(48, \"Agile 1\", session);\n\t\t\tpopulateClient(49, \"Agile1 , Federal Reserve Bank of San Francisco\", session);\n\t\t\tpopulateClient(50, \"Agile1 , Pacifc gas & Electric (PG&E)\", session);\n\t\t\tpopulateClient(51, \"Agile Enterprise Solutions Inc\", session);\n\t\t\tpopulateClient(52, \"Agile Global Solutions, Inc\", session);\n\t\t\tpopulateClient(53, \"Agile Information Technology Services, Inc\", session);\n\t\t\tpopulateClient(54, \"Agranee Tech, Inc\", session);\n\t\t\tpopulateClient(55, \"AgreeYa Solutions\", session);\n\t\t\tpopulateClient(56, \"AG Technologies, LLC\", session);\n\t\t\tpopulateClient(57, \"AIG\", session);\n\t\t\tpopulateClient(58, \"AIT Global, Inc.\", session);\n\t\t\tpopulateClient(59, \"AKT, LLC (Advance Knowledge Tech.)\", session);\n\t\t\tpopulateClient(60, \"Akvarr Inc.\", session);\n\t\t\tpopulateClient(61, \"Alcatel Lucent\", session);\n\t\t\tpopulateClient(62, \"Alethix\", session);\n\t\t\tpopulateClient(63, \"Alion Science and Technology\", session);\n\t\t\tpopulateClient(64, \"Alliance, IT\", session);\n\t\t\tpopulateClient(65, \"Allstate Insurance Company\", session);\n\t\t\tpopulateClient(66, \"AllTech Consulting Services\", session);\n\t\t\tpopulateClient(67, \"Ally Financial\", session);\n\t\t\tpopulateClient(68, \"Alpha Business Consortium, Inc\", session);\n\t\t\tpopulateClient(69, \"Alpha Net Consulting LLC\", session);\n\t\t\tpopulateClient(70, \"Alpha Solutions Inc\", session);\n\t\t\tpopulateClient(71, \"ALTA IT Services\", session);\n\t\t\tpopulateClient(72, \"Altisource\", session);\n\t\t\tpopulateClient(73, \"Altus Systems, Inc\", session);\n\t\t\tpopulateClient(74, \"Amazon\", session);\n\t\t\tpopulateClient(75, \"Amba Systems, LLC\", session);\n\t\t\tpopulateClient(76, \"Ameex Technologies Corp\", session);\n\t\t\tpopulateClient(77, \"Amensys, Inc.\", session);\n\t\t\tpopulateClient(78, \"American Airlines\", session);\n\t\t\tpopulateClient(79, \"American Chemical Society\", session);\n\t\t\tpopulateClient(80, \"American Cybersystems Inc\", session);\n\t\t\tpopulateClient(81, \"American Express Company\", session);\n\t\t\tpopulateClient(82, \"American IT Resource Group\", session);\n\t\t\tpopulateClient(83, \"American IT Resource Group, Inc\", session);\n\t\t\tpopulateClient(84, \"American National Property and Casualty Companies\", session);\n\t\t\tpopulateClient(85, \"American Red Cross\", session);\n\t\t\tpopulateClient(86, \"American Traffic Solutions\", session);\n\t\t\tpopulateClient(87, \"American Unit, Inc\", session);\n\t\t\tpopulateClient(88, \"America OnLine (AOL)\", session);\n\t\t\tpopulateClient(89, \"AmeriCold Logistics, LLC.\", session);\n\t\t\tpopulateClient(90, \"Ames IT and Numeric Solutions, LLC\", session);\n\t\t\tpopulateClient(91, \"AMG Technology\", session);\n\t\t\tpopulateClient(92, \"Amitech Solutions\", session);\n\t\t\tpopulateClient(93, \"Amkor Technology\", session);\n\t\t\tpopulateClient(94, \"Amko Software Solution, Inc\", session);\n\t\t\tpopulateClient(95, \"Ampcus Inc\", session);\n\t\t\tpopulateClient(96, \"Amphion Global, Inc\", session);\n\t\t\tpopulateClient(97, \"Amplify Systems\", session);\n\t\t\tpopulateClient(98, \"AM Pros, Inc\", session);\n\t\t\tpopulateClient(99, \"AMS Staffing Solutions\", session);\n\t\t\tpopulateClient(100, \"Amtex Systems Inc\", session);\n\t\t\tpopulateClient(101, \"Anthem Inc\", session);\n\t\t\tpopulateClient(102, \"Anveta, Inc\", session);\n\t\t\tpopulateClient(103, \"Apex CoVantage\", session);\n\t\t\tpopulateClient(104, \"Apex Technology Group, Inc\", session);\n\t\t\tpopulateClient(105, \"APL Logistics\", session);\n\t\t\tpopulateClient(106, \"Aplomb Technologies, Inc\", session);\n\t\t\tpopulateClient(107, \"APN Consulting, Inc.\", session);\n\t\t\tpopulateClient(108, \"Appian Corporation\", session);\n\t\t\tpopulateClient(109, \"Apple Inc\", session);\n\t\t\tpopulateClient(110, \"AppleOne Engineering and Technical\", session);\n\t\t\tpopulateClient(111, \"Applet Systems LLC\", session);\n\t\t\tpopulateClient(112, \"Applexus Technologies, LLC\", session);\n\t\t\tpopulateClient(113, \"Applied Technical Systems, Inc.\", session);\n\t\t\tpopulateClient(114, \"Applied Thought Auditors and Consultants, Inc\", session);\n\t\t\tpopulateClient(115, \"AppNet Global\", session);\n\t\t\tpopulateClient(116, \"Apps fusion\", session);\n\t\t\tpopulateClient(117, \"Apps Solutions, Inc\", session);\n\t\t\tpopulateClient(118, \"Aptude Inc\", session);\n\t\t\tpopulateClient(119, \"Ardent Technologies Inc\", session);\n\t\t\tpopulateClient(120, \"Aricent Group\", session);\n\t\t\tpopulateClient(121, \"Ariel Partners\", session);\n\t\t\tpopulateClient(122, \"Aries Computer Systems,Inc\", session);\n\t\t\tpopulateClient(123, \"Arizona Public Service\", session);\n\t\t\tpopulateClient(124, \"Arizona Regional Multiple Listing Service\", session);\n\t\t\tpopulateClient(125, \"ArkGen Consulting, LLC\", session);\n\t\t\tpopulateClient(126, \"ARK Solutions, Inc\", session);\n\t\t\tpopulateClient(127, \"AR Solutions Inc\", session);\n\t\t\tpopulateClient(128, \"Artech Information Systems LLC\", session);\n\t\t\tpopulateClient(129, \"Aruba Networks\", session);\n\t\t\tpopulateClient(130, \"ASAP Solutions, LLC\", session);\n\t\t\tpopulateClient(131, \"Ashoka\", session);\n\t\t\tpopulateClient(132, \"ASK IT Consulting Inc\", session);\n\t\t\tpopulateClient(133, \"Aspect Software\", session);\n\t\t\tpopulateClient(134, \"Aspiresys\", session);\n\t\t\tpopulateClient(135, \"Aspire Systems Inc\", session);\n\t\t\tpopulateClient(136, \"ASRC Federal\", session);\n\t\t\tpopulateClient(137, \"Assa Abloy\", session);\n\t\t\tpopulateClient(138, \"Asta CRS, Inc\", session);\n\t\t\tpopulateClient(139, \"Astir IT Solutions, Inc\", session);\n\t\t\tpopulateClient(140, \"ASTOGRAPH, INC\", session);\n\t\t\tpopulateClient(141, \"ASURION\", session);\n\t\t\tpopulateClient(142, \"ASU SkySong\", session);\n\t\t\tpopulateClient(143, \"AT&T\", session);\n\t\t\tpopulateClient(144, \"ATD Technology\", session);\n\t\t\tpopulateClient(145, \"Athreya, Inc\", session);\n\t\t\tpopulateClient(146, \"Atlantic Partners Corp\", session);\n\t\t\tpopulateClient(147, \"ATOS\", session);\n\t\t\tpopulateClient(148, \"Atria Group\", session);\n\t\t\tpopulateClient(149, \"Atrilogy\", session);\n\t\t\tpopulateClient(150, \"ATR Integerernational\", session);\n\t\t\tpopulateClient(151, \"Atyeti Inc\", session);\n\t\t\tpopulateClient(152, \"AuroPro Systems, Inc\", session);\n\t\t\tpopulateClient(153, \"Aurora Healthcare\", session);\n\t\t\tpopulateClient(154, \"Austin Fraser\", session);\n\t\t\tpopulateClient(155, \"Avanade\", session);\n\t\t\tpopulateClient(156, \"Avani Technical Solutions\", session);\n\t\t\tpopulateClient(157, \"Avani Technology Solutions, Inc\", session);\n\t\t\tpopulateClient(158, \"Avant Systems, Inc\", session);\n\t\t\tpopulateClient(159, \"Avco Consulting Inc\", session);\n\t\t\tpopulateClient(160, \"Avella Specialist Pharmacy\", session);\n\t\t\tpopulateClient(161, \"AVIGHNA GLOBAL SOLUTIONS, LLC\", session);\n\t\t\tpopulateClient(162, \"Avventis, Inc\", session);\n\t\t\tpopulateClient(163, \"AXA\", session);\n\t\t\tpopulateClient(164, \"AXIOM Consulting Group\", session);\n\t\t\tpopulateClient(165, \"Axius Technologies Inc\", session);\n\t\t\tpopulateClient(166, \"Axon\", session);\n\t\t\tpopulateClient(167, \"Ayesha NY, Inc (Pull Skill)\", session);\n\t\t\tpopulateClient(168, \"Baanyan Software Services, Inc\", session);\n\t\t\tpopulateClient(169, \"BAE Systems\", session);\n\t\t\tpopulateClient(170, \"BAH\", session);\n\t\t\tpopulateClient(171, \"Balance Innovations LLC\", session);\n\t\t\tpopulateClient(172, \"Bank of America\", session);\n\t\t\tpopulateClient(173, \"Banner Health\", session);\n\t\t\tpopulateClient(174, \"Bartronics America, Inc (First Tek, Inc)\", session);\n\t\t\tpopulateClient(175, \"BA Technolinks Corp\", session);\n\t\t\tpopulateClient(176, \"BB&T Corporation\", session);\n\t\t\tpopulateClient(177, \"BCforward\", session);\n\t\t\tpopulateClient(178, \"BDM Solutions Inc\", session);\n\t\t\tpopulateClient(179, \"Beacon Hill Staffing\", session);\n\t\t\tpopulateClient(180, \"Bell Helicopter\", session);\n\t\t\tpopulateClient(181, \"Benvia LLC\", session);\n\t\t\tpopulateClient(182, \"Best Buy Co., Inc.\", session);\n\t\t\tpopulateClient(183, \"Bestwestern\", session);\n\t\t\tpopulateClient(184, \"Bijjam Information Technologies, Inc\", session);\n\t\t\tpopulateClient(185, \"BirlaSoft\", session);\n\t\t\tpopulateClient(186, \"BITech Inc\", session);\n\t\t\tpopulateClient(187, \"Biz4Mation Inc\", session);\n\t\t\tpopulateClient(188, \"Biz Alps, Inc.\", session);\n\t\t\tpopulateClient(189, \"Blackboard\", session);\n\t\t\tpopulateClient(190, \"Blackstone Technology Group\", session);\n\t\t\tpopulateClient(191, \"Blink Technology Partners, Inc\", session);\n\t\t\tpopulateClient(192, \"Blood Systems\", session);\n\t\t\tpopulateClient(193, \"Bloomberg BNA\", session);\n\t\t\tpopulateClient(194, \"BlueAlly\", session);\n\t\t\tpopulateClient(195, \"Blue Joule Corporation\", session);\n\t\t\tpopulateClient(196, \"BMC\", session);\n\t\t\tpopulateClient(197, \"BNY Mellon\", session);\n\t\t\tpopulateClient(198, \"Bolste\", session);\n\t\t\tpopulateClient(199, \"Booz Allen Hamilton\", session);\n\t\t\tpopulateClient(200, \"BraIntegerree Technology Solutions\", session);\n\t\t\tpopulateClient(201, \"Brandsymbol\", session);\n\t\t\tpopulateClient(202, \"Braves Technologies\", session);\n\t\t\tpopulateClient(203, \"BrickLogix\", session);\n\t\t\tpopulateClient(204, \"BridgePoInteger Technologies, LLC\", session);\n\t\t\tpopulateClient(205, \"Brightpath Developers, LLC\", session);\n\t\t\tpopulateClient(206, \"Brillio\", session);\n\t\t\tpopulateClient(207, \"Broad Gate, Inc\", session);\n\t\t\tpopulateClient(208, \"BroadSoft\", session);\n\t\t\tpopulateClient(209, \"Bronto Consulting\", session);\n\t\t\tpopulateClient(210, \"Browse Info Solutions, Inc\", session);\n\t\t\tpopulateClient(211, \"BTECH GROUP, INC\", session);\n\t\t\tpopulateClient(212, \"BTS Solutions, Inc\", session);\n\t\t\tpopulateClient(213, \"Burgeon IT Services LLC\", session);\n\t\t\tpopulateClient(214, \"Burning Glass\", session);\n\t\t\tpopulateClient(215, \"Business Integerelli Solutions, Inc\", session);\n\t\t\tpopulateClient(216, \"Cable One\", session);\n\t\t\tpopulateClient(217, \"CACI Integerernational Inc.\", session);\n\t\t\tpopulateClient(218, \"California State University Northridge\", session);\n\t\t\tpopulateClient(219, \"Calif Technology, LLC\", session);\n\t\t\tpopulateClient(220, \"Cambay Consulting Services, LLC\", session);\n\t\t\tpopulateClient(221, \"Camber Corporation\", session);\n\t\t\tpopulateClient(222, \"Canopy One Solutions\", session);\n\t\t\tpopulateClient(223, \"Capco\", session);\n\t\t\tpopulateClient(224, \"Capgemini\", session);\n\t\t\tpopulateClient(225, \"Capital One\", session);\n\t\t\tpopulateClient(226, \"Capital One Financial\", session);\n\t\t\tpopulateClient(227, \"Capital TechSearch\", session);\n\t\t\tpopulateClient(228, \"Capricorn Systems Inc\", session);\n\t\t\tpopulateClient(229, \"Carahsoft Technology Corp.\", session);\n\t\t\tpopulateClient(230, \"Cardinal Technology Solutions\", session);\n\t\t\tpopulateClient(231, \"Cargill Inc\", session);\n\t\t\tpopulateClient(232, \"Carollo Engineers\", session);\n\t\t\tpopulateClient(233, \"Cascade Technologies Inc\", session);\n\t\t\tpopulateClient(234, \"CA Technologies (Computer Associates Integerernational, Inc.)\", session);\n\t\t\tpopulateClient(235, \"Cavalier IT\", session);\n\t\t\tpopulateClient(236, \"CCPace\", session);\n\t\t\tpopulateClient(237, \"CDI Corp\", session);\n\t\t\tpopulateClient(238, \"CDI Solutions, Inc\", session);\n\t\t\tpopulateClient(239, \"Celerity IT LLC\", session);\n\t\t\tpopulateClient(240, \"Centaurus Technology Partners, LLC\", session);\n\t\t\tpopulateClient(241, \"Centene Corporation\", session);\n\t\t\tpopulateClient(242, \"CentillionZ (Comtek Global Inc DBA CentillionZ)\", session);\n\t\t\tpopulateClient(243, \"Centizen\", session);\n\t\t\tpopulateClient(244, \"Centraprise Corp, Inc\", session);\n\t\t\tpopulateClient(245, \"CenturyLink Inc.\", session);\n\t\t\tpopulateClient(246, \"Cerner Corporation\", session);\n\t\t\tpopulateClient(247, \"CGI Technologies and Solutions Inc\", session);\n\t\t\tpopulateClient(248, \"Charles Schwab\", session);\n\t\t\tpopulateClient(249, \"Charter Communications\", session);\n\t\t\tpopulateClient(250, \"Choice Hotels\", session);\n\t\t\tpopulateClient(251, \"Cigniti Technologies, Inc\", session);\n\t\t\tpopulateClient(252, \"Ciox Health\", session);\n\t\t\tpopulateClient(253, \"Cisco Systems Inc\", session);\n\t\t\tpopulateClient(254, \"Cision\", session);\n\t\t\tpopulateClient(255, \"Citigroup Inc\", session);\n\t\t\tpopulateClient(256, \"CitiusTech Inc\", session);\n\t\t\tpopulateClient(257, \"CitraTek\", session);\n\t\t\tpopulateClient(258, \"City College of New York\", session);\n\t\t\tpopulateClient(259, \"Clairvoyant TechnoSolutions, Inc\", session);\n\t\t\tpopulateClient(260, \"Clarabridge\", session);\n\t\t\tpopulateClient(261, \"Clarity Tek, Inc\", session);\n\t\t\tpopulateClient(262, \"ClearFocus Technologies, LLC\", session);\n\t\t\tpopulateClient(263, \"Clever Devices Ltd\", session);\n\t\t\tpopulateClient(264, \"Cloudarity, Inc\", session);\n\t\t\tpopulateClient(265, \"CoastalCloud\", session);\n\t\t\tpopulateClient(266, \"CODE ACE SOLUTIONS\", session);\n\t\t\tpopulateClient(267, \"CodeTech, Inc\", session);\n\t\t\tpopulateClient(268, \"Codeworks Inc\", session);\n\t\t\tpopulateClient(269, \"Cognizant\", session);\n\t\t\tpopulateClient(270, \"Cognizant Technology Solutions (CTS)\", session);\n\t\t\tpopulateClient(271, \"Collabera\", session);\n\t\t\tpopulateClient(272, \"Collaborate Solutions Inc\", session);\n\t\t\tpopulateClient(273, \"Collasys, LLC\", session);\n\t\t\tpopulateClient(274, \"Collective Integerelligence,\", session);\n\t\t\tpopulateClient(275, \"College Board\", session);\n\t\t\tpopulateClient(276, \"Comcast\", session);\n\t\t\tpopulateClient(277, \"Commonwealth of VA\", session);\n\t\t\tpopulateClient(278, \"COMNet Group, Inc\", session);\n\t\t\tpopulateClient(279, \"Compass Solutions LLC\", session);\n\t\t\tpopulateClient(280, \"Comp Consults, Inc\", session);\n\t\t\tpopulateClient(281, \"Competent Systems, Inc\", session);\n\t\t\tpopulateClient(282, \"CompNova\", session);\n\t\t\tpopulateClient(283, \"compQSoft\", session);\n\t\t\tpopulateClient(284, \"Compri Consulting\", session);\n\t\t\tpopulateClient(285, \"Comprobase, Inc\", session);\n\t\t\tpopulateClient(286, \"CompuGain Corporation\", session);\n\t\t\tpopulateClient(287, \"Computer Futures\", session);\n\t\t\tpopulateClient(288, \"Computer Management Services, Inc\", session);\n\t\t\tpopulateClient(289, \"Computer Power Group, Inc\", session);\n\t\t\tpopulateClient(290, \"Computer Sciences Corporation(CSC)\", session);\n\t\t\tpopulateClient(291, \"Compu, Vision Consulting, Inc\", session);\n\t\t\tpopulateClient(292, \"Comp World Wide, Inc\", session);\n\t\t\tpopulateClient(293, \"Compworldwide Inc\", session);\n\t\t\tpopulateClient(294, \"Comrise\", session);\n\t\t\tpopulateClient(295, \"Comscore\", session);\n\t\t\tpopulateClient(296, \"ComScore, Inc\", session);\n\t\t\tpopulateClient(297, \"Comtec Consultants, Inc\", session);\n\t\t\tpopulateClient(298, \"Comtech LLC\", session);\n\t\t\tpopulateClient(299, \"Conch Technologies, Inc.\", session);\n\t\t\tpopulateClient(300, \"Concur Technologies Inc\", session);\n\t\t\tpopulateClient(301, \"Conduent\", session);\n\t\t\tpopulateClient(302, \"Conexess Group, LLC\", session);\n\t\t\tpopulateClient(303, \"Confiminds LLC\", session);\n\t\t\tpopulateClient(304, \"Connellyworks\", session);\n\t\t\tpopulateClient(305, \"ConsultNet\", session);\n\t\t\tpopulateClient(306, \"CopperPoInteger Mutual Insurance\", session);\n\t\t\tpopulateClient(307, \"Corner Bakery\", session);\n\t\t\tpopulateClient(308, \"Corp2Corp, Inc\", session);\n\t\t\tpopulateClient(309, \"Corporate Brokers\", session);\n\t\t\tpopulateClient(310, \"Corporate Computer Services\", session);\n\t\t\tpopulateClient(311, \"Corporate Executive Board\", session);\n\t\t\tpopulateClient(312, \"Corporate Transformation Partners.\", session);\n\t\t\tpopulateClient(313, \"Corpsystems, LLC\", session);\n\t\t\tpopulateClient(314, \"Covant Solutions Inc\", session);\n\t\t\tpopulateClient(315, \"CPSI\", session);\n\t\t\tpopulateClient(316, \"Creative Business Solutions\", session);\n\t\t\tpopulateClient(317, \"Creative Information Technology Inc\", session);\n\t\t\tpopulateClient(318, \"Credit Karma\", session);\n\t\t\tpopulateClient(319, \"CREON TECH, LLC\", session);\n\t\t\tpopulateClient(320, \"Criterion Executive Search\", session);\n\t\t\tpopulateClient(321, \"CSAA Insurance Group\", session);\n\t\t\tpopulateClient(322, \"CSRA\", session);\n\t\t\tpopulateClient(323, \"CSR Infotech Inc\", session);\n\t\t\tpopulateClient(324, \"CSS Staffing\", session);\n\t\t\tpopulateClient(325, \"CSS Technical Services\", session);\n\t\t\tpopulateClient(326, \"CST 2000 DBA iCST, LLC\", session);\n\t\t\tpopulateClient(327, \"CTI Info Tech\", session);\n\t\t\tpopulateClient(328, \"CTIS, Inc\", session);\n\t\t\tpopulateClient(329, \"Curve IT Consulting Inc\", session);\n\t\t\tpopulateClient(330, \"C , Vision IT\", session);\n\t\t\tpopulateClient(331, \"CVS Health\", session);\n\t\t\tpopulateClient(332, \"Cyberkorp\", session);\n\t\t\tpopulateClient(333, \"Cyber Resource Group, Inc.\", session);\n\t\t\tpopulateClient(334, \"CyberSearch\", session);\n\t\t\tpopulateClient(335, \"Cyber Think, Inc\", session);\n\t\t\tpopulateClient(336, \"Cygnus Professionals\", session);\n\t\t\tpopulateClient(337, \"CYGTEC, Inc\", session);\n\t\t\tpopulateClient(338, \"CYMA Systems, Inc.\", session);\n\t\t\tpopulateClient(339, \"Cynet Systems\", session);\n\t\t\tpopulateClient(340, \"Cystems Logic Inc.\", session);\n\t\t\tpopulateClient(341, \"D2Sol Inc\", session);\n\t\t\tpopulateClient(342, \"Damcosoft Inc\", session);\n\t\t\tpopulateClient(343, \"Darton Group\", session);\n\t\t\tpopulateClient(344, \"DatamanUSA, LLC\", session);\n\t\t\tpopulateClient(345, \"Datastaff Inc\", session);\n\t\t\tpopulateClient(346, \"DataVibes Technologies.\", session);\n\t\t\tpopulateClient(347, \"Datum Software Inc\", session);\n\t\t\tpopulateClient(348, \"Decipher Software Solutions LLC\", session);\n\t\t\tpopulateClient(349, \"Deegit Inc\", session);\n\t\t\tpopulateClient(350, \"DELL\", session);\n\t\t\tpopulateClient(351, \"Deloitte\", session);\n\t\t\tpopulateClient(352, \"Delphi, US\", session);\n\t\t\tpopulateClient(353, \"Delta Airlines\", session);\n\t\t\tpopulateClient(354, \"Delta System & Software, Inc\", session);\n\t\t\tpopulateClient(355, \"Deltek, Inc\", session);\n\t\t\tpopulateClient(356, \"Denken Solutions, Inc\", session);\n\t\t\tpopulateClient(357, \"Deosi LLC\", session);\n\t\t\tpopulateClient(358, \"Desert Schools Credit Union\", session);\n\t\t\tpopulateClient(359, \"Design Strategy Corporation\", session);\n\t\t\tpopulateClient(360, \"Deutsche Bank\", session);\n\t\t\tpopulateClient(361, \"DevCare Solutions\", session);\n\t\t\tpopulateClient(362, \"Devon Energy\", session);\n\t\t\tpopulateClient(363, \"DeVry Education Group\", session);\n\t\t\tpopulateClient(364, \"Diesel Direct\", session);\n\t\t\tpopulateClient(365, \"Digipulse Technologies, Inc\", session);\n\t\t\tpopulateClient(366, \"Digital Air Strike\", session);\n\t\t\tpopulateClient(367, \"Digital Infuzion\", session);\n\t\t\tpopulateClient(368, \"Digital IT\", session);\n\t\t\tpopulateClient(369, \"Digitek Software\", session);\n\t\t\tpopulateClient(370, \"Dignity Health\", session);\n\t\t\tpopulateClient(371, \"Direct Enegy\", session);\n\t\t\tpopulateClient(372, \"Discount Tire\", session);\n\t\t\tpopulateClient(373, \"Discover Financial Services\", session);\n\t\t\tpopulateClient(374, \"Disney\", session);\n\t\t\tpopulateClient(375, \"Ditech Financial\", session);\n\t\t\tpopulateClient(376, \"Diversant, Inc.\", session);\n\t\t\tpopulateClient(377, \"Diverse Lynx\", session);\n\t\t\tpopulateClient(378, \"Diversified Solutions\", session);\n\t\t\tpopulateClient(379, \"Dizer Corp\", session);\n\t\t\tpopulateClient(380, \"DLT Solutions\", session);\n\t\t\tpopulateClient(381, \"Doozer Software\", session);\n\t\t\tpopulateClient(382, \"Doyensys Inc\", session);\n\t\t\tpopulateClient(383, \"Dr First\", session);\n\t\t\tpopulateClient(384, \"DriveTime\", session);\n\t\t\tpopulateClient(385, \"Duke Energy Corporation\", session);\n\t\t\tpopulateClient(386, \"Dun & Bradstreet Corporation\", session);\n\t\t\tpopulateClient(387, \"DVI Technologies, Inc\", session);\n\t\t\tpopulateClient(388, \"DVR Softek, Inc\", session);\n\t\t\tpopulateClient(389, \"DXC Technologies\", session);\n\t\t\tpopulateClient(390, \"Dynamic IT Solutions, Inc\", session);\n\t\t\tpopulateClient(391, \"Dynatrace\", session);\n\t\t\tpopulateClient(392, \"E*PRO Consulting\", session);\n\t\t\tpopulateClient(393, \"E*trade\", session);\n\t\t\tpopulateClient(394, \"e&e IT Consulting Services, Inc\", session);\n\t\t\tpopulateClient(395, \"EADS North America\", session);\n\t\t\tpopulateClient(396, \"Eagle Creek Software Services\", session);\n\t\t\tpopulateClient(397, \"E, Aspire IT, LLC\", session);\n\t\t\tpopulateClient(398, \"eCap & Sol Inc\", session);\n\t\t\tpopulateClient(399, \"Eclaro\", session);\n\t\t\tpopulateClient(400, \"Eclaro Integerernational\", session);\n\t\t\tpopulateClient(401, \"eCloud Labs, Inc\", session);\n\t\t\tpopulateClient(402, \"E Computer Technologies Inc\", session);\n\t\t\tpopulateClient(403, \"Econtenti, Inc\", session);\n\t\t\tpopulateClient(404, \"eDataWorld, LLC\", session);\n\t\t\tpopulateClient(405, \"Edge360\", session);\n\t\t\tpopulateClient(406, \"Edge Professional Services, LLC\", session);\n\t\t\tpopulateClient(407, \"Effexoft, Inc\", session);\n\t\t\tpopulateClient(408, \"EGB Systems & Solutions Inc\", session);\n\t\t\tpopulateClient(409, \"EGiants Technologies, LLC\", session);\n\t\t\tpopulateClient(410, \"eGlobalTech\", session);\n\t\t\tpopulateClient(411, \"Eifer Software Solution,s Inc\", session);\n\t\t\tpopulateClient(412, \"eIntegerern LLC\", session);\n\t\t\tpopulateClient(413, \"Eitacies, Inc\", session);\n\t\t\tpopulateClient(414, \"E, IT Professionals Corp\", session);\n\t\t\tpopulateClient(415, \"eLan Technologies, Inc\", session);\n\t\t\tpopulateClient(416, \"Electrosoft\", session);\n\t\t\tpopulateClient(417, \"Eliassen Group\", session);\n\t\t\tpopulateClient(418, \"Elite IT Solutions Inc.\", session);\n\t\t\tpopulateClient(419, \"Elite Solutions, Inc\", session);\n\t\t\tpopulateClient(420, \"Ellucian Inc\", session);\n\t\t\tpopulateClient(421, \"EMC Corporation\", session);\n\t\t\tpopulateClient(422, \"Empower Professionals, Inc.\", session);\n\t\t\tpopulateClient(423, \"Enghouse Integerernational\", session);\n\t\t\tpopulateClient(424, \"Engility\", session);\n\t\t\tpopulateClient(425, \"Enlightened, Inc\", session);\n\t\t\tpopulateClient(426, \"Ensymbios, Inc\", session);\n\t\t\tpopulateClient(427, \"Entelli Consulting\", session);\n\t\t\tpopulateClient(428, \"Enternet Business Systems, Inc.\", session);\n\t\t\tpopulateClient(429, \"Entero\", session);\n\t\t\tpopulateClient(430, \"Enterprise Quality Assurance Labs Inc (EQA Labs Inc.)\", session);\n\t\t\tpopulateClient(431, \"Enterprise Solution Inc\", session);\n\t\t\tpopulateClient(432, \"Envision\", session);\n\t\t\tpopulateClient(433, \"EOK Technologies, Inc.\", session);\n\t\t\tpopulateClient(434, \"Epeople Technologies, Inc.\", session);\n\t\t\tpopulateClient(435, \"ERP Analysts, Inc\", session);\n\t\t\tpopulateClient(436, \"E, solutions Inc\", session);\n\t\t\tpopulateClient(437, \"ESRI\", session);\n\t\t\tpopulateClient(438, \"E Systems Inc\", session);\n\t\t\tpopulateClient(439, \"Eteam Solutions, Inc\", session);\n\t\t\tpopulateClient(440, \"Ettain Group\", session);\n\t\t\tpopulateClient(441, \"EUCLID INNOVATIONS INC\", session);\n\t\t\tpopulateClient(442, \"Eureka InfoTech, Inc\", session);\n\t\t\tpopulateClient(443, \"Everest Computers Inc.\", session);\n\t\t\tpopulateClient(444, \"Everest Consulting Group, Inc.\", session);\n\t\t\tpopulateClient(445, \"EverFi, Inc.\", session);\n\t\t\tpopulateClient(446, \"Exacta Corporation\", session);\n\t\t\tpopulateClient(447, \"Exostar\", session);\n\t\t\tpopulateClient(448, \"Expedite Inc\", session);\n\t\t\tpopulateClient(449, \"Experian\", session);\n\t\t\tpopulateClient(450, \"Experis Inc\", session);\n\t\t\tpopulateClient(451, \"ExterNetworks\", session);\n\t\t\tpopulateClient(452, \"Exxon Mobil\", session);\n\t\t\tpopulateClient(453, \"EZEN Computer Services, Inc\", session);\n\t\t\tpopulateClient(454, \"FAAZ Consulting LLC\", session);\n\t\t\tpopulateClient(455, \"Fedex\", session);\n\t\t\tpopulateClient(456, \"FICO\", session);\n\t\t\tpopulateClient(457, \"Fidelity Investments\", session);\n\t\t\tpopulateClient(458, \"FINRA\", session);\n\t\t\tpopulateClient(459, \"First Data Corporation\", session);\n\t\t\tpopulateClient(460, \"First Tek, Inc\", session);\n\t\t\tpopulateClient(461, \"Five9 , Inc.\", session);\n\t\t\tpopulateClient(462, \"Five 9 Group, Inc\", session);\n\t\t\tpopulateClient(463, \"Flexion Inc.\", session);\n\t\t\tpopulateClient(464, \"Focused HR Solutions\", session);\n\t\t\tpopulateClient(465, \"Ford Motor Company\", session);\n\t\t\tpopulateClient(466, \"Fortech\", session);\n\t\t\tpopulateClient(467, \"Fortira\", session);\n\t\t\tpopulateClient(468, \"Fourth Technologies, Inc\", session);\n\t\t\tpopulateClient(469, \"Fracsys Inc\", session);\n\t\t\tpopulateClient(470, \"Freddie Mac\", session);\n\t\t\tpopulateClient(471, \"freedom financial network\", session);\n\t\t\tpopulateClient(472, \"Freedom Partners Shared Services\", session);\n\t\t\tpopulateClient(473, \"Freeport McMoRan\", session);\n\t\t\tpopulateClient(474, \"Fruition\", session);\n\t\t\tpopulateClient(475, \"Fusion Plus Solutions Inc\", session);\n\t\t\tpopulateClient(476, \"Fusion Solutions Inc\", session);\n\t\t\tpopulateClient(477, \"G, O Digital Marketing\", session);\n\t\t\tpopulateClient(478, \"Gannett\", session);\n\t\t\tpopulateClient(479, \"Gannett, USA Today\", session);\n\t\t\tpopulateClient(480, \"GE\", session);\n\t\t\tpopulateClient(481, \"GEICO\", session);\n\t\t\tpopulateClient(482, \"Gemini Consulting Services\", session);\n\t\t\tpopulateClient(483, \"Genesis10\", session);\n\t\t\tpopulateClient(484, \"Genius Minds, LLC\", session);\n\t\t\tpopulateClient(485, \"Genoa Employment Solutions, Inc.\", session);\n\t\t\tpopulateClient(486, \"Genome Integerernational Corporation\", session);\n\t\t\tpopulateClient(487, \"GeoPropel LLC\", session);\n\t\t\tpopulateClient(488, \"Georgia Tech Research Institute\", session);\n\t\t\tpopulateClient(489, \"Geryon Corporation\", session);\n\t\t\tpopulateClient(490, \"Global Bridge InfoTech, Inc (GBIT)\", session);\n\t\t\tpopulateClient(491, \"Global Data Management\", session);\n\t\t\tpopulateClient(492, \"GlobalLogic, Inc\", session);\n\t\t\tpopulateClient(493, \"Global Payments Inc.\", session);\n\t\t\tpopulateClient(494, \"GLOBAL VISSE INC\", session);\n\t\t\tpopulateClient(495, \"GOAL Inc\", session);\n\t\t\tpopulateClient(496, \"GoDaddy\", session);\n\t\t\tpopulateClient(497, \"GoDaddy.com\", session);\n\t\t\tpopulateClient(498, \"Goldman Sachs\", session);\n\t\t\tpopulateClient(499, \"Goodwill Industries\", session);\n\t\t\tpopulateClient(500, \"GovPlace\", session);\n\t\t\tpopulateClient(501, \"GrammaTech Inc.\", session);\n\t\t\tpopulateClient(502, \"GSPANN\", session);\n\t\t\tpopulateClient(503, \"GSP Insight\", session);\n\t\t\tpopulateClient(504, \"GSS Infotech CT Inc\", session);\n\t\t\tpopulateClient(505, \"Guidance\", session);\n\t\t\tpopulateClient(506, \"Guidewell\", session);\n\t\t\tpopulateClient(507, \"H1B Candidate Pool\", session);\n\t\t\tpopulateClient(508, \"Hadiamondstar Software Solutions, LLC\", session);\n\t\t\tpopulateClient(509, \"Halfaker and Associates\", session);\n\t\t\tpopulateClient(510, \"Hallmark Cards\", session);\n\t\t\tpopulateClient(511, \"HallMark Global Technolgies\", session);\n\t\t\tpopulateClient(512, \"Hallmark Global Technologies Inc,\", session);\n\t\t\tpopulateClient(513, \"Hanzo Labs, Inc\", session);\n\t\t\tpopulateClient(514, \"Harbinger Partners, Inc.\", session);\n\t\t\tpopulateClient(515, \"HARKENDATA Corporation\", session);\n\t\t\tpopulateClient(516, \"HARMAN Integerernational\", session);\n\t\t\tpopulateClient(517, \"Hasbro, Inc.\", session);\n\t\t\tpopulateClient(518, \"hCentive\", session);\n\t\t\tpopulateClient(519, \"HCL America, Inc\", session);\n\t\t\tpopulateClient(520, \"HCL Global Systems, Inc\", session);\n\t\t\tpopulateClient(521, \"HealthFirst\", session);\n\t\t\tpopulateClient(522, \"Healthtrio\", session);\n\t\t\tpopulateClient(523, \"Herc Rentals\", session);\n\t\t\tpopulateClient(524, \"Hermitage Info Tech, LLC\", session);\n\t\t\tpopulateClient(525, \"Hewlett Packard, U.S. Public Sector\", session);\n\t\t\tpopulateClient(526, \"Hexaware Technologies\", session);\n\t\t\tpopulateClient(527, \"Hilton Worldwide\", session);\n\t\t\tpopulateClient(528, \"HireTalent\", session);\n\t\t\tpopulateClient(529, \"HMG America\", session);\n\t\t\tpopulateClient(530, \"Hobsons.com\", session);\n\t\t\tpopulateClient(531, \"Hollister Staffing, Inc\", session);\n\t\t\tpopulateClient(532, \"Honeywell Technology Solutions\", session);\n\t\t\tpopulateClient(533, \"HonorHealth\", session);\n\t\t\tpopulateClient(534, \"Horizon Industries LTD.\", session);\n\t\t\tpopulateClient(535, \"Horizon Technologies, Inc\", session);\n\t\t\tpopulateClient(536, \"HRK Solutions, LLC\", session);\n\t\t\tpopulateClient(537, \"HSBC Bank\", session);\n\t\t\tpopulateClient(538, \"HTC Global Services\", session);\n\t\t\tpopulateClient(539, \"Hudson\", session);\n\t\t\tpopulateClient(540, \"Hudson Data, LLC\", session);\n\t\t\tpopulateClient(541, \"Humac Inc\", session);\n\t\t\tpopulateClient(542, \"Hunter and Crab LLC\", session);\n\t\t\tpopulateClient(543, \"Huxley Associates\", session);\n\t\t\tpopulateClient(544, \"Huxley Banking and Financial Services\", session);\n\t\t\tpopulateClient(545, \"Hyperwallet\", session);\n\t\t\tpopulateClient(546, \"I.T. Software Solutions\", session);\n\t\t\tpopulateClient(547, \"i28 Technologies Corporation\", session);\n\t\t\tpopulateClient(548, \"IBM\", session);\n\t\t\tpopulateClient(549, \"Ibrite Solutions Inc\", session);\n\t\t\tpopulateClient(550, \"iBusiness Solution LLC\", session);\n\t\t\tpopulateClient(551, \"Iconic Displays\", session);\n\t\t\tpopulateClient(552, \"ICONMA\", session);\n\t\t\tpopulateClient(553, \"Idea Helix Inc\", session);\n\t\t\tpopulateClient(554, \"Idea Solutions, Inc\", session);\n\t\t\tpopulateClient(555, \"I Link Solutions, Inc\", session);\n\t\t\tpopulateClient(556, \"ILink Systems Inc\", session);\n\t\t\tpopulateClient(557, \"I Matrix Corp\", session);\n\t\t\tpopulateClient(558, \"Imbuesys, Inc.\", session);\n\t\t\tpopulateClient(559, \"Incentive Technology Group\", session);\n\t\t\tpopulateClient(560, \"Indecomm Global Services\", session);\n\t\t\tpopulateClient(561, \"Indeed\", session);\n\t\t\tpopulateClient(562, \"Indusvalley Consultants, Inc\", session);\n\t\t\tpopulateClient(563, \"Inficare Technologies\", session);\n\t\t\tpopulateClient(564, \"Infinite Computer Solutions\", session);\n\t\t\tpopulateClient(565, \"Infinitive\", session);\n\t\t\tpopulateClient(566, \"Infinity Consulting Solutions, Inc\", session);\n\t\t\tpopulateClient(567, \"Infinity Tech Group Inc\", session);\n\t\t\tpopulateClient(568, \"Infobahn Softworld Inc\", session);\n\t\t\tpopulateClient(569, \"Infobuilders\", session);\n\t\t\tpopulateClient(570, \"Infojini Consulting\", session);\n\t\t\tpopulateClient(571, \"Infomatics Corp\", session);\n\t\t\tpopulateClient(572, \"Informatica Corporation\", session);\n\t\t\tpopulateClient(573, \"Information Innovators Inc (III) , Formerly GNSI\", session);\n\t\t\tpopulateClient(574, \"Information Systems Consultants INC\", session);\n\t\t\tpopulateClient(575, \"Info Services, LLC\", session);\n\t\t\tpopulateClient(576, \"Infospan Technologies, Inc\", session);\n\t\t\tpopulateClient(577, \"Infosys\", session);\n\t\t\tpopulateClient(578, \"Infusionsoft\", session);\n\t\t\tpopulateClient(579, \"Ingersoll Rand\", session);\n\t\t\tpopulateClient(580, \"Inirus, LLC\", session);\n\t\t\tpopulateClient(581, \"Innova solutions\", session);\n\t\t\tpopulateClient(582, \"Innovate! Inc\", session);\n\t\t\tpopulateClient(583, \"Innovatis technologies, LLC\", session);\n\t\t\tpopulateClient(584, \"Innovative Information Technologies, Inc\", session);\n\t\t\tpopulateClient(585, \"Inoventures, LLC\", session);\n\t\t\tpopulateClient(586, \"InScope Integerernational\", session);\n\t\t\tpopulateClient(587, \"Insight Global, LLC.\", session);\n\t\t\tpopulateClient(588, \"Instant Technology\", session);\n\t\t\tpopulateClient(589, \"Integeregrated Management Systems, Inc.\", session);\n\t\t\tpopulateClient(590, \"IntegerEL Corporation\", session);\n\t\t\tpopulateClient(591, \"Integerelliswift Software Inc\", session);\n\t\t\tpopulateClient(592, \"Integerernational Cruise and Excursions\", session);\n\t\t\tpopulateClient(593, \"Integerernational Projects Consultancy Services, Inc. (IPCS)\", session);\n\t\t\tpopulateClient(594, \"Integerernational Software Services, Inc\", session);\n\t\t\tpopulateClient(595, \"Integerernational Software Systems Inc\", session);\n\t\t\tpopulateClient(596, \"Integerernational Solutions Group, Inc.\", session);\n\t\t\tpopulateClient(597, \"Integerersources Inc\", session);\n\t\t\tpopulateClient(598, \"IntegerL FCStone Inc\", session);\n\t\t\tpopulateClient(599, \"Integerone Networks Inc\", session);\n\t\t\tpopulateClient(600, \"IntegerraEdge Inc\", session);\n\t\t\tpopulateClient(601, \"IntegerTRA\", session);\n\t\t\tpopulateClient(602, \"Integeruites LLC\", session);\n\t\t\tpopulateClient(603, \"Integeruit Inc.\", session);\n\t\t\tpopulateClient(604, \"IO Datasphere Inc\", session);\n\t\t\tpopulateClient(605, \"Ipivot Solutions, LLC\", session);\n\t\t\tpopulateClient(606, \"IPolarity, LLC\", session);\n\t\t\tpopulateClient(607, \"IRIS Software Inc\", session);\n\t\t\tpopulateClient(608, \"iSpace, Inc\", session);\n\t\t\tpopulateClient(609, \"Isqare Technologies\", session);\n\t\t\tpopulateClient(610, \"IT America inc\", session);\n\t\t\tpopulateClient(611, \"ITBMS Global, Inc\", session);\n\t\t\tpopulateClient(612, \"ITBrainiac Inc\", session);\n\t\t\tpopulateClient(613, \"ITC Infotech USA Inc\", session);\n\t\t\tpopulateClient(614, \"IT Consulting Services, Inc.\", session);\n\t\t\tpopulateClient(615, \"ITDR, Inc\", session);\n\t\t\tpopulateClient(616, \"iTech US, Inc\", session);\n\t\t\tpopulateClient(617, \"iTek People Inc\", session);\n\t\t\tpopulateClient(618, \"IT Gateway, LLC\", session);\n\t\t\tpopulateClient(619, \"IT Integerellectuals\", session);\n\t\t\tpopulateClient(620, \"IT Mantra, LLC.\", session);\n\t\t\tpopulateClient(621, \"IT Solutions, Inc.\", session);\n\t\t\tpopulateClient(622, \"IT Spin Inc\", session);\n\t\t\tpopulateClient(623, \"IT Topspot LLC\", session);\n\t\t\tpopulateClient(624, \"IT Trailblazers\", session);\n\t\t\tpopulateClient(625, \"iWorks Corporation\", session);\n\t\t\tpopulateClient(626, \"JBS Technologies Inc\", session);\n\t\t\tpopulateClient(627, \"JC Penney\", session);\n\t\t\tpopulateClient(628, \"JDA Software\", session);\n\t\t\tpopulateClient(629, \"JDR Systems Inc\", session);\n\t\t\tpopulateClient(630, \"Jeppesen\", session);\n\t\t\tpopulateClient(631, \"Jobspring Partners\", session);\n\t\t\tpopulateClient(632, \"John Hopkins University\", session);\n\t\t\tpopulateClient(633, \"JP Morgan Chase\", session);\n\t\t\tpopulateClient(634, \"K12 Inc\", session);\n\t\t\tpopulateClient(635, \"Kabeer Consulting, Inc\", session);\n\t\t\tpopulateClient(636, \"kanand Corporation\", session);\n\t\t\tpopulateClient(637, \"KASTECH Software Solutions Group\", session);\n\t\t\tpopulateClient(638, \"Katalyst Technologies Inc\", session);\n\t\t\tpopulateClient(639, \"Kavitech Inc\", session);\n\t\t\tpopulateClient(640, \"Keane Soft Inc\", session);\n\t\t\tpopulateClient(641, \"Kennedy Integerernational Software, Inc\", session);\n\t\t\tpopulateClient(642, \"Key Business Solutions, Inc\", session);\n\t\t\tpopulateClient(643, \"Key Digital\", session);\n\t\t\tpopulateClient(644, \"KEYW Corp\", session);\n\t\t\tpopulateClient(645, \"Kforce\", session);\n\t\t\tpopulateClient(646, \"Kinetix Technology Partners\", session);\n\t\t\tpopulateClient(647, \"KK Associates, LLC\", session);\n\t\t\tpopulateClient(648, \"Knowledge Builders Inc\", session);\n\t\t\tpopulateClient(649, \"Korcomptenz Inc\", session);\n\t\t\tpopulateClient(650, \"Kore1\", session);\n\t\t\tpopulateClient(651, \"KPMG LLP\", session);\n\t\t\tpopulateClient(652, \"K , Tek\", session);\n\t\t\tpopulateClient(653, \"KUBRA\", session);\n\t\t\tpopulateClient(654, \"Kyra InfoTech\", session);\n\t\t\tpopulateClient(655, \"Laks Technology Solutions, LLC\", session);\n\t\t\tpopulateClient(656, \"Land O Lakes\", session);\n\t\t\tpopulateClient(657, \"Lash Group\", session);\n\t\t\tpopulateClient(658, \"Latitude 36 Inc\", session);\n\t\t\tpopulateClient(659, \"Latitude Inc\", session);\n\t\t\tpopulateClient(660, \"LCI Group\", session);\n\t\t\tpopulateClient(661, \"Lead IT Corporation\", session);\n\t\t\tpopulateClient(662, \"Ledgent Technology & Engineering\", session);\n\t\t\tpopulateClient(663, \"Leidos\", session);\n\t\t\tpopulateClient(664, \"Leidos Holdings Inc.\", session);\n\t\t\tpopulateClient(665, \"LendingTree\", session);\n\t\t\tpopulateClient(666, \"Lenmar Consulting\", session);\n\t\t\tpopulateClient(667, \"Lennar\", session);\n\t\t\tpopulateClient(668, \"Level 3 Communications\", session);\n\t\t\tpopulateClient(669, \"LEVVEL, LLC\", session);\n\t\t\tpopulateClient(670, \"Lifesize, Inc\", session);\n\t\t\tpopulateClient(671, \"Lightwell Inc\", session);\n\t\t\tpopulateClient(672, \"Linkware Group\", session);\n\t\t\tpopulateClient(673, \"LivingSocial\", session);\n\t\t\tpopulateClient(674, \"Lockheed Martin Corporation\", session);\n\t\t\tpopulateClient(675, \"Logi Analytics\", session);\n\t\t\tpopulateClient(676, \"Logic Planet, Inc\", session);\n\t\t\tpopulateClient(677, \"Logic Soft Inc\", session);\n\t\t\tpopulateClient(678, \"Logistics Integeregration Solutions\", session);\n\t\t\tpopulateClient(679, \"Logix Guru\", session);\n\t\t\tpopulateClient(680, \"Lorven Technologies Inc\", session);\n\t\t\tpopulateClient(681, \"Lowes Companies, Inc.\", session);\n\t\t\tpopulateClient(682, \"Lucid Technologies, Inc\", session);\n\t\t\tpopulateClient(683, \"Lumen Solutions Inc.\", session);\n\t\t\tpopulateClient(684, \"LumIntegerure Technologies\", session);\n\t\t\tpopulateClient(685, \"M9 Solutions\", session);\n\t\t\tpopulateClient(686, \"Maantic Inc\", session);\n\t\t\tpopulateClient(687, \"Maayee Inc\", session);\n\t\t\tpopulateClient(688, \"Magellan Health Services Inc\", session);\n\t\t\tpopulateClient(689, \"Magnanimous, Inc\", session);\n\t\t\tpopulateClient(690, \"Magna Systems Integerernational\", session);\n\t\t\tpopulateClient(691, \"Magnus Technologies, Inc (BLACKLISTED)\", session);\n\t\t\tpopulateClient(692, \"Makro Technologies Inc\", session);\n\t\t\tpopulateClient(693, \"Malvi Systems LLC\", session);\n\t\t\tpopulateClient(694, \"ManpowerGroup Inc.\", session);\n\t\t\tpopulateClient(695, \"Mantech Integerernational Corporation\", session);\n\t\t\tpopulateClient(696, \"MARATHON TS\", session);\n\t\t\tpopulateClient(697, \"Marchon Partners\", session);\n\t\t\tpopulateClient(698, \"MarketBridge\", session);\n\t\t\tpopulateClient(699, \"Marketo Lead\", session);\n\t\t\tpopulateClient(700, \"Mark Infotech, Inc\", session);\n\t\t\tpopulateClient(701, \"Marlabs Inc\", session);\n\t\t\tpopulateClient(702, \"Marriott Integerernational Inc\", session);\n\t\t\tpopulateClient(703, \"Marshwinds Integerernational Inc\", session);\n\t\t\tpopulateClient(704, \"MARS IT Corporation\", session);\n\t\t\tpopulateClient(705, \"Marvel Infotech Inc\", session);\n\t\t\tpopulateClient(706, \"Mason Frank Integerernational\", session);\n\t\t\tpopulateClient(707, \"Mastec\", session);\n\t\t\tpopulateClient(708, \"Mastech, Inc\", session);\n\t\t\tpopulateClient(709, \"Mastercard\", session);\n\t\t\tpopulateClient(710, \"MatchPoInteger Consulting Group\", session);\n\t\t\tpopulateClient(711, \"Matson\", session);\n\t\t\tpopulateClient(712, \"Mavenco\", session);\n\t\t\tpopulateClient(713, \"Maxima Consulting Inc\", session);\n\t\t\tpopulateClient(714, \"Maximus Inc\", session);\n\t\t\tpopulateClient(715, \"Mckesson\", session);\n\t\t\tpopulateClient(716, \"MDI Group [MSP for Ahold USA]\", session);\n\t\t\tpopulateClient(717, \"Meridian Technologies\", session);\n\t\t\tpopulateClient(718, \"METABYTE INC\", session);\n\t\t\tpopulateClient(719, \"MetaSense, Inc\", session);\n\t\t\tpopulateClient(720, \"Metasys Technologies Inc.\", session);\n\t\t\tpopulateClient(721, \"Metro Systems Inc\", session);\n\t\t\tpopulateClient(722, \"MH Consulting Inc\", session);\n\t\t\tpopulateClient(723, \"Microchip\", session);\n\t\t\tpopulateClient(724, \"Microexcel\", session);\n\t\t\tpopulateClient(725, \"MicroInfo, INC\", session);\n\t\t\tpopulateClient(726, \"MicroPact Inc\", session);\n\t\t\tpopulateClient(727, \"MIDASIS Technologies, LLC\", session);\n\t\t\tpopulateClient(728, \"MIDCOM\", session);\n\t\t\tpopulateClient(729, \"Mindlance\", session);\n\t\t\tpopulateClient(730, \"Mind lease, Inc\", session);\n\t\t\tpopulateClient(731, \"MindTree Ltd\", session);\n\t\t\tpopulateClient(732, \"Mitchell Martin Inc\", session);\n\t\t\tpopulateClient(733, \"Mitel\", session);\n\t\t\tpopulateClient(734, \"Mobi Corp\", session);\n\t\t\tpopulateClient(735, \"MobileWits, Inc\", session);\n\t\t\tpopulateClient(736, \"Modis IT\", session);\n\t\t\tpopulateClient(737, \"Mohegan Tribe\", session);\n\t\t\tpopulateClient(738, \"Mondo\", session);\n\t\t\tpopulateClient(739, \"Morgan Stanley\", session);\n\t\t\tpopulateClient(740, \"Morgan Vendor\", session);\n\t\t\tpopulateClient(741, \"Morton Consulting\", session);\n\t\t\tpopulateClient(742, \"Moten Tate, Inc.\", session);\n\t\t\tpopulateClient(743, \"Mouri Tech, LLC\", session);\n\t\t\tpopulateClient(744, \"Move.com\", session);\n\t\t\tpopulateClient(745, \"Mphasis Corporation\", session);\n\t\t\tpopulateClient(746, \"MRCC\", session);\n\t\t\tpopulateClient(747, \"MRoads\", session);\n\t\t\tpopulateClient(748, \"MST Solutions\", session);\n\t\t\tpopulateClient(749, \"MSys Inc\", session);\n\t\t\tpopulateClient(750, \"MTD Products\", session);\n\t\t\tpopulateClient(751, \"MUFG Union Bank\", session);\n\t\t\tpopulateClient(752, \"MultiVision, Inc\", session);\n\t\t\tpopulateClient(753, \"Mutex Systems Inc\", session);\n\t\t\tpopulateClient(754, \"Mythics Inc.\", session);\n\t\t\tpopulateClient(755, \"N.E.W Asurion\", session);\n\t\t\tpopulateClient(756, \"National Institute of Science and Technology.\", session);\n\t\t\tpopulateClient(757, \"Natsoft Corporation\", session);\n\t\t\tpopulateClient(758, \"Natural Insight\", session);\n\t\t\tpopulateClient(759, \"Nautilus Insurance\", session);\n\t\t\tpopulateClient(760, \"Naval Sea Systems Command\", session);\n\t\t\tpopulateClient(761, \"NavInteger Partners, LLC\", session);\n\t\t\tpopulateClient(762, \"NCI Information Systems, Inc.\", session);\n\t\t\tpopulateClient(763, \"Nesco Resource\", session);\n\t\t\tpopulateClient(764, \"Ness Software Engineering Services\", session);\n\t\t\tpopulateClient(765, \"Net Matrix Solutions\", session);\n\t\t\tpopulateClient(766, \"Network Objects, Inc\", session);\n\t\t\tpopulateClient(767, \"Netwoven\", session);\n\t\t\tpopulateClient(768, \"Neumeric Technologies Corp\", session);\n\t\t\tpopulateClient(769, \"New Relic\", session);\n\t\t\tpopulateClient(770, \"New Signature\", session);\n\t\t\tpopulateClient(771, \"New Wave technologies Inc\", session);\n\t\t\tpopulateClient(772, \"New York Technology Partners\", session);\n\t\t\tpopulateClient(773, \"Nextech Solutions\", session);\n\t\t\tpopulateClient(774, \"Nextgen Technologies\", session);\n\t\t\tpopulateClient(775, \"Next Level Business Services, Inc\", session);\n\t\t\tpopulateClient(776, \"NexusTek\", session);\n\t\t\tpopulateClient(777, \"Nice Ltd.\", session);\n\t\t\tpopulateClient(778, \"Nihaki Systems inc\", session);\n\t\t\tpopulateClient(779, \"Nike\", session);\n\t\t\tpopulateClient(780, \"Nitya Software Solutions Inc\", session);\n\t\t\tpopulateClient(781, \"Nityo Infotech Corp\", session);\n\t\t\tpopulateClient(782, \"Nokia\", session);\n\t\t\tpopulateClient(783, \"Northbound LLC\", session);\n\t\t\tpopulateClient(784, \"Northrop Grumman Corporation\", session);\n\t\t\tpopulateClient(785, \"NorthShore Resources, Inc.\", session);\n\t\t\tpopulateClient(786, \"Northwestern Mutual\", session);\n\t\t\tpopulateClient(787, \"Novalink Solutions\", session);\n\t\t\tpopulateClient(788, \"NPD Global Inc\", session);\n\t\t\tpopulateClient(789, \"NS IT Solutions LLC\", session);\n\t\t\tpopulateClient(790, \"NTT DATA Inc\", session);\n\t\t\tpopulateClient(791, \"Nutech Information Systems\", session);\n\t\t\tpopulateClient(792, \"O2 Technologies, Inc\", session);\n\t\t\tpopulateClient(793, \"Oakland Consulting Group\", session);\n\t\t\tpopulateClient(794, \"Oberonit\", session);\n\t\t\tpopulateClient(795, \"Oberon IT, Inc.\", session);\n\t\t\tpopulateClient(796, \"Oceanus Group\", session);\n\t\t\tpopulateClient(797, \"Ocher Technology Group\", session);\n\t\t\tpopulateClient(798, \"Odesus, Inc\", session);\n\t\t\tpopulateClient(799, \"Ohm Systems, Inc\", session);\n\t\t\tpopulateClient(800, \"Omni Hotels\", session);\n\t\t\tpopulateClient(801, \"Onshore Outsourcing\", session);\n\t\t\tpopulateClient(802, \"Open Systems Technologies\", session);\n\t\t\tpopulateClient(803, \"Open Systems Technologies Corporation\", session);\n\t\t\tpopulateClient(804, \"Open Text Corporation\", session);\n\t\t\tpopulateClient(805, \"Optima Global Solutions, Inc\", session);\n\t\t\tpopulateClient(806, \"OPTiMO Information Technology\", session);\n\t\t\tpopulateClient(807, \"Optomi\", session);\n\t\t\tpopulateClient(808, \"Oracle\", session);\n\t\t\tpopulateClient(809, \"Orbital ATK\", session);\n\t\t\tpopulateClient(810, \"Overture Partners, LLC\", session);\n\t\t\tpopulateClient(811, \"Oxford Solutions\", session);\n\t\t\tpopulateClient(812, \"Pace Computer Solutions\", session);\n\t\t\tpopulateClient(813, \"Palace Gate Corporation\", session);\n\t\t\tpopulateClient(814, \"Palmer Group\", session);\n\t\t\tpopulateClient(815, \"Palnar\", session);\n\t\t\tpopulateClient(816, \"PamTen, Inc\", session);\n\t\t\tpopulateClient(817, \"Pandit View Software, LLC\", session);\n\t\t\tpopulateClient(818, \"Pantar Solutions\", session);\n\t\t\tpopulateClient(819, \"Paragon IT Professionals\", session);\n\t\t\tpopulateClient(820, \"Paragon Medical\", session);\n\t\t\tpopulateClient(821, \"Paragon Technology Group\", session);\n\t\t\tpopulateClient(822, \"Param Consulting Services, Inc\", session);\n\t\t\tpopulateClient(823, \"Patriot Consulting\", session);\n\t\t\tpopulateClient(824, \"PayPal\", session);\n\t\t\tpopulateClient(825, \"PBS, Public Broadcasting System\", session);\n\t\t\tpopulateClient(826, \"Pelican Technology Partners\", session);\n\t\t\tpopulateClient(827, \"Pennsylvania State System of Higher Education\", session);\n\t\t\tpopulateClient(828, \"Pentagon Federal Credit Union\", session);\n\t\t\tpopulateClient(829, \"PepsiCo\", session);\n\t\t\tpopulateClient(830, \"Peridot Solutions\", session);\n\t\t\tpopulateClient(831, \"Perigonsoft, LLC\", session);\n\t\t\tpopulateClient(832, \"Peritus, Inc\", session);\n\t\t\tpopulateClient(833, \"Persistent Systems\", session);\n\t\t\tpopulateClient(834, \"Peterson Technology Partners\", session);\n\t\t\tpopulateClient(835, \"PetSmart\", session);\n\t\t\tpopulateClient(836, \"Phacil\", session);\n\t\t\tpopulateClient(837, \"PIMCO\", session);\n\t\t\tpopulateClient(838, \"Pinnacle Technical Resources\", session);\n\t\t\tpopulateClient(839, \"Pioneer Corporate Services, Inc\", session);\n\t\t\tpopulateClient(840, \"PISOFT, INC\", session);\n\t\t\tpopulateClient(841, \"Pitney Bowes\", session);\n\t\t\tpopulateClient(842, \"PIT Solutions LLC,\", session);\n\t\t\tpopulateClient(843, \"PLAN IT GROUP\", session);\n\t\t\tpopulateClient(844, \"PLATYS GROUP INC\", session);\n\t\t\tpopulateClient(845, \"Plus Consulting\", session);\n\t\t\tpopulateClient(846, \"PNC Financial Services Group, Inc\", session);\n\t\t\tpopulateClient(847, \"PoInteger Solutions Group\", session);\n\t\t\tpopulateClient(848, \"Polakams, LLC\", session);\n\t\t\tpopulateClient(849, \"Pontoon\", session);\n\t\t\tpopulateClient(850, \"PowerBand Consulting Group, Inc.\", session);\n\t\t\tpopulateClient(851, \"Powersolv\", session);\n\t\t\tpopulateClient(852, \"Pozent Corporation\", session);\n\t\t\tpopulateClient(853, \"PPC , Project Performance Corporation\", session);\n\t\t\tpopulateClient(854, \"Prabhav Services, Inc\", session);\n\t\t\tpopulateClient(855, \"Pragma Info Systems, Inc\", session);\n\t\t\tpopulateClient(856, \"Pragmatics Inc\", session);\n\t\t\tpopulateClient(857, \"PRA Group\", session);\n\t\t\tpopulateClient(858, \"Precision Technologies Corp\", session);\n\t\t\tpopulateClient(859, \"Price Waterhouse Coopers LLP, PWC\", session);\n\t\t\tpopulateClient(860, \"PrideVel Consulting LLC\", session);\n\t\t\tpopulateClient(861, \"Primesoft INC\", session);\n\t\t\tpopulateClient(862, \"Prime Software Technologies, Inc\", session);\n\t\t\tpopulateClient(863, \"Primus Global Services Inc.\", session);\n\t\t\tpopulateClient(864, \"Primus Software Corporation\", session);\n\t\t\tpopulateClient(865, \"Princeton Information\", session);\n\t\t\tpopulateClient(866, \"Principle Solutions Group\", session);\n\t\t\tpopulateClient(867, \"PRISM Inc\", session);\n\t\t\tpopulateClient(868, \"Proactive Technical Services\", session);\n\t\t\tpopulateClient(869, \"PROBYS\", session);\n\t\t\tpopulateClient(870, \"Prodware Solutions LLC\", session);\n\t\t\tpopulateClient(871, \"Professional Alternative, Inc\", session);\n\t\t\tpopulateClient(872, \"Pro Innovation\", session);\n\t\t\tpopulateClient(873, \"ProKarma, Inc.\", session);\n\t\t\tpopulateClient(874, \"Propelsys Technologies, LLC\", session);\n\t\t\tpopulateClient(875, \"Prosoft IT Services, Inc\", session);\n\t\t\tpopulateClient(876, \"Prosoft Technology Group, Inc\", session);\n\t\t\tpopulateClient(877, \"Prospect Infosys Inc\", session);\n\t\t\tpopulateClient(878, \"Protective Life\", session);\n\t\t\tpopulateClient(879, \"Pro, Tek Consulting\", session);\n\t\t\tpopulateClient(880, \"Proximate Technologies, Inc.\", session);\n\t\t\tpopulateClient(881, \"Prudential\", session);\n\t\t\tpopulateClient(882, \"PruTech Solutions\", session);\n\t\t\tpopulateClient(883, \"PSI IntegerERNATIONAL, Inc\", session);\n\t\t\tpopulateClient(884, \"Puresoft, Inc\", session);\n\t\t\tpopulateClient(885, \"PVK Corporation\", session);\n\t\t\tpopulateClient(886, \"Pyramid Consulting, Inc\", session);\n\t\t\tpopulateClient(887, \"QED National\", session);\n\t\t\tpopulateClient(888, \"QNC Consulting Inc\", session);\n\t\t\tpopulateClient(889, \"Quadrant 4 System Corporation\", session);\n\t\t\tpopulateClient(890, \"Qualitree Inc\", session);\n\t\t\tpopulateClient(891, \"Quantum Infotech\", session);\n\t\t\tpopulateClient(892, \"QUEEN Consulting Group\", session);\n\t\t\tpopulateClient(893, \"Questa Technology Inc\", session);\n\t\t\tpopulateClient(894, \"Quest Solutions, Inc.\", session);\n\t\t\tpopulateClient(895, \"r2 Technologies, Inc\", session);\n\t\t\tpopulateClient(896, \"Radiss Tech Services Inc\", session);\n\t\t\tpopulateClient(897, \"Radus Tek Services, Inc\", session);\n\t\t\tpopulateClient(898, \"RAMY Infotech Inc\", session);\n\t\t\tpopulateClient(899, \"Randstad Technologies\", session);\n\t\t\tpopulateClient(900, \"Rang Technologies, Inc.\", session);\n\t\t\tpopulateClient(901, \"Realsoft Technologies, LLC\", session);\n\t\t\tpopulateClient(902, \"Regent Education\", session);\n\t\t\tpopulateClient(903, \"Reliable Software Resources, Inc (RSRIT)\", session);\n\t\t\tpopulateClient(904, \"Reliance Global Services Inc.\", session);\n\t\t\tpopulateClient(905, \"Renee Systems\", session);\n\t\t\tpopulateClient(906, \"Republic Services\", session);\n\t\t\tpopulateClient(907, \"ReqRoute,Inc\", session);\n\t\t\tpopulateClient(908, \"Resource 1\", session);\n\t\t\tpopulateClient(909, \"Resource Logistics\", session);\n\t\t\tpopulateClient(910, \"Revature India\", session);\n\t\t\tpopulateClient(911, \"Revature LLC\", session);\n\t\t\tpopulateClient(912, \"Reveille Technologies Inc\", session);\n\t\t\tpopulateClient(913, \"Riverbed Technology Inc\", session);\n\t\t\tpopulateClient(914, \"Robert Half Technology\", session);\n\t\t\tpopulateClient(915, \"RPartners\", session);\n\t\t\tpopulateClient(916, \"R Systems\", session);\n\t\t\tpopulateClient(917, \"Rural Sourcing Inc. (RSI)\", session);\n\t\t\tpopulateClient(918, \"Sabre Systems Inc\", session);\n\t\t\tpopulateClient(919, \"Safeway\", session);\n\t\t\tpopulateClient(920, \"Sage Group Consulting Inc\", session);\n\t\t\tpopulateClient(921, \"Sage IT\", session);\n\t\t\tpopulateClient(922, \"SAIC\", session);\n\t\t\tpopulateClient(923, \"Saicon Consultants Inc\", session);\n\t\t\tpopulateClient(924, \"Salient CRGT\", session);\n\t\t\tpopulateClient(925, \"SamaraTech LLC\", session);\n\t\t\tpopulateClient(926, \"Samiti Technology Inc\", session);\n\t\t\tpopulateClient(927, \"Samson Software Solutions, Inc\", session);\n\t\t\tpopulateClient(928, \"Saphire Solutions, Inc\", session);\n\t\t\tpopulateClient(929, \"SAP SE or an SAP affiliate company\", session);\n\t\t\tpopulateClient(930, \"SAPVIX Technology Services\", session);\n\t\t\tpopulateClient(931, \"Saransh, Inc\", session);\n\t\t\tpopulateClient(932, \"Saras America Inc\", session);\n\t\t\tpopulateClient(933, \"SAS Institute Inc.\", session);\n\t\t\tpopulateClient(934, \"SA Technologies Inc\", session);\n\t\t\tpopulateClient(935, \"Satsyil Corporation\", session);\n\t\t\tpopulateClient(936, \"Saturn Infotech\", session);\n\t\t\tpopulateClient(937, \"Saven Technologies, Inc\", session);\n\t\t\tpopulateClient(938, \"Saxon Global, Inc\", session);\n\t\t\tpopulateClient(939, \"Sayva\", session);\n\t\t\tpopulateClient(940, \"SBA Communications\", session);\n\t\t\tpopulateClient(941, \"SBC Solutions, INC\", session);\n\t\t\tpopulateClient(942, \"Scadea Solutions, Inc\", session);\n\t\t\tpopulateClient(943, \"Scepter Technologies, Inc\", session);\n\t\t\tpopulateClient(944, \"Schlage\", session);\n\t\t\tpopulateClient(945, \"Schrill Technologies, Inc\", session);\n\t\t\tpopulateClient(946, \"ScienceLogic\", session);\n\t\t\tpopulateClient(947, \"Scientific Technologies Corporation\", session);\n\t\t\tpopulateClient(948, \"SCI Group\", session);\n\t\t\tpopulateClient(949, \"SCM DATA, INC\", session);\n\t\t\tpopulateClient(950, \"Scope IT Consulting\", session);\n\t\t\tpopulateClient(951, \"Scripps Network\", session);\n\t\t\tpopulateClient(952, \"Scube Square Systems Inc\", session);\n\t\t\tpopulateClient(953, \"Sedna Consulting Group\", session);\n\t\t\tpopulateClient(954, \"Selective Insurance Company of America\", session);\n\t\t\tpopulateClient(955, \"Select source solution\", session);\n\t\t\tpopulateClient(956, \"Seneca Resources LLC\", session);\n\t\t\tpopulateClient(957, \"Sequent Global Technologies, Inc\", session);\n\t\t\tpopulateClient(958, \"Serco Inc.\", session);\n\t\t\tpopulateClient(959, \"Serenity Infotech, Inc\", session);\n\t\t\tpopulateClient(960, \"Serigor Inc\", session);\n\t\t\tpopulateClient(961, \"Servesys Corporation, Inc\", session);\n\t\t\tpopulateClient(962, \"Shinewell Technologies, Inc\", session);\n\t\t\tpopulateClient(963, \"Shorewise Consulting, Inc (USA)\", session);\n\t\t\tpopulateClient(964, \"Shutterfly\", session);\n\t\t\tpopulateClient(965, \"Sierra Infosys, Inc\", session);\n\t\t\tpopulateClient(966, \"Silverlink Technologies\", session);\n\t\t\tpopulateClient(967, \"Silverxis, Inc\", session);\n\t\t\tpopulateClient(968, \"Singular\", session);\n\t\t\tpopulateClient(969, \"Siri InfoSolutions Inc\", session);\n\t\t\tpopulateClient(970, \"Siteworx\", session);\n\t\t\tpopulateClient(971, \"SJ Technologies\", session);\n\t\t\tpopulateClient(972, \"Skill Demand\", session);\n\t\t\tpopulateClient(973, \"SkillSmart\", session);\n\t\t\tpopulateClient(974, \"Sky Solutions llc\", session);\n\t\t\tpopulateClient(975, \"Skytouch Technologies\", session);\n\t\t\tpopulateClient(976, \"SmartApp\", session);\n\t\t\tpopulateClient(977, \"Smart IMS, Inc\", session);\n\t\t\tpopulateClient(978, \"Smart Insight, LLC\", session);\n\t\t\tpopulateClient(979, \"SNI Technology\", session);\n\t\t\tpopulateClient(980, \"Social Tables\", session);\n\t\t\tpopulateClient(981, \"Softech Integerernational Resources Inc\", session);\n\t\t\tpopulateClient(982, \"Software AG, Inc\", session);\n\t\t\tpopulateClient(983, \"Software Catalysts, LLC\", session);\n\t\t\tpopulateClient(984, \"Software Guidance & Assistance, Inc\", session);\n\t\t\tpopulateClient(985, \"Software People Inc\", session);\n\t\t\tpopulateClient(986, \"Software Specialists\", session);\n\t\t\tpopulateClient(987, \"Softworld Inc\", session);\n\t\t\tpopulateClient(988, \"Sogeti USA LLC\", session);\n\t\t\tpopulateClient(989, \"Solomons Integerernational\", session);\n\t\t\tpopulateClient(990, \"Solution IT\", session);\n\t\t\tpopulateClient(991, \"Solution Partners, Inc\", session);\n\t\t\tpopulateClient(992, \"Solution Street\", session);\n\t\t\tpopulateClient(993, \"Sonoma Consulting, Inc.\", session);\n\t\t\tpopulateClient(994, \"Sourcechip Inc\", session);\n\t\t\tpopulateClient(995, \"Source Infotech, Inc\", session);\n\t\t\tpopulateClient(996, \"Source Mantra Inc\", session);\n\t\t\tpopulateClient(997, \"Spar Information Systems\", session);\n\t\t\tpopulateClient(998, \"SparkPost\", session);\n\t\t\tpopulateClient(999, \"Spartan Resources, LLC\", session);\n\t\t\tpopulateClient(1000, \"Spino & Margin5 Inc.\", session);\n\t\t\tpopulateClient(1001, \"SPLUNK INC\", session);\n\t\t\tpopulateClient(1002, \"SprInteger\", session);\n\t\t\tpopulateClient(1003, \"Spruce Technology Inc\", session);\n\t\t\tpopulateClient(1004, \"Spyglass Partners, LLC\", session);\n\t\t\tpopulateClient(1005, \"SQL Data Solutions, Inc\", session);\n\t\t\tpopulateClient(1006, \"Sriven Technologies LLC\", session);\n\t\t\tpopulateClient(1007, \"SRT Group\", session);\n\t\t\tpopulateClient(1008, \"Staffing Industry Analysts\", session);\n\t\t\tpopulateClient(1009, \"Stafflabs Inc\", session);\n\t\t\tpopulateClient(1010, \"StaffMethods, Inc\", session);\n\t\t\tpopulateClient(1011, \"Staff Tech, Inc.\", session);\n\t\t\tpopulateClient(1012, \"StanSource Inc\", session);\n\t\t\tpopulateClient(1013, \"StarpoInteger Solutions LLC\", session);\n\t\t\tpopulateClient(1014, \"State Farm\", session);\n\t\t\tpopulateClient(1015, \"State Farm Insurance\", session);\n\t\t\tpopulateClient(1016, \"State of Arizona\", session);\n\t\t\tpopulateClient(1017, \"State of NY\", session);\n\t\t\tpopulateClient(1018, \"Sterling 5, Inc\", session);\n\t\t\tpopulateClient(1019, \"Strategic IT Staffing\", session);\n\t\t\tpopulateClient(1020, \"Stratitude\", session);\n\t\t\tpopulateClient(1021, \"Sumeru Inc\", session);\n\t\t\tpopulateClient(1022, \"Summit Information Solutions\", session);\n\t\t\tpopulateClient(1023, \"Sunmerge Systems, Inc\", session);\n\t\t\tpopulateClient(1024, \"Sun Technologies Inc\", session);\n\t\t\tpopulateClient(1025, \"SunTrust\", session);\n\t\t\tpopulateClient(1026, \"SunTrust Bank\", session);\n\t\t\tpopulateClient(1027, \"Superior Software & Technology Solutions\", session);\n\t\t\tpopulateClient(1028, \"Supervalu inc\", session);\n\t\t\tpopulateClient(1029, \"SVS Technologies\", session);\n\t\t\tpopulateClient(1030, \"Swift\", session);\n\t\t\tpopulateClient(1031, \"SwitchLane Inc.\", session);\n\t\t\tpopulateClient(1032, \"Symbioun Technologies\", session);\n\t\t\tpopulateClient(1033, \"Synapse Business System\", session);\n\t\t\tpopulateClient(1034, \"Synergy Global Technologies, Inc\", session);\n\t\t\tpopulateClient(1035, \"SysLogic Technical Services\", session);\n\t\t\tpopulateClient(1036, \"Sysmind\", session);\n\t\t\tpopulateClient(1037, \"Systel, Inc\", session);\n\t\t\tpopulateClient(1038, \"Systems America\", session);\n\t\t\tpopulateClient(1039, \"Systems Edge (USA) LLC\", session);\n\t\t\tpopulateClient(1040, \"System Soft Technologies(DO NOT USE)\", session);\n\t\t\tpopulateClient(1041, \"Systems Pros\", session);\n\t\t\tpopulateClient(1042, \"TAK Technologies, Inc\", session);\n\t\t\tpopulateClient(1043, \"TALENTIERT SOLUTIONS, INC\", session);\n\t\t\tpopulateClient(1044, \"Talent IT Services, Inc\", session);\n\t\t\tpopulateClient(1045, \"TalTeam Inc\", session);\n\t\t\tpopulateClient(1046, \"TAL Technologies Inc\", session);\n\t\t\tpopulateClient(1047, \"Tanson Corp\", session);\n\t\t\tpopulateClient(1048, \"Target Corporation\", session);\n\t\t\tpopulateClient(1049, \"Target Labs\", session);\n\t\t\tpopulateClient(1050, \"Tata Consultancy Services\", session);\n\t\t\tpopulateClient(1051, \"Tavant Technologies\", session);\n\t\t\tpopulateClient(1052, \"TD Bank\", session);\n\t\t\tpopulateClient(1053, \"TEAM Recruiting Services\", session);\n\t\t\tpopulateClient(1054, \"TeamSoft Inc\", session);\n\t\t\tpopulateClient(1055, \"Team Technology Inc\", session);\n\t\t\tpopulateClient(1056, \"Techligent Systems, INC\", session);\n\t\t\tpopulateClient(1057, \"Tech, Mahindra\", session);\n\t\t\tpopulateClient(1058, \"Tech Mahindra, AT&T\", session);\n\t\t\tpopulateClient(1059, \"Tech Mahindra, SprInteger\", session);\n\t\t\tpopulateClient(1060, \"Tech Mahindra, T, Mobile\", session);\n\t\t\tpopulateClient(1061, \"Tech Mahindra, Verizon\", session);\n\t\t\tpopulateClient(1062, \"Techminds Group, LLC\", session);\n\t\t\tpopulateClient(1063, \"Technical Resources Integerernational, Inc. (TRI)\", session);\n\t\t\tpopulateClient(1064, \"Technical Strategies Inc\", session);\n\t\t\tpopulateClient(1065, \"Technik Inc\", session);\n\t\t\tpopulateClient(1066, \"Technocraft Solutions\", session);\n\t\t\tpopulateClient(1067, \"TechnoLabs, Inc\", session);\n\t\t\tpopulateClient(1068, \"Technology Resource Group Inc\", session);\n\t\t\tpopulateClient(1069, \"Technology Resource Services, Inc.\", session);\n\t\t\tpopulateClient(1070, \"Technomax LLC\", session);\n\t\t\tpopulateClient(1071, \"Techno Talent Inc.\", session);\n\t\t\tpopulateClient(1072, \"TechOrbit, Inc\", session);\n\t\t\tpopulateClient(1073, \"TechProjects\", session);\n\t\t\tpopulateClient(1074, \"Techstar Consulting, Inc\", session);\n\t\t\tpopulateClient(1075, \"TEK Connexion\", session);\n\t\t\tpopulateClient(1076, \"Tekforce Corp\", session);\n\t\t\tpopulateClient(1077, \"TEKFORTUNE, Inc.\", session);\n\t\t\tpopulateClient(1078, \"Tekskills Inc\", session);\n\t\t\tpopulateClient(1079, \"TekSystems\", session);\n\t\t\tpopulateClient(1080, \"Teradata\", session);\n\t\t\tpopulateClient(1081, \"Tetra Tech AMT\", session);\n\t\t\tpopulateClient(1082, \"The Ascent Services Group\", session);\n\t\t\tpopulateClient(1083, \"The Aspen Group, Inc\", session);\n\t\t\tpopulateClient(1084, \"The BSST Software Group, Inc. d, b, a The Boston Group\", session);\n\t\t\tpopulateClient(1085, \"The Charles Schwab Corporation\", session);\n\t\t\tpopulateClient(1086, \"The Clearing House\", session);\n\t\t\tpopulateClient(1087, \"The Coca, Cola Company\", session);\n\t\t\tpopulateClient(1088, \"The Common Application\", session);\n\t\t\tpopulateClient(1089, \"The FootBridge Companies\", session);\n\t\t\tpopulateClient(1090, \"The Gallup Organization\", session);\n\t\t\tpopulateClient(1091, \"The Hartford Financial Services Group, Inc.\", session);\n\t\t\tpopulateClient(1092, \"The Home Depot\", session);\n\t\t\tpopulateClient(1093, \"The Judge Group\", session);\n\t\t\tpopulateClient(1094, \"The Media Trust\", session);\n\t\t\tpopulateClient(1095, \"Themesoft Inc\", session);\n\t\t\tpopulateClient(1096, \"The Mitre Corporation\", session);\n\t\t\tpopulateClient(1097, \"The Mom Project\", session);\n\t\t\tpopulateClient(1098, \"The Squires Group\", session);\n\t\t\tpopulateClient(1099, \"The University of Alabama at Birmingham\", session);\n\t\t\tpopulateClient(1100, \"The Urban Institute\", session);\n\t\t\tpopulateClient(1101, \"The Vanguard Group, Inc\", session);\n\t\t\tpopulateClient(1102, \"Thomson Reuters\", session);\n\t\t\tpopulateClient(1103, \"Thought Wave Software and Solutions\", session);\n\t\t\tpopulateClient(1104, \"TicketMaster\", session);\n\t\t\tpopulateClient(1105, \"Tiger Team Consulting, LLC\", session);\n\t\t\tpopulateClient(1106, \"Time Warner cable\", session);\n\t\t\tpopulateClient(1107, \"Torch Technologies Inc\", session);\n\t\t\tpopulateClient(1108, \"Toyota Financial Services\", session);\n\t\t\tpopulateClient(1109, \"TPA Technologies\", session);\n\t\t\tpopulateClient(1110, \"TransUnion Corporation\", session);\n\t\t\tpopulateClient(1111, \"Trigyn Technologies, Inc.\", session);\n\t\t\tpopulateClient(1112, \"Triple, I\", session);\n\t\t\tpopulateClient(1113, \"TriSept Corporation\", session);\n\t\t\tpopulateClient(1114, \"Trisync Technologies, Inc\", session);\n\t\t\tpopulateClient(1115, \"Trivecta Digital Solutions\", session);\n\t\t\tpopulateClient(1116, \"TriZetto Corporation\", session);\n\t\t\tpopulateClient(1117, \"Trustek Inc\", session);\n\t\t\tpopulateClient(1118, \"TSQ Systems, Inc\", session);\n\t\t\tpopulateClient(1119, \"Turbo Federal LLC\", session);\n\t\t\tpopulateClient(1120, \"Turner Broadcasting\", session);\n\t\t\tpopulateClient(1121, \"TVS Infotech Inc\", session);\n\t\t\tpopulateClient(1122, \"UC Irvine Health\", session);\n\t\t\tpopulateClient(1123, \"UCLA\", session);\n\t\t\tpopulateClient(1124, \"UDig\", session);\n\t\t\tpopulateClient(1125, \"Uhaul Integerernational Inc.\", session);\n\t\t\tpopulateClient(1126, \"UHG\", session);\n\t\t\tpopulateClient(1127, \"Ultimate Gaming\", session);\n\t\t\tpopulateClient(1128, \"Ultramatics, Inc\", session);\n\t\t\tpopulateClient(1129, \"Unicon Integerernational, Inc\", session);\n\t\t\tpopulateClient(1130, \"Unicorn Technologies, Llc\", session);\n\t\t\tpopulateClient(1131, \"Unified Business Technologies, Inc\", session);\n\t\t\tpopulateClient(1132, \"Uniplus\", session);\n\t\t\tpopulateClient(1133, \"Unissant\", session);\n\t\t\tpopulateClient(1134, \"Unisys Corporation\", session);\n\t\t\tpopulateClient(1135, \"United Global Technologies\", session);\n\t\t\tpopulateClient(1136, \"United Services Automobile Association (USAA)\", session);\n\t\t\tpopulateClient(1137, \"Universal Background Screening, Inc\", session);\n\t\t\tpopulateClient(1138, \"Universal Service Administrative Company (USAC)\", session);\n\t\t\tpopulateClient(1139, \"University of California\", session);\n\t\t\tpopulateClient(1140, \"University Ventures\", session);\n\t\t\tpopulateClient(1141, \"Upp Technology, Inc\", session);\n\t\t\tpopulateClient(1142, \"US Bank\", session);\n\t\t\tpopulateClient(1143, \"US Foods\", session);\n\t\t\tpopulateClient(1144, \"USM Business Systems, Inc\", session);\n\t\t\tpopulateClient(1145, \"US Pan Asian American Chamber of Commerce Education Foundation\", session);\n\t\t\tpopulateClient(1146, \"US Tech Solutions Inc\", session);\n\t\t\tpopulateClient(1147, \"UST Global\", session);\n\t\t\tpopulateClient(1148, \"V6 Systems, Inc\", session);\n\t\t\tpopulateClient(1149, \"VanderHouwen & Associates Inc.\", session);\n\t\t\tpopulateClient(1150, \"Varsun eTechnologies Group, Inc\", session);\n\t\t\tpopulateClient(1151, \"Vastika, Inc\", session);\n\t\t\tpopulateClient(1152, \"Vayusoft, Inc\", session);\n\t\t\tpopulateClient(1153, \"VBridge Global, LLC\", session);\n\t\t\tpopulateClient(1154, \"VDart Inc\", session);\n\t\t\tpopulateClient(1155, \"VEDAINFO Inc\", session);\n\t\t\tpopulateClient(1156, \"VedaSoft Inc\", session);\n\t\t\tpopulateClient(1157, \"VedicSoft Solutions, Inc\", session);\n\t\t\tpopulateClient(1158, \"Vencore\", session);\n\t\t\tpopulateClient(1159, \"VensIT Corp\", session);\n\t\t\tpopulateClient(1160, \"Ven Soft, LLC\", session);\n\t\t\tpopulateClient(1161, \"Ventera Corporation\", session);\n\t\t\tpopulateClient(1162, \"Ventois, Inc\", session);\n\t\t\tpopulateClient(1163, \"Venture Unlimited Inc.\", session);\n\t\t\tpopulateClient(1164, \"Verans Business Solutions, Inc\", session);\n\t\t\tpopulateClient(1165, \"Verigent\", session);\n\t\t\tpopulateClient(1166, \"Verinon Technology Solutions Ltd.\", session);\n\t\t\tpopulateClient(1167, \"Veritas Technologies\", session);\n\t\t\tpopulateClient(1168, \"Versatile Consulting, Inc\", session);\n\t\t\tpopulateClient(1169, \"Viad\", session);\n\t\t\tpopulateClient(1170, \"VIA Technical\", session);\n\t\t\tpopulateClient(1171, \"Vigilant Technologies\", session);\n\t\t\tpopulateClient(1172, \"Vigna Solutions, Inc\", session);\n\t\t\tpopulateClient(1173, \"VincentBenjamin\", session);\n\t\t\tpopulateClient(1174, \"VIntegerech solutions, Inc\", session);\n\t\t\tpopulateClient(1175, \"Virgo Systems, Inc\", session);\n\t\t\tpopulateClient(1176, \"Virtue Group\", session);\n\t\t\tpopulateClient(1177, \"Virtusa\", session);\n\t\t\tpopulateClient(1178, \"Virtustream Inc\", session);\n\t\t\tpopulateClient(1179, \"Visionary Integeregration Professionals\", session);\n\t\t\tpopulateClient(1180, \"Visionist, Inc\", session);\n\t\t\tpopulateClient(1181, \"Visionisys Inc\", session);\n\t\t\tpopulateClient(1182, \"VisionIT services USA Inc\", session);\n\t\t\tpopulateClient(1183, \"Visionsoft Integerernational Inc\", session);\n\t\t\tpopulateClient(1184, \"Visual Technologies LLC\", session);\n\t\t\tpopulateClient(1185, \"Vitaver & Associates, Inc.\", session);\n\t\t\tpopulateClient(1186, \"Vixxo\", session);\n\t\t\tpopulateClient(1187, \"VLink Inc.\", session);\n\t\t\tpopulateClient(1188, \"VLS Systems, Inc\", session);\n\t\t\tpopulateClient(1189, \"Volvo AB\", session);\n\t\t\tpopulateClient(1190, \"V, Soft Consulting Group Inc\", session);\n\t\t\tpopulateClient(1191, \"Vuesol Technologies, Inc\", session);\n\t\t\tpopulateClient(1192, \"VY Systems Inc\", session);\n\t\t\tpopulateClient(1193, \"W3 Global Inc\", session);\n\t\t\tpopulateClient(1194, \"w3r Consulting\", session);\n\t\t\tpopulateClient(1195, \"WAFTS SOLUTIONS, INC\", session);\n\t\t\tpopulateClient(1196, \"Wageworks\", session);\n\t\t\tpopulateClient(1197, \"Walgreens\", session);\n\t\t\tpopulateClient(1198, \"Walkwater Technologies, Inc\", session);\n\t\t\tpopulateClient(1199, \"WalMart Labs\", session);\n\t\t\tpopulateClient(1200, \"Waltech\", session);\n\t\t\tpopulateClient(1201, \"WatchGuard Technologies\", session);\n\t\t\tpopulateClient(1202, \"WebPT\", session);\n\t\t\tpopulateClient(1203, \"Wells Fargo\", session);\n\t\t\tpopulateClient(1204, \"West Coast Consulting, LLC\", session);\n\t\t\tpopulateClient(1205, \"Western Refining\", session);\n\t\t\tpopulateClient(1206, \"Whiteboard Federal Technologies\", session);\n\t\t\tpopulateClient(1207, \"Whiztekcorp\", session);\n\t\t\tpopulateClient(1208, \"Wilco Source, LLC\", session);\n\t\t\tpopulateClient(1209, \"Willis Towers Watson\", session);\n\t\t\tpopulateClient(1210, \"WinWire Technologies Inc\", session);\n\t\t\tpopulateClient(1211, \"Wipro\", session);\n\t\t\tpopulateClient(1212, \"Wipro , Capital One\", session);\n\t\t\tpopulateClient(1213, \"WIPRO, STATE STREET\", session);\n\t\t\tpopulateClient(1214, \"WIPRO, T, MOBILE\", session);\n\t\t\tpopulateClient(1215, \"Wisdom InfoTech\", session);\n\t\t\tpopulateClient(1216, \"WITH, LLC\", session);\n\t\t\tpopulateClient(1217, \"wonese\", session);\n\t\t\tpopulateClient(1218, \"WorkForce Software Inc\", session);\n\t\t\tpopulateClient(1219, \"WorldWide Technology\", session);\n\t\t\tpopulateClient(1220, \"World Wide Technology, Inc.\", session);\n\t\t\tpopulateClient(1221, \"Wyndham Capital Mortgage\", session);\n\t\t\tpopulateClient(1222, \"Xceltech, Inc\", session);\n\t\t\tpopulateClient(1223, \"Xduce Corporation\", session);\n\t\t\tpopulateClient(1224, \"xo communications\", session);\n\t\t\tpopulateClient(1225, \"Xpertvantage LLC\", session);\n\t\t\tpopulateClient(1226, \"xScion Solutions LLC\", session);\n\t\t\tpopulateClient(1227, \"Y & L Consulting, Inc\", session);\n\t\t\tpopulateClient(1228, \"Yakabod, Inc\", session);\n\t\t\tpopulateClient(1229, \"Yash Technologies, Inc (BLACK LISTED)\", session);\n\t\t\tpopulateClient(1230, \"Yash Technologies Inc.,\", session);\n\t\t\tpopulateClient(1231, \"Yasme Soft, Inc\", session);\n\t\t\tpopulateClient(1232, \"Yochana it solutions inc\", session);\n\t\t\tpopulateClient(1233, \"Yoh Services LLC\", session);\n\t\t\tpopulateClient(1234, \"Yors Corporation\", session);\n\t\t\tpopulateClient(1235, \"Zen3\", session);\n\t\t\tpopulateClient(1236, \"Zensar Technologies\", session);\n\t\t\tpopulateClient(1237, \"Zeva Technology\", session);\n\t\t\tpopulateClient(1238, \"Ztek consulting\", session);\n\t\t\tpopulateClient(1239, \"TSymmetry Inc\", session);\n\n\t\t\tpopulateDBSF2(session);\n\t\t\tpopulateDBSF3(session);\n\n\t\t\tsession.flush();\n\t\t\ttx.commit();\n\t\t\tprev = DBMode.SF;\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\ttx.rollback();\n\t\t\tthrow new IOException(\"Could not populate DBSF\", e);\n\t\t} finally {\n\t\t\tsession.close();\n\t\t}\n\t}", "@Override\n\tpublic void importData(List<Schedule> listData) {\n\t\tSession session = getCurrentSession();\n\t\tif (listData != null && !listData.isEmpty()) {\n\t\t\tlistData.forEach((schedule) -> {\n\t\t\t\tsession.saveOrUpdate(schedule);\n\t\t\t});\n\t\t}\n\n\t}", "public void toSql(String baseDir, String out) throws IOException {\n Path pBase = Paths.get(baseDir);\n final String format = \"insert into files values(null,'%s','%s');\";\n List<String> files = new ArrayList<>();\n Files.walkFileTree(pBase, new SimpleFileVisitor<Path>() {\n @Override\n public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {\n String fileName = file.getFileName().toString();\n String path = file.toAbsolutePath().toString();\n if (filter(path) || filter(fileName)) {\n return FileVisitResult.CONTINUE;\n }\n if (fileName.length() > 128 || path.length() > 8096) {\n System.out.println(String.format(\"warning : %s %s exced the limit\", fileName, path));\n }\n\n\n String insert = String.format(format, fileName, path);\n files.add(insert);\n if (files.size() >= 10240) {\n write2File(out, files);\n files.clear();\n }\n return FileVisitResult.CONTINUE;\n }\n });\n write2File(out, files);\n }", "int insertBatch(List<Basicinfo> list);", "@Override\n\tpublic void saveOrUpdateAll(Collection<Export> entitys) {\n\t\t\n\t}", "private void insertData() {\n \n for (int i = 0; i < 3; i++) {\n ClienteEntity editorial = factory.manufacturePojo(ClienteEntity.class);\n em.persist(editorial);\n ClienteData.add(editorial);\n }\n \n for (int i = 0; i < 3; i++) {\n ContratoPaseoEntity paseo = factory.manufacturePojo(ContratoPaseoEntity.class);\n em.persist(paseo);\n contratoPaseoData.add(paseo);\n }\n \n for (int i = 0; i < 3; i++) {\n ContratoHotelEntity editorial = factory.manufacturePojo(ContratoHotelEntity.class);\n em.persist(editorial);\n contratoHotelData.add(editorial);\n }\n \n for (int i = 0; i < 3; i++) {\n PerroEntity perro = factory.manufacturePojo(PerroEntity.class);\n //perro.setCliente(ClienteData.get(0));\n //perro.setEstadias((List<ContratoHotelEntity>) contratoHotelData.get(0));\n //perro.setPaseos((List<ContratoPaseoEntity>) contratoPaseoData.get(0));\n em.persist(perro);\n Perrodata.add(perro);\n }\n\n }", "public void saveManyHistory() {\n Map<String, String> status = new HashMap<>();\n String userID = \"15\";\n List<User> allUsers = dumpDao.getAllUsers();\n Random random = new Random();\n for (int x = 0; x < 1000; x++) {\n System.out.println(\"Loop Counter : \" + x);\n userID = allUsers.get(random.nextInt(allUsers.size() - 1)).getId().toString();\n int numberOfHistory = random.nextInt(20);\n for (int y = 0; y < numberOfHistory + 1; y++) {\n System.out.println(\"\\nHistory Save\\n\");\n History history = new History();\n history.setUserId(userID);//will be set from service.\n history.setDate(DateUtil.getDate().toString());\n history.setLocation(DumpData.getLocation());\n history.setPatientDescription(DumpData.getPatientDescription());\n history.setRefferedBy(DumpData.getRefferedBy());\n history.setNote(DumpData.getNote());\n history.setUserId(userID);\n dao_history_i.save(history);\n System.out.println(history.getId());\n }//for\n }\n// bug : data are not being save\n// for (int x = 0; x < 100; x++) {\n// System.out.println(\"\\nHistory Save\\n\");\n// History history = new History();\n// history.setUserId(userID);//will be set from service.\n// history.setDate(DateUtil.getDate().toString());\n// history.setLocation(DumpData.getLocation());\n// history.setPatientDescription(DumpData.getPatientDescription());\n// history.setRefferedBy(DumpData.getRefferedBy());\n// history.setNote(DumpData.getNote());\n// history.setUserId(userID);\n// entityManager.persist(history);\n// System.out.println(history.getId());\n// }\n\n// bug : data are not being save\n// History history = new History();\n// history.setUserId(userID);//will be set from service.\n// history.setDate(DateUtil.getDate().toString());\n// history.setLocation(DumpData.getLocation());\n// history.setPatientDescription(DumpData.getPatientDescription());\n// history.setRefferedBy(DumpData.getRefferedBy());\n// history.setNote(DumpData.getNote());\n// history.setUserId(userID);\n// entityManager.persist(history);\n// System.out.println(history.getId());\n //working, insertion of history, just for one.\n// for (int x = 0; x < 10; x++) {\n// System.out.println(\"\\nHistory Save\\n\");\n// History history = new History();\n// history.setUserId(userID);//will be set from service.\n// history.setDate(DateUtil.getDate().toString());\n// history.setLocation(DumpData.getLocation());\n// history.setPatientDescription(DumpData.getPatientDescription());\n// history.setRefferedBy(DumpData.getRefferedBy());\n// history.setNote(DumpData.getNote());\n// history.setUserId(userID);\n// dao_history_i.save(history);\n// System.out.println(history.getId());\n// }//for\n }", "public void saveAll(List list);", "void insertBatch(List<Customer> customers);" ]
[ "0.69899154", "0.6453737", "0.641134", "0.60848916", "0.6084824", "0.60553277", "0.58690834", "0.582298", "0.5819185", "0.5807919", "0.5802641", "0.5798538", "0.5773959", "0.57079077", "0.5705839", "0.56697536", "0.56533873", "0.56395805", "0.5615198", "0.56139195", "0.55889726", "0.5586646", "0.5585169", "0.5578677", "0.5576447", "0.5574387", "0.5538693", "0.5534218", "0.55191404", "0.5499335", "0.5497993", "0.54813224", "0.54418266", "0.54344887", "0.54250896", "0.5416114", "0.54159164", "0.5408412", "0.54033715", "0.5388478", "0.53854287", "0.53797156", "0.53727335", "0.5372133", "0.5362192", "0.53547615", "0.53524613", "0.5352005", "0.53516746", "0.535151", "0.5346722", "0.5346681", "0.53329587", "0.53276104", "0.5323565", "0.53184956", "0.5317379", "0.5314953", "0.5306801", "0.52970874", "0.52943736", "0.5291513", "0.5289057", "0.5282765", "0.5277331", "0.52745414", "0.5274017", "0.5269862", "0.52679425", "0.5262526", "0.5256683", "0.5251617", "0.52506745", "0.5238872", "0.5238596", "0.5232303", "0.5231681", "0.5224648", "0.52190095", "0.52178967", "0.5216105", "0.5215757", "0.521359", "0.52128893", "0.5209608", "0.5209599", "0.52069324", "0.5206744", "0.5198977", "0.5196332", "0.51895136", "0.5189485", "0.5188995", "0.518525", "0.5180695", "0.5173884", "0.51694745", "0.5167717", "0.51620495", "0.5156644", "0.5155577" ]
0.0
-1
The entry point for the program java Xmx256m Wattos.Episode_II.MRConvert.
public static void main(String[] args) { // Change some of the standard settings defined in the Globals class Globals g = new Globals(); g.showMap(); sql_epiII = new SQL_Episode_II( g ); // General.verbosity = General.verbosityDebug; General.showOutput("Opened an sql connection:" + sql_epiII ); // Read in the classifications possible for annotation. classi = new Classification(); if (!classi.readFromCsvFile("Data/classification.csv")){ General.showError("in MRAnnotate.main found:"); General.showError("reading classification file."); System.exit(1); } /** Very simple loop as a menu. *Start over every time a sequence of entries has been done. *Very fast though to get the info again so not a performance issue. */ in = new BufferedReader(new InputStreamReader(System.in)); do { // Work on temporary tables. // This is the way to indicate on which set of tables to operate on. // The string below indicates it will be the temporary tables. sql_epiII.SQL_table_prefix = "temp_"; // Perhaps something left over so empty it. This will also check // to see if tables exist. boolean status = emptyTempTables(); if ( ! status ) { General.showError("trying to empty the temporary db tables."); System.exit(1); } int star_version = NmrStar.STAR_VERSION_DEFAULT; General.showOutput("Using NMR-STAR version: " + NmrStar.STAR_VERSION_NAMES[star_version]); ArrayList entries_done = doLoop(g, classi, star_version); if ( entries_done == null ) { General.showError("in doLoop."); continue; } if ( entries_done.size() == 0 ) { General.showWarning("no entries done."); continue; } General.showOutput("Done entries: " + entries_done.size()); // In 1 transaction with a try/catch construct for safety sql_epiII.setAutoCommit(false); boolean transaction_status; try { // -1- delete the old converted MR files if any sql_epiII.SQL_table_prefix = ""; transaction_status = sql_epiII.deleteFilesNotClassified( entries_done ); sql_epiII.SQL_table_prefix = "temp_"; if ( transaction_status ) { General.showDebug("-2- Copy temporary content to regular tables."); transaction_status = sql_epiII.copyFromSpecialToRegularTables(); if ( ! transaction_status ) { General.showError("trying to copy data from temporary to regular db tables."); } } else { General.showError("trying to delete old converted files from the regular db tables."); } if ( ! transaction_status ) { throw new Exception(); } } catch ( Exception e ) //every possible exception { General.showThrowable(e); // Rollback the transaction if previous steps where not successful. General.showError("Will try to roll back the transaction."); transaction_status = sql_epiII.rollbackTransaction(); if ( ! transaction_status ) { General.showError("rolling back the transaction. Aborting program."); break; } } // Reset commit so the doLoop can be quick. sql_epiII.setAutoCommit(true); General.showDebug("-3- Delete temporary content."); status = emptyTempTables(); if ( ! status ) { General.showError("trying to empty the temporary db tables."); break; } } while ( Strings.getInputBoolean(in, "Start again?") ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void run(String[] args) throws Exception\r\n {\r\n String inFileName = null;\r\n String outFileName = null;\r\n\r\n String alternateMzXmlDir = null;\r\n\r\n HashMap<Character,IsotopicLabel> labels = new HashMap<Character,IsotopicLabel>();\r\n\r\n char labeledResidue = '\\0';\r\n float massDiff = 0f;\r\n float massTol = 25.f; // PPM\r\n\r\n float minPeptideProphet = 0.f;\r\n boolean filterByMinPeptideProphet = false;\r\n\r\n float maxFracDeltaMass = 9999999.9f;\r\n boolean maxFracDeltaMassIsPPM = true;\r\n boolean filterByMaxFracDeltaMass = false;\r\n\r\n boolean mimicXpress = false;\r\n boolean noSentinels = false;\r\n boolean forceOutput = false;\r\n boolean debugMode = false;\r\n boolean compatMode = false;\r\n boolean stripExistingQ3 = false;\r\n\r\n for (int i = 1; i < args.length; i++)\r\n {\r\n if (args[i].equals(\"--mimicXpress\"))\r\n mimicXpress = true;\r\n else if (args[i].equals(\"--noSentinels\"))\r\n noSentinels = true;\r\n else if (args[i].equals(\"--forceOutput\"))\r\n forceOutput = true;\r\n else if (args[i].equals(\"--stripExistingQ3\"))\r\n stripExistingQ3 = true;\r\n else if (args[i].equals(\"--debug\"))\r\n debugMode = true;\r\n else if (args[i].equals(\"--compat\"))\r\n compatMode = true;\r\n else if (args[i].startsWith(\"-n\"))\r\n {\r\n // Look for XPRESS args of the form -nA,###\r\n String[] val = args[i].substring(2).split(\",\");\r\n if (val.length < 2 || val[0].length() != 1 || val[1].length() < 1)\r\n throw new RuntimeException(\"Could not parse residue and mass from argument \" + args[i]);\r\n char tmpResidue = val[0].charAt(0);\r\n float tmpDelta = Float.parseFloat(val[1]);\r\n labels.put(tmpResidue, new IsotopicLabel(tmpResidue, tmpDelta));\r\n }\r\n else if (args[i].startsWith(\"-m\"))\r\n {\r\n // Look for XPRESS style mass tolerance; ignored for now\r\n // massTol = Float.parseFloat(args[i].substring(2));\r\n massTol = 25.f;\r\n }\r\n else if (args[i].startsWith(\"-d\"))\r\n {\r\n // Look for mzXML files in an alternate directory\r\n alternateMzXmlDir = args[i].substring(2);\r\n }\r\n else if (args[i].startsWith(\"--\"))\r\n {\r\n String[] param = args[i].split(\"=\");\r\n if (param.length != 2)\r\n quit(\"Unknown param: \" + args[i]);\r\n\r\n String paramName = param[0];\r\n String paramVal = param[1];\r\n\r\n if (\"--out\".equals(paramName))\r\n outFileName = paramVal;\r\n else if (\"--labeledResidue\".equals(paramName))\r\n labeledResidue = paramVal.charAt(0);\r\n else if (\"--massDiff\".equals(paramName))\r\n massDiff = Float.parseFloat(paramVal);\r\n else if (\"--massTol\".equals(paramName))\r\n massTol = 25.f;\r\n else if (\"--minPeptideProphet\".equals(paramName))\r\n {\r\n minPeptideProphet = Float.parseFloat(paramVal);\r\n filterByMinPeptideProphet = true;\r\n }\r\n else if (\"--maxFracDeltaMass\".equals(paramName))\r\n {\r\n if (paramVal.toLowerCase().endsWith(\"da\"))\r\n maxFracDeltaMassIsPPM = false;\r\n maxFracDeltaMass = Float.parseFloat(paramVal);\r\n filterByMaxFracDeltaMass = true;\r\n }\r\n else\r\n quit(\"Unknown parameter: \" + paramName);\r\n\r\n if (labeledResidue != '\\0' && massDiff != 0f)\r\n {\r\n labels.put(labeledResidue, new IsotopicLabel(labeledResidue, massDiff));\r\n labeledResidue = '\\0';\r\n massDiff = 0f;\r\n }\r\n }\r\n else\r\n {\r\n if (null != inFileName)\r\n quit(\"Can only process one pepXML file at a time. Found '\" + args[i] + \"'\");\r\n inFileName = args[i];\r\n }\r\n }\r\n\r\n if (null == inFileName)\r\n quit(\"Must specify a pepXML file\");\r\n\r\n if (null == outFileName)\r\n {\r\n outFileName = inFileName;\r\n forceOutput = true;\r\n }\r\n\r\n if (labels.size() == 0)\r\n quit(\"Must specify at least one isotopic label\");\r\n\r\n try\r\n {\r\n Q3 q3 = new Q3(inFileName, labels, outFileName);\r\n\r\n if (null != alternateMzXmlDir)\r\n q3.setAlternateMzXmlDir(alternateMzXmlDir);\r\n if (filterByMinPeptideProphet)\r\n q3.setMinPeptideProphet(minPeptideProphet);\r\n if (filterByMaxFracDeltaMass)\r\n q3.setMaxFracDeltaMass(maxFracDeltaMass, maxFracDeltaMassIsPPM);\r\n q3.setCompatMode(compatMode);\r\n q3.setDebugMode(debugMode);\r\n q3.setForceOutput(forceOutput);\r\n q3.setMimicXpress(mimicXpress);\r\n q3.setNoSentinels(noSentinels);\r\n q3.setStripExistingQ3(stripExistingQ3);\r\n q3.apply();\r\n }\r\n catch (Exception e)\r\n {\r\n// e.printStackTrace(System.err);\r\n quit(\"Error running Q3: \" + e.getMessage());\r\n }\r\n\r\n }", "public static void main(String args[])\n {\n try\n {\n Date startDate = new Date();\n System.out.println(\"Job started \" + startDate);\n\n // Change the thread name so we can easily identify messages\n // from this run in the log.\n Thread t = Thread.currentThread();\n t.setName(\"RunLBL_\" + startDate.getTime());\n\n log.info(\"LBL conversion started\");\n\n RL21Convert lbl = new RL21Convert(RL21Convert.LBL);\n\n // Get a new RunConvert using our conversion class.\n RunConvert run = new RunConvert(lbl);\n\n // RunConvert.process handles all I/O and the calling\n // of the MarcConvert routines to perform the conversion.\n int rc = run.convert();\n log.info(\"LBL conversion completed - return code = \" + rc);\n System.out.println(\"Job completed \" + new java.util.Date() + \" rc = \" + rc);\n System.exit(rc);\n }\n catch (MarcParmException e)\n {\n log.error(\"MarcParmException: \" + e.getMessage(), e);\n }\n catch (Exception e)\n {\n log.error(\"Exception: \" + e.getMessage(), e);\n }\n }", "public static void main(String[] args) {\n\t\t\n\t\tmm\n\t\t\n\t}", "public static void main(String[] args) {\n //Added some awesome things to movie class\n // done with tc100\n }", "public static void main(String[] args) {\n Memory mem = new Memory();\n System.out.println(\n \"Initial memory: \"\n + Utils.doubleToString(Memory.toMegaByte(mem.getInitial()), 1) + \"MB\" \n + \" (\" + mem.getInitial() + \")\");\n System.out.println(\n \"Max memory: \"\n + Utils.doubleToString(Memory.toMegaByte(mem.getMax()), 1) + \"MB\"\n + \" (\" + mem.getMax() + \")\");\n }", "public static void main(final String[] args) {\n\n // Do not change this method in any way!\n\n if (args.length != 1) {\n System.err.println(\"Usage: java MovieApp <file-name>\");\n System.exit(2);\n }\n\n final File filename = new File(args[0]);\n final AbstractGraph graph = build(filename);\n analyze(graph);\n }", "public static void main(String[] args) throws Exception {\r\n if(args.length != 2){\r\n System.err.println(\"Usage: Inverted <in> <out>\");\r\n System.exit(2);\r\n }\r\n /**\r\n * Load hadoop configuration (Only taking XML files that have a summary tag present)\r\n */\r\n Configuration conf = new Configuration();\r\n conf.set(\"xmlinput.start\", \"<movies>\");\r\n conf.set(\"xmlinput.end\", \"</movies>\");\r\n\r\n //define and submit job\r\n Job job = new Job(conf, \"Movies\");\r\n job.setJarByClass(Inverted.class);\r\n\r\n //define mappers, combiners and reducers\r\n job.setMapperClass(Movies.MoviesMapper.class);\r\n job.setCombinerClass(Movies.MoviesCombiner.class);\r\n job.setReducerClass(Movies.MoviesReducer.class);\r\n\r\n //set input type\r\n job.setInputFormatClass(XMLInputFormat.class);\r\n\r\n //define output type\r\n job.setOutputKeyClass(Text.class);\r\n job.setOutputValueClass(Text.class);\r\n\r\n //set concatenated paths\r\n String paths = new String();\r\n for (int i = 0; i < args.length-1; i++) {\r\n if (i > 0) {\r\n paths += \",\";\r\n }\r\n paths += args[i];\r\n }\r\n\r\n //set input and output\r\n org.apache.hadoop.mapreduce.lib.input.FileInputFormat.addInputPaths(job, paths);\r\n FileOutputFormat.setOutputPath(job, new Path(args[args.length-1]));\r\n\r\n System.exit(job.waitForCompletion(true) ? 0 : 1);\r\n }", "public static void oldMain(String[] args) {\n\t\tParameters.initializeParameterCollections(new String[] { \"io:false\", \"netio:false\", \"recurrency:false\"\n\t\t\t\t, \"useThreeGANsMegaMan:true\" });\n\t\tfor(int i = 11;i<=29;i++) {\n\t\t\tmaxX=0;\n\t\t\tmaxY=0;\n\t\t\tvisited.clear();\n\t\t\tenemyNumber=-1;\n\t\t\tenemyString = null;\n\t\t\tbossString = null;\n\t\t\tList<List<Integer>> level = convertMMLVtoInt(MegaManVGLCUtil.MEGAMAN_MMLV_PATH+\"MegaManLevel\"+i+\".mmlv\");\n\t\t\tMegaManVGLCUtil.printLevel(level);\n\t\t\t//System.out.println(\"\\n\\n\"+i+\"\\n\\n\");\n\t\t\t//saveListToEditableFile(level, i+\"000\");\n\t\t\t//MegaManVGLCUtil.convertMegaManLevelToMMLV(level, i+\"000\", MegaManVGLCUtil.MEGAMAN_MMLV_PATH);\n\t\t}\n\t}", "public static void main(String[] argv) {\n\t\tfor (MoviePlotRecord rec : readRecords(imdbPath)) {\n\t\t\tSystem.out.println(rec.title + \" \" + rec.plots);\n\t\t}\n\t}", "public static void main(String[] args) throws UnsupportedEncodingException, FileNotFoundException {\n\t\tRiffRaff riff = new RiffRaff();\n\t\triff.readIn();\n\t}", "public static void main(String[] args) {\r\n System.out.println(\"Starting\");\r\n try {\r\n File fastq = new File(\"data/HW4.fastq\");\r\n if (!fastq.exists()) {\r\n System.out.println(\"Can't find input file \" + fastq.getAbsolutePath());\r\n System.exit(1);\r\n }\r\n File fasta = new File(\"data/HW4.fasta\");\r\n FileConverter converter = new FileConverter(fastq, fasta);\r\n converter.convert();\r\n } catch (IOException x) {\r\n System.out.println(x.getMessage());\r\n }\r\n System.out.println(\"Done\");\r\n }", "public static void main(String[] args) {\n CharStream stream;\n if(args.length == 1){\n try {\n stream = new ANTLRFileStream(args[0]);\n } catch (IOException e) {\n System.err.println(\"Ocorreu um problema ao tentar ler o ficheiro \\\"\" + args[0] + \"\\\".\");\n e.printStackTrace();\n return;\n }\n } else{\n try {\n stream = new ANTLRInputStream(System.in);\n } catch (IOException e) {\n System.err.println(\"Ocorreu um problema ao tentar ler do stdin.\");\n e.printStackTrace();\n return;\n }\n }\n\n System.out.println(stream.toString());\n\n LissLexer lexer = new LissLexer(stream);\n TokenStream token = new CommonTokenStream(lexer);\n LissParser parser = new LissParser(token);\n\n //create identifier table\n SymbolTable idT = new SymbolTable();\n ErrorTable e = new ErrorTable();\n Mips m = new Mips();\n parser.liss(idT, e, m);\n\n System.out.println(idT.toString());\n\n /*long total_memory = Runtime.getRuntime().totalMemory(); // Total available now (bytes)\n long free_memory = Runtime.getRuntime().freeMemory(); // Free memory now (bytes)\n long max_memory = Runtime.getRuntime().maxMemory(); // (bytes)\n long mb= (2^20);\n\n System.out.println(\"TOTAL_MEMORY: \"+total_memory +\" B\");\n System.out.println(\"FREE_MEMORY: \"+(free_memory)+\" B\");\n System.out.println(\"MAX_MEMORY: \"+(max_memory)+\" B\\n\");\n\n System.out.println(\"TOTAL_MEMORY: \"+total_memory/mb +\" MB\");\n System.out.println(\"FREE_MEMORY: \"+(free_memory/mb)+\" MB\");\n System.out.println(\"MAX_MEMORY: \"+(max_memory/mb)+\" MB\");*/\n\n }", "public static void main(String[] args) throws IOException,\r\n\tInterruptedException, ClassNotFoundException {\nJob job = new Job();\r\njob.setJarByClass(EvideoJoinDMVIDFormatMR.class);\r\njob.setJobName(\"EvideoJoinDMVIDFormatETL\");\r\njob.getConfiguration().set(\"mapred.job.tracker\", \"local\");\r\njob.getConfiguration().set(\"fs.default.name\", \"local\");\r\n\r\nFileInputFormat.addInputPaths(job, \"output_evideo,conf/dm_common_vid\");\r\nFileOutputFormat.setOutputPath(job, new Path(\"output_vid_evideo\"));\r\njob.setMapperClass(EvideoJoinDMVIDFormatMap.class);\r\njob.setReducerClass(EvideoJoinDMVIDFormatReduce.class);\r\njob.setOutputKeyClass(Text.class);\r\njob.setOutputValueClass(Text.class);\r\nSystem.exit(job.waitForCompletion(true) ? 0 : 1);\r\n}", "public static void main(String args[]) {\n new xml().convert();\n }", "public static void main(String[] args) throws Exception {\n // TODO Auto-generated method stub\n if (args.length != 3) {\n System.err.println(\"Enter valid number of arguments <Inputdirectory> <Outputlocation>\");\n System.exit(0);\n }\n ToolRunner.run(new Configuration(), new MovieLensTopMovies(), args);\n }", "public static void main(String[] args) {\r\n\t\tmeasureHeapMemory();\r\n\t}", "public static void main (String[] args) {\n\t\t\r\n\t\tFile archivo = new File(RUTA_TEMP + args[0]);\r\n\t\t\r\n\t\t//A la variable x le damos el valor del tamaņo del archivo\r\n\t\t\r\n\t\tlong x = archivo.length();\r\n\t\t\r\n\t\t//Hacemos conversiones\r\n\t\t\r\n\t\tlong conversionKB = x/1024;\r\n\t\tlong conversionMB = (x/1024)/1024;\r\n\t\tSystem.out.println(x + \" B\");\r\n\t\tSystem.out.println(conversionKB + \" KB\");\r\n\t\tSystem.out.println(conversionMB + \" MB\");\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n NaverMovieMain n=new NaverMovieMain();\r\n \r\n // n.naverMovieLinkData();\r\n //n.getMovieYear();\r\n }", "public static void main(String args[])\r\n\t\tthrows Exception\r\n\t{\n\t\twrkDir = FileUtils.getTempUserDirectory(\"jhi-flapjack\");\r\n\t\twrkDir = new File(wrkDir, \"GobiiMabcConverter\");\r\n\t\twrkDir.mkdirs();\r\n\r\n\t\tGobiiMabcConverter converter = new GobiiMabcConverter();\r\n\r\n\t\t// Read/create the markers\r\n\t\tconverter.createMap(new File(args[0]));\r\n\t\t// Read/create the genotypes\r\n\t\tconverter.createGenotypes(new File(args[1]));\r\n\t\t// Read/create the qtls\r\n\t\tconverter.createQTL(new File(args[2]));\r\n\r\n\t\tCreateProjectSettings projectSettings = new CreateProjectSettings(\r\n\t\t\tnew File(wrkDir, \"map\"),\r\n\t\t\tnew File(wrkDir, \"geno\"),\r\n\t\t\tnull,\r\n\t\t\tnew File(wrkDir, \"qtl\"),\r\n\t\t\tnew FlapjackFile(args[3]),\r\n\t\t\tnull);\r\n\r\n\t\tDataImportSettings importSettings = new DataImportSettings();\r\n\t\timportSettings.setDecimalEnglish(true);\r\n\r\n\t\t// Make a Flapjack project\r\n\t\tCreateProject cp = new CreateProject(projectSettings, importSettings);\r\n\r\n\t\tcp.doProjectCreation();\r\n\t}", "public static void main(String[] args) throws MalformedObjectNameException, InstanceAlreadyExistsException,\n\t\t\tMBeanRegistrationException, NotCompliantMBeanException {\n\t\tMBeanServer server = ManagementFactory.getPlatformMBeanServer();\n\t\tObjectName myJmxName = new ObjectName(\"jmxBean:name=myJmx\");\n\t\tserver.registerMBean(new MyJmx(), myJmxName);\n// TODO Auto-generated method stub\n\t\ttry {\n\t\t\tLocateRegistry.createRegistry(9999);\n\t\t\tJMXServiceURL url = new JMXServiceURL(\"service:jmx:rmi:///jndi/rmi://localhost:9999/jmxrmi\");\n\t\t\tJMXConnectorServer jcs = JMXConnectorServerFactory.newJMXConnectorServer(url, null, server);\n\t\t\tSystem.out.println(\"begin rmi start\");\n\t\t\tjcs.start();\n\t\t\tSystem.out.println(\"rmi start\");\n\t\t} catch (RemoteException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void Main(String args[]) {\n Magacin magacin = new Magacin(\"Trosarina\");\n Artikal artikal = new Artikal(\"123\", \"Prolom voda\");\n magacin.dodajArtikal(artikal);\n magacin.ispisiSveOpise();\n }", "public static void main(String[] args) {\n\t\t\n\t\tnew MyAssembler();\n\n\t}", "public static void main(String argv[]) throws UnsupportedEncodingException, ExecutionException, FileNotFoundException {\r\n // Check arguments\r\n if(argv.length <= 0) { System.err.println(\"Usage: <filename>\"); return; }\r\n\r\n // Start the machine\r\n Main.traceStream = System.out;\r\n Machine.powerOn();\r\n\r\n // Assemble the file\r\n Assembler assembler = new Assembler();\r\n InputStream stream = new FileInputStream(argv[0]);\r\n try { assembler.Assemble(stream); }\r\n catch(InvalidInstructionException e)\r\n { System.err.println(e.getMessage()); return; }\r\n catch(LabelNotResolvedException e)\r\n { System.err.println(e.getMessage()); return; }\r\n catch(ProgramSizeException e)\r\n { System.err.println(e.getMessage()); return; }\r\n\r\n // Run the code\r\n Machine.setPC((short) 0);\r\n Machine.setMSP((short) assembler.getSize());\r\n Machine.setMLP((short) (Machine.memorySize - 1));\r\n Machine.run();\r\n }", "public void convertor(String videoInputPath, String videoOutputPath) throws Exception {\n\t\tList<String> command = new ArrayList<>();\n\t\tcommand.add(ffmpegEXE);\n\t\t\n\t\tcommand.add(\"-i\");\n\t\tcommand.add(videoInputPath);\n\t\tcommand.add(\"-y\");\n\t\tcommand.add(videoOutputPath);\n\t\t\n\t\tfor (String c : command) {\n\t\t\tSystem.out.print(c + \" \");\n\t\t}\n\t\t\n\t\tProcessBuilder builder = new ProcessBuilder(command);\n\t\tProcess process = builder.start();\n\t\t\n\t\tInputStream errorStream = process.getErrorStream();\n\t\tInputStreamReader inputStreamReader = new InputStreamReader(errorStream);\n\t\tBufferedReader br = new BufferedReader(inputStreamReader);\n\t\t\n\t\tString line = \"\";\n\t\twhile ( (line = br.readLine()) != null ) {\n\t\t}\n\t\t\n\t\tif (br != null) {\n\t\t\tbr.close();\n\t\t}\n\t\tif (inputStreamReader != null) {\n\t\t\tinputStreamReader.close();\n\t\t}\n\t\tif (errorStream != null) {\n\t\t\terrorStream.close();\n\t\t}\n\t\t\n\t}", "public static void main(String[] args) throws IOException {\n\t\t\r\n\t\tLeerPersona.descubrirNombresRepetidos(\"400milNombres.in\");\r\n\t}", "public static void main(String[] args) {\n if (args.length != 2) {\r\n System.out.println(\"Error Incorrect Arguments:\" + Arrays.toString(args));\r\n System.exit(0);\r\n }\r\n \r\n try {\r\n\t\t\t// set up the memory\r\n\t\t\tProcess memory = Runtime.getRuntime().exec(\"java Memory \" + args[0]);\r\n\t\t\tInputStream is = memory.getInputStream();\r\n\t\t\tOutputStream os = memory.getOutputStream();\r\n\t\t\tint timer = Integer.parseInt(args[1]); //Set timer to interrupt val\r\n String file = args[0]; // Store file name for ease of access later\r\n\r\n\t\t\t//Create our CPU\r\n\t\t\tCPU cpu = new CPU(is, os, timer, file);\r\n\t\t\tcpu.startCPU();\r\n\r\n\t\t} catch (Exception e) { \r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public static void main(String[] args) throws IOException{\n\t\tSystem.exit((new BitCompresser()).run(args));\n\t}", "public static void main(String[] args) throws IllegalArgumentException, IOException,Exception{\n\t\tConfiguration config =new Configuration();\n\t\tJob j= Job.getInstance(config, \"MaxAnnualRainFall\");\n\t\tFileInputFormat.addInputPath(j, new Path(args[0]));\n\t\tFileOutputFormat.setOutputPath(j,new Path(args[1]));\n\t\tj.setJarByClass(AnnualRainMain.class);\n\t\tj.setMapperClass(com.AnnualRain.AnnualRainMapper.class);\n\t\tj.setReducerClass(com.AnnualRain.AnnualRainReducer.class);\n\t\tj.setInputFormatClass(TextInputFormat.class);\n\t\tj.setOutputFormatClass(TextOutputFormat.class);\n\t\tj.setOutputKeyClass(Text.class);\n\t\tj.setOutputValueClass(FloatWritable.class);\n\t\tj.setMapOutputKeyClass(Text.class);\n\t\tj.setMapOutputValueClass(FloatWritable.class);\n\t\tSystem.exit(j.waitForCompletion(true)?0:1);\n\t\t\n\t}", "public void convertVoiceToMaori() {\n\t\tString command = \"HVite -H HTK/MaoriNumbers/HMMs/hmm15/macros -H HTK/MaoriNumbers/HMMs/hmm15/hmmdefs -C HTK/MaoriNumbers/user/configLR -w HTK/MaoriNumbers/user/wordNetworkNum -o SWT -l '*' -i recout.mlf -p 0.0 -s 5.0 HTK/MaoriNumbers/user/dictionaryD HTK/MaoriNumbers/user/tiedList 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 convertProcess = pb.start();\n\t\t\t\n\t\t\tconvertProcess.waitFor();\n\t\t\t\n\t\t\tconvertProcess.destroy();\n\t\t\t\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\n\t\n\t\n\t}", "public static void main(String[] args) {\n\t\tUtility.tempConversion();\n\t}", "public static void main(String argv[]) {\n if (argv.length == 0) {\n System.out.println(\"Usage : java AnalizadorLexicoArchivo [ --encoding <name> ] <inputfile(s)>\");\n }\n else {\n int firstFilePos = 0;\n String encodingName = \"UTF-8\";\n if (argv[0].equals(\"--encoding\")) {\n firstFilePos = 2;\n encodingName = argv[1];\n try {\n java.nio.charset.Charset.forName(encodingName); // Side-effect: is encodingName valid? \n } catch (Exception e) {\n System.out.println(\"Invalid encoding '\" + encodingName + \"'\");\n return;\n }\n }\n for (int i = firstFilePos; i < argv.length; i++) {\n AnalizadorLexicoArchivo scanner = null;\n try {\n java.io.FileInputStream stream = new java.io.FileInputStream(argv[i]);\n java.io.Reader reader = new java.io.InputStreamReader(stream, encodingName);\n scanner = new AnalizadorLexicoArchivo(reader);\n while ( !scanner.zzAtEOF ) scanner.debug_next_token();\n }\n catch (java.io.FileNotFoundException e) {\n System.out.println(\"File not found : \\\"\"+argv[i]+\"\\\"\");\n }\n catch (java.io.IOException e) {\n System.out.println(\"IO error scanning file \\\"\"+argv[i]+\"\\\"\");\n System.out.println(e);\n }\n catch (Exception e) {\n System.out.println(\"Unexpected exception:\");\n e.printStackTrace();\n }\n }\n }\n }", "public static void main(String[] args) {\n\n\tMilk m=new Milk();\n\tm.mineral();\n\tm.bisleri();\n\t}", "public static void main(String[] args) {\n\t\tMy2048 my2048 = new My2048();\n\t}", "public static void lemmatize(String infilename, String outfilename) {\n\n final MADAMIRAWrapper wrapper = new MADAMIRAWrapper();\n JAXBContext jc = null;\n\n try {\n jc = JAXBContext.newInstance(MADAMIRA_NS);\n Unmarshaller unmarshaller = jc.createUnmarshaller();\n\n // The structure of the MadamiraInput object is exactly similar to the\n // madamira_input element in the XML\n final MadamiraInput input = (MadamiraInput)unmarshaller.unmarshal(\n new File( infilename ) );\n\n {\n int numSents = input.getInDoc().getInSeg().size();\n String outputAnalysis = input.getMadamiraConfiguration().\n getOverallVars().getOutputAnalyses();\n String outputEncoding = input.getMadamiraConfiguration().\n getOverallVars().getOutputEncoding();\n\n System.out.println(\"processing \" + numSents +\n \" sentences for analysis type = \" + outputAnalysis +\n \" and output encoding = \" + outputEncoding);\n }\n\n // The structure of the MadamiraOutput object is exactly similar to the\n // madamira_output element in the XML\n final MadamiraOutput output = wrapper.processString(input);\n\n {\n int numSents = output.getOutDoc().getOutSeg().size();\n System.out.println(\"processed output contains \"+numSents+\" sentences...\");\n }\n\n\n jc.createMarshaller().marshal(output, new File(outfilename));\n\n\n } catch (JAXBException ex) {\n System.out.println(\"Error marshalling or unmarshalling data: \"\n + ex.getMessage());\n } catch (InterruptedException ex) {\n System.out.println(\"MADAMIRA thread interrupted: \"\n +ex.getMessage());\n } catch (ExecutionException ex) {\n System.out.println(\"Unable to retrieve result of task. \" +\n \"MADAMIRA task may have been aborted: \"+ex.getCause());\n }\n\n wrapper.shutdown();\n }", "public static void main(String [] argv) {\n// weka.gui.explorer.Explorer explorer=new weka.gui.explorer.Explorer();\n// String[] file={};\n// explorer.main(file);\n runClassifier(new ExtremeLearningMachine(), argv);\n }", "public static void main(String[] args)\r\n {\r\n \tnew BioMorph();\r\n }", "public static void main(String[] args) {\n\n printMemory();\n\n byte[] buf1 = new byte[1*1024*1024];\n printMemory(\"分配1M内存\");\n\n byte[] buf2 = new byte[4*1024*1024];\n printMemory(\"分配4M内存\");\n }", "public static void main(String[] args)\n\t{\n\t\tif(args.length < 2)\n\t\t{\n\t\t\tSystem.err.println(\"USAGE: java ConvertPRG <infile> <outfile>\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t\t\n\t\t// Use these to be sure it's okay to overwrite\n\t\t// an existing file.\n\t\tScanner userIn = new Scanner(System.in);\n\t\tchar overwriteChar = 'n';\n\n\t\t// Use these to see whether the files exist\n\t\tFile inFile;\n\t\tFile outFile;\n\n\t\t// Use these to read and write the files\n\t\tDataInputStream in;\n\t\tDataOutputStream out;\n\n\t\t// Store the ROM data in here, minus INES header\n\t\tbyte[] rom = new byte[0x4000];\n\t\t\n\t\ttry\n\t\t{\n\t\t\tinFile = new File(args[0]);\n\t\t\toutFile = new File(args[1]);\n\t\t\t\n\t\t\t// Make sure the input file exists. Chastise foolish user if it doesn't.\n\t\t\tif(!inFile.isFile())\n\t\t\t{\n\t\t\t\tSystem.err.println(\"File \" + inFile.getName() + \" not found.\");\n\t\t\t\tSystem.exit(1);\n\t\t\t}\n\t\t\t\n\t\t\t// It's okay if the output file already exists, but make sure\n\t\t\t// we really want to overwrite it if it does.\n\t\t\tif(outFile.isFile())\n\t\t\t{\n\t\t\t\t// If this loop repeats, the user input gibberish.\n\t\t\t\twhile(overwriteChar != 'y')\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"Really overwrite \" + outFile.getName() + \"? (y/n)\");\n\t\t\t\t\toverwriteChar = Character.toLowerCase(userIn.next().charAt(0));\n\t\t\t\t\t\n\t\t\t\t\tif(overwriteChar == 'n')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.exit(1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tin = new DataInputStream(new FileInputStream(inFile));\n\t\t\tout = new DataOutputStream(new FileOutputStream(outFile));\n\t\t\t\n\t\t\tin.skipBytes(16); // skip the INES header\n\t\t\tin.read(rom); // read in the prg rom data\n\n\t\t\tout.write(rom, 0, rom.length); // write the rom without INES header\n\t\t\tout.write(rom, 0, rom.length); // write the same data to bank 2\n\t\t\t\n\t\t\t// Let's just be sure the sizes are correct.\n\t\t\tSystem.out.println(\"Size of input file: 0x\" + Long.toHexString(inFile.length()));\n\t\t\tSystem.out.println(\"(Expected: 0x4010)\");\n\t\t\tSystem.out.println(\"Size of output file: 0x\" + Long.toHexString(outFile.length()));\n\t\t\tSystem.out.println(\"(Expected: 0x8000)\");\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(1);\n\t\t}\n\t}", "public static void main(String[] args) {\r\n\r\n try {\r\n \r\n String outFile = \"H:\\\\Nexrad_Viewer_Test\\\\Hutchins\\\\gis\\\\WFUS53-KPAH-152129.txt\";\r\n convertFile(outFile);\r\n \r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(intToRoman(10));\n\t}", "public static void main(String[] args) throws IOException {\n String dataDir = Utils.getDataDir(PrimaveraXmlRead.class);\n\n readProjectUidsFromXmlFile(dataDir);\n\n readLoadPrimaveraXmlProject(dataDir);\n\n readProjectUidsFromStream(dataDir);\n\n // Display result of conversion.\n System.out.println(\"Process completed Successfully\");\n }", "public static void main(String args[]) throws DuplicateNMRRequestException {\n\n // Constants...\n final String vendor = \"xilinx\";\n final String family = \"virtex2\";\n final String part = \"XC2V8000FF1517\";\n // *** Comment out the above name and\n // use the following part if you want the SSRA to run\n // out of resources...\n\n // Load EDIF\n // note: expecting arg0 to be the name of an edif file\n // note: the -L arg is needed if there are child edif files\n EdifCell topCell = XilinxMergeParser.parseAndMergeXilinx(args);\n\n // Flatten the cell...\n System.out.println(\"Flattening the cell...\");\n try {\n topCell = new FlattenedEdifCell(topCell);\n } catch (EdifNameConflictException e5) {\n e5.toRuntime();\n } catch (InvalidEdifNameException e5) {\n e5.toRuntime();\n }\n\n // Create a TMR architecture object for the part\n // specified in the \"constants\" section of this function \n System.out.println(\"Creating new TMR architecture object for part \" + part + \" of family \" + family\n + \" from vendor \" + vendor);\n NMRArchitecture tmrArch = new XilinxNMRArchitecture();\n\n // Create an instance connectivity object\n System.out.println(\"Creating a connectivity object...\");\n EdifCellInstanceGraph ecic = new EdifCellInstanceGraph(topCell);\n\n // Create groups based on bad cuts\n System.out.println(\"Grouping the cell based on bad cuts...\");\n EdifCellBadCutGroupings ecbcg = new EdifCellBadCutGroupings(topCell, tmrArch, ecic);\n\n // Create a group connectivity object\n // this isn't needed for this example, but this is how you\n // would create one...\n //EdifCellInstanceCollectionGraph ecigc = new EdifCellInstanceCollectionGraph(ecic, ecbcg);\n\n // // Create a resource limits object for the given device\n // System.out.println (\"Creating a resource limit information object for part \"+part+\" of family \" + family + \" from vendor \"+vendor);\n // //DeviceUtilization normalResourceCount = DeviceUtilization.createDeviceUtilizationObject(vendor, family, part);\n // DeviceUtilization normalResourceCount = new XilinxVirtexDeviceUtilization(part);\n // System.out.println (\"Static utilization (should be null)...\");\n // System.out.println (normalResourceCount);\n\n // Get the resource utilization of the device for the cell\n // note: this is without TMR\n // note: the utilization is calculated at object creation time\n System.out.println(\"Calculating normal resource utilization of cell \" + topCell);\n DeviceUtilizationTracker duTracker = null;\n try {\n duTracker = DeviceParser.createXilinxDeviceUtilizationTracker(topCell, family, part);\n } catch (OverutilizationException e) {\n throw new EdifRuntimeException(\"ERROR: Initial contents of cell \" + topCell + \" do not fit into part \"\n + part);\n }\n System.out.println(\"Normal utilization for cell \" + topCell);\n System.out.println(duTracker);\n\n // Get a collection of all the bad cut groups in the cell...\n System.out.println(\"Getting a reference to all of the bad cut groups in the cell...\");\n Collection groups = ecbcg.getInstanceGroups();\n\n // Iterate over all of the groups and try to add each one\n // to the resource tracker\n System.out.println(\"Iterating over each bad cut group and trying to add each to the TMR resource tracker...\");\n for (Iterator i = groups.iterator(); i.hasNext();) {\n Collection group = (Collection) i.next();\n try {\n duTracker.nmrInstancesAtomic(group, _replicationFactor);\n } catch (OverutilizationEstimatedStopException e1) {\n System.out\n .println(\"WARNING: Group of instances not added to resource tracker due to estimated resource constraints. \"\n + e1);\n // The following could be a \"continue\" or \"break\" \n // depending on how you want to proceed...\n // presumably you want to believe the resource tracker\n // meaning that it correctly is predicting\n // that you are out of resources\n break;\n } catch (OverutilizationHardStopException e2) {\n System.out.println(\"WARNING: Group of instances not added to resource tracker.\");\n System.out.println(e2);\n // This call adds everything else in the group\n // except those instances which cause hard stops\n try {\n duTracker.nmrInstancesAsManyAsPossible(group, _replicationFactor, null);\n } catch (OverutilizationEstimatedStopException e3) {\n System.out\n .println(\"WARNING: Group of instances not added to resource tracker due to estimated resource constraints. \"\n + e3);\n // The following could be a \"continue\" or \"break\" \n // depending on how you want to proceed...\n // presumably you want to believe the resource tracker\n // meaning that it correctly is predicting\n // that you are out of resources\n break;\n } catch (OverutilizationHardStopException e4) {\n // !!! Shouldn't get here because we called tmrInstances\n // with the flag set to skip hard stops\n throw new EdifRuntimeException(\"ERROR: Shouldn't get here! \" + e4);\n }\n }\n }\n\n System.out.println(\"Utilization for cell \" + topCell + \" after TMR...\");\n System.out.println(duTracker);\n\n }", "public static void main(String[] args) throws Exception {\n Arguments processedArgs = new Arguments(args);\n\n TileToSequenceFile tiler = new TileToSequenceFile();\n\n String inPath = processedArgs.getRequiredString(\"-f\");\n String outPath = processedArgs.getRequiredString(\"-o\");\n\n ImageSeqFileWriter writer = new ImageSeqFileWriter(outPath);\n tiler.doTiling(inPath, writer);\n }", "public static void main(String[] args){\n\t\tMemory mem = getMemInfo();\r\n//\t\tfor(CPU cpu : cpus){\r\n//\t\t\tSystem.out.println(cpu.getName()+\",\"+cpu.getUsedRatio());\r\n//\t\t}\r\n//\t\tfor(Disk d : disks){\r\n//\t\t\tSystem.out.println(d.getName()+\",\"+d.getFreeSize());\r\n//\t\t}\r\n\t\tSystem.out.println(mem.getFreeSize());\r\n//\t\tSystem.out.println(System.getProperty(\"java.library.path\"));\r\n\t}", "public static void main(String[] args) throws Exception {\n\t\t\n\t\tString magType = \"\";\n\t\tString resultsType = \"\";\n\t\tString timeZone = \"\";\n\t\tString pathToDataFile = \"\";\n\t\tString pathToResultsFile = \"\";\n\t\t\t\n\t\tString path = args[0];\n\t\t\n\t\ttry {\n\t\t\tFileReader fr = new FileReader(path);\n\t\t\tScanner sc = new Scanner(fr);\n\t\t\t\n\t\t\tmagType = sc.nextLine();\n\t\t\tresultsType = sc.nextLine();\n\t\t\ttimeZone = sc.nextLine();\n\t\t\tpathToDataFile = sc.nextLine();\n\t\t\tpathToResultsFile = sc.nextLine();\n\t\t\t\n\t\t\tsc.close();\n\t\t\tfr.close();\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\t\t\n\t\t// choose between different types of magnetometer\n\t\tswitch(magType) { \n\t\tcase \"-pa\": // Pos1-aero\n\t\t\tPOSaero pa = new POSaero(timeZone);\n\t\t\tpa.getDataFromFile(pathToDataFile);\n\t\t\tpa.writeDataToFile(pathToResultsFile, resultsType, \"+00\");\t\n\t\t\tbreak;\n\t\tcase \"-pg\": // MMPOS \n\t\t\tMMPOS pg = new MMPOS(timeZone);\n\t\t\tpg.getDataFromFile(pathToDataFile);\n\t\t\tpg.writeDataToFile(pathToResultsFile, resultsType, \"+00\");\n\t\t\tbreak;\n\t\tcase \"-m\": // Minimag\n\t\t\tMinimag m = new Minimag(timeZone);\n\t\t\tm.getDataFromFile(pathToDataFile);\n\t\t\tm.writeDataToFile(pathToResultsFile, resultsType, \"+00\");\n\t\t\tbreak;\n\t\tcase \"-g\": // GEM\n\t\t\tGEM g = new GEM(timeZone);\n\t\t\tg.getDataFromFile(pathToDataFile);\n\t\t\tg.writeDataToFile(pathToResultsFile, resultsType, \"+00\");\n\t\t\tbreak;\n\t\tcase \"-mq\": // quantum (MVS)\n\t\t\tMVS mvs = new MVS(timeZone);\n\t\t\tmvs.getDataFromFile(pathToDataFile);\n\t\t\tmvs.writeDataToFile(pathToResultsFile, resultsType, \"+00\");\n\t\t\tbreak;\n\t\tcase \"-gs\": // Geoscan\n\t\t\tGeoscan gs = new Geoscan(timeZone);\n\t\t\tgs.getDataFromFile(pathToDataFile);\n\t\t\tgs.writeDataToFile(pathToResultsFile, resultsType, \"+00\");\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tSystem.out.println(\"Wrong type of magnetometer\");\n\t\t}\n\t}", "public static void main(String[] args) throws Exception {\n\t\tSettings.initSettings();\n\t\tnew A1_Transformer().run();\n\t\tSystem.exit(0);\n\t}", "public static void main(String[] args) {\n\t\tNormalize normal = new Normalize(2001, 2016, 1, 11);\r\n\t\t// normal.newsnum_daily2monthly(\"C:/Users/install/Desktop/hxs/bbc/bbcdata/newsnum.txt\",\r\n\t\t// \"C:/Users/install/Desktop/hxs/bbc/bbcdata/newsmonth.txt\");\r\n\t\t// normal.readmontlynums(\"C:/Users/install/Desktop/hxs/bbc/bbcdata/newsmonth.txt\");\r\n\t\t normal.dir2monthly(\"C:/Users/install/Desktop/hxs/test/FOX/tops/top238.txt\",\r\n\t\t \"C:/Users/install/Desktop/hxs/test/FOX/allfrq/\",\r\n\t\t \"C:/Users/install/Desktop/hxs/test/FOX/tops/\");\r\n//\t\tnormal.getmatrixfromfils(\"C:/Users/install/Desktop/hxs/bbc/MeSH/top120.txt\",\r\n//\t\t\t\t\"C:/Users/install/Desktop/hxs/bbc/bbcdata/topfrqswithspace/\");\r\n//\t\tnormal.normal(\"C:/Users/install/Desktop/hxs/bbc/bbcdata/newsmonth.txt\");\r\n\t}", "public static void main(String[] args) {\n\t\t// Set initial position in the pose network\n\t\tdouble x_pc = (Math.floor(PC_DIM_XY / 2.0) + 1);\n\t\tdouble y_pc = (Math.floor(PC_DIM_XY / 2.0) + 1);\n\t\tdouble th_pc = (Math.floor(PC_DIM_TH / 2.0) + 1);\n\n\t\t// Posecells[x_pc][y_pc][th_pc] = 1;\n\t\tdouble[] max_act_xyth_path = { x_pc, y_pc, th_pc };\n\n\t\t// Set the initial position in the odo and experience map\n\t\tprev_vrot_image_x_sums = new double[IMAGE_ODO_X_RANGE.length];\n\t\tprev_vtrans_image_x_sums = new double[IMAGE_ODO_X_RANGE.length];\n\n\t\tOdo initOdo = new Odo(0, PI / 2, prev_vtrans_image_x_sums,\n\t\t\t\tprev_vrot_image_x_sums, IMAGE_VTRANS_Y_RANGE,\n\t\t\t\tIMAGE_VROT_Y_RANGE, IMAGE_ODO_X_RANGE);\n\n\t\t// Specify movie and frames to read\n\t\t// In our case, specify image size, in x and y direction\n\n\t\tFFmpegFrameGrabber grabber = new FFmpegFrameGrabber(MOV_FILE);\n\t\tFFmpegFrameGrabber dispGrabber = null;\n\t\tif (DISP_MOV_FILE != \"\"){\n\t\t\tdispGrabber = new FFmpegFrameGrabber(DISP_MOV_FILE);\n\t\t}\n\n\t\t// store size in a variable\n\t\t// 5 used as random size\n\t\tArrayList<VT> vts = new ArrayList<VT>();\n\t\tArrayList<Odo> odos = new ArrayList<Odo>();\n\t\tArrayList<Experience> exps = new ArrayList<Experience>();\n\t\tArrayList<Link> links = new ArrayList<Link>();\n\n\t\tint numvts = 1;\n\n\t\t// Need to fix parameters; more specifically, array sizes\n\t\tvts.add(new VT(numvts, new double[] {}, 1.0, x_pc, y_pc, th_pc, 1, 1));\n\t\todos.add(initOdo);\n\n\t\t// vt[numvts].template_decay = 1.0;\n\t\tVT vtcurr = (VT) vts.get(0);\n\t\tvtcurr.template_decay = 1.0;\n\n\t\t// Experience[] exps = new Experience[5];\n\t\t// figure out where to get id\n\t\texps.add(new Experience(0, x_pc, y_pc, th_pc, 0, 0, (PI / 2), 1, links));\n\n\t\t// Process the parameters\n\t\t// nargin: number of arguments passed to main\n\t\t// varargin: input variable in a function definition statement that\n\t\t// allows the function to accept any number of input arguments\n\t\t// 1xN cell array, in which N is the number of inputs that the function\n\t\t// receives after explicitly declared inputs;\n\t\t// use prompt.in\n\t\tfor (int i = 0; i < (args.length - 3); i++) {\n\t\t\t// figure out varargin in Java\n\t\t\t// should be an array that is passed to the main(?) - double check\n\t\t\tswitch (args[i]) {\n\t\t\tcase \"RENDER_RATE\":\n\t\t\t\tRENDER_RATE = Integer.parseInt(args[i + 1]);\n\t\t\t\tbreak;\n\t\t\tcase \"BLOCK_READ\":\n\t\t\t\tBLOCK_READ = Integer.parseInt(args[i + 1]);\n\t\t\t\tbreak;\n\t\t\t// HK EDIT START\n\t\t\tcase \"START_FRAME\":\n\t\t\t\tSTART_FRAME = Integer.parseInt(args[i + 1]);\n\t\t\t\tbreak;\n\t\t\tcase \"END_FRAME\":\n\t\t\t\tEND_FRAME = Integer.parseInt(args[i + 1]);\n\t\t\t\tbreak;\n\n\t\t\tcase \"PC_VT_INJECT_ENERGY\":\n\t\t\t\tPC_VT_INJECT_ENERGY = Integer.parseInt(args[i + 1]);\n\t\t\t\tbreak;\n\t\t\tcase \"IMAGE_VT_Y_RANGE\":\n\t\t\t\tIMAGE_VT_Y_RANGE = Util.setRange(Integer.parseInt(args[i + 1]),\n\t\t\t\t\t\tInteger.parseInt(args[i + 2]));\n\t\t\t\tbreak;\n\t\t\tcase \"IMAGE_VT_X_RANGE\":\n\t\t\t\tIMAGE_VT_X_RANGE = Util.setRange(Integer.parseInt(args[i + 1]),\n\t\t\t\t\t\tInteger.parseInt(args[i + 2]));\n\t\t\t\t// break;\n\t\t\t\t// case \"VT_SHIFT_MATCH\": VT_SHIFT_MATCH =\n\t\t\t\t// Integer.parseInt(args[i+1]);\n\t\t\t\t// break;\n\t\t\t\t// case \"VT_MATCH_THRESHOLD\": VT_MATCH_THRESHOLD =\n\t\t\t\t// Integer.parseInt(args[i+1]);\n\t\t\t\t// break;\n\t\t\t\t//\n\t\t\t\t// case \"VTRANS_SCALE\": VTRANS_SCALE =\n\t\t\t\t// Integer.parseInt(args[i+1]);\n\t\t\t\t// break;\n\t\t\t\t// case \"VISUAL_ODO_SHIFT_MATCH\": VISUAL_ODO_SHIFT_MATCH =\n\t\t\t\t// Integer.parseInt(args[i+1]);\n\t\t\t\t// break;\n\t\t\t\t// case \"IMAGE_VTRANS_Y_RANGE\": IMAGE_VTRANS_Y_RANGE =\n\t\t\t\t// Integer.parseInt(args[i+1]);\n\t\t\t\t// break;\n\t\t\t\t// case \"IMAGE_VROT_Y_RANGE\": IMAGE_VROT_Y_RANGE =\n\t\t\t\t// Integer.parseInt(args[i+1]);\n\t\t\t\t// break;\n\t\t\t\t// case \"IMAGE_ODO_X_RANGE\": IMAGE_ODO_X_RANGE =\n\t\t\t\t// Integer.parseInt(args[i+1]);\n\t\t\t\t// break;\n\t\t\t\t//\n\t\t\t\t// case \"EXP_DELTA_PC_THRESHOLD\": EXP_DELTA_PC_THRESHOLD =\n\t\t\t\t// Integer.parseInt(args[i+1]);\n\t\t\t\t// break;\n\t\t\t\t// case \"EXP_CORRECTION\": EXP_CORRECTION =\n\t\t\t\t// Integer.parseInt(args[i+1]);\n\t\t\t\t// break;\n\t\t\t\t// case \"EXP_LOOPS\": EXP_LOOPS = Integer.parseInt(args[i+1]);\n\t\t\t\t// break;\n\t\t\t\t//\n\t\t\t\t// case \"ODO_ROT_SCALING\": ODO_ROT_SCALING =\n\t\t\t\t// Integer.parseInt(args[i+1]);\n\t\t\t\t// break;\n\t\t\t\t// case \"POSECELL_VTRANS_SCALING\": POSECELL_VTRANS_SCALING =\n\t\t\t\t// Integer.parseInt(args[i+1]);\n\t\t\t\t// break;\n\t\t\t\t// HK EDIT END\n\t\t\t}\n\t\t}\n\n\t\t// vtcurr.template = new double[IMAGE_VT_X_RANGE.length];\n\n\t\tint frameIdx = 0;\n\n\t\ttry {\n\t\t\tgrabber.start();\n\t\t\tif (DISP_MOV_FILE != \"\"){\n\t\t\t\tdispGrabber.start();\n\t\t\t}\n\t\t} catch (Exception e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tint frameCount = grabber.getLengthInFrames();\n\t\tEND_FRAME = frameCount;\n\t\tJFrame frame = new JFrame();\n\t\tif (DISP_MOV_FILE != \"\") {\n\t\t\tframe.setSize(1236, 744);\n\t\t} else {\n\t\t\tframe.setSize(640, 480);\n\t\t}\n\t\t\n\t\tframe.setVisible(true);\n\n\t\t// showOnScreen(0,frame);\n\n\t\t// Setup to display results\n\t\tDisplay display = new Display(\"RatSlam Output\");\n\t\tdisplay.pack();\n\t\tRefineryUtilities.centerFrameOnScreen(display);\n\t\t// showOnScreen(0,display);\n\t\tdisplay.setVisible(true);\n\t\tDefaultXYDataset dataset = (DefaultXYDataset) display.dataset;\n\n\t\tExpMapIteration expItr = new ExpMapIteration();\n\n\t\tExpMapIteration.EXP_DELTA_PC_THRESHOLD = 1.0;\n\t\tExpMapIteration.EXP_LOOPS = 100;\n\t\tExpMapIteration.EXP_CORRECTION = 0.5;\n\t\tExpMapIteration.PC_DIM_XY = PC_DIM_XY;\n\t\tExpMapIteration.PC_DIM_TH = PC_DIM_TH;\n\n\t\tOpenCVFrameConverter.ToIplImage grabberConverter = new OpenCVFrameConverter.ToIplImage();\n\t\tJava2DFrameConverter paintConverter = new Java2DFrameConverter();\n\t\tBufferedImage img = null;\n\t\tBufferedImage dispImg = null;\n\n//\t\tfor (frameIdx = 0; frameIdx < END_FRAME; frameIdx++) {\n\t\twhile (true) {\n\t\t\tframeIdx++;\n\t\t\tSystem.out.println(\"debug: frame: \" + frameIdx + \" of ???\");\n\t\t\t// save the experience map information to the disk for later\n\t\t\t// playback\n\t\t\t// read the avi file (in our case, the photo file) and record the\n\t\t\t// delta time\n\n\t\t\ttry {\n\t\t\t\torg.bytedeco.javacv.Frame f = grabber.grab();\n\t\t\t\timg = paintConverter.getBufferedImage(f,\n\t\t\t\t\t\t2.2 / grabber.getGamma());\n\t\t\t\tif (DISP_MOV_FILE != \"\"){\n\t\t\t\t\torg.bytedeco.javacv.Frame fd = dispGrabber.grab();\n\t\t\t\t\tdispImg = paintConverter.getBufferedImage(fd,\n\t\t\t\t\t\t\t2.2 / dispGrabber.getGamma());\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t\tImageFilter filter = new GrayFilter(true, 0);\n\t\t\tImageProducer producer = new FilteredImageSource(img.getSource(),\n\t\t\t\t\tfilter);\n\t\t\tImage grayImg = Toolkit.getDefaultToolkit().createImage(producer);\n\t\t\tif (DISP_MOV_FILE != \"\"){\n\t\t\t\tdrawFrame(frame, dispImg, dispImg, frameIdx); //using display image here for ONR visit, pretty it up, rest of processign is on img\n\t\t\t} else {\n\t\t\t\tdrawFrame(frame, img, img, frameIdx);\n\t\t\t}\n\t\t\tVisualTemplate viewTemplate = new VisualTemplate(img, x_pc, y_pc,\n\t\t\t\t\tth_pc, img.getWidth(), img.getHeight(), vts);\n\t\t\tvtID = viewTemplate.visual_template();\n\t\t\tVisualOdometry vo = new VisualOdometry();\n\t\t\tvo.visual_odometry(img, odos);\n\t\t\t// XXX: use odoData to track odo data for comparison as per Matlab\n\t\t\t// main\n\t\t\tPosecell_Iteration pci = new Posecell_Iteration(vtID, odos.get(odos\n\t\t\t\t\t.size() - 1).vtrans, odos.get(odos.size() - 1).vrot, pc,\n\t\t\t\t\tvts, PC_E_XY_WRAP, PC_E_TH_WRAP, PC_I_XY_WRAP, PC_I_TH_WRAP);\n\t\t\tpc = pci.iteration();\n\n\t\t\txyth = pc.getPosecellXYTH(PC_XY_SUM_SIN_LOOKUP,\n\t\t\t\t\tPC_XY_SUM_COS_LOOKUP, PC_TH_SUM_SIN_LOOKUP,\n\t\t\t\t\tPC_TH_SUM_COS_LOOKUP, PC_CELLS_TO_AVG, PC_AVG_XY_WRAP,\n\t\t\t\t\tPC_AVG_TH_WRAP);\n\t\t\t// System.out.println(\"debug: odo.vtrans: \"+\n\t\t\t// odos.get(odos.size()-1).vtrans);\n\n\t\t\tx_pc = xyth[0];\n\t\t\ty_pc = xyth[1];\n\t\t\tth_pc = xyth[2];\n\n\t\t\texpItr.iterate(vtID, odos.get(odos.size() - 1).vtrans,\n\t\t\t\t\todos.get(odos.size() - 1).vrot, x_pc, y_pc, th_pc, vts,\n\t\t\t\t\texps);\n\n\t\t\tdataset.addSeries(\"Experience Map\", getExpsXY(exps));\n\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\tjflex.Main.generate(new File(\"especificacoes/miniC.lex\"));\n\t}", "public static void main(String[] args)\n {\n CmdLineOptions options = new CmdLineOptions(args);\n Task task = new ProgressTask(options);\n Experiment exp = new EpisodicExperiment(task, options.getAgent());\n exp.doEpisodes(2);\n }", "public static void main(String[] args) {\n\n ArrayClone();\n //ArrayToString();\n //ArrayReverse();\n\n //ForToForeach();\n //SaveOurRAM();\n\n //Homework_Example_1();\n //Homework_Example_2();\n }", "public static void main(final String[] args) {\n \tString enginePath = engines[8];\n\t\tEngineParameter eparams = new EngineParameter(enginePath);\n\n\t\tString url = \"http://files.grouplens.org/datasets/movielens/ml-1m.zip\";\n String folder = \"src/resources/main/data/ml-1m\";\n String modelPath = \"src/resources/main/crossValid/ml-1m/model/\";\n String recPath = \"src/resources/main/crossValid/ml-1m/recommendations/\";\n String dataFile = eparams.getDataSouceParams().getSourceLocation().get(0);\n int nFolds = N_FOLDS;\n \t\t\n System.out.println(\"Preparing splits...\");\n prepareSplits(url, nFolds, dataFile, folder, modelPath);\n \n System.out.println(\"Gathering recomendations...\");\n //recommend(nFolds, modelPath, recPath); // RiVal's original step.\n //orbsRecommend(nFolds, eparams, modelPath); // Based on RiVal' step\n mixedRecommend(nFolds, eparams, modelPath); // Mixed step\n \n //System.out.println(\"Preparing strategy...\");\n // the strategy files are (currently) being ignored\n //prepareStrategy(nFolds, modelPath, recPath, modelPath);\n\n System.out.println(\"Evaluating...\");\n evaluate(nFolds, modelPath, recPath);\n }", "public static void main(String[] args) throws IOException {\n byte[] msg = readMessage();\n // Initialize SCALE Reader\n ScaleCodecReader rdr = new ScaleCodecReader(msg);\n // Call it providing a custom reader for the expected class\n Status status = rdr.read(new StatusReader());\n\n // All read\n System.out.println(\"Decoded Status: height=\" + status.height + \", hash=\" + status.bestHash.toString());\n\n // Write status as bytes\n ByteArrayOutputStream buf = new ByteArrayOutputStream();\n ScaleCodecWriter writer = new ScaleCodecWriter(buf);\n writer.write(new StatusWriter(), status);\n // don't forget to close writer\n writer.close();\n\n System.out.println(\"Encoded Status: \" + Hex.encodeHexString(buf.toByteArray()));\n }", "public static void main(String[] args) {\n\t\tMovie coco = new Movie(\"Coco\", \"Animated\");\n\t\tmovList.add(coco);\n\t\tcoco.setCat(\"Supernatural\");\n\t\tcoco.setCat(\"Family\");\n\t\tMovie iHeart = new Movie(\"I <3 Huckabees\", \"Quirky\");\n\t\tmovList.add(iHeart);\n\t\tiHeart.setCat(\"Comedy\");\n\t\tiHeart.setCat(\"Drama\");\n\t\tMovie machGo = new Movie(\"Speed Racer\", \"Action\");\n\t\tmovList.add(machGo);\n\t\tmachGo.setCat(\"Comedy\");\n\t\tmachGo.setCat(\"Family\");\n\t\tMovie fightClub = new Movie(\"Fight Club\", \"Drama\");\n\t\tmovList.add(fightClub);\n\t\tfightClub.setCat(\"Thriller\");\n\t\tMovie scott = new Movie(\"Scott Pilgrim vs. The World\", \"Action\");\n\t\tmovList.add(scott);\n\t\tscott.setCat(\"Comedy\");\n\t\tscott.setCat(\"Coming of age\");\n\t\tscott.setCat(\"Teen\");\n\t\tMovie scream = new Movie(\"Scream\", \"Horror\");\n\t\tmovList.add(scream);\n\t\tscream.setCat(\"Thriller\");\n\t\tscream.setCat(\"Teen\");\n\t\tMovie nick = new Movie(\"Nick & Norah's Infinite Playlist\", \"Teen\");\n\t\tmovList.add(nick);\n\t\tnick.setCat(\"Romantic Comedy\");\n\t\tnick.setCat(\"Coming of age\");\n\t\tMovie fiveHun = new Movie(\"(500) Days of Summer\", \"Romantic Comedy\");\n\t\tmovList.add(fiveHun);\n\t\tfiveHun.setCat(\"Drama\");\n\t\tfiveHun.setCat(\"Coming of Age\");\n\t\tfiveHun.setCat(\"Quirky\");\n\t\tMovie nightMare = new Movie(\"The Nightmare Before Christmas\", \"Animated\");\n\t\tmovList.add(nightMare);\n\t\tnightMare.setCat(\"Family\");\n\t\tnightMare.setCat(\"Comedy\");\n\t\tMovie ferris = new Movie(\"Ferris Bueller's Day Off\");\n\t\tmovList.add(ferris);\n\t\tferris.setCat(\"Teen\");\n\t\tferris.setCat(\"Coming of age\");\n\t\tferris.setCat(\"Comedy\");\n//Menu is moved to it's own method for simplicity. \n\t\tSystem.out.println(\n\t\t\t\t\"Welcome to the movie list app! \\n \\nThere are currently \" + movList.size() + \" movies on the list.\");\n\t\tmenu();\n\t}", "public static void main(String[] args) {\n int num = 400 ;\n _12_Integer_to_Roman integer_to_roman = new _12_Integer_to_Roman();\n String work = integer_to_roman.work(num);\n System.out.println(\"work is: \" + work) ;\n }", "public static void main(String[] args) throws IOException {\n\t\tString MUMmerFile = args[0];\n\t\tString ErrorEPGAcontigFile = args[1];\n\t\tString ErrorFreeEPGAcontigFile = args[2];\n\t\tString SPAdescontigFile = args[3];\n\t\tString DataName = args[4];\n\t\tString FinalEPGAcontigPath = args[5];\n\t\t//Alignment.\n\t\tint SizeOfMUMmerFile = CommonClass.getFileLines(MUMmerFile);\n\t\tString MUMerArray[] = new String[SizeOfMUMmerFile];\n\t\tint RealSizeMUMmer = CommonClass.FileToArray(MUMmerFile, MUMerArray);\n\t\tSystem.out.println(\"The real size of MUMmer is:\" + RealSizeMUMmer);\n\t\t//Load EPGA.\n\t\tint SizeOfErrorEPGAFile = CommonClass.getFileLines(ErrorEPGAcontigFile);\n\t\tString ErrorEPGAcontigArray[] = new String[SizeOfErrorEPGAFile];\n\t\tint RealSizeErrorEPGAcontig = CommonClass.FastaToArray(ErrorEPGAcontigFile, ErrorEPGAcontigArray);\n\t\tSystem.out.println(\"The real size of Error EPGA assembly is:\" + RealSizeErrorEPGAcontig);\n\t\t//Load EPGA.\n\t\tint SizeOfErrorFreeEPGAFile = CommonClass.getFileLines(ErrorFreeEPGAcontigFile);\n\t\tString ErrorFreeEPGAcontigArray[] = new String[SizeOfErrorFreeEPGAFile];\n\t\tint RealSizeErrorFreeEPGAcontig = CommonClass.FastaToArray(ErrorFreeEPGAcontigFile, ErrorFreeEPGAcontigArray);\n\t\tSystem.out.println(\"The real size of Error Free EPGA assembly is:\" + RealSizeErrorFreeEPGAcontig);\n\t\t//Load SPAdes.\n\t\tint SizeOfSPAdesFile = CommonClass.getFileLines(SPAdescontigFile);\n\t\tString SPAdescontigArray[] = new String[SizeOfSPAdesFile];\n\t\tint RealSizeSPAdescontig = CommonClass.FastaToArray(SPAdescontigFile, SPAdescontigArray);\n\t\tSystem.out.println(\"The real size of SPAdes assembly is:\" + RealSizeSPAdescontig);\n\t\t//Process.\n\t\tSet<Integer> hashSet = new HashSet<Integer>();\n\t\tfor (int w = 4; w < RealSizeMUMmer; w++) {\n\t\t\tif (MUMerArray[w].charAt(0) != '#') {\n\t\t\t\tint CountSave = 0;\n\t\t\t\tString SaveTempArray[] = new String[RealSizeMUMmer];\n\t\t\t\tString[] SplitLine1 = MUMerArray[w].split(\"\\t|\\\\s+\");\n\t\t\t\tSaveTempArray[CountSave++] = MUMerArray[w];\n\t\t\t\tMUMerArray[w] = \"#\" + MUMerArray[w];\n\t\t\t\tfor (int e = w + 1; e < RealSizeMUMmer; e++) {\n\t\t\t\t\tif (MUMerArray[e].charAt(0) != '#') {\n\t\t\t\t\t\tString[] SplitLine2 = MUMerArray[e].split(\"\\t|\\\\s+\");\n\t\t\t\t\t\tif (SplitLine1[11].equals(SplitLine2[11])) {\n\t\t\t\t\t\t\tSaveTempArray[CountSave++] = MUMerArray[e];\n\t\t\t\t\t\t\tMUMerArray[e] = \"#\" + MUMerArray[e];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Mark read.\n\t\t\t\tfor (int r = 0; r < CountSave; r++) {\n\t\t\t\t\tString[] SplitLine31 = SaveTempArray[r].split(\"\\t|\\\\s+\");\n\t\t\t\t\tString[] SplitLine41 = SplitLine31[12].split(\"_\");\n\t\t\t\t\tint SPAdes_id = Integer.parseInt(SplitLine41[1]);\n\t\t\t\t\thashSet.add(SPAdes_id);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//Write.\n\t\tint CountCorrEPGA=0;\n\t\tString CorrEPGAContigArray[]=new String[2*(RealSizeErrorFreeEPGAcontig+RealSizeSPAdescontig)];\n\t\tint EPId = 0;\n\t\tfor (int w = 0; w < RealSizeErrorFreeEPGAcontig; w++) {\n CorrEPGAContigArray[CountCorrEPGA++]=ErrorFreeEPGAcontigArray[w];\n\t\t}\n\t\tIterator<Integer> it = hashSet.iterator();\n\t\twhile (it.hasNext()) {\n\t\t\tint EPGAIndex = it.next();\n CorrEPGAContigArray[CountCorrEPGA++]=SPAdescontigArray[EPGAIndex];\n\t\t}\n\t\t//Sort process.\n\t\tString exch=\"\";\n\t\tfor(int w=0;w<CountCorrEPGA;w++)\n\t\t{\n\t\t\tfor(int h=w+1;h<CountCorrEPGA;h++)\n\t\t\t{\n\t\t\t\tif(CorrEPGAContigArray[w].length()<CorrEPGAContigArray[h].length())\n\t\t\t\t{\n\t\t\t\t\texch=CorrEPGAContigArray[w];\n\t\t\t\t\tCorrEPGAContigArray[w]=CorrEPGAContigArray[h];\n\t\t\t\t\tCorrEPGAContigArray[h]=exch;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//Delete duplicate records.\n\t\tfor(int w=0;w<CountCorrEPGA;w++)\n\t\t{\n\t\t\tfor(int h=w+1;h<CountCorrEPGA;h++)\n\t\t\t{\n\t\t \tif(CorrEPGAContigArray[w].equals(CorrEPGAContigArray[h])||CorrEPGAContigArray[w].equals(CommonClass.reverse(CorrEPGAContigArray[h])))\n\t\t\t\t{\n\t\t\t\t\tCorrEPGAContigArray[h]=\"%\"+CorrEPGAContigArray[h];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor(int j=0;j<CountCorrEPGA;j++)\n\t\t{\n\t\t\tif(CorrEPGAContigArray[j].charAt(0)!='%')\n\t\t\t{\n\t\t\t\t FileWriter writer = new FileWriter(FinalEPGAcontigPath + \"/CorrEPGAcontig.\" + DataName + \".fa\", true);\n\t\t\t writer.write(\">\" + (EPId++) + \"\\n\" + CorrEPGAContigArray[j] + \"\\n\");\n\t\t\t writer.close();\n\t\t\t}\n\t\t}\n\t\t//Free.\n\t\tMUMerArray=null;\n\t\tErrorEPGAcontigArray=null;\n\t\tErrorFreeEPGAcontigArray=null;\n\t\tSPAdescontigArray=null;\n\t\tCorrEPGAContigArray=null;\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\tTesteNumeroRomano tn=new TesteNumeroRomano();\r\n\t\ttn.testaSubtracaoDoisNumerosRomanos();\r\n\r\n\t}", "public static void main(String[] args) throws IOException, InvalidMidiDataException {\r\n String file = \"\";\r\n String viewMode = \"\";\r\n file += args[0];\r\n viewMode = args[1];\r\n CompositionBuilder<MusicMakerModel> comp = new MusicMakerModel.MusicBuilder();\r\n IMusicMakerModel model = null;\r\n model = MusicReader.parseFile(new FileReader(file), comp);\r\n IGUIView view = GUIViewFactory.create(viewMode);\r\n Controller cont = new Controller(view, model);\r\n cont.start();\r\n }", "public static void main(String args[]){\r\n\t\ttry{\r\n\t\t\tExtract ex = new Extract();\r\n\t\t\t\r\n\t\t\t// TODO: remove hard coded file\r\n\t\t\t//ex.unZip(\"D:\\\\Workspace\\\\APKExtractor\\\\res\\\\Fragment.apk\");\r\n\t\t\t//ex.unZip(\"E:\\\\Workspace3.7\\\\APKExtractor\\\\res\\\\Fragment.apk\");\r\n\t\t\t// ex.unZip(\"E:\\\\Workspace3.7\\\\APKExtractor\\\\res\\\\YPmobile.apk\");\r\n\t\t\t\r\n\t\t\tif(args == null || args.length == 0){\r\n\t\t\t\tthrow new Exception(\"Please mention APK file.\\nUsage java -cp CLASSPATH com.pras.Extract test.apk\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tString file = args[0];\r\n\t\t\tif(args.length > 1){\r\n\t\t\t\ttry{\r\n\t\t\t\t\tSystem.out.println(\"Log Level: \"+ args[1]);\r\n\t\t\t\t\tSystem.out.println(\"1- Debug, 2- Production. Debug is slow.\");\r\n\t\t\t\t\tint logLevel = Integer.parseInt(args[1]);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(logLevel != Log.DEBUG_LEVEL && logLevel != Log.PRODUCTION_LEVEL)\r\n\t\t\t\t\t\tthrow new Exception(\"Unsupported loglevel \"+ logLevel +\". Supported values: Debug- 1, Production - 2\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tLog.setLogLevel(logLevel);\r\n\t\t\t\t\t\r\n\t\t\t\t}catch(Exception e){\r\n\t\t\t\t\tthrow new Exception(\"Incorrect Log Level. Please mention APK file.\\nUsage java -cp CLASSPATH com.pras.Extract test.apk\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Parsing data, please wait...\");\r\n\t\t\t// Unzip content\r\n\t\t\tex.unZip(file);\r\n\t\t\t// Parse Binary XML\r\n\t\t\tex.decodeBX();\r\n\t\t\t// Decode DEX file\r\n\t\t\tex.decodeDex();\r\n\t\t\t\r\n\t\t\tLog.exitLogger();\r\n\t\t\tSystem.out.println(\"Done!\");\r\n\t\t\t// EXperimentel. Still working on it...\r\n\t\t\t//ex.decodeResource();\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}", "public static void main(String[] argv) {\r\n\t\tDemo15 demo = new Demo15();\r\n\t\tdemo.start();\r\n\t}", "public static void main(String[] args) {\n\n if (args.length < 2 || args.length > 3) {\n System.out.println(\"Usage: BuildDemoData <dir> <file> [<jenaflag>]\");\n System.out.println(\"where <dir> is the output directory\");\n System.out.println(\"where <file> is a properties file\");\n System.out.println(\"where <jenaflag> is any value\");\n System.exit(0);\n }\n\n Properties dataProps = new Properties();\n\n try {\n File props = new File(args[1]);\n FileInputStream fis = new FileInputStream(props);\n dataProps.load((InputStream) fis);\n } catch (Exception e) {\n System.err.println(e.toString());\n e.printStackTrace();\n }\n\n \tModel model = ModelFactory.createDefaultModel();\n try {\n model = getModelFromFiles(dataProps);\n } catch (Exception e) {\n System.err.println(e.toString());\n e.printStackTrace();\n }\n \n System.out.println(\"Writing no inferencing model...\");\n writeModel(model, args[0] + \"simileDemoNoInference.rdf\");\n System.out.println(\"Uninferenced model contains \" + model.size() + \" statements\");\n\n System.out.println(\"Inferencing...\"); \t\n if (args.length == 2) {\n Reasoner reasoner = new SimileReasoner();\n writeModel(reasoner.process(model), args[0] + \"simileDemoMappingInference.rdf\");\n } else {\n Reasoner reasoner = new JenaReasoner();\n writeModel(reasoner.process(model), args[0] + \"simileDemoJenaInference.rdf\");\n }\n \n System.out.println(\"Inferenced model contains \" + model.size() + \" statements\");\n }", "public void run()\r\n/* 41: */ {\r\n/* 42: */ try\r\n/* 43: */ {\r\n/* 44: 40 */ Connections.getPorts(MovieManager.this).transmit(\"switch tab\", \"Video annotation\");\r\n/* 45: 41 */ MovieManager.this.movieDescriptions = new ArrayList();\r\n/* 46: */ \r\n/* 47: 43 */ List<URL> fileNames = PathFinder.listFiles(\"visualmemory/annotations\", \".txt\");\r\n/* 48: 44 */ List<URL> movieURLs = PathFinder.listFiles(\"visualmemory/videos\", \"mov\");\r\n/* 49: 45 */ movieURLs.addAll(PathFinder.listFiles(\"visualmemory/videos\", \"mpg\"));\r\n/* 50: */ BufferedReader reader;\r\n/* 51: */ String line;\r\n/* 52: 47 */ for (Iterator localIterator = fileNames.iterator(); localIterator.hasNext(); (line = reader.readLine()) != null)\r\n/* 53: */ {\r\n/* 54: 47 */ URL annotationURL = (URL)localIterator.next();\r\n/* 55: 48 */ String txtFileName = FilenameUtils.getBaseName(URLDecoder.decode(annotationURL.toString(), \"utf-8\"));\r\n/* 56: 49 */ URL movieURL = PathFinder.lookupURL(\"visualmemory/videos/\" + txtFileName + \".mov\");\r\n/* 57: 50 */ if (movieURL == null) {\r\n/* 58: 51 */ movieURL = PathFinder.lookupURL(\"visualmemory/videos/\" + txtFileName + \".mpg\");\r\n/* 59: */ }\r\n/* 60: 53 */ if (movieURL == null) {\r\n/* 61: 54 */ Mark.say(new Object[] {\"No movie named \", txtFileName });\r\n/* 62: */ }\r\n/* 63: 56 */ Mark.say(new Object[] {\"MovieURL is \" + movieURL });\r\n/* 64: 57 */ Connections.getPorts(MovieManager.this).transmit(Html.h1(\"Annotations of \" + txtFileName + \":\"));\r\n/* 65: */ \r\n/* 66: 59 */ MovieDescription movieDescription = new MovieDescription(movieURL);\r\n/* 67: 60 */ MovieManager.this.movieDescriptions.add(movieDescription);\r\n/* 68: 61 */ Mark.say(new Object[] {\"Now movie count is\", Integer.valueOf(MovieManager.this.movieDescriptions.size()), annotationURL, \"-->\", movieURL });\r\n/* 69: 62 */ reader = new BufferedReader(new InputStreamReader(annotationURL.openStream()));\r\n/* 70: */ \r\n/* 71: 64 */ continue;\r\n/* 72: */ String line;\r\n/* 73: 65 */ String prefix = \"summary:\";\r\n/* 74: 66 */ boolean test = line.toLowerCase().startsWith(prefix);\r\n/* 75: 67 */ MovieLink movieLink = null;\r\n/* 76: 68 */ if (test)\r\n/* 77: */ {\r\n/* 78: 69 */ line = line.substring(prefix.length()).trim();\r\n/* 79: */ \r\n/* 80: */ \r\n/* 81: 72 */ movieLink = new MovieLink(line, movieDescription);\r\n/* 82: 73 */ movieDescription.addSummary(movieLink);\r\n/* 83: */ }\r\n/* 84: 75 */ else if (line.indexOf(\":\") > 0)\r\n/* 85: */ {\r\n/* 86: 76 */ int index = line.indexOf(\":\");\r\n/* 87: 77 */ String frames = line.substring(0, index);\r\n/* 88: 78 */ line = line.substring(index + 1).trim();\r\n/* 89: */ \r\n/* 90: */ \r\n/* 91: 81 */ movieLink = new MovieLink(line, movieDescription, frames);\r\n/* 92: 82 */ movieDescription.addEvent(movieLink);\r\n/* 93: */ }\r\n/* 94: 84 */ if (movieLink != null)\r\n/* 95: */ {\r\n/* 96: 85 */ String phrase = movieLink.getPhrase();\r\n/* 97: 86 */ Sequence sequence = null;\r\n/* 98: 87 */ Entity instantiation = null;\r\n/* 99: */ \r\n/* 100: 89 */ sequence = MovieManager.this.gauntlet.getStartParser().parse(phrase);\r\n/* 101: 90 */ if (sequence != null) {\r\n/* 102: 91 */ instantiation = MovieManager.this.gauntlet.getNewSemanticTranslator().interpret(sequence);\r\n/* 103: */ }\r\n/* 104: 93 */ if (instantiation.isA(\"semantic-interpretation\"))\r\n/* 105: */ {\r\n/* 106: 94 */ if (instantiation.sequenceP())\r\n/* 107: */ {\r\n/* 108: 95 */ Sequence s = (Sequence)instantiation;\r\n/* 109: 96 */ if (!s.getElements().isEmpty()) {\r\n/* 110: 97 */ instantiation = s.getElement(0);\r\n/* 111: */ }\r\n/* 112: */ }\r\n/* 113: */ }\r\n/* 114:107 */ else if (instantiation != null)\r\n/* 115: */ {\r\n/* 116:108 */ movieLink.setRepresentation(instantiation);\r\n/* 117:109 */ Connections.getPorts(MovieManager.this).transmit(Html.normal(Punctuator.addPeriod(phrase)));\r\n/* 118: */ }\r\n/* 119: */ else\r\n/* 120: */ {\r\n/* 121:112 */ System.out.println(\"No parse for \" + phrase + \"!!!\");\r\n/* 122: */ }\r\n/* 123: */ }\r\n/* 124: */ }\r\n/* 125: */ }\r\n/* 126: */ catch (Exception e)\r\n/* 127: */ {\r\n/* 128:121 */ e.printStackTrace();\r\n/* 129: */ }\r\n/* 130: */ finally\r\n/* 131: */ {\r\n/* 132:124 */ if (MovieManager.this.gauntlet != null) {\r\n/* 133:125 */ MovieManager.this.gauntlet.openInterface();\r\n/* 134: */ }\r\n/* 135: */ }\r\n/* 136:128 */ Connections.getPorts(MovieManager.this).transmit(\"switch tab\", \"silence\");\r\n/* 137: */ \r\n/* 138:130 */ System.out.println(\"Loaded: \" + MovieManager.this.movieDescriptions.size());\r\n/* 139: */ }", "public static void main(String[] args) throws ParseException {\n // first load the configurations from command line and config files\n Config config = ResourceAllocator.loadConfig(new HashMap<>());\n\n Options options = new Options();\n options.addOption(Constants.ARGS_PARALLELISM, true, \"parallelism\");\n options.addOption(Constants.ARGS_SIZE, true, \"Size\");\n options.addOption(Constants.ARGS_ITR, true, \"Iteration\");\n options.addOption(Utils.createOption(Constants.ARGS_OPERATION, true, \"Operation\", true));\n options.addOption(Constants.ARGS_STREAM, false, \"Stream\");\n options.addOption(Utils.createOption(Constants.ARGS_TASK_STAGES, true, \"Throughput mode\", true));\n options.addOption(Utils.createOption(Constants.ARGS_GAP, true, \"Gap\", false));\n options.addOption(Utils.createOption(Constants.ARGS_FNAME, true, \"File name\", false));\n options.addOption(Utils.createOption(Constants.ARGS_APP_NAME, true, \"App Name\", false));\n options.addOption(Utils.createOption(Constants.ARGS_OUTSTANDING, true, \"Throughput no of messages\", false));\n options.addOption(Utils.createOption(Constants.ARGS_THREADS, true, \"Threads\", false));\n options.addOption(Utils.createOption(Constants.ARGS_PRINT_INTERVAL, true, \"Threads\", false));\n options.addOption(Utils.createOption(Constants.ARGS_DATA_TYPE, true, \"Data\", false));\n options.addOption(Utils.createOption(Constants.ARGS_KEYED, true, \"Operation Type , ex : keyed\", false));\n options.addOption(Utils.createOption(Constants.ARGS_INIT_ITERATIONS, true, \"Data\", false));\n options.addOption(Constants.ARGS_VERIFY, false, \"verify\");\n options.addOption(Constants.ARGS_COMMS, false, \"comms\");\n options.addOption(Constants.ARGS_TASK_EXEC, false, \"taske\");\n options.addOption(Constants.ARGS_APP, false, \"app\");\n\n CommandLineParser commandLineParser = new DefaultParser();\n CommandLine cmd = commandLineParser.parse(options, args);\n int parallelism = Integer.parseInt(cmd.getOptionValue(Constants.ARGS_PARALLELISM));\n int size = Integer.parseInt(cmd.getOptionValue(Constants.ARGS_SIZE));\n int itr = Integer.parseInt(cmd.getOptionValue(Constants.ARGS_ITR));\n String operation = cmd.getOptionValue(Constants.ARGS_OPERATION);\n boolean stream = cmd.hasOption(Constants.ARGS_STREAM);\n boolean verify = cmd.hasOption(Constants.ARGS_VERIFY);\n boolean keyed = cmd.hasOption(Constants.ARGS_KEYED);\n boolean taskExec = cmd.hasOption(Constants.ARGS_TASK_EXEC);\n boolean app = cmd.hasOption(Constants.ARGS_APP);\n boolean comms = cmd.hasOption(Constants.ARGS_COMMS);\n\n String threads = \"true\";\n if (cmd.hasOption(Constants.ARGS_THREADS)) {\n threads = cmd.getOptionValue(Constants.ARGS_THREADS);\n }\n\n String taskStages = cmd.getOptionValue(Constants.ARGS_TASK_STAGES);\n String gap = \"0\";\n if (cmd.hasOption(Constants.ARGS_GAP)) {\n gap = cmd.getOptionValue(Constants.ARGS_GAP);\n }\n\n String fName = \"\";\n if (cmd.hasOption(Constants.ARGS_FNAME)) {\n fName = cmd.getOptionValue(Constants.ARGS_FNAME);\n }\n\n String outstanding = \"0\";\n if (cmd.hasOption(Constants.ARGS_OUTSTANDING)) {\n outstanding = cmd.getOptionValue(Constants.ARGS_OUTSTANDING);\n }\n\n String printInt = \"1\";\n if (cmd.hasOption(Constants.ARGS_PRINT_INTERVAL)) {\n printInt = cmd.getOptionValue(Constants.ARGS_PRINT_INTERVAL);\n }\n\n String dataType = \"default\";\n if (cmd.hasOption(Constants.ARGS_DATA_TYPE)) {\n dataType = cmd.getOptionValue(Constants.ARGS_DATA_TYPE);\n }\n String intItr = \"0\";\n if (cmd.hasOption(Constants.ARGS_INIT_ITERATIONS)) {\n intItr = cmd.getOptionValue(Constants.ARGS_INIT_ITERATIONS);\n }\n\n // build JobConfig\n JobConfig jobConfig = new JobConfig();\n jobConfig.put(Constants.ARGS_ITR, Integer.toString(itr));\n jobConfig.put(Constants.ARGS_OPERATION, operation);\n jobConfig.put(Constants.ARGS_SIZE, Integer.toString(size));\n jobConfig.put(Constants.ARGS_PARALLELISM, Integer.toString(parallelism));\n jobConfig.put(Constants.ARGS_TASK_STAGES, taskStages);\n jobConfig.put(Constants.ARGS_GAP, gap);\n jobConfig.put(Constants.ARGS_FNAME, fName);\n jobConfig.put(Constants.ARGS_OUTSTANDING, outstanding);\n jobConfig.put(Constants.ARGS_THREADS, threads);\n jobConfig.put(Constants.ARGS_PRINT_INTERVAL, printInt);\n jobConfig.put(Constants.ARGS_DATA_TYPE, dataType);\n jobConfig.put(Constants.ARGS_INIT_ITERATIONS, intItr);\n jobConfig.put(Constants.ARGS_VERIFY, verify);\n jobConfig.put(Constants.ARGS_STREAM, stream);\n jobConfig.put(Constants.ARGS_KEYED, keyed);\n jobConfig.put(Constants.ARGS_TASK_EXEC, taskExec);\n jobConfig.put(Constants.ARGS_STREAM, app);\n jobConfig.put(Constants.ARGS_COMMS, comms);\n\n // build the job\n if (!app) {\n switch (operation) {\n\n }\n\n } else {\n\n }\n\n\n if (comms) {\n System.out.println(\"==========Comms Example Running===========\");\n CommsRunner commsRunner = new CommsRunner(config, jobConfig, stream, operation, parallelism, keyed);\n commsRunner.run();\n }\n\n\n if (!keyed) {\n if (taskExec) {\n\n }\n }\n\n switch (operation) {\n case \"keyedreduce\":\n\n }\n\n\n }", "public static void main(String... args) {\n try {\n new Main(args).process();\n return;\n } catch (EnigmaException excp) {\n System.err.printf(\"Error: %s%n\", excp.getMessage());\n }\n System.exit(1);\n }", "public static void main(String[] argv){\n\t}", "public static void main(String[] args) {\n\t\tString registryHost = args[0];\n\t\tint registryPort = Integer.parseInt(args[1]);\n\t\tMRMonitor monitor = new MRMonitor(registryHost, registryPort);\n\n\t\tprintUsage();\n\n\t\tString input = \"\";\n\t\tScanner scanner = new Scanner(System.in);\n\t\twhile (true) {\n\t\t\tinput = scanner.nextLine();\n\t\t\tString[] cmds = input.split(\" \");\n\t\t\tint len = cmds.length;\n\t\t\tString type = cmds[0];\n\t\t\tswitch (type) {\n\t\t\tcase \"describe\":\n\t\t\t\ttry {\n\t\t\t\t\tif (len == 2) {\n\t\t\t\t\t\tmonitor.describe(cmds[1]);\n\t\t\t\t\t} else if (len == 1) {\n\t\t\t\t\t\tmonitor.describe();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tprintUsage();\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"kill\":\n\t\t\t\ttry {\n\t\t\t\t\tif (len == 2) {\n\t\t\t\t\t\tmonitor.kill(cmds[1]);\n\t\t\t\t\t} else if (len == 1) {\n\t\t\t\t\t\tmonitor.kill();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tprintUsage();\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase \"terminate\":\n\t\t\t\ttry {\n\t\t\t\t\tif (len == 1) {\n\t\t\t\t\t\tmonitor.terminate();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tprintUsage();\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\tcase \"exit\":\n\t\t\t\tscanner.close();\n\t\t\t\tSystem.exit(0);\n\t\t\tdefault:\n\t\t\t\tprintUsage();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\tDataScanner scanner = new DataScanner();\n\t\tlong time = System.currentTimeMillis();\n\t\tscanner.scan(originalDataset, chunkSize);\n\t\t\n\t\t//2) Here the scan process finishes. In this point we want to persist the characterization of this\n\t\t//dataset in a sharable data structure.\n\t\tDatasetCharacterization characterization = scanner.finishScanAndBuildCharacterization();\n\t\tcharacterization.save(datasetPath + \"docs\");\n\t\t\n\t\t//3) In this point, we load the dataset characterization just created to show how characterization can be loaded\n\t\t//and shared among users.\n\t\tDatasetCharacterization newCharacterization = new DatasetCharacterization();\n\t\tnewCharacterization.load(datasetPath + \"docs\");\n\t\tSystem.out.println(\"Scanning time: \" + (System.currentTimeMillis()-time)/1000.0);\t\t\n\t}", "public static void main(String[] args) throws FileNotFoundException, ParseException {\n mediaList = new ArrayList<>();\n personList = new ArrayList<>();\n\n readPerson(personList);\n readMedia(mediaList);\n printActors(personList);\n printSeries(mediaList);\n //exemplo de copia\n\n Series tempSerie = (Series)mediaList.get(3);\n ArrayList tempEpisodes = tempSerie.getEpisodes();\n Episode tempEpisode = ((Episode)((ArrayList)tempEpisodes.get(0)).get(0));\n Episode episodeCopy = new Episode(tempEpisode);\n {\n System.out.println(\"O nome do episodio copiado é\" + episodeCopy.getName());\n System.out.println(\"e seu diretor é \" + episodeCopy.getDirector().getName());\n System.out.println(\"\");\n }\n\n\n Movie movieCopy = new Movie((Movie) (mediaList.get(1)));\n {\n System.out.println(\"O nome do file copiado é \"+movieCopy.getName());\n System.out.println(\"e seu diretor é \" + movieCopy.getDirector().getName());\n System.out.println(\"\");\n }\n }", "public static void main(String argv[]) {\n if (argv.length == 0) {\n System.out.println(\"Usage : java Yylex [ --encoding <name> ] <inputfile(s)>\");\n }\n else {\n int firstFilePos = 0;\n String encodingName = \"UTF-8\";\n if (argv[0].equals(\"--encoding\")) {\n firstFilePos = 2;\n encodingName = argv[1];\n try {\n java.nio.charset.Charset.forName(encodingName); // Side-effect: is encodingName valid? \n } catch (Exception e) {\n System.out.println(\"Invalid encoding '\" + encodingName + \"'\");\n return;\n }\n }\n for (int i = firstFilePos; i < argv.length; i++) {\n Yylex scanner = null;\n try {\n java.io.FileInputStream stream = new java.io.FileInputStream(argv[i]);\n java.io.Reader reader = new java.io.InputStreamReader(stream, encodingName);\n scanner = new Yylex(reader);\n while ( !scanner.zzAtEOF ) scanner.yylex();\n }\n catch (java.io.FileNotFoundException e) {\n System.out.println(\"File not found : \\\"\"+argv[i]+\"\\\"\");\n }\n catch (java.io.IOException e) {\n System.out.println(\"IO error scanning file \\\"\"+argv[i]+\"\\\"\");\n System.out.println(e);\n }\n catch (Exception e) {\n System.out.println(\"Unexpected exception:\");\n e.printStackTrace();\n }\n }\n }\n }", "public static void main(String[] args) throws Exception{\n \n if(args.length != 1){\n System.out.println(\"Usage: java TextDecoder filename\");\n System.exit(0);\n }\n \n File messageFile = new File(args[0]); \n TextDecoder decoder = new TextDecoder();\n decoder.readMessagesFromFile(messageFile);\n decoder.printMessages();\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(\"Arguments : \");\n\t\tfor(String arg : args){\n\t\t\tSystem.out.println(\"\\t\" +arg);\n\t\t}\n\t\tSystem.out.println(\"------------------\");\n\t\tString outputFilePath = null;\n\t\tint imageLength, webCamCode;\n\t\tif(args.length != 3){\n\t\t\tprintUsage();\n\t\t\treturn;\n\t\t}else{\n\t\t\ttry{\n\t\t\t\twebCamCode = Integer.parseInt(args[0]);\n\t\t\t\tif(webCamCode != 1 && webCamCode != 2){\n\t\t\t\t\tthrow new IllegalArgumentException(\"Web cam code must be either 1 or 2\");\n\t\t\t\t}else{\n\t\t\t\t\t//Good as of now. Go Ahead\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\toutputFilePath = args[1];\n\t\t\t\tif(!outputFilePath.endsWith(\".mov\")){\n\t\t\t\t\tthrow new IllegalArgumentException(\"Output file must end with .mov\");\n\t\t\t\t}\n\t\t\t\timageLength = Integer.parseInt(args[2]);\n\t\t\t\t\n\t\t\t\tif(imageLength <= 0){\n\t\t\t\t\tthrow new IllegalArgumentException(\"Image length must be non zero & positive\");\n\t\t\t\t}else{\n\t\t\t\t\t//Good as of now. Go Ahead\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}catch(Exception e){\n\t\t\t\tSystem.err.println(\"Invalid Arguments Passed. Error : \" +e.getMessage());\n\t\t\t\tprintUsage();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tFile outputFile = new File(outputFilePath);\n\t\t\tobjWriter = new JPEGMovWriter(outputFile);\n\t\t\tSystem.out.println(\"Writing File to : \" +outputFile.getAbsolutePath());\n\t\t} catch (IOException e) { \n\t\t\tSystem.err.println(\"Error Creating file : \" +e.getMessage());\n\t\t\treturn;\n\t\t}\n\t\twhile(true){\n\t\t\ttry {\n\t\t\t\tif(imageCount >= imageLength){\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tURL webCamURL = null;\n\t\t\t\tswitch(webCamCode){\n\t\t\t\tcase 1:\n\t\t\t\t\twebCamURL = new URL(urlWestLawns);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\twebCamURL = new URL(urlMU);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t//Code should never enter here\n\t\t\t\t}\n\t\t\t\t/*\n\t\t\t\t * Format seems to be : \n\t\t\t\t\t\t--myboundary\n\t\t\t\t\t\tContent-Type: image/jpeg\n\t\t\t\t\t\tContent-Length: 36232\n\t\t\t\t\t\t<newline>\n\t\t\t\t\t\t<binary Data starts>\n\t\t\t\t * \n\t\t\t\t */\n\t\t\t\tHttpURLConnection webCamURLConn = (HttpURLConnection)webCamURL.openConnection();\n\t\t\t\t//BufferedReader in = new BufferedReader(new InputStreamReader(webCamURLConn.getInputStream()));\n\t\t\t\tBufferedInputStream in = new BufferedInputStream(webCamURLConn.getInputStream());\n\t\t\t\tDataInputStream dis = new DataInputStream(in);\n\t\t\t\tint length = skipLines(4,dis);\n\t\t\t\treadJPG(dis, length);\n\t\t\t\twebCamURLConn.disconnect();\n\t\t\t\t\n\t\t\t\t\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\tVector<String> inputFiles = new Vector<String>();\n\n\t\ttry {\n\n\t\t\tfor(String str : inputFiles){\n\t\t\t\tobjWriter.addFrame(1.0f/30.0f, new File(str));\n\t\t\t}\n\t\t\tobjWriter.close(true);\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void main( String[] args ) {\n\t\tQrCode qr = new QrCodeEncoder().\n\t\t\t\tsetError(QrCode.ErrorLevel.M).\n\t\t\t\taddAutomatic(\"This is a Test ん鞠\").fixate();\n\t\t// NOTE: The final function you call must be fixate(), that's how it knows it's done\n\n\t\t// QrCodeGenerator is the base class with all the logic and the children tell it how to\n\t\t// write in a specific format. QrCodeGeneratorImage is included with BoofCV and is used\n\t\t// to create images\n\t\tvar render = new QrCodeGeneratorImage(/* pixel per module */ 20);\n\n\t\trender.render(qr);\n\n\t\t// Convert it to a BufferedImage for display purposes\n\t\tBufferedImage image = ConvertBufferedImage.convertTo(render.getGray(), null);\n\n\t\t// You can also save it to disk by uncommenting the line below\n//\t\tUtilImageIO.saveImage(image, \"qrcode.png\");\n\n\t\t// Display the image\n\t\tShowImages.showWindow(image, \"Rendered QR Code\", true);\n\t}", "public static void main(String[] args) {\n int perimeter = calculatePerimeter(2,4);\n int volume = calculateVolume(2, 4, 6);\n float temperature = convertToCelsius(100);\n int time = transformToSeconds(1, 10, 30);\n int intArray[] = new int[]{ 1,2,3,4,5,6,7,8,9,10 };\n float media = calculateMedia(intArray);\n\n System.out.println(\"O perimetro do rectangulo e: \" + perimeter);\n System.out.println(\"O volume do paralelepipedo e: \" + volume);\n System.out.println(\"A temperatura em Celsius e: \" + temperature);\n System.out.println(\"O tempo em segundos e: \" + time);\n System.out.println(\"max: \" + maximum);\n }", "public static void main(String argv[]) {\n if (argv.length == 0) {\n System.out.println(\"Usage : java AnalizadorLexico2 [ --encoding <name> ] <inputfile(s)>\");\n }\n else {\n int firstFilePos = 0;\n String encodingName = \"UTF-8\";\n if (argv[0].equals(\"--encoding\")) {\n firstFilePos = 2;\n encodingName = argv[1];\n try {\n java.nio.charset.Charset.forName(encodingName); // Side-effect: is encodingName valid? \n } catch (Exception e) {\n System.out.println(\"Invalid encoding '\" + encodingName + \"'\");\n return;\n }\n }\n for (int i = firstFilePos; i < argv.length; i++) {\n AnalizadorLexico2 scanner = null;\n try {\n java.io.FileInputStream stream = new java.io.FileInputStream(argv[i]);\n java.io.Reader reader = new java.io.InputStreamReader(stream, encodingName);\n scanner = new AnalizadorLexico2(reader);\n while ( !scanner.zzAtEOF ) scanner.debug_next_token();\n }\n catch (java.io.FileNotFoundException e) {\n System.out.println(\"File not found : \\\"\"+argv[i]+\"\\\"\");\n }\n catch (java.io.IOException e) {\n System.out.println(\"IO error scanning file \\\"\"+argv[i]+\"\\\"\");\n System.out.println(e);\n }\n catch (Exception e) {\n System.out.println(\"Unexpected exception:\");\n e.printStackTrace();\n }\n }\n }\n }", "public static void main(String argv[]) {\n if (argv.length == 0) {\n System.out.println(\"Usage : java AnalizadorLexicoPaginas [ --encoding <name> ] <inputfile(s)>\");\n }\n else {\n int firstFilePos = 0;\n String encodingName = \"UTF-8\";\n if (argv[0].equals(\"--encoding\")) {\n firstFilePos = 2;\n encodingName = argv[1];\n try {\n java.nio.charset.Charset.forName(encodingName); // Side-effect: is encodingName valid? \n } catch (Exception e) {\n System.out.println(\"Invalid encoding '\" + encodingName + \"'\");\n return;\n }\n }\n for (int i = firstFilePos; i < argv.length; i++) {\n AnalizadorLexicoPaginas scanner = null;\n try {\n java.io.FileInputStream stream = new java.io.FileInputStream(argv[i]);\n java.io.Reader reader = new java.io.InputStreamReader(stream, encodingName);\n scanner = new AnalizadorLexicoPaginas(reader);\n while ( !scanner.zzAtEOF ) scanner.debug_next_token();\n }\n catch (java.io.FileNotFoundException e) {\n System.out.println(\"File not found : \\\"\"+argv[i]+\"\\\"\");\n }\n catch (java.io.IOException e) {\n System.out.println(\"IO error scanning file \\\"\"+argv[i]+\"\\\"\");\n System.out.println(e);\n }\n catch (Exception e) {\n System.out.println(\"Unexpected exception:\");\n e.printStackTrace();\n }\n }\n }\n }", "public static void main(String args[]) throws IOException{\n\t\tscan = new BufferedReader(new InputStreamReader(System.in));\n\t\tregisters = new HashMap<Character,String>();\n\t\tmemory = new HashMap<Integer , String>();//Memory location 0 will remain unused\n\t\tlabels = new HashMap<String , Integer>();\n\t\thexa = \"0123456789ABCDEF\".toCharArray();\n\t\tpossible_codes = \"HLT RST MOV MVI LXI LDA STA LHLD SHLD LDAX STAX XCHG ADD ADC ADI ACI DAD SUB SBB SUI INR DCR INX DCX ANA ANI ORA ORI XRA XRI CMA CMC STC CMP CPI RLC RRC RAL RAR JMP JZ JNZ JC JNC JP JM JPE JPO CALL CZ CNZ CC CNC CP CM CPE CPO RET RZ RNZ RC RNC RP RM RPE RPO PCHL IN OUT PUSH POP XTHL SPHL\".split(\" \");\n\t\tgeneral_registers = new HashSet<Character>();\n\t\tAC=CS=Z=P=S=false;\n\t\tSP = 65536;\n\t\tPC = 0;\n\t\tmodified = false;\n\t\tadd_the_general_registers();\n\n\t\tSystem.out.println(\"SIMULATOR FOR 8085 MICROPROCESSOR\\n\");\n\t\t//Take the input of code\n\t\tSystem.out.println(\"ENTER THE CODE :-\\n\");\n\t\ttake_the_input();\n\t\t//Take the input of memory values\n\t\tSystem.out.println(\"ENTER THE MEMORY VALUES :-\");\n\t\tSystem.out.println(\"IF NO VALUE HAS TO BE ENTERED PRESS N ELSE WRITE THE ADDRESS.\\n\");\n\t\ttake_memory_values();\n\t\t//Execution starts\n\t\tSystem.out.println(\"\\nNOW EXECUTION WILL BEGIN...\");\n\t\texecute();\n\t\t//Providing the output to the user\n\t\tSystem.out.println(\"\\nENTER THE MEMORY LOCATIONS AND REGISTER VALUES YOU WANT TO CHECK : \");\n\t\tSystem.out.println(\"(WHEN YOU ARE DONE CHECKING TYPE N)\\n\");\n\t\toutput_process();\n\t}", "public static void main(String[] args) {\r\n\t\tif (args.length != 1) {\r\n\t\t\tSystem.out.println(\"Invalid cmd arguments, terminating\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tMap<String, Integer[]> vocabulary = new HashMap<>();\r\n\t\tMap<Path, Vector> freqVectors = new HashMap<>();\r\n\t\t\r\n\t\tPath path = Paths.get(args[0]);\r\n\t\tVisitor visitor = new Visitor(vocabulary, freqVectors, STOPWORDS_PATH);\r\n\t\ttry {\r\n\t\t\t//create vocabulary\r\n\t\t\tFiles.walkFileTree(path,visitor);\t\r\n\t\t\t//create frequency vectors\r\n\t\t\tvisitor.vocabularyAcquired = true;\r\n\t\t\tFiles.walkFileTree(path, visitor);\r\n\t\t} catch (IOException e) {\r\n\t\t\tSystem.out.println(\"An error occurred while reading files.\");\r\n\t\t\treturn;\r\n\t\t}\t\r\n\t\tprocessFreqVectors(visitor.vocabulary, visitor.freqVectors, visitor.numOfDocs);\r\n\t\tSystem.out.println(\"Velicina rjecnika je: \" + vocabulary.size());\r\n\r\n\t\tScanner sc = new Scanner(System.in);\r\n\t\trunShell(sc, freqVectors, vocabulary);\r\n\t\t\r\n\t\tSystem.out.println(\"Application is closing.\");\r\n\t\tsc.close();\r\n\t\t\r\n\t}", "@SuppressWarnings(\"resource\")\n\tpublic static void main(String[] args) {\n\t\tmrgeSrt();\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\tLanguage l = new AnimalScript(\"QR\", \"Dan Le\", 1920, 1080);\r\n\t\tQR gN = new QR(l);\r\n\t\tgN.setProperties();\r\n\t\tgN.printSourceCode();\r\n\t\tint n= 4;\r\n\t\tgN.start(getDefaultMatrix(),n,null,null);\r\n\t\tSystem.out.println(l);\r\n\t}", "public static void main(String[] args) throws Exception {\n Map<String, Object> settings = Grep.parseCommandLineArguments(args); \n if ((Boolean)settings.get(\"printUsage\")) {\n System.out.println((String)settings.get(\"errorMessage\"));\n System.out.println(Grep.printUsage());\n System.exit(-1);\n }\n\n // Derive tmp dir for job output\n settings.put(\"tempDir\", new Path(\"rucio-grep-\"+Integer.toString(new Random().nextInt(Integer.MAX_VALUE))));\n System.out.println(Grep.printJobSummary(settings));\n\n // Execute MR job\n try {\n if (!Grep.runJob(settings)) {\n System.out.println(\"Something went wrong :-(\");\n System.out.println(\"Hints: (1) do not redirect stderr to /dev/null (2) consider setting -excludeTmpFiles in case of IOExceptions\");\n }\n } catch(Grep.NoInputFilesFound e) {\n System.out.println(e);\n System.exit(1);\n }\n try {\n System.out.println(Grep.getResults(settings));\n } catch(Exception e) {\n System.out.println(\"No job output found in \" + settings.get(\"tempDir\").toString());\n System.out.println(e);\n }\n System.exit(0);\n }", "public static void main(String[] args) {\r\n new ParseVimeoXMLFile();\r\n }", "public static void main(java.\n lang.\n String[] args) {\n \tif (x10.lang.Runtime.runtime == null) {\n \t\tSystem.err.println(\"Please use the 'x10' script to invoke X10 programs, or see the generated\");\n \t\tSystem.err.println(\"Java code for alternate invocation instructions.\");\n \t\tSystem.exit(128);\n \t}\n {\n \n//#line 3\nProgram0.\n runMain();\n }\n }", "public static void main(String[] args) {\n\t\tif(args.length != 1) {\n\t\t\tSystem.err.println(\"Error! Usage: <program_name> <output.xml>\");\n\t\t\tSystem.err.println(\"args.length is equal to \"+args.length);\n\t\t\treturn;\n\t\t}\n\t\tSystem.out.println(\"This program will serialize your WorkflowMonitor into an XML file!\");\n\t\t\n\t\ttry {\n\t\t\tNfvInfoSerializer serializer = new NfvInfoSerializer();\n\t\t\tVirtualnetworkmanager root = serializer.createVirtualnetworkmanager();\n\t\t\tSystem.out.println(\"The data structures were created!\\n\");\n\t\t\t\n\t\t\tserializer.marshallDocument(root, System.out);\n\t\t\t\n\t\t\tPrintStream fpout = new PrintStream(new File(args[0]));\n\t\t\tserializer.marshallDocument(root, fpout);\n\t\t\tfpout.close();\n\t\t}\n\t\tcatch (FactoryConfigurationError e) {\n\t\t\tSystem.err.println(\"Could not create a DocumentBuilderFactory: \"+e.getMessage());\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(0);\n\t\t}\t\t\n\t\tcatch (NfvReaderException e) {\n\t\t\tSystem.err.println(\"Could not instantiate the manager class: \"+e.getMessage());\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(1);\n\t\t}\n\t\tcatch (JAXBException e) {\n\t\t\tSystem.err.println(\"Error creating the new instance of the JAXBContent\");\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(2);\n\t\t}\n\t\tcatch(IllegalArgumentException e) {\n\t\t\tSystem.err.println(\"Error, some argument are wrong!\");\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(3);\n\t\t}\n\t\tcatch (FileNotFoundException e) {\n\t\t\tSystem.err.println(\"Error! The file: \"+args[0]+\" does not exists!\");\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(4);\n\t\t}\n\t\tcatch (SAXException e) {\n\t\t\tSystem.err.println(\"Error creating the XML Schema object\");\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(5);\n\t\t} catch (DatatypeConfigurationException e) {\n\t\t\tSystem.err.println(\"Error data type configuration\");\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(6);\n\t\t}\n\t\t\n\t}", "public static void main(String[] args) {\n PAT1028 pat = new PAT1028();\r\n pat.run();\r\n \r\n }", "public static void main(String[] args) {\n\t\ttry {\n\t\t\tMMNEAT.main(new String[]{\"runNumber:0\",\"randomSeed:1\",\"bigInteractiveButtons:false\",\"LodeRunnerGANModel:LodeRunnerAllGround20LevelsEpoch20000_10_7.pth\",\"lodeRunnerDistinguishesSolidAndDiggableGround:false\",\"GANInputSize:10\",\"showKLOptions:false\",\"trials:1\",\"mu:16\",\"maxGens:500\",\"io:false\",\"netio:false\",\"mating:true\",\"fs:false\",\"task:edu.southwestern.tasks.interactive.loderunner.LodeRunnerGANLevelBreederTask\",\"watch:true\",\"cleanFrequency:-1\",\"genotype:edu.southwestern.evolution.genotypes.BoundedRealValuedGenotype\",\"simplifiedInteractiveInterface:false\",\"saveAllChampions:false\",\"ea:edu.southwestern.evolution.selectiveBreeding.SelectiveBreedingEA\",\"imageWidth:2000\",\"imageHeight:2000\",\"imageSize:200\"});\n\t\t} catch (FileNotFoundException | NoSuchMethodException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void main(String[] args) {\n Practica array = new Practica();\n\n array.rellanarArray();\n array.imprimirInversamente();\n }", "public static void main(String[] args) {\n try {\n convert(\"d:\\\\MLDATA\\\\adult.data\", \"d:\\\\MLDATA\\\\adult_standard.csv\", \"[ \\t]*,[ \\t]*\");\n convert(\"d:\\\\MLDATA\\\\adult.test\", \"d:\\\\MLDATA\\\\adult_standard_test.csv\", \"[ \\t]*,[ \\t]*\");\n }\n catch (Exception e)\n {\n e.printStackTrace();\n }\n }", "public static void main(String[] args)\r\n\t{\n\t\tSystem.out.println(\"Jon Heard's JVM Assembler\");\r\n\t\tSystem.out.println(\"version \" + VERSION);\r\n\t\tSystem.out.println(\"----------------------------\");\r\n\t\tSystem.out.println(\" ('-help' or '-h' for help)\");\r\n\t\tSystem.out.println(\"----------------------------\");\r\n\t\t\r\n\t\t/// Parse arguments\r\n\t\tboolean error = false;\r\n\t\tboolean helpTextPrinted = false;\r\n\t\tString sourceFileName = \"\";\t\t\r\n\t\tfor(String arg : args)\r\n\t\t{\r\n\t\t\tif(arg.startsWith(\"-\"))\r\n\t\t\t{\r\n\t\t\t\tif(arg.equals(\"-help\") || arg.equals(\"-h\"))\r\n\t\t\t\t{\r\n\t\t\t\t\tprintHelpText();\r\n\t\t\t\t\thelpTextPrinted = true;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.err.println(\r\n\t\t\t\t\t\t\t\"ERROR: Invalid parameter '\" + arg + \"'.\");\r\n\t\t\t\t\terror = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse if(!sourceFileName.equals(\"\"))\r\n\t\t\t{\r\n\t\t\t\tSystem.err.println(\"ERROR: Invalid parameter '\" + arg + \"'.\");\r\n\t\t\t\terror = true;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tsourceFileName = arg;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(error || helpTextPrinted) return;\r\n\r\n\t\t/// Make sure we have a source file to load\r\n\t\tif(args.length < 1)\r\n\t\t{\r\n\t\t\tSystem.err.println(\"ERROR: A sourcefile must be included.\");\r\n\t\t\tSystem.err.println(\"\\tExample: \");\r\n\t\t\tSystem.err.println(\"\\tjvmasm MySource.asm\");\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t/// Make sure the source file exists\r\n\t\tFile sourceFile = new File(sourceFileName);\r\n\t\tif(!sourceFile.exists())\r\n\t\t{\r\n\t\t\tSystem.err.println(\r\n\t\t\t\t\t\"ERROR: the source file '\" + sourceFileName +\r\n\t\t\t\t\t\"' does not exist.\");\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t/// Load the source file into a string\r\n\t\tString sourceData = UtilMethods.fileToString(sourceFileName);\r\n\t\tif(sourceData == null)\r\n\t\t{\r\n\t\t\tSystem.err.println(\r\n\t\t\t\t\t\"ERROR: Unable to load the source file '\" + sourceFileName +\r\n\t\t\t\t\t\"'.\");\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t/// Parse the source file into a ClassRep object\r\n\t\tClassParser parser = new ClassParser();\r\n\t\tClassRep classRep = parser.parseSource(sourceFileName, sourceData);\r\n\t\tif(classRep == null)\r\n\t\t{\r\n\t\t\tSystem.err.println(\r\n\t\t\t\t\t\"ERROR: Failed to parse source file '\" + sourceFileName +\r\n\t\t\t\t\t\"'.\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t/// Store the ClassRep into a class file\r\n\t\tString classFileName = classRep.getName() + \".class\";\r\n\t\tif(!UtilMethods.byteArrayToFile(\r\n\t\t\t\tclassRep.getJvmBytes(), classFileName))\r\n\t\t{\r\n\t\t\tSystem.err.println(\r\n\t\t\t\t\t\"ERROR: Failed to write class file '\" + classFileName +\r\n\t\t\t\t\t\"'.\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t}", "public static void convertToWav(Map<String, String> filesToConvert)\n throws IOException {\n Process proc = null;\n String cmd = \"\";\n // If output location does not exist, create a directory\n File dir = new File(Constants.OUTPUT_FILE_LOCATION);\n if (!dir.exists()) dir.mkdir();\n for (Map.Entry<String, String> entry : filesToConvert.entrySet()) {\n cmd =\n Constants.LAME_LOCATION + Constants.SPACE\n + Constants.LAME_DECODE + Constants.SPACE\n + entry.getKey() + Constants.SPACE + entry.getValue();\n try {\n // Attach the process to execute the command\n proc = Runtime.getRuntime().exec(cmd);\n // Keep polling the errorStream of the spawned\n // process for any data:\n StreamReaderThread errorStreamReaderThread =\n new StreamReaderThread(proc.getErrorStream());\n // Keep polling the OutputStream of the spawned\n // process for any data:\n StreamReaderThread outputStreamReaderThread =\n new StreamReaderThread(proc.getInputStream());\n // Start the threads to poll the streams\n errorStreamReaderThread.start();\n outputStreamReaderThread.start();\n // Wait until the process has terminated\n proc.waitFor();\n } catch (Exception e) {}\n }\n }", "public static void main(String[] args) {\n // if required - start the graphical output using -v parameter\n if (args.length > 0) {\n if (args[0].equals(\"-v\")) {\n visualize = true;\n }\n } else {\n // change this to true if you want to visualize always, disregarding parameters.\n visualize = false;\n }\n // stores references to animation windows\n LinkedList<Visualizator> windows = new LinkedList();\n // if true then create windows with graps.\n if (visualize) {\n createGUI(windows);\n }\n\n // list of results\n LinkedList results = new LinkedList();\n\n // data set name(s) are stored in this list. Typically, the data are expected to be in a \"$PATH/data-set/\" directory, where $PATH is the path to where the Alea directory is.\n // Therefore, this directory should contain both ./Alea and ./data-set directories. Files describing machines should be placed in a file named e.g., \"metacentrum.mwf.machines\".\n // Similarly machine failures (if simulated) should be placed in a file called e.g., \"metacentrum.mwf.failures\".\n // Please read carefully the copyright note when using public workload traces!\n //String data_sets[] = {\"SDSC-SP2.swf\", \"hpc2n.swf\", \"star.swf\", \"thunder.swf\", \"metacentrum.mwf\", \"meta2008.mwf\", \"atlas.swf\",};\n String data_sets[] = {\"metacentrum.mwf\"};\n\n // number of gridlets in data set\n //int total_gridlet[] = {59700, 202876, 96000, 121038, 103656, 187370, 42724,};\n int total_gridlet[] = {6, 6};\n // the weight of the fairness criteria in objective function\n int fairw[] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1};\n\n // set true to use failures\n failures = false;\n // set true to use specific job requirements\n reqs = true;\n // set true to use runtime estimates\n estimates = false;\n\n // set true to refine estimates using job avg. length\n useAvgLength = false;\n // set true to use last job length as a new runtime estimate\n useLastLength = false;\n // set true to use \"on demand\" schedule optimization when early job completions appear\n useEventOpt = false;\n\n // set true to use very imprecise estimates\n useUserPrecision = false;\n // set true to use Feitelson's deterministic f-model to generate runtime estimates\n useDurationPrecision = false;\n // if useDurationPrecision = true, then following number denotes the level of imprecison\n // 100 = 2 x real lenght, 400 = 5 x real length, 900 = 10x, 1900 = 20x, 4900 = 50x\n userPercentage = 4900;\n // the minimal length (in seconds) of gap in schedule since when the \"on demand\" optimization is executed\n gap_length = 10 * 60;\n // the weigh of fairness criterion\n fair_weight = 1;\n\n // use binary heap dat structure to represent schedule (generally faster solution)\n useHeap = true;\n\n\n //defines the name format of output files\n String problem = \"Result\";\n if (!failures && !reqs) {\n problem += \"Basic\";\n }\n if (reqs) {\n problem += \"R-\";\n }\n if (failures) {\n problem += \"F\";\n }\n if (estimates) {\n problem += \"-Estim\";\n } else {\n problem += \"-Exact\";\n }\n if (useAvgLength) {\n problem += \"-AvgL\";\n }\n if (useLastLength) {\n problem += \"-LastL\";\n }\n if (useEventOpt) {\n problem += \"-EventOpt\";\n }\n if (useUserPrecision) {\n problem += \"-UserPrec\" + userPercentage;\n }\n if (useDurationPrecision) {\n problem += \"-DurPrec\" + userPercentage;\n }\n\n // data sets are outside the project folder (i.e. in ../data-set/)\n data = true;\n // multiply the number of iterations of optimization techniques\n multiplicator = 1;\n // used to influence the frequency of job arrivals (mwf files only)\n double multiplier = 1.0;\n\n // used only when executed on a real cluster (do not change)\n path = \"estim100/\";\n meta = false;\n if (meta) {\n String date = \"-\" + new Date().toString();\n date = date.replace(\" \", \"_\");\n date = date.replace(\"CET_\", \"\");\n date = date.replace(\":\", \"-\");\n System.out.println(date);\n problem += date;\n }\n\n String user_dir = \"\";\n if (ExperimentSetup.meta) {\n user_dir = \"/scratch/xklusac/\" + path;\n } else {\n user_dir = System.getProperty(\"user.dir\");\n }\n try {\n Output out = new Output();\n out.deleteResults(user_dir + \"/jobs(\" + problem + \"\" + ExperimentSetup.algID + \").csv\");\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n\n // creates Result Collector\n ResultCollector result_collector = new ResultCollector(results, problem);\n\n\n // this cycle selects data set from data_sets[] list\n for (int set = 0; set <= 0; set++) {\n String prob = problem;\n fair_weight = fairw[set];\n if (useUserPrecision) {\n prob += \"-UserPrec\" + userPercentage;\n }\n max_estim = 0;\n result_collector.generateHeader(data_sets[set] + \"_\" + prob);\n prevAlgID = -1;\n\n // selects algorithm\n // write down the IDs of algorithm that you want to use (FCFS = 0, EDF = 1, EASY = 2, CONS = 4, PBS PRO = 5, BestGap = 10, BestGap+RandomSearch = 11, ...)\n int algorithms[] = {2};\n\n // select which algorithms from the algorithms[] list will be used.\n for (int sel_alg = 0; sel_alg <= 0; sel_alg++) {\n\n // reset values from previous iterations\n use_compresion = false;\n opt_alg = null;\n fix_alg = null;\n\n // get proper algorithm\n int alg = algorithms[sel_alg];\n int experiment_count = 1;\n name = data_sets[set];\n algID = alg;\n if (sel_alg > 0) {\n prevAlgID = algorithms[sel_alg - 1];\n }\n\n // used for output description\n String suff = \"\";\n // initialize the simulation - create the scheduler\n Scheduler scheduler = null;\n String scheduler_name = \"Alea_3.0_scheduler\";\n try {\n Calendar calendar = Calendar.getInstance();\n boolean trace_flag = false; // true means tracing GridSim events\n String[] exclude_from_file = {\"\"};\n String[] exclude_from_processing = {\"\"};\n String report_name = null;\n GridSim.init(entities, calendar, trace_flag, exclude_from_file, exclude_from_processing, report_name);\n scheduler = new Scheduler(scheduler_name, baudRate, entities, results, alg, data_sets[set], total_gridlet[set], suff, windows, result_collector, sel_alg);\n } catch (Exception ex) {\n Logger.getLogger(ExperimentSetup.class.getName()).log(Level.SEVERE, null, ex);\n }\n // this will set up the proper algorithm according to the algorithms[] list\n if (alg == 0) {\n policy = new FCFS(scheduler);\n suff = \"FCFS\";\n }\n if (alg == 1) {\n policy = new EDF(scheduler);\n suff = \"EDF\";\n }\n if (alg == 2) {\n policy = new EASY_Backfilling(scheduler);\n // fixed version of EASY Backfilling\n suff = \"EASY\";\n }\n if (alg == 4) {\n policy = new CONS(scheduler);\n use_compresion = true;\n suff = \"CONS+compression\";\n }\n // do not use PBS-PRO on other than \"metacentrum.mwf\" data - not enough information is available.\n if (alg == 5) {\n policy = new PBS_PRO(scheduler);\n suff = \"PBS-PRO\";\n }\n\n if (alg == 10) {\n policy = new BestGap(scheduler);\n suff = \"BestGap\";\n }\n if (alg == 11) {\n suff = \"BestGap+RandSearch(\" + multiplicator + \")\";\n policy = new BestGap(scheduler);\n opt_alg = new RandomSearch();\n if (useEventOpt) {\n fix_alg = new GapSearch();\n suff += \"-EventOptLS\";\n }\n }\n\n if (alg == 19) {\n suff = \"CONS+LS(\" + multiplicator + \")\";\n policy = new CONS(scheduler);\n opt_alg = new GapSearch();\n\n if (useEventOpt) {\n fix_alg = new GapSearch();\n suff += \"-EventOptLS\";\n }\n }\n if (alg == 20) {\n suff = \"CONS+RandSearch(\" + multiplicator + \")\";\n policy = new CONS(scheduler);\n opt_alg = new RandomSearch();\n if (useEventOpt) {\n fix_alg = new GapSearch();\n suff += \"-EventOptLS\";\n }\n }\n if (alg == 21) {\n suff = \"CONS-no-compress\";\n policy = new CONS(scheduler);\n if (useEventOpt) {\n fix_alg = new GapSearch();\n // instead of compression, use LS-based optimization on early job completion\n suff += \"-EventOptLS\";\n }\n }\n\n System.out.println(\"Now scheduling \" + total_gridlet[set] + \" jobs by: \" + suff + \", using \" + data_sets[set] + \" data set.\");\n\n suff += \"@\" + data_sets[set];\n\n // this cycle may be used when some modifications of one data set are required in multiple runs of Alea 3.0 over same data-set.\n for (int pass_count = 1; pass_count <= experiment_count; pass_count++) {\n\n try {\n // creates entities\n String job_loader_name = data_sets[set] + \"_JobLoader\";\n String failure_loader_name = data_sets[set] + \"_FailureLoader\";\n\n // creates all grid resources\n MachineLoader m_loader = new MachineLoader(10000, 3.0, data_sets[set]);\n rnd_seed = sel_alg;\n\n // creates 1 scheduler\n\n JobLoader job_loader = new JobLoader(job_loader_name, baudRate, total_gridlet[set], data_sets[set], maxPE, minPErating, maxPErating,\n multiplier, pass_count, m_loader.total_CPUs, estimates);\n if (failures) {\n FailureLoaderNew failure = new FailureLoaderNew(failure_loader_name, baudRate, data_sets[set], clusterNames, machineNames, 0);\n }\n // start the simulation\n System.out.println(\"Starting the Alea 3.0\");\n GridSim.startGridSimulation();\n } catch (Exception e) {\n System.out.println(\"Unwanted errors happened!\");\n System.out.println(e.getMessage());\n e.printStackTrace();\n System.out.println(\"Usage: java Test [time | space] [1-8]\");\n }\n\n System.out.println(\"=============== END OF TEST \" + pass_count + \" ====================\");\n // reset inner variables of the simulator\n Scheduler.load = 0.0;\n Scheduler.classic_load = 0.0;\n Scheduler.max_load = 0.0;\n Scheduler.classic_activePEs = 0.0;\n Scheduler.classic_availPEs = 0.0;\n Scheduler.activePEs = 0.0;\n Scheduler.availPEs = 0.0;\n Scheduler.requestedPEs = 0.0;\n Scheduler.last_event = 0.0;\n Scheduler.start_event = -10.0;\n Scheduler.runtime = 0.0;\n\n // reset internal SimJava variables to start new experiment with different job/gridlet setup\n Sim_system.setInComplete(true);\n // store results\n result_collector.generateResults(suff, experiment_count);\n result_collector.reset();\n results.clear();\n System.out.println(\"Max. estim has been used = \" + max_estim);\n System.gc();\n }\n }\n }\n // end of the whole simulation\n }", "public static void main(String[] args) {\n\t\tint M = Integer.parseInt(args[0]);\n\t\tint P = Integer.parseInt(args[1]);\n\t\tint S = Integer.parseInt(args[2]);\n\t\tint J = Integer.parseInt(args[3]);\n\t\tint N = Integer.parseInt(args[4]);\n\t\tString algorithm = args[5];\n\t\t\n\t\t//this is to match the output\n\t\tSystem.out.println(\"The machine size is \"+M);\n\t\tSystem.out.println(\"The page size is \"+P);\n\t\tSystem.out.println(\"The process size is \"+S);\n\t\tSystem.out.println(\"The job mix number is \"+J);\n\t\tSystem.out.println(\"The number of references per process is \"+N);\n\t\tSystem.out.println(\"The replacement algorithm is \"+algorithm+\"\\n\\n\");\n\t\t\n\t\t\n\t\t//attempt to read in the RandomInts.txt file\n\t\tScanner intScanner = null; \n\t\ttry {\n\t\t\tintScanner = new Scanner(new File(\"random-ints.txt\"));\n\t\t\t\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\tSystem.err.printf(\"Error: there was a problem reading the random file\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t\t\n\t\tint quantum = 3;\n\t\t\n\t\tProcess currentProcess;\n\t\tArrayList<Process> processList = new ArrayList<Process>();\n\t\t\n\t\t//check now to see the job mix\n\t\tif(J == 1){\t\n\t\t\t//int processNumber, double a, double b, double c, int size, int numberOfReferences, int numberOfPages,Scanner randInt, String replacementAlgo\n\t\t\tcurrentProcess = new Process(1,1,0,0,S,N,S/P,intScanner,algorithm);\n\t\t\tprocessList.add(currentProcess);\n\t\t}\n\t\telse if(J ==2) {\n\t\t\t\n\t\t\tfor (int i = 0; i < 4; i++) {\n\t\t\t\tcurrentProcess = new Process(i+1,1,0,0,S,N,S/P,intScanner,algorithm);\n\t\t\t\tprocessList.add(currentProcess);\n\t\t\t}\n\t\t}\n\t\t\t\n\t\telse if (J == 3){\n\t\t\tfor (int i = 0; i < 4; i++) {\n\t\t\t\tcurrentProcess = new Process(i+1,0,0,0,S,N,S/P,intScanner,algorithm);\n\t\t\t\tprocessList.add(currentProcess);\n\t\t\t}\n\t\t}\n\t\t\t\n\t\telse {\n\t\t\t//1,2,3,4\n\t\t\tcurrentProcess = new Process(1,0.75,0.25,0,S,N,S/P,intScanner,algorithm);\n\t\t\tprocessList.add(currentProcess);\n\t\t\tcurrentProcess = new Process(2,0.75,0,0.25,S,N,S/P,intScanner,algorithm);\n\t\t\tprocessList.add(currentProcess);\n\t\t\tcurrentProcess = new Process(3,0.75,0.125,0.125,S,N,S/P,intScanner,algorithm);\n\t\t\tprocessList.add(currentProcess);\n\t\t\tcurrentProcess = new Process(4,0.5,0.125,0.125,S,N,S/P,intScanner,algorithm);\n\t\t\tprocessList.add(currentProcess);\n\t\t\t\n\t\t}\n\t\t\n\t\t//get the size of the frame table depending upon machine size and page size\n\t\t//remember we are also going to use the highest most frame as the first one\n\t\tint sizeOfFrame = M/P -1;\n\t\t\n\t\t\n\t\t//these are going to simply help us determine which frame is to be evicted if neccesary\n //linked list for LRU replacement algorithm\n LinkedList<Integer> LRUList = new LinkedList<Integer>();\n\n // we do not need a data structure for LIFO either because we will always replace the last frame\n \n //we do not need to use one for random since we do not need to keep track of which page we are getting rid of\n \n\t\t//this is going to hold the current process,page pair in each index so it will look like <1,{Process,page}>\n //having the Integer array will help us replace and update the frame easier then just maintaining if there's something in the map\n\t\tHashMap<Integer, Integer[]> frame = new HashMap<Integer, Integer[]>(); \n\t\t\n\t\tint time = 1;\n\t\t\n\t\tfor(int i=0; i < processList.size() * N; i++) {\n\t\t\t//get the current process\n\t\t\tProcess runningProcess = processList.get(i%processList.size());\n\t\t\t\n\t\t\tif(runningProcess.numberOfReferences <= 0) {\n\t\t\t\t//then the process is done running\n\t\t\t\ttime++;\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t}\n\t\t\t// this is simply to simulate the round robin simulation\n\t\t\tfor(int j=0; j < quantum; j++) {\n\t\t\t\t\n\t\t\t\tif(runningProcess.numberOfReferences <= 0) {\n\t\t\t\t\t//then the process is done running\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tint currentRef = runningProcess.currentReference;\n\t\t\t\t\n\t\t\t\t//now get the page index then check if it is MAX_VALUE or within the frame\n\t\t\t\tint pageIndex = currentRef/P;\n\t\t\t\tint processFrameIndex = runningProcess.pages[pageIndex];\n\t\t\t\t\n\n\t\t\t\t//we know we had a miss because the page table is not in the frame\n\t\t\t\tif(processFrameIndex == Integer.MAX_VALUE) {\n\t\t\t\t\t\n\t\t\t\t\trunningProcess.pageFaults++;\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t//now we determine where to place the pageTable in the frame\n\t\t\t\t\t//we know that if it is less than zero then there is no room on the frame table since we start from highest index\n\t\t\t\t\tif(sizeOfFrame < 0) {\n\t\t\t\t\t\t//then we must use some sort of replacement algorithm\n\t\t\t\t\t\tif(runningProcess.replacementAlgo.equalsIgnoreCase(\"LIFO\")) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//pop the last frame and get the necessary information\n\t\t\t\t\t\t\tInteger[] removeProcessPagePair = frame.remove(0);\n\t\t\t\t\t\t\tint removeIndex = removeProcessPagePair[0];\n\t\t\t\t\t\t\tint nullifyPageIndex = removeProcessPagePair[1];\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//get the actual process from the process list and update its values\n\t\t\t\t\t\t\tProcess updateProcess = processList.get(removeIndex);\n\t\t\t\t\t\t\tupdateProcess.pages[nullifyPageIndex] = Integer.MAX_VALUE;\n\t\t\t\t\t\t\tupdateProcess.numberOfEvictions++;\n\t\t\t\t\t\t\tupdateProcess.residencyTime += time - updateProcess.pageLoadTime[nullifyPageIndex];\n\t\t\t\t\t\t\tupdateProcess.pageLoadTime[nullifyPageIndex] = 0;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tsizeOfFrame++;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//update the pages array\n\t\t\t\t\t\t\trunningProcess.pages[pageIndex] = sizeOfFrame;\n\t\t\t\t\t\t\trunningProcess.pageLoadTime[pageIndex] = time;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//we will need to know which process to update and remember that to get processNum 1 \n\t\t\t\t\t\t\t//in the array list that is at index 0. Then to update its pageTable we will also need its pageIndex\n\t\t\t\t\t\t\tInteger[] processPagePair = {runningProcess.processNumber-1,pageIndex};\n\t\t\t\t\t\t\tframe.put(sizeOfFrame, processPagePair);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tsizeOfFrame--;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(runningProcess.replacementAlgo.equalsIgnoreCase(\"LRU\")) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//remove the top of the LRULinked List and get the index of the frame\n\t\t\t\t\t\t\tint indexRemoveFrame = LRUList.remove();\n\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\t//pop the index of the frame and get the necessary information\n\t\t\t\t\t\t\tInteger[] removeProcessPagePair = frame.remove(indexRemoveFrame);\n\t\t\t\t\t\t\tint removeIndex = removeProcessPagePair[0];\n\t\t\t\t\t\t\tint nullifyPageIndex = removeProcessPagePair[1];\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//get the actual process from the process list and update its values\n\t\t\t\t\t\t\tProcess updateProcess = processList.get(removeIndex);\n\t\t\t\t\t\t\tupdateProcess.pages[nullifyPageIndex] = Integer.MAX_VALUE;\n\t\t\t\t\t\t\tupdateProcess.numberOfEvictions++;\n\t\t\t\t\t\t\tupdateProcess.residencyTime += time - updateProcess.pageLoadTime[nullifyPageIndex];\n\t\t\t\t\t\t\tupdateProcess.pageLoadTime[nullifyPageIndex] = 0;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//now add to the back of the linked list the most newly updated indexFrame\n\t\t\t\t\t\t\tLRUList.add(indexRemoveFrame);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//update the running process\n\t\t\t\t\t\t\trunningProcess.pages[pageIndex] = indexRemoveFrame;\n\t\t\t\t\t\t\trunningProcess.pageLoadTime[pageIndex] = time;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//we will need to know which process to update and remember that to get processNum 1 \n\t\t\t\t\t\t\t//in the array list that is at index 0. Then to update its pageTable we will also need its pageIndex\n\t\t\t\t\t\t\tInteger[] processPagePair = {runningProcess.processNumber-1,pageIndex};\n\t\t\t\t\t\t\tframe.put(indexRemoveFrame, processPagePair);\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\t//this indicates it is random replacement algorithm\n\t\t\t\t\t\telse if(runningProcess.replacementAlgo.equalsIgnoreCase(\"RANDOM\")) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//get the random int and then find out which random frame you are taking out\n\t\t\t\t\t\t\tint randomInt = intScanner.nextInt();\n\t\t\t\t\t\t\t//since it is probably some big number we have to accommodate it for our frame size\n\t\t\t\t\t\t\tint randomIntIndex = (randomInt + M/P)%(M/P);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//and pretty much do the same as the above but with the randomIntIndex\n\t\t\t\t\t\t\t//pop the index of the frame and get the necessary information\n\t\t\t\t\t\t\tInteger[] removeProcessPagePair = frame.remove(randomIntIndex);\n\t\t\t\t\t\t\tint removeIndex = removeProcessPagePair[0];\n\t\t\t\t\t\t\tint nullifyPageIndex = removeProcessPagePair[1];\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//get the actual process from the process list and update its values\n\t\t\t\t\t\t\tProcess updateProcess = processList.get(removeIndex);\n\t\t\t\t\t\t\tupdateProcess.pages[nullifyPageIndex] = Integer.MAX_VALUE;\n\t\t\t\t\t\t\tupdateProcess.numberOfEvictions++;\n\t\t\t\t\t\t\tupdateProcess.residencyTime += time - updateProcess.pageLoadTime[nullifyPageIndex];\n\t\t\t\t\t\t\tupdateProcess.pageLoadTime[nullifyPageIndex] = 0;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t/////DO IF CYCLE IS IN 38 DEBUGG IN HERE/////\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//update the running process\n\t\t\t\t\t\t\trunningProcess.pages[pageIndex] = randomIntIndex;\n\t\t\t\t\t\t\trunningProcess.pageLoadTime[pageIndex] = time;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//we will need to know which process to update and remember that to get processNum 1 \n\t\t\t\t\t\t\t//in the array list that is at index 0. Then to update its pageTable we will also need its pageIndex\n\t\t\t\t\t\t\tInteger[] processPagePair = {runningProcess.processNumber-1,pageIndex};\n\t\t\t\t\t\t\tframe.put(randomIntIndex, processPagePair);\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\t\n\t\t\t\t\t}\n\t\t\t\t\t//otherwise we will now place the pageTable into the frame\n\t\t\t\t\telse {\n\t\t\t\t\t\t\n\t\t\t\t\t\t//update the pages array\n\t\t\t\t\t\trunningProcess.pages[pageIndex] = sizeOfFrame;\n\t\t\t\t\t\trunningProcess.pageLoadTime[pageIndex] = time;\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t//we will need to know which process to update and remember that to get processNum 1 \n\t\t\t\t\t\t//in the array list that is at index 0. Then to update its pageTable we will also need its pageIndex\n\t\t\t\t\t\tInteger[] processPagePair = {runningProcess.processNumber-1,pageIndex};\n\t\t\t\t\t\tframe.put(sizeOfFrame, processPagePair);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//update the LRU if the process is using the algorithm\n\t\t\t\t\t\tif(runningProcess.replacementAlgo.equalsIgnoreCase(\"LRU\")) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//sizeOfFrame is also essentially the index of the frame\n\t\t\t\t\t\t\tLRUList.add(sizeOfFrame);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t//now there is one less frame available\n\t\t\t\t\t\tsizeOfFrame--;\n\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t//there was a page hit\n\t\t\t\telse {\n\n\t\t\t\t\t//update the most recently used page for LRU\n\t\t\t\t\tif(runningProcess.replacementAlgo.equalsIgnoreCase(\"LRU\")) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t //to get it back to 0 in case we are on the last frame\n\t\t\t\t\t\t\n\t\t\t\t\t\tint removeIndex = LRUList.indexOf(processFrameIndex);\n\n\t\t\t\t\t\t//put to the end of the list\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tint updatePage = LRUList.remove(removeIndex);\n\t\t\t\t\t\tLRUList.add(updatePage);\n\t\t\t\t\t\t //to indicate we have no more frames incase the next reference needs a new one\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t//remember this also decrements the amount of references that the process has left \n\t\t\t\trunningProcess.getNextReference();\n\t\t\t\ttime++;\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\tint totalFaults = 0;\n\t\tint totalEvictions = 0;\n\t\tdouble totalResidency = 0;\n\t\t\n\t\tfor(int i=0; i<processList.size();i++) {\n\t\t\t\n\t\t\tif(processList.get(i).numberOfEvictions != 0) {\n\t\t\t\ttotalFaults += processList.get(i).pageFaults;\n\t\t\t\ttotalResidency += processList.get(i).residencyTime;\n\t\t\t\ttotalEvictions += processList.get(i).numberOfEvictions;\n\t\t\t\tSystem.out.printf(\"Process Number: %d had %d faults and an average residency of %f\",processList.get(i).processNumber,processList.get(i).pageFaults,processList.get(i).residencyTime/processList.get(i).numberOfEvictions);\n\t\t\t}\n\t\t\telse {\n\t\t\t\ttotalFaults += processList.get(i).pageFaults;\n\t\t\t\tSystem.out.printf(\"Process Number: %d had %d faults and with no evictions an average residency of undefined\",processList.get(i).processNumber,processList.get(i).pageFaults);\n\t\t\t}\n\t\t\tSystem.out.println(\"\");\n\t\t}\n\t\tSystem.out.println(\"\\n\");\n\t\t\n\t\t\n\t\tif(totalEvictions != 0) {\n\t\t\tdouble avgTotalResidency = totalResidency/totalEvictions;\n\t\t\tSystem.out.printf(\"The total number of faults is %d and the overall average residency is %f\", totalFaults,avgTotalResidency);\n\t\t}\n\t\telse {\n\t\t\tSystem.out.printf(\"The total number of faults is %d and the overall average residency is undefined\", totalFaults);\n\t\t}\n\t\tSystem.out.println(\"\");\n\t\t\n\n\t}", "public static void \n main\n (\n String[] args /* IN: command line arguments */\n )\n {\n FileCleaner.init();\n\n try {\n TestJarReaderApp app = new TestJarReaderApp();\n app.run();\n } \n catch (Exception ex) {\n ex.printStackTrace();\n System.exit(1);\n } \n \n System.exit(0);\n }", "public static void main(String[] args){\n\n // Definite command line\n CommandLineParser parser = new PosixParser();\n Options options = new Options();\n\n //Help page\n String helpOpt = \"help\";\n options.addOption(\"h\", helpOpt, false, \"print help message\");\n\n String experimentFileStr = \"experimentFile\";\n options.addOption(experimentFileStr, true, \"Input File with all the ArrayExpress experiments.\");\n\n String protocolFileStr = \"protocolFile\";\n options.addOption(protocolFileStr, true, \"Input File with all the ArrayExpress protocols.\");\n\n String omicsDIFileStr = \"omicsDIFile\";\n options.addOption(omicsDIFileStr, true, \"Output File for omicsDI\");\n\n // Parse command line\n CommandLine line = null;\n try {\n line = parser.parse(options, args);\n if (line.hasOption(helpOpt) || !line.hasOption(protocolFileStr) ||\n !line.hasOption(experimentFileStr)\n || !line.hasOption(omicsDIFileStr)) {\n HelpFormatter formatter = new HelpFormatter();\n formatter.printHelp(\"validatorCLI\", options);\n }else{\n File omicsDIFile = new File (line.getOptionValue(omicsDIFileStr));\n Experiments experiments = new ExperimentReader(new File (line.getOptionValue(experimentFileStr))).getExperiments();\n Protocols protocols = new ProtocolReader(new File (line.getOptionValue(protocolFileStr))).getProtocols();\n generate(experiments, protocols, omicsDIFile);\n }\n\n } catch (ParseException e) {\n e.printStackTrace();\n } catch (Exception ex){\n ex.getStackTrace();\n }\n\n\n }", "public static void main(String[] args) {\n\n\t\t// File file=new File(\"./testClasses/binarysearch.java\");\n\t\tCharStream input = null;\n\t\tif (args.length > 0) {\n\t\t\ttry {\n\t\t\t\tinput = CharStreams.fromFileName(args[0]);\n\t\t\t} catch (IOException e) {\n\t\t\t\tSystem.out.println(BGSTYLE + RED + BOLD + UNDERLINE\n\t\t\t\t\t\t+ \"THE GIVEN FILE PATH IS WRONG!\" + RESET);\n\t\t\t\tSystem.out.println(YELLOW + BOLD\n\t\t\t\t\t\t+ \"IF EXECUTING THE JAR, CHECK YOUR COMMAND \"\n\t\t\t\t\t\t+ \" java -jar MJCompiler <filePath> \\n\"\n\t\t\t\t\t\t+ \"OTHERWISE CHECK THE MAIN METHOD\" + RESET);\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else {\n\n\t\t\ttry {\n\t\t\t\tinput = CharStreams.fromFileName(\"./testFiles/factorial.java\");\n\n\t\t\t} catch (IOException e) {\n\t\t\t\tSystem.out.println(BGSTYLE + RED + BOLD + UNDERLINE\n\t\t\t\t\t\t+ \"THE GIVEN FILE PATH IS WRONG!!\" + RESET);\n\t\t\t\tSystem.out.println(YELLOW + BOLD\n\t\t\t\t\t\t+ \"IF EXECUTING THE JAR, CHECK YOUR COMMAND \"\n\t\t\t\t\t\t+ \" java -jar MJCompiler <filePath> \\n\"\n\t\t\t\t\t\t+ \"OTHERWISE CHECK THE MAIN METHOD\" + RESET);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tMiniJavaLexer lexer = new MiniJavaLexer(input);\n\t\tMiniJavaParser parser = new MiniJavaParser(new BufferedTokenStream(\n\t\t\t\tlexer));\n\t\tParseTree tree = parser.program();\n\t\tTrees.inspect(tree, parser);\n\n\t\t// ---------PrintVisitor-------------\n\t\tPrintVisitor pv = new PrintVisitor();\n\t\tpv.visitMiniJava(tree);\n\n\t\t// --------SymbolTableVisitor--------\n\t\tSymbolTableVisitor symbolTableVisitor = new SymbolTableVisitor();\n\t\tSymbolTable visitedST = (SymbolTable) symbolTableVisitor.visit(tree);\n\t\tif (symbolTableVisitor.getErrorFlag()) {\n\t\t\tSystem.err\n\t\t\t\t\t.println(BGSTYLE\n\t\t\t\t\t\t\t+ RED\n\t\t\t\t\t\t\t+ \"THE PROGRAM COTAINS ERRORS! \\n CHECK CONSOLE AND PARSE TREE WINDOW FOR MORE INFO!\");\n\t\t} else {\n\t\t\tvisitedST.printTable();\n\t\t\tvisitedST.resetTable();\n\n\t\t\t// ------TypeCheckVisitor\n\t\t\tTypeCheckVisitor tcv = new TypeCheckVisitor(visitedST);\n\t\t\ttcv.visit(tree);\n\t\t\tif (tcv.getErrorCount() > 0) {\n\t\t\t\tSystem.err.println(\"The Program contains \"\n\t\t\t\t\t\t+ tcv.getErrorCount() + \" Type Errors!\");\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"TypeChecking Done With No Errors!\");\n\t\t\t}\n\t\t}\n\n\t}", "static public void main(String argv[]) {\n String archivo_a_parsear = \"/home/maldad/repos/automatas/semantico/EjemploA/src/ejemploa/test.txt\";\n try {\n parser p = new parser(new Lexer(new FileReader(archivo_a_parsear)));\n Object result = p.parse().value; \n } catch (Exception e) {\n /* do cleanup here -- possibly rethrow e */\n e.printStackTrace();\n }\n }", "public static void main(String[] args) {\n\t\tOpenCV.loadShared();\r\n\t\t\r\n\t\t// load the ffmpeg library\r\n//\t\tConfigurationService conf = ConfigurationService.getInstance();\r\n//\t\tSystem.load(conf.getConfigurationValue(\"ffmpeg.library.path\"));\r\n\t\t\r\n\t\t// launch the app\r\n\t\tlaunch(args);\r\n\t}", "public static void main(String args[])\r\n {\n\t\tString result = new epsnfa().Start(\"sampleRE.in\");\r\n\t\tSystem.out.println(result);\r\n\t}", "public static void main(String[] args) {\r\n\t\tString romNum = checkInput();\t//Check that the input contains only Roman numerals.\r\n\t\tuserInput.close();\r\n\t\t\r\n\t\tint convNum = calcRomNum(romNum);\t//Convert the Roman numerals into an integer.\r\n\t\t\r\n\t\tSystem.out.println(\"--------------------\");\r\n\t\tSystem.out.println(convNum);\r\n\t}", "public static void main(String[] args) throws IOException {\n String projectId = \"my-project-id\";\n String location = \"us-central1\";\n String inputUri = \"gs://my-bucket/my-video-file\";\n String outputUri = \"gs://my-bucket/my-output-folder/\";\n\n createJobWithSetNumberImagesSpritesheet(projectId, location, inputUri, outputUri);\n }", "public static void main(String[] args) {\r\n MemoryManager memory = new MemoryManager(Integer.parseInt(args[0]));\r\n HashTable hasher = new HashTable(Integer.parseInt(args[1]), memory);\r\n if (args[2] != null) {\r\n File commands = new File(args[2]);\r\n Processor processor = new Processor(commands, hasher);\r\n processor.process();\r\n }\r\n //System.exit(0);\r\n \r\n }" ]
[ "0.5517744", "0.53912574", "0.5305346", "0.52889204", "0.5230876", "0.52289724", "0.5070303", "0.50652325", "0.50649863", "0.5046793", "0.49997336", "0.499683", "0.4989147", "0.49664226", "0.4960489", "0.49524528", "0.49419385", "0.493402", "0.4895537", "0.48795742", "0.4862216", "0.48462912", "0.48317105", "0.48297948", "0.4823998", "0.48235413", "0.48228395", "0.48189196", "0.4815432", "0.47981986", "0.4781203", "0.47744125", "0.47734693", "0.4772791", "0.47710064", "0.47659263", "0.47642246", "0.4760003", "0.4755927", "0.47552067", "0.47477922", "0.47467723", "0.47246107", "0.4723491", "0.47151652", "0.4713223", "0.46934378", "0.46739495", "0.4671785", "0.46698356", "0.46644834", "0.46536747", "0.46455786", "0.46370012", "0.46301427", "0.46295568", "0.4625344", "0.46246853", "0.4611905", "0.4606218", "0.46046427", "0.4600555", "0.4597914", "0.45959067", "0.45888677", "0.45816034", "0.4581175", "0.45790154", "0.45742136", "0.45708317", "0.45697471", "0.45688745", "0.45661333", "0.45564792", "0.45530534", "0.45450616", "0.45412987", "0.45408157", "0.45385942", "0.45370215", "0.45369834", "0.45332068", "0.4532736", "0.45241666", "0.45224708", "0.45208377", "0.45165303", "0.45148703", "0.4513973", "0.45138332", "0.45098695", "0.4509598", "0.4508937", "0.4508016", "0.4506384", "0.45002833", "0.44958428", "0.4485445", "0.44844678", "0.44838962" ]
0.5248592
4
Creates a new Location similar to the first argument but calculates and stores the distance from the first to the second argument.
public CFLocation(Location location, Location distanceTo) { super(location); this.distance = location.distanceTo(distanceTo); this.index = NO_INDEX; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Location createLocation();", "Location createLocation();", "Location createLocation();", "public static int dist(Location loc1, Location loc2)\n\t{\n\t\treturn Math.abs(loc1.x - loc2.x) + Math.abs(loc1.y - loc2.y);\n\t}", "public static int distance(Location l1, Location l2) {\r\n\t\treturn (int) (Math.pow((l1.getX() - l2.getX()), 2) + Math.pow((l1.getY() - l2.getY()), 2) + Math.pow((l1.getZ() - l2.getZ()), 2));\r\n\t}", "private int calculateDistance(Location location1, Location location2) {\n\t\treturn Math.abs(location1.getX() - location2.getX()) + Math.abs(location1.getY() - location2.getY());\n\t}", "public int distance(Coord coord1, Coord coord2);", "@Override\n\tpublic Location newInstance() {\n\t\treturn new Location(this.X,this.Y,0);\n\t}", "public double calculateDistance(MapLocation a, MapLocation b) {\r\n\t\treturn Math.sqrt((double) ( Math.pow((b.x - a.x),2) + Math.pow((b.y - a.y),2) ));\r\n\t}", "private static double get_distance ( String one, String two){\n String temp[] = one.split(\" \");\n double lat1 = Double.parseDouble(temp[0]);\n double long1 = Double.parseDouble(temp[1]);\n\n String temp2[] = two.split(\" \");\n double lat2 = Double.parseDouble(temp2[0]);\n double long2 = Double.parseDouble(temp2[1]);\n\n// Get distance between two lats and two lans\n double latDistance = Math.toRadians(lat1 - lat2);\n double lngDistance = Math.toRadians(long1 - long2);\n\n// Step 1\n double a = (Math.sin ( latDistance / 2 ) * Math.sin (latDistance / 2)) +\n (Math.cos ( Math.toRadians(lat1)) * Math.cos(Math.toRadians(lat2)) )\n * ( Math.sin (lngDistance /2 ) * Math.sin(lngDistance / 2) );\n// Step 2\n double c = ( 2 * (Math.atan2( Math.sqrt(a), Math.sqrt(1-a))));\n// Step 3\n double d = ( EARTH_RADIUS * c );\n return d;\n }", "private double distFrom(double lat1, double lng1, double lat2, double lng2) {\n\t\tdouble dist = Math.pow(lat1 - lat2, 2) + Math.pow(lng1 - lng2, 2);\n\n\t\treturn dist;\n\t}", "public static int distance(Location location1, Location location2) {\n return (int) location1.distance(location2);\n }", "public Location checkFurtherLocation(Location toCompareTo, Location Location1, Location Location2) {\n int Distance1 = getDistance(toCompareTo, Location1);\n int Distance2 = getDistance(toCompareTo, Location2);\n\n if (Distance2 > Distance1)\n return Location2;\n\n return Location1;\n }", "public Location getLocation(Location loc) {\n return getLocation(loc.getX(), loc.getY());\n}", "public Location checkClosestLocation(Location toCompareTo, Location Location1, Location Location2) {\n int Distance1 = getDistance(toCompareTo, Location1);\n int Distance2 = getDistance(toCompareTo, Location2);\n if (Distance2 < Distance1)\n return Location2;\n return Location1;\n }", "private double dist(Integer unit1, Integer unit2, StateView newstate) {\n\t\t//Creating two arrays of size 2 to store the position of the 2 units\n\t\tint[] pos1 = new int[2];\n\t\tint[] pos2 = new int[2];\n\t\t//Extracting the positional data\n\t\tpos1[0] = newstate.getUnit(unit1).getXPosition();\n\t\tpos1[1] = newstate.getUnit(unit1).getYPosition();\n\t\tpos2[0] = newstate.getUnit(unit2).getXPosition();\n\t\tpos2[1] = newstate.getUnit(unit2).getYPosition();\n\t\t//Calculating the distance\n\t\tdouble dx = Math.abs(pos1[0] - pos2[0]);\n\t\tdouble dy = Math.abs(pos1[1] - pos2[1]);\n\t\tdouble distance = Math.sqrt(Math.pow(dx, 2.0) + Math.pow(dy, 2.0));\n\t\treturn distance;\n\t}", "public static Distance convertAndReturnNew(\n final Distance input, final DistanceUnit outputUnit) {\n final Distance result = new Distance();\n convert(input, outputUnit, result);\n return result;\n }", "public Location(String c, Float x, Float y) {\n _place = c;\n _x = x;\n _y = y;\n }", "public NewLocation(int locationID, double longitude, double altitude, double latitude, float speed, long time) {\n this.locationID= locationID;\n this.longitude = longitude;\n this.altitude = altitude;\n this.latitude = latitude;\n this.speed = speed;\n this.time = time;\n }", "private Integer getDistance(double lat1, double lon1, double lat2, double lon2) {\n Location locationA = new Location(\"Source\");\n locationA.setLatitude(lat1);\n locationA.setLongitude(lon1);\n Location locationB = new Location(\"Destination\");\n locationB.setLatitude(lat2);\n locationB.setLongitude(lon2);\n distance = Math.round(locationA.distanceTo(locationB));\n return distance;\n }", "public Location(int x, int y)\n {\n this.x = x;\n this.y = y;\n }", "private static double distance(double lat1, double lon1, double lat2, double lon2, String unit) {\n double theta = lon1 - lon2;\n double dist = Math.sin(deg2rad(lat1)) * Math.sin(deg2rad(lat2)) + Math.cos(deg2rad(lat1)) * Math.cos(deg2rad(lat2)) * Math.cos(deg2rad(theta));\n dist = Math.acos(dist);\n dist = rad2deg(dist);\n dist = dist * 60 * 1.1515;\n if (unit.equals(\"K\")) {\n dist = dist * 1.609344;\n } else if (unit.equals(\"N\")) {\n dist = dist * 0.8684;\n }\n //default miles\n return (dist);\n }", "public Location(String name, String coordinates, double distance, boolean achieved) {\n this.name = name;\n this.coordinates = coordinates;\n this.distance = distance; \n this.achieved = achieved;\n }", "public void testDistanceTo() {\n City boston = new City(\"Boston\", 42.3601, -71, 1);\n City austin = new City(\"Austin\", 30.26, -97, 2);\n\n assertEquals(2674.2603695871003, boston.distanceTo(austin));\n assertEquals(2674.2603695871003, austin.distanceTo(boston));\n }", "@Override\n\tpublic Location<Vector2> newLocation() {\n\t\treturn null;\n\t}", "public static double getDistanceSquared(Location loc1, Location loc2) {\n\t\treturn loc1.toVector().distanceSquared(loc2.toVector());\n\t}", "private Distance(){}", "@SuppressLint(\"UseValueOf\")\n\tpublic static double distFrom(double lat1, double lng1, double lat2, double lng2) {\n\t double earthRadius = 3958.75;\n\t double dLat = Math.toRadians(lat2-lat1);\n\t double dLng = Math.toRadians(lng2-lng1);\n\t double a = Math.sin(dLat/2) * Math.sin(dLat/2) +\n\t Math.cos(Math.toRadians(lat1)) * Math.cos(Math.toRadians(lat2)) *\n\t Math.sin(dLng/2) * Math.sin(dLng/2);\n\t double c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a));\n\t double dist = earthRadius * c;\n\n\t int meterConversion = 1609;\n\t \n\t return new Double(dist * meterConversion).doubleValue();\n\t }", "public GPSPoint getNewGPSLocation(double currentLat, double currentLong, double newBearing, double newDistance, gpsUnits unit) {\n\n\n double lat = Math.toRadians(currentLat);\n double lon = Math.toRadians(currentLong);\n\n double localR = 0;\n\n switch (unit) {\n case MILES:\n localR = R_IN_MILES;\n break;\n case NAUTICAL_MILES:\n localR = R_IN_NAUTICAL_MILES;\n break;\n default:\n localR = R_IN_KILOMETERS;\n }\n\n double newLat = Math.asin(Math.sin(lat) * Math.cos(newDistance / localR)\n + Math.cos(lat) * Math.sin(newDistance / localR) * Math.cos(newBearing));\n\n double newLon = lon + Math.atan2(Math.sin(newBearing) * Math.sin(newDistance / localR) * Math.cos(lat),\n Math.cos(newDistance / localR) - Math.sin(lat) * Math.sin(newLat));\n\n\n return new GPSPoint(Math.toDegrees(newLat), Math.toDegrees(newLon));\n }", "public static int editDistance2(String s1, String s2) {\r\n\t\treturn auxDistance2(0, 0, s1, s2);\r\n\t}", "void addDistance(float distanceToAdd);", "public Location(int x, int y)\r\n {\r\n\r\n //this basically makes a new location...it's a constructor\r\n //\"this\" refers to the instance of this class...meaning the instance\r\n //variables. This is saying that the instance variable \"x\" will be\r\n //updated to the value of x that is passed into as a parameter of\r\n //this function. This pretty much makes this a constructor method.\r\n this.x = x;\r\n this.y = y;\r\n\r\n }", "public Route(City city1, City city2, int distance, double price) {\n this.city1 = city1;\n this.city2 = city2;\n this.distance = distance;\n this.price = price;\n }", "public static double distance(double latitude,double longitude,double latitude2,double longitude2){\n\n \t double deltalat = Math.toRadians(latitude2 - latitude);\n \t double deltalog = Math.toRadians(longitude2 - longitude);\n\n \t double a = Math.pow(Math.sin(deltalat/2),2) +\n \t\t\t\t Math.pow(Math.sin(deltalog/2),2) *\n \t\t\t\t Math.cos(latitude) *\n \t\t\t\t Math.cos(latitude2);\n \t double c = 2 * Math.asin(Math.sqrt(a));\n\n \t return EARTH_RADIUS * c;\n\n }", "Coordinate createCoordinate();", "public double GetDistanceBetweenTwoGPSPoints(double lat1,\n double lat2, double lon1,\n double lon2, gpsUnits unit) {\n\n double lat1Radians = Math.toRadians(lat1);\n double lat2Radians = Math.toRadians(lat2);\n double deltaLatInRadians = Math.toRadians(lat2 - lat1);\n double deltaLonInRadians = Math.toRadians(lon2 - lon1);\n\n double a;\n a = Math.sin(deltaLatInRadians / 2) * Math.sin(deltaLatInRadians / 2) +\n Math.cos(lat1Radians) * Math.cos(lat2Radians) *\n Math.sin(deltaLonInRadians / 2) * Math.sin(deltaLonInRadians / 2);\n double c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n\n double distance = 0;\n\n switch (unit) {\n case KILOMETERS:\n distance = c * R_IN_KILOMETERS;\n break;\n case NAUTICAL_MILES:\n distance = c * R_IN_NAUTICAL_MILES;\n break;\n case MILES:\n distance = c * R_IN_MILES;\n break;\n }\n\n return distance;\n }", "public abstract double distanceFrom(double x, double y);", "public Location(String store_name, String store_location, String address, String city, String state, String zip_code, double latitude, double longitude, String county)\n\t{\n super();\n this.store_name = store_name;\n this.store_location = store_location;\n this.address = address;\n this.city = city;\n this.state = state;\n this.zip_code = zip_code;\n this.latitude = latitude;\n this.longitude = longitude;\n this.county = county;\n }", "public DistanciaLocal(double distanceRadians, String distance, String unit) {\n this.distanceRadians = distanceRadians;\n this.distance = distance;\n this.unit = unit;\n\n }", "Location getLocation();", "Location getLocation();", "Location getLocation();", "Location getLocation();", "public double distancia2(GPS a2,GPS a3){\n return this.distancia(a2)+a2.distancia(a3);\n }", "public int setLocation (Location location) {\n Location locationToMove = location;\n // double heading = getHeading();\n towards(locationToMove);\n int distance = (int) Vector.distanceBetween(location, getLocation());\n // setHeading(heading);\n move(distance);\n return distance;\n }", "public Location(int x, int y)\n\t{\n\t\tmX = x;\n\t\tmY = y;\n\t}", "public void calcDistance() {\n if (DataManager.INSTANCE.getLocation() != null && location.getLength() == 2) {\n Log.e(\"asdf\", DataManager.INSTANCE.getLocation().getLength() + \"\");\n Log.e(\"asdf\", DataManager.INSTANCE.getLocation().getLength() + \"\");\n double dLat = Math.toRadians(location.getLatitude() - DataManager.INSTANCE.getLocation().getLatitude()); // deg2rad below\n double dLon = Math.toRadians(location.getLongitude() - DataManager.INSTANCE.getLocation().getLongitude());\n double a =\n Math.sin(dLat / 2) * Math.sin(dLat / 2) +\n Math.cos(Math.toRadians(location.getLatitude()))\n * Math.cos(Math.toRadians(location.getLatitude()))\n * Math.sin(dLon / 2)\n * Math.sin(dLon / 2);\n double c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n double d = KM_IN_RADIUS * c; // Distance in km\n distance = (float) d;\n } else distance = null;\n }", "public static double distance2DSquared(Location loc1, Location loc2) {\n return square(loc1.getX() - loc2.getX()) + square(loc1.getZ() - loc2.getZ());\n }", "public Location(final double latitude, final double longitude) {\n this.latitude = latitude;\n this.longitude = longitude;\n this.name = null;\n }", "static public NewMovement create(PosRotScale originLoc,Vector3 destination_loc, int duration) {\n\t\tPosRotScale destinationState = originLoc.copy(); //make a new PosRotScale from the original location\n\t\t\n\t\t//but we change its position\n\t\tdestinationState.setToPosition(destination_loc);\n\n\t\tGdx.app.log(logstag, \"_______________requested pos :\"+destination_loc);\n\t\t\n\t\t\t\t\n\t\tNewMovement newmovement= new NewMovement(destinationState,duration);\n\t\tnewmovement.currenttype = MovementTypes.Absolute;\n\n\t\tGdx.app.log(logstag, \"_______________destination pos after creation:\"+newmovement.destination.position);\n\t\t\t\n\t\treturn newmovement;\n\t}", "public Location(int x, int y) {\r\n\t\txCoord = x;\r\n\t\tyCoord = y;\r\n\t}", "@Test\n\tpublic void testDistance() {\n\t\tCoordinate newBasic = new Coordinate(4,4);\n\t\tassertTrue(\"Correct distance\", newBasic.distance(basic2) == 5);\n\t}", "public CLocation get_location(int bias, int length) {\r\n\t\treturn new CLocation(this, bias, length);\r\n\t}", "public static double distance(double latit1, double longit1, double latit2, double longit2)\n\t{\n\t\tdouble latitude1 = Math.toRadians(latit1); //latitude of the first location\n\t\tdouble latitude2 = Math.toRadians(latit2);\t//latitude of the second location\n\t\t\n\t\tdouble longitude1 = Math.toRadians(longit1); //longitude of the first location\n\t\tdouble longitude2 = Math.toRadians(longit2); //longitude of the second location\n\t\t\n\t\tdouble radiusOfEarth = 6371; //km\n\t\tdouble distance;\n\t\t\n\t\tdouble sinSquaredLatitude = Math.pow(Math.sin((latitude1-latitude2)/2),2);\n\t\tdouble cosCalculations = Math.cos(latitude1)*Math.cos(latitude2);\n\t\tdouble sinSquaredLongitude = Math.pow(Math.sin((longitude1-longitude2)/2),2);\n\t\t\n\t\tdistance = 2*radiusOfEarth * Math.asin(Math.sqrt(sinSquaredLatitude + cosCalculations * sinSquaredLongitude));\n\t\t\n\t\t//distance = Math.round(distance);\n\t\treturn distance;\n\t\t\n\t\t//System.out.println(\"Distance is: \"+distance+\"km\");\n\t}", "private double distance(double lat1, double lat2, double lon1, double lon2)\n {\n lon1 = Math.toRadians(lon1);\n lon2 = Math.toRadians(lon2);\n lat1 = Math.toRadians(lat1);\n lat2 = Math.toRadians(lat2);\n\n // Haversine formula\n double dlon = lon2 - lon1;\n double dlat = lat2 - lat1;\n double a = Math.pow(Math.sin(dlat / 2), 2)\n + Math.cos(lat1) * Math.cos(lat2)\n * Math.pow(Math.sin(dlon / 2),2);\n\n double c = 2 * Math.asin(Math.sqrt(a));\n\n // Radius of earth in kilometers. Use 3956\n // for miles\n double r = 6371;\n\n // calculate the result\n return(c * r);\n }", "double getDistance();", "public double calculateDistance(String locationA, String locationB){\n\t\tString[] locA=locationA.split(\",\");\n\t\tFloat lat1=Float.parseFloat(locA[0]);\n\t\tFloat lon1=Float.parseFloat(locA[1]);\n\t\tString[] locB=locationB.split(\",\");\n\t\tFloat lat2=Float.parseFloat(locB[0]);\n\t\tFloat lon2=Float.parseFloat(locB[1]);\n\t\tdouble theta = lon1 - lon2;\n\t\tdouble dist = Math.sin(deg2rad(lat1)) * Math.sin(deg2rad(lat2)) + Math.cos(deg2rad(lat1)) * Math.cos(deg2rad(lat2)) * Math.cos(deg2rad(theta));\n\t\tdist = Math.acos(dist);\n\t\tdist = rad2deg(dist);\n\t\tdist = dist * 60 * 1.1515;\n\t\tdist = dist * 1.609344;\n\n\t\treturn (dist);\n\t}", "public Location(int x, int y) {\n\t\t\n\t\tthis.xCoord=xCoord;\n\t\tthis.yCoord=yCoord;\n\t\t\n\t}", "public static Point OnALine( Point first, Point second, Double distanceFromFirst ) {\n Double vectorX = second.x() - first.x();\n Double vectorY = second.y() - first.y();\n Double vectorZ = second.z() - first.z();\n\n // b. calculate the proportion of hypotenuse\n Double factor = distanceFromFirst /\n Math.sqrt( vectorX * vectorX + vectorY * vectorY + vectorZ * vectorZ );\n\n // c. factor the lengths\n vectorX *= factor;\n vectorY *= factor;\n vectorZ *= factor;\n\n // d. calculate and Draw the new vector,\n return new Point( first.x() + vectorX, first.y() + vectorY, first.z() + vectorZ );\n }", "public static int editDistance1(String s1, String s2) {\r\n\t\tMyInteger gmin = new MyInteger(Integer.MAX_VALUE);\r\n\t\tauxDistance1(0, 0, 0, s1, s2, gmin);\r\n\t\treturn gmin.get();\r\n\t}", "public LatLonDistance(Collection<K> locationList) {\n locations = locationList;\n }", "public double calculateDistanceBetween(Location A, Location B){\n double distance; //http://www.movable-type.co.uk/scripts/latlong.html\n double earthsRadius;\n if(unitSelect){\n earthsRadius = 6372.8;\n }\n else{\n earthsRadius = 3959.87433;\n }\n double latARadians = Math.toRadians(A.getDblLatitude());\n double latBRadians = Math.toRadians(B.getDblLatitude());\n double changeInLat = Math.toRadians(B.getDblLatitude() - A.getDblLatitude());\n double changeInLong = Math.toRadians((B.getDblLongitude() - A.getDblLongitude()));\n\n double a = Math.sin(changeInLat/2) * Math.sin(changeInLat/2)\n + Math.cos(latARadians) * Math.cos(latBRadians)\n * Math.sin(changeInLong/2) * Math.sin(changeInLong/2);\n double c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a));\n\n distance = (earthsRadius * c);\n\n return distance;\n }", "public int getDistance(Location otherLocation, Location location) {\n return (Math.abs(location.getX() - otherLocation.getX()) + Math.abs(location.getY() - otherLocation.getY()));\n }", "public Location(String name, String coordinates) {\n this.name = name; \n this.coordinates = coordinates;\n }", "public void convertToLocation() {\r\n\t\tdouble longitude = Double.MIN_VALUE;\r\n\t\tdouble latitude = Double.MIN_VALUE;\r\n\r\n\t\tdistance += 0.75;\r\n\t\tsteps = meter.getSteps();\r\n\r\n\t\tDataLogger.getInstance().setCurrDistance(distance);\r\n\r\n\t\tlatitude = 0.75 * Math.cos(orientation) * 0.000009\r\n\t\t\t\t+ DataLogger.getInstance().getPrevLatitude();\r\n\t\tlongitude = 0.75 * Math.sin(orientation) * 0.0000136\r\n\t\t\t\t+ DataLogger.getInstance().getPrevLongitude();\r\n\r\n\t\tDataLogger.getInstance().addLocation(latitude, longitude,\r\n\t\t\t\tjava.lang.System.currentTimeMillis());\r\n\r\n\t\tLog.d(TAG, \"Called convertToLocation\");\r\n\t}", "public Location(final String name) {\n this.latitude = 0;\n this.longitude = 0;\n this.name = name;\n }", "private static Double getDistance(Double lng1, Double lat1, Double lng2, Double lat2) {\n double radLat1 = lat1 * RAD;\n double radLat2 = lat2 * RAD;\n double a = radLat1 - radLat2;\n double b = (lng1 - lng2) * RAD;\n double s = 2 * Math.asin(Math.sqrt(\n Math.pow(Math.sin(a / 2), 2) + Math.cos(radLat1) * Math.cos(radLat2) * Math.pow(Math.sin(b / 2), 2)));\n s = s * EARTH_RADIUS;\n s = Math.round(s * 10000) / 10000000.0;\n return s;\n }", "public abstract double getDistance(T o1, T o2) throws Exception;", "public static double distanciaCoord(double lat1, double lng1, double lat2, double lng2) {\n\n double radioTierra = 6371;//en kilómetros \n double dLat = Math.toRadians(lat2 - lat1);\n double dLng = Math.toRadians(lng2 - lng1);\n double sindLat = Math.sin(dLat / 2);\n double sindLng = Math.sin(dLng / 2);\n double va1 = Math.pow(sindLat, 2) + Math.pow(sindLng, 2)\n * Math.cos(Math.toRadians(lat1)) * Math.cos(Math.toRadians(lat2));\n double va2 = 2 * Math.atan2(Math.sqrt(va1), Math.sqrt(1 - va1));\n double distancia = radioTierra * va2;\n\n return distancia * 1000;\n }", "private double Distance(Point first, Point second){ // distance between two points \n\t\treturn Math.sqrt(Math.pow(second.getY()-first.getY(),2) + Math.pow(second.getX()-first.getX(),2));\n\t}", "public Location(final double latitude, final double longitude,\n final String name) {\n this.latitude = latitude;\n this.longitude = longitude;\n this.name = name;\n }", "Location getLocationById(long id);", "public static double distCalc(double long1, double long2, double lat1,\n\t\t\tdouble lat2) {\n\t\tdouble theta = long1 - long2;\n\t\tdouble dist = Math.sin(deg2rad(lat1)) * Math.sin(deg2rad(lat2))\n\t\t\t\t+ Math.cos(deg2rad(lat1)) * Math.cos(deg2rad(lat2))\n\t\t\t\t* Math.cos(deg2rad(theta));\n\t\tdist = rad2deg(Math.acos(dist));\n\t\treturn (dist * 60 * 1.1515);\n\t}", "private double distance(double lat1, double lon1, double lat2, double lon2) {\r\n double theta = lon1 - lon2;\r\n double dist = Math.sin(deg2rad(lat1))\r\n * Math.sin(deg2rad(lat2))\r\n + Math.cos(deg2rad(lat1))\r\n * Math.cos(deg2rad(lat2))\r\n * Math.cos(deg2rad(theta));\r\n dist = Math.acos(dist);\r\n dist = rad2deg(dist);\r\n dist = dist * 60 * 1.1515;\r\n return (dist);\r\n }", "public Location (java.lang.Long uniqueId) {\n \t\tsuper(uniqueId);\n \t}", "public static Location commandLocation(CommandSender sender, int cStart, String[] args) {\n // cStart is the index of the argument the coordinates start at\n if (args[cStart].startsWith(\"~\") && args[cStart + 1].startsWith(\"~\") && args[cStart + 2].startsWith(\"~\")) {\n Location sLocation = getLocation(sender);\n sLocation.setX(sLocation.getX() + relativeTilde(args[cStart]));\n sLocation.setY(sLocation.getY() + relativeTilde(args[cStart + 1]));\n sLocation.setZ(sLocation.getZ() + relativeTilde(args[cStart + 2]));\n // Checks if tildes are provided in the span of args, then returns the location with the relative values added\n return sLocation;\n }\n // Otherwise return a new location using the values provided\n return new Location(\n ((Entity) sender).getWorld(),\n Double.parseDouble(args[cStart]),\n Double.parseDouble(args[cStart+1]),\n Double.parseDouble(args[cStart+2])\n );\n }", "public static double distance(LatLng one, LatLng two, char unit) {\n double theta = one.longitude - two.longitude;\n double dist = Math.sin(deg2rad(one.latitude)) * Math.sin(deg2rad(two.latitude)) + Math.cos(deg2rad(one.latitude)) * Math.cos(deg2rad(two.latitude)) * Math.cos(deg2rad(theta));\n dist = Math.acos(dist);\n dist = rad2deg(dist);\n dist = dist * 60 * 1.1515;\n if (unit == 'K') {\n dist = dist * 1.609344;\n } else if (unit == 'N') {\n dist = dist * 0.8684;\n }\n return (dist);\n }", "public LocationImpl(double lon, double lat) {\n\t\tthis.lat = lat;\n\t\tthis.lon = lon;\n\t}", "void makeMove(Location loc);", "public static double getDistance(String location){\n\t\tdouble lng1 = -122.301436; \n\t\tdouble lat1 = 47.605387; \n\t\t\n\t\tint startIndex1 = location.indexOf(\"longitude\");\n\t\tlng = location.substring(startIndex1+11, startIndex1+20);\n\t\tint startIndex2 = location.indexOf(\"latitude\");\n\t\tlat = location.substring(startIndex2+10, startIndex2+17);\n\n\t\tdouble lng2 = Double.parseDouble(lng);\n\t\tdouble lat2 = Double.parseDouble(lat);\n\n\t\tdouble R = 6371; \n\t\tdouble vlat1 = lat1*Math.PI/180; \n\t\tdouble vlat2 = lat2*Math.PI/180;\n\t\tdouble changelat = (lat2-lat1)*Math.PI/180;\n\t\tdouble changelng = (lng2-lng1)*Math.PI/180;\n\t\tdouble a = Math.sin(changelat/2) * Math.sin(changelat/2) +\n\t\t Math.cos(vlat1) * Math.cos(vlat2) *\n\t\t Math.sin(changelng/2) * Math.sin(changelng/2);\n\t\tdouble c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a));\n\t\tdouble d = R * c;\n\t\t\n\t\tDecimalFormat df = new DecimalFormat(\"#.##\");\n String dis = df.format(d);\n double dist = Double.parseDouble(dis);\n \n\t\treturn dist;\n\t}", "public MyPoint1 (double x, double y) {}", "final public static int dist(float lat1, float lon1,\n \t\tfloat lat2, float lon2) {\n \tdouble latSin = Math.sin((lat2-lat1)/2d);\n \tdouble longSin = Math.sin((lon2-lon1)/2d);\n \tdouble a = (latSin * latSin) + (Math.cos(lat1)*Math.cos(lat2)*longSin*longSin);\n \tdouble c = 2d * atan2(Math.sqrt(a),Math.sqrt(1d-a));\n \treturn (int)(PLANET_RADIUS_D * (c + 0.5d));\n }", "public Location(GameMap map, int x, int y) {\n\t\tthis.map = map;\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t}", "@Test (expected = IllegalArgumentException.class)\n\tpublic void testAddDistance2() {\n\t\tDistance d3 = new Distance(3, 2);\n\t\tDistance d4 = new Distance(-1, 1);\n\t\td3.addDistance(d3, d4);\n\t}", "public static FragmentLocations newInstance(String param1, String param2) {\n FragmentLocations fragment = new FragmentLocations();\n Bundle args = new Bundle();\n //put any extra arguments that you may want to supply to this fragment\n fragment.setArguments(args);\n return fragment;\n }", "private double distance(double lat1, double lon1, double lat2, double lon2) {\n double theta = lon1 - lon2;\r\n double dist = Math.sin(deg2rad(lat1)) * Math.sin(deg2rad(lat2)) + Math.cos(deg2rad(lat1)) * Math.cos(deg2rad(lat2)) * Math.cos(deg2rad(theta));\r\n dist = Math.acos(dist);\r\n dist = rad2deg(dist);\r\n dist = dist * 60 * 1.1515;\r\n dist = dist * 1.609344;\r\n return (dist); // return distance in kilometers\r\n }", "public DistanceCalculate(String string, String string1) {\n this.oriString = string;\n this.fixString = string1;\n minDistance(string, string1);\n }", "public Train(Location village1, Location village2) {\n this.start = village1;\n this.destination = village2;\n // when train is created, it is at the start location\n this.current = start;\n this.occupied = false;\n }", "public static double GetDistance(double lat1, double lon1, double lat2, double lon2) {\n double radLat1 = rad(lat1);\n double radLat2 = rad(lat2);\n double a = radLat1 - radLat2;\n double b = rad(lon1) - rad(lon2);\n double s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) +\n Math.cos(radLat1) * Math.cos(radLat2) * Math.pow(Math.sin(b / 2), 2)));\n s = s * EARTH_RADIUS;//km\n// Log.e(\"s\", \"s=\" + s);\n return s;\n }", "private static double calculateDistance(Position A, Position B) {\n\t\tdouble x = (B.m_dLongitude - A.m_dLongitude) * Math.cos( (A.m_dLatitude + B.m_dLatitude) / 2.0d);\n\t\tdouble y = B.m_dLatitude - A.m_dLatitude;\n\t\treturn Math.sqrt(Math.pow(x, 2.0d) + Math.pow(y, 2.0d)) * 6371;\n\t}", "public Location(int i, int j) {\r\n\t\t\tthis.i = i;\r\n\t\t\tthis.j = j;\r\n\t\t}", "private static Location locationYIncrementer(final Location location, final double y){\n return new Location(\n location.getWorld(),\n location.getX(),\n location.getY() + y,\n location.getZ()\n );\n }", "@Test\n\tpublic void testAddDistance1() {\n\t\tDistance d1 = new Distance(0, 0);\n\t\tDistance d2 = new Distance();\n\t\texpectedFeet = 1;\n\t\texpectedInches = 1;\n\t\tDistance d = d1.addDistance(d1, d2);\n\t\tassertEquals(expectedFeet, d.getFeet());\n\t\tassertEquals(expectedInches, d.getInches());\n\t}", "public static double distance(double lat1, double lat2, double lon1, double lon2) {\n lon1 = Math.toRadians(lon1);\n lon2 = Math.toRadians(lon2);\n lat1 = Math.toRadians(lat1);\n lat2 = Math.toRadians(lat2);\n\n // Haversine formula\n double dlon = lon2 - lon1;\n double dlat = lat2 - lat1;\n double a = Math.pow(Math.sin(dlat / 2), 2) + Math.cos(lat1) * Math.cos(lat2) * Math.pow(Math.sin(dlon / 2),2);\n\n double c = 2 * Math.asin(Math.sqrt(a));\n\n // Radius of earth in miles.\n double r = 3956;\n\n // calculate the result\n return(c * r);\n }", "public Location(String name) {\n this.name = name;\n this.description = \"\";\n this.items = new ArrayList<Item>();\n this.playersNames = new ArrayList<String>();\n this.destinations = new HashMap<Direction, Location>();\n }", "public double distance(double x, double y);", "public double distanceTo(MC_Location loc)\n\t {\n\t\t // If dimensions are different, instead of throwing an exception just treat different dimensions as 'very far away'\n\t\t if(loc.dimension != dimension) return Double.MAX_VALUE/2; // don't need full max value so reducing so no basic caller wrap-around.\n\t\t \n\t\t // Pythagoras...\n\t\t double dx = x - loc.x;\n\t\t double dy = y - loc.y;\n\t\t double dz = z - loc.z;\n\t\t return Math.sqrt(dx*dx + dy*dy + dz*dz);\n\t }", "public Location(Context context){\n//\t\tthis.context = context;\n\t\tinit(context);\n\t}", "Long addLocation(String cityName, double lat, double lon, double wlat, double wlon) {\n\n Long locationId = 100L;\n\n // First, check if the location with this city name exists in the db\n Cursor locationCursor = mContext.getContentResolver().query(\n WeatherContract.LocationEntry.CONTENT_URI,\n new String[]{WeatherContract.LocationEntry._ID},\n WeatherContract.LocationEntry.COLUMN_WEATHER_CITY + \" = ?\",\n new String[]{cityName},\n null);\n\n if (locationCursor != null &&locationCursor.moveToFirst()) {\n int locationIdIndex = locationCursor.getColumnIndex(WeatherContract.LocationEntry._ID);\n locationId = locationCursor.getLong(locationIdIndex);\n } else {\n ContentValues locationValues = new ContentValues();\n\n locationValues.put(WeatherContract.LocationEntry.COLUMN_WEATHER_CITY, cityName);\n locationValues.put(WeatherContract.LocationEntry.COLUMN_STARTING_COORD_LAT, lat);\n locationValues.put(WeatherContract.LocationEntry.COLUMN_STARTING_COORD_LON, lon);\n locationValues.put(WeatherContract.LocationEntry.COLUMN_WEATHER_COORD_LAT, wlat);\n locationValues.put(WeatherContract.LocationEntry.COLUMN_WEATHER_COORD_LON, wlon);\n\n // Finally, insert location data into the database.\n Uri insertedUri = mContext.getContentResolver().insert(\n WeatherContract.LocationEntry.CONTENT_URI,\n locationValues\n );\n\n // The resulting URI contains the ID for the row. Extract the locationId from the Uri.\n locationId = ContentUris.parseId(insertedUri);\n\n }\n Log.d(LOG_TAG,\"LOCATION_ID =\" + locationId);\n locationCursor.close();\n return locationId;\n }", "public Coordinate getLocation();" ]
[ "0.63258207", "0.63258207", "0.63258207", "0.610777", "0.597234", "0.5943302", "0.58674186", "0.58437014", "0.57636225", "0.57194257", "0.567761", "0.56742334", "0.5651992", "0.56425184", "0.5611348", "0.5570508", "0.55555123", "0.5521835", "0.5516992", "0.5512287", "0.55102754", "0.55038625", "0.5495566", "0.54813534", "0.54788965", "0.5464656", "0.5460744", "0.5431829", "0.54250205", "0.5388365", "0.53725934", "0.53676534", "0.534588", "0.5343257", "0.53267807", "0.5314782", "0.5309847", "0.5296024", "0.5292745", "0.5289795", "0.5289795", "0.5289795", "0.5289795", "0.528282", "0.52788275", "0.52684706", "0.52675194", "0.5249829", "0.52409613", "0.52385056", "0.52375835", "0.5228941", "0.52246284", "0.5218226", "0.5195344", "0.51737", "0.5170065", "0.5165876", "0.5163956", "0.5159834", "0.51502967", "0.5147454", "0.51467055", "0.51380676", "0.51119053", "0.51090753", "0.5104188", "0.51041055", "0.5089628", "0.50742596", "0.507298", "0.50669557", "0.5064622", "0.5058419", "0.50559825", "0.50520176", "0.50513077", "0.5043859", "0.50393957", "0.5037755", "0.50165236", "0.50158507", "0.49967918", "0.4996417", "0.49925703", "0.49894294", "0.4987936", "0.49865472", "0.49836323", "0.49740538", "0.49720827", "0.49698544", "0.49651206", "0.49606785", "0.49593398", "0.49551094", "0.4951291", "0.49434793", "0.4941759", "0.4933759" ]
0.58082265
8
if the drawer is not showing
@Override public boolean onCreateOptionsMenu(Menu menu) { if (!fragmentNavigationDrawer.isDrawerOpen()) restoreActionBar(); return true; // return super.onCreateOptionsMenu(menu); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean isDrawerOpen() {\n return mDrawerLayout != null && mDrawerLayout.isDrawerOpen(Gravity.LEFT);\n }", "@Override\n\t\t\tpublic void onDrawerOpened() {\n\t\t\t\tshowDown();\n\t\t\t}", "@Override\n\t\t\tpublic void onDrawerOpened() {\n\t\t\t\tbottomLayout.setVisibility(View.INVISIBLE);\n\t\t\t}", "@Override\n public boolean onPrepareOptionsMenu(Menu menu) {\n // mDrawerLayout.isDrawerOpen(mDrawerView);\n return super.onPrepareOptionsMenu(menu);\n }", "@Override\n public void onDrawerClosed() {\n if (lnr_option_pen.getVisibility() == View.VISIBLE)\n lnr_option_pen.setVisibility(View.GONE);\n\n if (lnr_option_brush.getVisibility() == View.VISIBLE)\n lnr_option_brush.setVisibility(View.GONE);\n\n if (lnr_option_size.getVisibility() == View.VISIBLE)\n lnr_option_size.setVisibility(View.GONE);\n }", "@Override\n public void onDrawerStateChanged(int newState) {\n }", "@Override\n public void onDrawerStateChanged(int newState) {\n }", "@Override\n public void onDrawerStateChanged(int newState) {\n }", "@Override\n public void onDrawerStateChanged(int newState) {\n }", "@Override\n\t\t\tpublic void onDrawerClosed() {\n\t\t\t\tshowUp();\n\t\t\t}", "@Override\n public void onDrawerStateChanged(int newState) {\n }", "@Override\n boolean onBeforePopDir() {\n int size = mState.stack.size();\n\n if (mDrawer.isPresent()\n && (System.currentTimeMillis() - mDrawerLastFiddled) > DRAWER_NO_FIDDLE_DELAY) {\n // Close drawer if it is open.\n if (mDrawer.isOpen()) {\n mDrawer.setOpen(false);\n mDrawerLastFiddled = System.currentTimeMillis();\n return true;\n }\n\n final Intent intent = getIntent();\n final boolean launchedExternally = intent != null && intent.getData() != null\n && mState.action == State.ACTION_BROWSE;\n\n // Open the Close drawer if it is closed and we're at the top of a root, but only when\n // not launched by another app.\n if (size <= 1 && !launchedExternally) {\n mDrawer.setOpen(true);\n // Remember so we don't just close it again if back is pressed again.\n mDrawerLastFiddled = System.currentTimeMillis();\n return true;\n }\n }\n\n return false;\n }", "@Override\n public void onDrawerOpened(View drawerView) {\n }", "@Override\n public void onDrawerOpened(View drawerView) {\n }", "@Override\n public boolean onPrepareOptionsMenu(Menu menu) {\n //boolean drawerOpen = mDrawerLayout.isDrawerOpen(mDrawerList);\n //menu.findItem(<MENU_ITEMS>).setVisible(!drawerOpen);\n return super.onPrepareOptionsMenu(menu);\n }", "@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == R.id.nav_read_offline) {\n // Handle the camera action\n Toast.makeText(this, \"Chờ phiên bản tiếp nhé !\", Toast.LENGTH_SHORT).show();\n } else if (id == R.id.nav_like) {\n Toast.makeText(this, \"Đã bảo chờ phiên bản tiếp rồi !\", Toast.LENGTH_SHORT).show();\n } else if (id == R.id.nav_night_mode) {\n //mFrameLayoutSetting.setVisibility(View.VISIBLE);\n } else if (id == R.id.nav_setting) {\n Toast.makeText(this, \"Mệt em vl, chờ phiên bản sau nhé !\", Toast.LENGTH_SHORT).show();\n } else if (id == R.id.nav_version) {\n Toast.makeText(this, \"I am sorry ! Đừng gỡ app\", Toast.LENGTH_SHORT).show();\n } else if (id == R.id.nav_policy) {\n Toast.makeText(this, \"Dừng lại tại đây thôi !\", Toast.LENGTH_SHORT).show();\n } else if (id == R.id.nav_vote) {\n //SystemClock.sleep(1000);\n Toast.makeText(this, \"Em nhây vl !\", Toast.LENGTH_SHORT).show();\n } else if (id == R.id.nav_feedback) {\n Toast.makeText(this, \"Em gỡ mịa app đi !\", Toast.LENGTH_SHORT).show();\n }\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }", "@Override\n public void onDrawerClosed(View drawerView) {\n }", "@Override\n public void onDrawerClosed(View drawerView) {\n }", "@Override\n\t\t\tpublic void onDrawerClosed() {\n\t\t\t\tlayoutParams = new FrameLayout.LayoutParams(\n\t\t\t\t\t\tLayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);\n\t\t\t\tslidingDrawer.setLayoutParams(layoutParams);\n\t\t\t\tbottomLayout.setVisibility(View.VISIBLE);\n\t\t\t}", "@Override\n public void onDrawerClosed(View drawerView) {\n }", "@Override\n public void onDrawerOpened(View drawerView) {\n Log.d(\"Apps Main\", \"Open drawer \");\n }", "private void toggleDrawer() {\n DrawerLayout drawer = (DrawerLayout)findViewById(R.id.menu);\n if(drawer.isDrawerOpen(Gravity.START)) {\n drawer.closeDrawer(Gravity.START);\n }\n else drawer.openDrawer(Gravity.START);\n }", "public void onDrawerOpened(View drawerView) {\n\n }", "public void onDrawerClosed(View view) {\n super.onDrawerClosed(view);\n\n\n }", "@Override\n public void onDrawerOpened(View drawerView) {\n super.onDrawerOpened(drawerView);\n }", "@Override\n public void onDrawerOpened(View drawerView) {\n super.onDrawerOpened(drawerView);\n }", "@Override\n public void onDrawerOpened(View drawerView) {\n super.onDrawerOpened(drawerView);\n }", "@Override\n public void onDrawerOpened(View drawerView) {\n super.onDrawerOpened(drawerView);\n }", "@Override\n public void onDrawerOpened(View drawerView) {\n super.onDrawerOpened(drawerView);\n }", "@Override\n public void onDrawerOpened(View drawerView) {\n super.onDrawerOpened(drawerView);\n }", "@Override\n public void onDrawerOpened(View drawerView) {\n super.onDrawerOpened(drawerView);\n }", "@Override\n public void onDrawerOpened(View drawerView) {\n super.onDrawerOpened(drawerView);\n }", "@Override\n public void onDrawerOpened(View drawerView) {\n super.onDrawerOpened(drawerView);\n }", "@Override\n public void onDrawerOpened(View drawerView) {\n super.onDrawerOpened(drawerView);\n }", "@Override\n public void onDrawerOpened(View drawerView) {\n super.onDrawerOpened(drawerView);\n }", "@Override\n public boolean onPrepareOptionsMenu(Menu menu)\n {\n boolean drawerOpen = mDrawerLayout.isDrawerOpen(mDrawerRelativeLayout);\n return super.onPrepareOptionsMenu(menu);\n }", "public void onDrawerClosed(View view) {\n }", "void onUserHasntLearntAboutDrawer();", "private void setupDrawerContent() {\n previousMenuItem = navigationView.getMenu().findItem(R.id.nav_category);\n previousMenuItem.setChecked(true);\n previousMenuItem.setCheckable(true);\n\n navigationView.setNavigationItemSelectedListener(\n new NavigationView.OnNavigationItemSelectedListener() {\n @Override\n public boolean onNavigationItemSelected(MenuItem menuItem) {\n\n drawerLayout.closeDrawer(Gravity.LEFT);\n\n if (previousMenuItem.getItemId() == menuItem.getItemId())\n return true;\n\n menuItem.setCheckable(true);\n menuItem.setChecked(true);\n previousMenuItem.setChecked(false);\n previousMenuItem = menuItem;\n\n switch (menuItem.getItemId()) {\n case R.id.nav_category:\n displayView(CATEGORIES_FRAG, null);\n break;\n case R.id.nav_favorites:\n displayView(FAVORITE_FRAG, null);\n break;\n case R.id.nav_reminder:\n displayView(REMINDER_FRAG, null);\n break;\n case R.id.nav_about:\n displayView(ABOUT_FRAG, null);\n break;\n case R.id.nav_feedback:\n IntentHelper.sendEmail(BaseDrawerActivity.this);\n break;\n case R.id.nav_rate_us:\n IntentHelper.voteForAppInBazaar(BaseDrawerActivity.this);\n break;\n case R.id.nav_settings:\n displayView(SETTINGS_FRAG, null);\n break;\n\n }\n\n\n return true;\n }\n }\n\n );\n }", "private void setUpNavigationDrawer() {\n navigationView.setNavigationItemSelectedListener(item -> {\n Fragment nextFragment = findNextFragment(item.getItemId());\n\n if (nextFragment instanceof WalkFragment && areLocationServicesDisabled()) {\n MaterialAlertDialogBuilder builder = new MaterialAlertDialogBuilder(this);\n builder.setTitle(R.string.location_services_not_enabled_title);\n builder.setMessage(R.string.location_services_not_enabled_message);\n builder.setPositiveButton(R.string.ok, null);\n\n builder.show();\n } else {\n changeFragment(nextFragment);\n\n item.setChecked(true);\n drawerLayout.closeDrawers();\n setUpNewFragment(item.getTitle(), item.getItemId());\n }\n\n return true;\n });\n }", "private boolean closeDrawer() {\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n if (drawer.isDrawerOpen(GravityCompat.START)) {\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }\n\n return false;\n }", "boolean isMenuShowing() {\n return game.r != null;\n }", "@Override\n public void onDrawerOpened(View drawerView) {\n\n super.onDrawerOpened(drawerView);\n }", "@Override\n public void onDrawerOpened(View drawerView) {\n\n super.onDrawerOpened(drawerView);\n }", "@Override\n public void onDrawerOpened(View drawerView) {\n\n super.onDrawerOpened(drawerView);\n }", "private boolean m4816l() {\n return this.f6594b.isDrawerOpen(this.f6609q);\n }", "@Override\n\tpublic boolean onPrepareOptionsMenu(Menu menu) {\n\t\tboolean drawerOpen = mDrawerLayout.isDrawerOpen(mDrawerList);\n\t\treturn super.onPrepareOptionsMenu(menu);\n\t}", "@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == R.id.nav_titol) {\n filter_bar.setVisibility(LinearLayout.GONE);\n notifyAdaptador();\n } else if (id == R.id.nav_director) {\n Dialogs.showDirectorFilter(this,filmData.getAllDirectors(actualSortOrder));\n } else if (id == R.id.nav_protagonista) {\n Dialogs.showProtagonistFilter(this,filmData.getAllProtagonists(actualSortOrder));\n } else if (id == R.id.nav_faq) {\n Dialogs.showFAQDialog(this);\n } else if (id == R.id.nav_about) {\n Dialogs.showAboutDialog(this);\n }\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }", "@Override\n public void onDrawerClosed(View drawerView) {\n super.onDrawerClosed(drawerView);\n }", "@Override\n public void onDrawerClosed(View drawerView) {\n super.onDrawerClosed(drawerView);\n }", "@Override\n public void onDrawerClosed(View drawerView) {\n super.onDrawerClosed(drawerView);\n }", "@Override\n public void onDrawerClosed(View drawerView) {\n super.onDrawerClosed(drawerView);\n }", "@Override\n public void onDrawerClosed(View drawerView) {\n super.onDrawerClosed(drawerView);\n }", "@Override\n public void onDrawerClosed(View drawerView) {\n super.onDrawerClosed(drawerView);\n }", "@Override\n public void onDrawerClosed(View drawerView) {\n super.onDrawerClosed(drawerView);\n }", "@Override\n public void onDrawerClosed(View drawerView) {\n super.onDrawerClosed(drawerView);\n }", "@Override\n public void onDrawerClosed(View drawerView) {\n super.onDrawerClosed(drawerView);\n }", "@Override\n public void onDrawerClosed(View drawerView) {\n super.onDrawerClosed(drawerView);\n }", "@Override\n public void onDrawerClosed(View drawerView) {\n super.onDrawerClosed(drawerView);\n }", "@Override\n public void onDrawerClosed(View drawerView) {\n super.onDrawerClosed(drawerView);\n }", "@Override\n public void onDrawerClosed(View drawerView) {\n super.onDrawerClosed(drawerView);\n }", "@Override\n public void onDrawerClosed(View drawerView) {\n super.onDrawerClosed(drawerView);\n }", "Drawer getDrawer();", "@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if(id == R.id.nav_hot){\n\n }else if(id == R.id.nav_special){\n\n }else if(id == R.id.nav_preference){\n\n }else if(id == R.id.nav_findGame){\n\n }\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }", "public void onDrawerClosed(View view) {\n super.onDrawerClosed(view);\n // Do whatever you want here\n }", "@Override\n public void onDrawerOpened(View drawerView) {\n\n int currentLearned = AppUtils.getIntegerPreference(getApplication(), Constant.COUNT_DONE, 0);\n int currentDifficult = AppUtils.getIntegerPreference(getApplication(), Constant.COUNT_DIFFICULT, 0);\n\n Log.d(\"debug\", \"---current learned = \" + currentLearned);\n Log.d(\"debug\", \"---current difficult = \" + currentDifficult);\n\n Menu menu = navigationView.getMenu();\n MenuItem menuItemLearned = menu.getItem(1);\n MenuItem menuItemDifficult = menu.getItem(2);\n\n Log.d(\"debug\", \"---menu = \" + menu);\n Log.d(\"debug\", \"---menu 1 = \" + menuItemLearned);\n Log.d(\"debug\", \"---menu 2 = \" + menuItemDifficult);\n\n\n menuItemLearned.setTitle(getResources().getString(R.string.menu_navigation_learned)\n + \" (\" + currentLearned + \")\");\n menuItemDifficult.setTitle(getResources().getString(R.string.menu_navigation_hard)\n + \" (\" + currentDifficult + \")\");\n\n menuItemLearned.setEnabled(currentLearned != 0);\n menuItemDifficult.setEnabled(currentDifficult != 0);\n\n super.onDrawerOpened(drawerView);\n }", "public void onDrawerClosed(View drawerView) {\n\n }", "@Override\n\tpublic boolean onPrepareOptionsMenu(Menu menu) {\n\t\tboolean drawerOpen = drawerLayout.isDrawerOpen(drawerList);\n\t\t// if (getSupportFragmentManager().findFragmentByTag(\"TaskList\") !=\n\t\t// null) {\n\t\tif (getSupportFragmentManager().getBackStackEntryCount() > 0) {\n\t\t\tif (getSupportFragmentManager().getBackStackEntryAt(\n\t\t\t\t\tgetSupportFragmentManager().getBackStackEntryCount() - 1)\n\t\t\t\t\t.getName() == \"TaskList\") {\n\t\t\t\tLog.d(TAG, \"made it in here!\");\n\t\t\t\tmenu.findItem(R.id.add).setVisible(!drawerOpen);\n\t\t\t} else if (getSupportFragmentManager().getBackStackEntryAt(\n\t\t\t\t\tgetSupportFragmentManager().getBackStackEntryCount() - 1)\n\t\t\t\t\t.getName() == \"DETAILTASK\") {\n\t\t\t\tmenu.findItem(R.id.deletedetailedtask).setVisible(!drawerOpen);\n\t\t\t}\n\t\t}\n\t\tmenu.findItem(R.id.settings).setVisible(!drawerOpen);\n\t\tmenu.findItem(R.id.about).setVisible(!drawerOpen);\n\t\treturn super.onPrepareOptionsMenu(menu);\n\t}", "public void onDrawerOpened(View drawerView) {\r\n super.onDrawerOpened(drawerView);\r\n if(!mUserLearnedDrawer){\r\n\r\n mUserLearnedDrawer=true;\r\n Utility utility=new Utility();\r\n utility.writeToSharedPref(getApplicationContext(),KEY_USER_LEARNED_DRAWER,mUserLearnedDrawer+\"\");\r\n }\r\n invalidateOptionsMenu();\r\n }", "@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n kondisi(id);\n\n DrawerLayout drawer = findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }", "private void closeDrawer(){\n if (drawerLayout.isDrawerOpen(GravityCompat.START)){\n drawerLayout.closeDrawer(GravityCompat.START);\n }\n }", "public void onDrawerClosed(View view) {\n super.onDrawerClosed(view);\n //change toolbar title to the app's name\n toolbar.setTitle(getResources().getString(R.string.app_name));\n\n //hide the add feed menu option\n hideAddFeed();\n\n }", "public void dynamicDrawerEvent(NavigationType type){\n CustomDrawer drawer = dynamicDrawers.get(type);\n if (drawer.isShown()) {\n titleBar.toFront();\n drawer.hide();\n } else {\n drawer.open();\n }\n }", "@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(MenuItem item) {\n DrawerLayout drawer = findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }", "public void onDrawerOpened(View drawerView) {\n super.onDrawerOpened(drawerView);\n }", "public void onDrawerOpened(View drawerView) {\n super.onDrawerOpened(drawerView);\n }", "public void onDrawerOpened(View drawerView) {\n super.onDrawerOpened(drawerView);\n }", "public void onDrawerOpened(View drawerView) {\n super.onDrawerOpened(drawerView);\n }", "@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == R.id.nav_dash) {\n Toast.makeText(MainActivity.this, \"Dashboard\", Toast.LENGTH_SHORT).show();\n }else if (id == R.id.nav_config){\n Toast.makeText(MainActivity.this, \"Fazer alguma coisa aqui...\", Toast.LENGTH_SHORT).show();\n }\n DrawerLayout drawer = findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }", "@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(MenuItem item) {\n Fragment fragment = null;\n int id = item.getItemId();\n\n if (id == R.id.drawer_area) {\n // Handle the camera action\n fragment = new AreaFragment();\n } else if (id == R.id.drawer_cooking) {\n\n } else if (id == R.id.drawer_currency) {\n\n } else if (id == R.id.drawer_energy) {\n\n } else if (id == R.id.drawer_fuel) {\n\n } else if (id == R.id.drawer_length) {\n\n }\n\n if(fragment != null){\n\n FragmentManager fragmentManager = getSupportFragmentManager();\n FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();\n\n fragmentTransaction.replace(R.id.drawer, fragment);\n fragmentTransaction.commit();\n }\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }", "@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(MenuItem item) {\n\n DrawerLayout drawer = findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }", "void displayDrawer() {\n //toolbar = (Toolbar) findViewById(R.id.toolbar);\n setSupportActionBar(toolbar);\n actionbar = getSupportActionBar();\n actionbar.setDisplayHomeAsUpEnabled(true);\n\n actionbar.setHomeAsUpIndicator(R.drawable.ic_menu);\n\n navigationView.setNavigationItemSelectedListener(\n new NavigationView.OnNavigationItemSelectedListener() {\n @Override\n public boolean onNavigationItemSelected(MenuItem menuItem) {\n // set item as selected to persist highlight\n menuItem.setChecked(true);\n // close drawer when item is tapped\n mdrawer.closeDrawers();\n\n String choice = menuItem.getTitle().toString();\n\n switch (choice) {\n case \"Register\":\n Intent i = new Intent(getBaseContext(), SignIn.class);\n startActivity(i);\n break;\n case \"Log In\":\n Intent p = new Intent(getBaseContext(), LoginActivity.class);\n startActivity(p);\n break;\n\n case \"Profile Picture\":\n Intent pic = new Intent(getBaseContext(), ImageUpload.class);\n startActivity(pic);\n break;\n\n case \"Users\":\n Intent users = new Intent(getBaseContext(), Userlist.class);\n startActivity(users);\n break;\n\n case \"Chats\":\n Intent chats = new Intent(getBaseContext(), ChatList.class);\n startActivity(chats);\n break;\n }\n\n // Add code here to update the UI based on the item selected\n // For example, swap UI fragments here\n\n return true;\n }\n });\n }", "@Override\n public boolean onPrepareOptionsMenu(Menu menu) {\n // If the nav drawer is open, hide action items related to the content view\n boolean drawerOpen = myDrawerLayout.isDrawerOpen(myDrawerList);\n // Þetta getur falið icon þegar drawer er opin\n // menu.findItem(R.id.action_websearch).setVisible(!drawerOpen);\n return super.onPrepareOptionsMenu(menu);\n }", "@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(MenuItem item) {\n int id = item.getItemId();\n displaySelectedScreen(id);\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }", "@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == R.id.librarydraw) {\n\n } else if (id == R.id.nav_gallery) {\n\n } else if (id == R.id.nav_slideshow) {\n\n } else if (id == R.id.nav_manage) {\n\n } else if (id == R.id.nav_share) {\n\n } else if (id == R.id.nav_send) {\n\n }\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }", "@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == R.id.nav_configuration) {\n\n Toast.makeText(getApplication(),\"Este es la configuración\",Toast.LENGTH_SHORT).show();\n\n } else if (id == R.id.nav_sign_off) {\n\n Toast.makeText(getApplication(),\"Esto es cerrar sesión\",Toast.LENGTH_SHORT).show();\n\n }\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }", "public void onDrawerClosed(View view) {\n super.onDrawerClosed(view);\n\n }", "public void onDrawerClosed(View view) {\n\t\t\t\t\t invalidateOptionsMenu(); \n\t\t\t\t\t }", "@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == R.id.nav_camera) {\n // Handle the camera action\n } else if (id == R.id.nav_gallery) {\n\n } else if (id == R.id.nav_slideshow) {\n\n } else if (id == R.id.nav_manage) {\n\n } else if (id == R.id.nav_share) {\n\n } else if (id == R.id.nav_send) {\n\n }\n\n\n\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }", "public boolean onNavigationItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == R.id.nav_home) {\n NavUtils.navigateUpFromSameTask(this);\n } else if (id == R.id.nav_precipitation) {\n //Already At Precipitation\n } else if(id == R.id.nav_stoichiometry){\n NavUtils.navigateUpFromSameTask(this);\n startActivity(new Intent(getApplicationContext(), Stoichiometry.class));\n } else if (id == R.id.nav_periodic_table){\n NavUtils.navigateUpFromSameTask(this);\n startActivity(new Intent(getApplicationContext(), Periodic_Table.class));\n } else if(id == R.id.nav_base_acid){\n NavUtils.navigateUpFromSameTask(this);\n startActivity(new Intent(getApplicationContext(), Base_Acid.class));\n } else if(id == R.id.nav_dissolving){\n NavUtils.navigateUpFromSameTask(this);\n startActivity(new Intent(getApplicationContext(), Dissolving.class));\n } else if(id == R.id.nav_fatty_acid){\n NavUtils.navigateUpFromSameTask(this);\n startActivity(new Intent(getApplicationContext(), Fatty_Acid.class));\n } else if(id == R.id.nav_equation_balancer){\n NavUtils.navigateUpFromSameTask(this);\n startActivity(new Intent(getApplicationContext(), Equation_Balancer.class));\n }\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }", "@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == R.id.nav_dongvat) {\n\n } else if (id == R.id.nav_sacmau) {\n\n } else if (id == R.id.nav_tainhieunhat) {\n\n } else if (id == R.id.nav_thiennhien) {\n\n } else if (id == R.id.nav_tinhyeu) {\n\n }\n\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }", "@Override\r\n\tpublic boolean onPrepareOptionsMenu(Menu menu) {\n\t\tboolean drawerOpened = drawerLayout.isDrawerOpen(drawerList);\r\n\r\n\t\tmenu.findItem(R.id.settingsMenuItem).setVisible(!drawerOpened);\r\n\r\n\t\tif (drawerOpened)\r\n\t\t\tmenu.findItem(R.id.refreshMenuItem).setVisible(false);\r\n\t\telse {\r\n\t\t\tif (selectedItem == 0)\r\n\t\t\t\tmenu.findItem(R.id.refreshMenuItem).setVisible(true);\r\n\t\t\telse\r\n\t\t\t\tmenu.findItem(R.id.refreshMenuItem).setVisible(false);\r\n\t\t}\r\n\r\n\t\treturn super.onPrepareOptionsMenu(menu);\r\n\t}", "@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(MenuItem item) {\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }", "public void onDrawerClosed(View view) {\n super.onDrawerClosed(view);\n }", "public void onDrawerClosed(View view) {\n super.onDrawerClosed(view);\n }", "@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(MenuItem item) {\n\n displaySelectedScreen(item.getItemId());\n\n item.setChecked(true);\n\n drawer.closeDrawers();\n return true;\n }", "public void ifLose() {\n LoseMenu.setVisible(true);\n }", "@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == R.id.nav_newsurvey) {\n // Handle the camera action\n\n CapturePlot fr = new CapturePlot();\n fragment = fr;\n this.setTitle(fr.TAG);\n getSupportFragmentManager().beginTransaction().replace(R.id.fholder, fragment).addToBackStack(fr.TAG).commit();\n\n } else if (id == R.id.nav_pendingshare) {\n\n } else if (id == R.id.nav_nonmemtomem) {\n\n } else if (id == R.id.nav_editplot) {\n\n } else if (id == R.id.nav_daysummary) {\n DaySummary fr = new DaySummary();\n fragment = fr;\n this.setTitle(fr.TAG);\n getSupportFragmentManager().beginTransaction().replace(R.id.fholder, fragment).addToBackStack(fr.TAG).commit();\n\n } else if (id == R.id.nav_dataimport) {\n ImportData fr = new ImportData();\n fragment = fr;\n this.setTitle(fr.TAG);\n getSupportFragmentManager().beginTransaction().replace(R.id.fholder, fragment).addToBackStack(fr.TAG).commit();\n\n } else if (id == R.id.nav_logout) {\n //CommanData.conn.oprator.truncateTable();\n\n this.finish();\n\n }\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }", "boolean isReadyForShowing();", "@SuppressWarnings(\"StatementWithEmptyBody\")\r\n @Override\r\n public boolean onNavigationItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n if (id == R.id.nav_music) {\r\n\r\n } else if (id == R.id.nav_settting) {\r\n\r\n }\r\n\r\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\r\n drawer.closeDrawer(GravityCompat.START);\r\n return true;\r\n }", "public boolean checkListNull() {\n\t\treturn ((drawerItems == null) ? true : false);\n\t}" ]
[ "0.72370064", "0.6938734", "0.69182134", "0.68762994", "0.67787904", "0.67731714", "0.67731714", "0.67731714", "0.67731714", "0.6746964", "0.6707873", "0.6696173", "0.6658199", "0.6587322", "0.6545412", "0.6495904", "0.6456638", "0.6456638", "0.6421169", "0.63851154", "0.6375284", "0.63561046", "0.6347248", "0.6331797", "0.63188154", "0.63188154", "0.63188154", "0.63188154", "0.63188154", "0.63188154", "0.63188154", "0.63188154", "0.63188154", "0.63188154", "0.63188154", "0.6297733", "0.62969315", "0.6294334", "0.62851536", "0.6267976", "0.62471956", "0.62459743", "0.623509", "0.623509", "0.623509", "0.62333536", "0.62215316", "0.62208927", "0.62149894", "0.62149894", "0.62149894", "0.62149894", "0.62149894", "0.62149894", "0.62149894", "0.62149894", "0.62149894", "0.62149894", "0.62149894", "0.62149894", "0.62149894", "0.62149894", "0.61947614", "0.6179664", "0.617514", "0.6166774", "0.616026", "0.6150073", "0.6144952", "0.61398613", "0.6134734", "0.61294764", "0.6128081", "0.6126025", "0.61224794", "0.61224794", "0.61224794", "0.61224794", "0.61150783", "0.61085296", "0.6094545", "0.60858464", "0.60602635", "0.6055345", "0.604924", "0.6047146", "0.60439026", "0.6032539", "0.60323125", "0.6021851", "0.60023606", "0.59994614", "0.59970266", "0.5990916", "0.5990916", "0.59809285", "0.59782416", "0.5977904", "0.597629", "0.5965126", "0.59507346" ]
0.0
-1
Handle action bar item clicks here. The action bar will automatically handle clicks on the Home/Up button, so long as you specify a parent activity in AndroidManifest.xml.
@Override public boolean onOptionsItemSelected(MenuItem item) { return super.onOptionsItemSelected(item); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onOptionsItemSelected(MenuItem item) { Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n\n //\n // HANDLE BACK BUTTON\n //\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // Back button clicked\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // app icon in action bar clicked; goto parent activity.\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n switch (id) {\r\n case android.R.id.home:\r\n // app icon in action bar clicked; go home\r\n this.finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // app icon in action bar clicked; go home\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n Log.e(\"clik\", \"action bar clicked\");\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n\t public boolean onOptionsItemSelected(MenuItem item) {\n\t int id = item.getItemId();\n\t \n\t\t\tif (id == android.R.id.home) {\n\t\t\t\t// Respond to the action bar's Up/Home button\n\t\t\t\t// NavUtils.navigateUpFromSameTask(this);\n\t\t\t\tonBackPressed();\n\t\t\t\treturn true;\n\t\t\t}\n\t \n\t \n\t return super.onOptionsItemSelected(item);\n\t }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n // Respond to the action bar's Up/Home button\r\n case android.R.id.home:\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n switch (item.getItemId()) {\n case android.R.id.home:\n\n // app icon in action bar clicked; goto parent activity.\n this.finish();\n return true;\n default:\n\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n switch (item.getItemId()) {\n case android.R.id.home:\n\n // app icon in action bar clicked; goto parent activity.\n this.finish();\n return true;\n default:\n\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle presses on the action bar items\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n case R.id.action_clear:\n return true;\n case R.id.action_done:\n\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n onActionHomePressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId())\n {\n case android.R.id.home :\n super.onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId ()) {\n case android.R.id.home:\n onBackPressed ();\n return true;\n\n default:\n break;\n }\n return super.onOptionsItemSelected ( item );\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t switch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\t// app icon in action bar clicked; go home \n\t\t\tIntent intent = new Intent(this, Kelutral.class); \n\t\t\tintent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); \n\t\t\tstartActivity(intent); \n\t\t\treturn true;\t\t\n\t case R.id.Search:\n\t \treturn onSearchRequested();\n\t\tcase R.id.AppInfo:\n\t\t\t// Place holder menu item\n\t\t\tIntent newIntent = new Intent(Intent.ACTION_VIEW,\n\t\t\t\t\tUri.parse(\"http://forum.learnnavi.org/mobile-apps/\"));\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\n\t\tcase R.id.Preferences:\n\t\t\tnewIntent = new Intent(getBaseContext(), Preferences.class);\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\t\n\t }\n\t return false;\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n\n case android.R.id.home:\n onBackPressed();\n return true;\n\n }\n return super.onOptionsItemSelected(item);\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // Intent homeIntent = new Intent(this, MainActivity.class);\n // homeIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n // startActivity(homeIntent);\n finish();\n return true;\n default:\n return (super.onOptionsItemSelected(item));\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // setResult and close the activity when Action Bar Up Button clicked.\n if (item.getItemId() == android.R.id.home) {\n setResult(RESULT_CANCELED);\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // This ID represents the Home or Up button. In the case of this\n // activity, the Up button is shown. Use NavUtils to allow users\n // to navigate up one level in the application structure. For\n // more details, see the Navigation pattern on Android Design:\n //\n // http://developer.android.com/design/patterns/navigation.html#up-vs-back\n //\n \tgetActionBar().setDisplayHomeAsUpEnabled(false);\n \tgetFragmentManager().popBackStack();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if(id == android.R.id.home){\n onBackPressed();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@RequiresApi(api = Build.VERSION_CODES.M)\n @Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif(item.getItemId()==android.R.id.home)\r\n\t\t{\r\n\t\t\tgetActivity().onBackPressed();\r\n\t\t}\r\n\t\treturn super.onOptionsItemSelected(item);\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if(item.getItemId()==android.R.id.home){\n super.onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n return false;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n //Back arrow\n case android.R.id.home:\n onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // android.R.id.home是Android内置home按钮的id\n finish();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n this.onBackPressed();\n return false;\n }\n return false;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n int id = item.getItemId();\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n\r\n case android.R.id.home:\r\n /*Intent i= new Intent(getApplication(), MainActivity.class);\r\n i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);\r\n startActivity(i);*/\r\n onBackPressed();\r\n finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case android.R.id.home:\n this.finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Pass the event to ActionBarDrawerToggle, if it returns\n // true, then it has handled the app icon touch event\n if (mDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n\n // Handle your other action bar items...\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n NavUtils.navigateUpFromSameTask(getActivity());\n return true;\n case R.id.action_settings:\n Intent i = new Intent(getActivity(), SettingsActivity.class);\n startActivity(i);\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n //Fixes the Up Button\n if(id == android.R.id.home) {\n BuildRoute.this.finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()){\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return true;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n if (id == android.R.id.home) {\n NavUtils.navigateUpFromSameTask(this);\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n onBackPressed();\r\n break;\r\n }\r\n return true;\r\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif (item.getItemId() == android.R.id.home) {\n\t\t\tfinish();\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n onBackPressed();\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n if ( id == android.R.id.home ) {\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.home) {\r\n NavUtils.navigateUpFromSameTask(this);\r\n return true;\r\n }\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_about) {\r\n AboutDialog();\r\n return true;\r\n }\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_exit) {\r\n finish();\r\n return true;\r\n }\r\n\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n//noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n// finish the activity\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item)\n {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if( id == android.R.id.home ) // Back button of the actionbar\n {\n finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\t\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\t\tswitch (item.getItemId()) {\r\n\t\t\tcase android.R.id.home:\r\n\t\t\t\tfinish();\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\treturn super.onOptionsItemSelected(item);\r\n\t\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n\n this.finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (item.getItemId() == android.R.id.home) {\n onBackPressed();\n return true;\n }\n return false;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n if(id == android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n if (item.getItemId() == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\r\n\t\tcase android.R.id.home:\r\n\t\t\tsetResult(RESULT_OK, getIntent());\r\n\t\t\tfinish();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n finish();\n return true;\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\tbreak;\n\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n\n case android.R.id.home:\n this.finish();\n return true;\n }\n return true;\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tint id = item.getItemId();\n\t\tif (id == android.R.id.home) {\n\t\t\tfinish();\n\t\t\treturn true;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n if (id == android.R.id.home) {\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n //NavUtils.navigateUpFromSameTask(this);\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // todo: goto back activity from here\n finish();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n // Handle item selection\r\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n onBackPressed();\r\n return true;\r\n\r\n case me.cchiang.lookforthings.R.id.action_sample:\r\n// Snackbar.make(parent_view, item.getTitle() + \" Clicked \", Snackbar.LENGTH_SHORT).show();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tcase R.id.scan_menu:\n\t\t\tonScan();\n\t\t\tbreak;\n\t\tcase R.id.opt_about:\n\t\t\t//onAbout();\n\t\t\tbreak;\n\t\tcase R.id.opt_exit:\n\t\t\tfinish();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t\treturn true;\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n super.onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n this.finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(@NonNull MenuItem item) {\n if (item.getItemId() == android.R.id.home) {\n onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n\n case android.R.id.home:\n finish();\n return true;\n\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if(id==android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\r\n\t switch (item.getItemId()) {\r\n\t \t// back to previous page\r\n\t case android.R.id.home:\r\n\t finish();\r\n\t return true;\r\n\t }\r\n\t return super.onOptionsItemSelected(item);\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == android.R.id.home) {\r\n // finish the activity\r\n onBackPressed();\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == android.R.id.home) {\r\n // finish the activity\r\n onBackPressed();\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId())\n {\n case android.R.id.home:\n this.finish();\n return (true);\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case R.id.home:{\n NavUtils.navigateUpFromSameTask(this);\n return true;\n }\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n switch(item.getItemId())\n {\n case android.R.id.home:\n super.onBackPressed();\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\treturn true;\n\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n\r\n int id = item.getItemId();\r\n if(id==android.R.id.home){\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }" ]
[ "0.79041183", "0.7805934", "0.77659106", "0.7727251", "0.7631684", "0.7621701", "0.75839096", "0.75300384", "0.74873656", "0.7458051", "0.7458051", "0.7438486", "0.742157", "0.7403794", "0.7391802", "0.73870087", "0.7379108", "0.7370295", "0.7362194", "0.7355759", "0.73454577", "0.734109", "0.73295504", "0.7327726", "0.73259085", "0.73188347", "0.731648", "0.73134047", "0.7303978", "0.7303978", "0.7301588", "0.7298084", "0.72932935", "0.7286338", "0.7283324", "0.72808945", "0.72785115", "0.72597474", "0.72597474", "0.72597474", "0.725962", "0.7259136", "0.7249966", "0.7224023", "0.721937", "0.7216621", "0.72045326", "0.7200649", "0.71991026", "0.71923256", "0.71851367", "0.7176769", "0.7168457", "0.71675026", "0.7153402", "0.71533287", "0.71352696", "0.71350807", "0.71350807", "0.7129153", "0.7128639", "0.7124181", "0.7123387", "0.7122983", "0.71220255", "0.711715", "0.711715", "0.711715", "0.711715", "0.7117043", "0.71169263", "0.7116624", "0.71149373", "0.71123946", "0.7109806", "0.7108778", "0.710536", "0.7098968", "0.70981944", "0.7095771", "0.7093572", "0.7093572", "0.70862055", "0.7082207", "0.70808214", "0.7080366", "0.7073644", "0.7068183", "0.706161", "0.7060019", "0.70598614", "0.7051272", "0.70374316", "0.70374316", "0.7035865", "0.70352185", "0.70352185", "0.7031749", "0.703084", "0.7029517", "0.7018633" ]
0.0
-1
Created by lipenghui on 2017/1/10.
public interface SayHelloInterface { String sayHello(String text); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "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\tpublic void grabar() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "private void strin() {\n\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "private void poetries() {\n\n\t}", "@Override\n public void init() {\n\n }", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void initialize() {\n\n \n }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "private void init() {\n\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n\tprotected void interr() {\n\t}", "public void mo38117a() {\n }", "@Override\n public void memoria() {\n \n }", "@Override\n void init() {\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\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n public void init() {\n }", "private void kk12() {\n\n\t}", "@Override\n protected void getExras() {\n }", "public void mo4359a() {\n }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@Override\n\tpublic void sacrifier() {\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}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n public void settings() {\n // TODO Auto-generated method stub\n \n }", "public void gored() {\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 einkaufen() {\n\t}", "public final void mo51373a() {\n }", "Constructor() {\r\n\t\t \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 }", "private void init() {\n\n\n\n }", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "public void mo6081a() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void init()\n\t{\n\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\n public void init() {}", "@Override\n protected void init() {\n }", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\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\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\r\n\tvoid func04() {\n\t\t\r\n\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\r\n\tpublic void init() {}", "public contrustor(){\r\n\t}", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void init() {\n\t}", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "private void m50366E() {\n }", "private void test() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}" ]
[ "0.5994932", "0.59472734", "0.5807083", "0.5775633", "0.5733542", "0.57287294", "0.57287294", "0.5725936", "0.56622934", "0.5594499", "0.55875134", "0.55866706", "0.55736345", "0.55620617", "0.5548187", "0.55418384", "0.5539918", "0.5538614", "0.55330986", "0.55224425", "0.5520938", "0.54991275", "0.54991275", "0.54799896", "0.54749435", "0.5470609", "0.5465114", "0.5457614", "0.543799", "0.54268306", "0.54251456", "0.54143685", "0.54143685", "0.54143685", "0.54143685", "0.54143685", "0.5387151", "0.53807855", "0.5377344", "0.5367502", "0.53665507", "0.5361316", "0.53607535", "0.5359534", "0.5359534", "0.53449804", "0.5342787", "0.5342787", "0.5342787", "0.5340743", "0.5340743", "0.5340743", "0.5328859", "0.5325464", "0.5310845", "0.5310845", "0.5310845", "0.5310115", "0.5308136", "0.5307913", "0.53062856", "0.53062856", "0.53062856", "0.53062856", "0.53062856", "0.53062856", "0.53062856", "0.5304251", "0.52863955", "0.5281274", "0.5266284", "0.5266284", "0.5266284", "0.5266284", "0.5266284", "0.5266284", "0.5258763", "0.5255624", "0.52544224", "0.5248024", "0.5247262", "0.5246531", "0.52448076", "0.5236508", "0.52301025", "0.52301025", "0.52293795", "0.5227806", "0.5224091", "0.5218787", "0.5214386", "0.52119297", "0.52015847", "0.5200852", "0.51938856", "0.5179715", "0.51777756", "0.51766926", "0.5175652", "0.51737934", "0.5173772" ]
0.0
-1
Metodos sobrecargados utilizados para la insercion de un nuevo objeto a la BD. Reciben el objeto/registro que se desea Insertar.
public long Create(Estado estado ){ SQLiteDatabase sqLiteDatabase = conn.getWritableDatabase(); return sqLiteDatabase.insert("estados", null, estado.toContentValues()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void insertarcola(){\n Cola_banco nuevo=new Cola_banco();// se declara nuestro metodo que contendra la cola\r\n System.out.println(\"ingrese el nombre que contendra la cola: \");// se pide el mensaje desde el teclado\r\n nuevo.nombre=teclado.next();// se ingresa nuestro datos por consola yse almacena en la variable nombre\r\n if (primero==null){// se usa una condicional para indicar si primer dato ingresado es igual al null\r\n primero=nuevo;// se indica que el primer dato ingresado pasa a ser nuestro dato\r\n primero.siguiente=null;// se indica que el el dato ingresado vaya al apuntador siguente y que guarde al null\r\n ultimo=nuevo;// se indica que el ultimo dato ingresado pase como nuevo en la cabeza de nuestro cola\r\n }else{// se usa la condicon sino se cumple la primera\r\n ultimo.siguiente=nuevo;//se indica que ultimo dato ingresado apunte hacia siguente si es que hay un nuevo dato ingresado y que vaya aser el nuevo dato de la cola\r\n nuevo.siguiente=null;// se indica que el nuevo dato ingresado vaya y apunete hacia siguente y quees igual al null\r\n ultimo=nuevo;// se indica que el ultimo dato ingresado pase como nuevo dato\r\n }\r\n System.out.println(\"\\n dato ingresado correctamente\");// se imprime enl mensaje que el dato ha sido ingresado correctamente\r\n}", "@Override\r\n\tpublic void insert(Object obj) throws DAOException {\n\t\tOfferta offerta;\r\n\t\ttry {\r\n\t\t\tofferta = (Offerta) obj;\r\n\r\n\t\t\tconn = getConnection(usr, pass);\r\n\r\n\t\t\tps = conn.prepareStatement(insertQuery);\r\n\r\n\t\t\tSystem.out.println(\"Inserimento dell'offerta nel db.\");\r\n\t\t\tofferta.print();\r\n\r\n\t\t\tps.setInt(1, offerta.getIdOfferta());\r\n\t\t\tps.setInt(2, offerta.getIdTratta());\r\n\t\t\tps.setInt(3, offerta.getData().getGiorno());\r\n\t\t\tps.setInt(4, offerta.getData().getMese());\r\n\t\t\tps.setInt(5, offerta.getData().getAnno());\r\n\t\t\tps.setInt(6, offerta.getOraPartenza().getOra());\r\n\t\t\tps.setInt(7, offerta.getOraPartenza().getMinuti());\r\n\t\t\tps.setInt(8, offerta.getOraArrivo().getOra());\r\n\t\t\tps.setInt(9, offerta.getOraArrivo().getMinuti());\r\n\t\t\tps.setInt(10, offerta.getPosti());\r\n\t\t\tps.setInt(11, offerta.getDataInserimento().getGiorno());\r\n\t\t\tps.setInt(12, offerta.getDataInserimento().getMese());\r\n\t\t\tps.setInt(13, offerta.getDataInserimento().getAnno());\r\n\r\n\t\t\tps.executeUpdate();\r\n\r\n\t\t} catch (ClassCastException e) {\r\n\t\t\tthrow new DAOException(\"Errore in insert ClassCastException.\");\r\n\t\t} catch (SQLException e) {\r\n\t\t\tthrow new DAOException(\"Errore in insert SQLException.\");\r\n\t\t}\r\n\r\n\t}", "@Override\n\tpublic int insertarEntrada(AlmacenDTO obj) {\n\t\tint rs=-1;\n\t\tConnection con=null;\n\t\tPreparedStatement pst=null;\n\t\ttry {\n\t\t\tcon=new MySqlDbConexion().getConexion();\n\t\t\tString sql=\"insert into MATERIAL_ENTRADA values (null,?,?,?)\";\n\t\t\tpst=con.prepareStatement(sql);\n\t\t\t\n\t\t\tpst.setInt(1,obj.getCodigo_producto());\n\t\t\tpst.setInt(2,obj.getCantidad_entrada());\n\t\t\tpst.setDate(3,obj.getFecha_entrada());\n\t\t\t\n\t\t\trs=pst.executeUpdate();\n\t\t \n\t\t\t\n\t\t}\n\t\tcatch(Exception e) {\n\t\t\tSystem.out.println(\"Error en la Sentencia\"+e.getMessage());\n\t\t\t\n\t\t}\n\t\tfinally {\n\t\t\ttry {\n\t\t\t\tif(pst!=null) pst.close();\n\t\t\t\tif(con!=null) con.close();\n\t\t\t}\n\t\t\tcatch (SQLException e) {\n\t\t\t\tSystem.out.println(\"Error al cerrar\");\n\t\t\t}\n\t\t}\n\t\treturn rs;\n\t}", "private void insertar() {\n try {\n cvo.setNombre_cliente(vista.txtNombre.getText());\n cvo.setApellido_cliente(vista.txtApellido.getText());\n cvo.setDireccion_cliente(vista.txtDireccion.getText());\n cvo.setCorreo_cliente(vista.txtCorreo.getText());\n cvo.setClave_cliente(vista.txtClave.getText());\n cdao.insertar(cvo);\n vista.txtNombre.setText(\"\");\n vista.txtApellido.setText(\"\");\n vista.txtDireccion.setText(\"\");\n vista.txtCorreo.setText(\"\");\n vista.txtClave.setText(\"\");\n JOptionPane.showMessageDialog(null, \"Registro Ingresado\");\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"Debe ingresar Datos para guardar registro!\");\n }\n }", "@Override\n\tpublic void insert(Unidade obj) {\n\n\t}", "public void inserir(Comentario c);", "public void insert(Object objekt) throws SQLException {\r\n\t\t \r\n\t\tPomagaloVO ul = (PomagaloVO) objekt;\r\n\r\n\t\tif (ul == null)\r\n\t\t\tthrow new SQLException(\"Insert \" + tablica\r\n\t\t\t\t\t+ \", ulazna vrijednost je null!\");\r\n\t\t \r\n\t\tConnection conn = null;\r\n\t\tPreparedStatement ps = null;\r\n\r\n\t\ttry {\r\n\t\t\tconn = conBroker.getConnection();\r\n\r\n\t\t\tps = conn.prepareStatement(insertUpit);\r\n\r\n\t\t\tps.setString(1, ul.getSifraArtikla());\r\n\t\t\tps.setString(2, ul.getNaziv());\r\n\t\t\tps.setInt(3, ul.getPoreznaSkupina().intValue());\r\n\r\n\t\t\tif (ul.getCijenaSPDVom() == null\r\n\t\t\t\t\t|| ul.getCijenaSPDVom().intValue() <= 0)\r\n\t\t\t\tps.setNull(4, Types.INTEGER);\r\n\t\t\telse\r\n\t\t\t\tps.setInt(4, ul.getCijenaSPDVom().intValue());\r\n\r\n\t\t\tString op = ul.getOptickoPomagalo() != null\r\n\t\t\t\t\t&& ul.getOptickoPomagalo().booleanValue() ? DA : NE;\r\n\r\n\t\t\tps.setString(5, op);\r\n\t\t\t\r\n\t\t\tps.setTimestamp(6, new Timestamp(System.currentTimeMillis()));\r\n\t\t\tps.setInt(7, NEPOSTOJECA_SIFRA);\r\n\t\t\tps.setTimestamp(8, null);\r\n\t\t\tps.setNull(9, Types.INTEGER);\r\n\r\n\t\t\tint kom = ps.executeUpdate();\r\n\r\n\t\t\tif (kom == 1) {\r\n\t\t\t\tul.setSifra(Integer.valueOf(0)); // po tome i pozivac zna da je\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t// insert uspio...\r\n\t\t\t}// if kom==1\r\n\t\t\telse {\r\n\t\t\t\t//Logger.fatal(\"neuspio insert zapisa u tablicu \" + tablica, null);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\t// nema catch-anja SQL exceptiona... neka se pozivatelj iznad jebe ...\r\n\t\tfinally {\r\n\t\t\ttry {\r\n\t\t\t\tif (ps != null)\r\n\t\t\t\t\tps.close();\r\n\t\t\t} catch (SQLException e1) {\r\n\t\t\t}\r\n\t\t\tconBroker.freeConnection(conn);\r\n\t\t}// finally\r\n\r\n\t}", "public void processInsertar() {\n }", "public int Create(Objet obj) {\n\t\tPreparedStatement smt=null; \n\t\t\n\t\tString chaineSQL=\"\";\n int rep=0;\n \t\t\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t\tchaineSQL=\"insert into objet_vente (Designation,Prix,Categories,Lieu,Date,Email) values(?,?,?,?,?,?)\";\t\t\t\n\t\t\tsmt=this.getCnn().prepareStatement(chaineSQL, Statement.RETURN_GENERATED_KEYS); //retourne le Id auto incrementé lors de l'envoie de la chaine sql\n\t\t\t\n\t\t\tsmt.setString(1, obj.getDesignation());\n\t\t\tsmt.setInt(2, Integer.parseInt(obj.getPrix()));\n\t\t\tsmt.setString(3, obj.getCategorie());\n\t\t\tsmt.setString(4, obj.getLieu());\n\t\t\tsmt.setDate(5, obj.getDate());\n\t\t\tsmt.setString(6, obj.getEmail());\n\t\t\t\n\t\t\t\t\t\n\t\t\trep=smt.executeUpdate();\n\t\t\t// rep contient le nbre d'enreigistrement effectué/ligne\n\t\t\tResultSet generatedKey = smt.getGeneratedKeys(); //getGeneratedKeys retourne le *id auto incrementé\n\t\t\tgeneratedKey.next();\n\t\t\t//on sait que y a q'une ligne ou on insere donc 1 seule .next()\n\t\t\tobj.setId(generatedKey.getInt(1));\n\t\t\t// lit dans la 1ere colonne avec la ligne correspondante a celle crée et retourne ici l'ID objet\n\t\t\t\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\treturn rep;\n\t}", "public void insert(TdiaryArticle obj) throws SQLException {\n\r\n\t}", "int insert(Tipologia record);", "public Mascota insert(Mascota mascota){\n if(mascota != null)\n mascotaRepository.save(mascota);\n return mascota;\n }", "@Override\r\n\tpublic MensajeBean inserta(Tramite_presentan_info_impacto nuevo) {\n\t\treturn tramite.inserta(nuevo);\r\n\t}", "public void insertarRubro2(RubrosObject rubro) throws SQLException \r\n { \r\n PreparedStatement prepStmt = null;\r\n\r\n String insertStatement = \"INSERT INTO RUBROS (IDRUBRO, NOMBRE, MONTO, IDPRESUPUESTO,SALDO,TIPO_PAGO) VALUES (?,?,?,?,?,?)\";\r\n \r\n prepStmt = con.prepareStatement(insertStatement);\r\n \r\n prepStmt.setInt(1, Integer.parseInt(rubro.getIdentificador()));\r\n prepStmt.setString(2, rubro.getNombre());\r\n prepStmt.setDouble(3, Double.parseDouble(rubro.getMonto()));\r\n prepStmt.setInt(4, Integer.parseInt(rubro.getIdpresupuesto()));\r\n prepStmt.setDouble(5, Double.parseDouble(rubro.getMonto()));//EL SALDO SE INICIA IGUAL AL MONTO\r\n prepStmt.setString(6, rubro.getTipo_pago().trim());\r\n \r\n prepStmt.executeUpdate();\r\n \r\n \r\n if (prepStmt != null) {\r\n prepStmt.close();\r\n }\r\n\r\n }", "private long insert(SQLiteDatabase db, Object o) {\n\t\tContentValues values = createContentValues(o);\n\t\tif (values != null) {\n\t\t\treturn db.insert(getTableName(o.getClass()), null, values);\n\t\t}\n\t\treturn -1L;\n\t}", "private void insertData() {\n\n cliente = factory.manufacturePojo(ClienteEntity.class);\n em.persist(cliente);\n for (int i = 0; i < 3; i++) {\n FormaPagoEntity formaPagoEntity = factory.manufacturePojo(FormaPagoEntity.class);\n formaPagoEntity.setCliente(cliente);\n em.persist(formaPagoEntity);\n data.add(formaPagoEntity);\n }\n }", "private void insertData() {\r\n PodamFactory factory = new PodamFactoryImpl();\r\n for (int i = 0; i < 3; i++) {\r\n UsuarioEntity entity = factory.manufacturePojo(UsuarioEntity.class);\r\n em.persist(entity);\r\n dataUsuario.add(entity);\r\n }\r\n for (int i = 0; i < 3; i++) {\r\n CarritoDeComprasEntity entity = factory.manufacturePojo(CarritoDeComprasEntity.class);\r\n if (i == 0 ){\r\n entity.setUsuario(dataUsuario.get(0));\r\n }\r\n em.persist(entity);\r\n data.add(entity);\r\n }\r\n }", "public void insert() {\n\t\tSession session = DBManager.getSession();\n\t\tsession.beginTransaction();\n\t\tsession.save(this);\n\t\tsession.getTransaction().commit();\n\t}", "@Override\n\tpublic MensajeBean inserta(Tramite_informesem nuevo) {\n\t\treturn tramite_informesemDao.inserta(nuevo);\n\t}", "@Override\r\n public Kiosque insertKiosque(Kiosque obj) {\r\n em.persist(obj);\r\n return obj;\r\n //To change body of generated methods, choose Tools | Templates.\r\n }", "public ResultSQL inserir(BaseJDBC baseJDBC, Object objeto) throws Exception\r\n\t{\r\n\t\tQuerySQL querySQL = objectToInsertSQL(objeto, baseJDBC);\r\n\t\tResultSQL resultSQL = baseJDBC.executaInsert(querySQL.toString(baseJDBC), false, false);\r\n\t\t\r\n\t\tif(resultSQL!=null)\r\n\t\t{\r\n\t\t\tAnnotation[] annotations;\r\n\t\t\tField[] fields = objeto.getClass().getDeclaredFields();\r\n\t\t\tfor(int i=0; i<fields.length; i++)\r\n\t\t\t{\r\n\t\t\t\tannotations = fields[i].getAnnotations();\r\n\t\t\t\tfor(int j=0; j<annotations.length; j++)\r\n\t\t\t\t{\r\n\t\t\t\t\tif(annotations[j] instanceof Id)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tfields[i].setAccessible(true);\r\n\t\t\t\t\t\tfields[i].set(objeto, resultSQL.get(0, fields[i].getName()));\r\n\t\t\t\t\t\t//fields[i].set(objeto, resultSQL.get(0, 0));\r\n\t\t\t\t\t\treturn resultSQL;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn resultSQL;\r\n\t}", "@Override\r\n public long insertRecord(Object o) throws SQLException {\r\n\r\n String sql = \"insert into patient (LastName, FirstName, Diagnosis, AdmissionDate, ReleaseDate) values (?,?,?,?,?)\";\r\n long result = -1;\r\n PatientBean pb;\r\n\r\n try (PreparedStatement pStatement = connection.prepareStatement(sql, Statement.RETURN_GENERATED_KEYS);) {\r\n\r\n pb = (PatientBean) o;\r\n\r\n pStatement.setString(1, pb.getLastName());\r\n pStatement.setString(2, pb.getFirstName());\r\n pStatement.setString(3, pb.getDiagnosis());\r\n pStatement.setTimestamp(4, pb.getAdmissionDate());\r\n pStatement.setTimestamp(5, pb.getReleaseDate());\r\n\r\n pStatement.executeUpdate();\r\n\r\n // Retrieve new primary key\r\n try (ResultSet rs = pStatement.getGeneratedKeys()) {\r\n if (rs.next()) {\r\n result = rs.getLong(1);\r\n }\r\n }\r\n }\r\n\r\n logger.info(\"New patient record has been added: \" + pb.getFirstName() + \" \" + pb.getLastName() + \", new patient id: \" + result);\r\n\r\n return result;\r\n }", "public Etudiant insert(Etudiant obj) {\n\t\treturn null;\n\t}", "public void guardar() {\n String msj = \"\";\n int idpagoanulado = daoPagoCuotaAnulado.nuevoID();\n Date SYSDATE = new Date();\n java.sql.Timestamp fechaPagoCuotaAnuladoSQL = new java.sql.Timestamp(SYSDATE.getTime());\n String observacion = txtObservacion.getText();\n int idmotivo = Integer.parseInt(txtCodigoMotivo.getText());\n int idusuario = appLogin.IDUSUARIO;\n int idpago =Integer.parseInt(txtNumeroPago.getText());\n Date fechapago = daoCotizacion.parseFecha(txtFechaPago.getText());\n java.sql.Date fechapagoSQL = new java.sql.Date(fechapago.getTime());\n double mPago = montoPago;\n String numerocomprobante = txtComprobante.getText();\n String numerorecibo = txtRecibo.getText();\n //VALIDACIONES\n if (idmotivo == 0) {\n msj += \"CODIGO DEL MOTIVO DE ANULACION ESTA VACIO.\\n\";\n }\n if (idpago == 0) {\n msj += \"NO HA SELECCIONADO NINGUN PAGO PARA LA ANULACIÓN.\\n\";\n }\n if (msj.isEmpty()) {\n cpca.setIdpagoanulado(idpagoanulado);\n cpca.setFechahoranulado(fechaPagoCuotaAnuladoSQL);\n cpca.setObservacion(observacion);\n cpca.setIdmotivo(idmotivo);\n cpca.setIdusuario(idusuario);\n cpca.setIdpago(idpago);\n cpca.setFechapago(fechapagoSQL);\n cpca.setMonto(mPago);\n cpca.setNumerocomprobante(numerocomprobante);\n cpca.setNumerorecibo(numerorecibo);\n daoPagoCuotaAnulado.agregar(cpca);\n } else {\n JOptionPane.showMessageDialog(null, msj, \"ERRORES\", JOptionPane.ERROR_MESSAGE);\n }\n }", "private void insertData() {\n compra = factory.manufacturePojo(CompraVentaEntity.class);\n compra.setId(1L);\n compra.setQuejasReclamos(new ArrayList<>());\n em.persist(compra);\n\n for (int i = 0; i < 3; i++) {\n QuejasReclamosEntity entity = factory.manufacturePojo(QuejasReclamosEntity.class);\n entity.setCompraVenta(compra);\n em.persist(entity);\n data.add(entity);\n compra.getQuejasReclamos().add(entity);\n }\n }", "private void insertData() {\r\n \r\n TeatroEntity teatro = factory.manufacturePojo(TeatroEntity.class);\r\n em.persist(teatro);\r\n FuncionEntity funcion = factory.manufacturePojo(FuncionEntity.class);\r\n List<FuncionEntity> lista = new ArrayList();\r\n lista.add(funcion);\r\n em.persist(funcion);\r\n for (int i = 0; i < 3; i++) \r\n {\r\n SalaEntity sala = factory.manufacturePojo(SalaEntity.class);\r\n sala.setTeatro(teatro);\r\n sala.setFuncion(lista);\r\n em.persist(sala);\r\n data.add(sala);\r\n }\r\n for (int i = 0; i < 3; i++) \r\n {\r\n SalaEntity sala = factory.manufacturePojo(SalaEntity.class);\r\n sala.setTeatro(teatro);\r\n em.persist(sala);\r\n sfdata.add(sala);\r\n }\r\n \r\n }", "public void guardar() {\n try {\n objConec.conectar();\n objConec.Sql = objConec.con.prepareStatement(\"insert into contacto values(null,?,?,?,?,?)\");\n objConec.Sql.setString(1, getNom_con());\n objConec.Sql.setInt(2, getTel_con()); \n objConec.Sql.setString(3, getEma_con());\n objConec.Sql.setString(4, getAsu_con());\n objConec.Sql.setString(5, getMen_con());\n objConec.Sql.executeUpdate();\n objConec.cerrar();\n JOptionPane.showMessageDialog(null, \"Mensaje enviado correctamente\");\n } catch (Exception ex) {\n JOptionPane.showMessageDialog(null, \"Error al enviar el mensaje\");\n\n }\n\n }", "public void insere(Pessoa pessoa){\n\t\tdb.save(pessoa);\n\t}", "@Override\n\tpublic void insertar() {\n\t\t\n\t}", "public void insertarOrden(Object dato) {\n Nodo nuevo = new Nodo(dato);\n int res = 0;\n // System.out.println(\"esxa\"+res);\n if (primero == null) {\n nuevo.setReferencia(primero);\n primero = nuevo;\n // System.out.println(\"Es nulo\");\n// System.out.println(\"sss\"+primero.getDato());\n } else {\n res = comp.evaluar(dato, primero.getDato());\n // System.out.println(\"\"+res);\n if (res == -1) {\n nuevo.setReferencia(primero);\n primero = nuevo;\n } else {\n int auxres = 0;\n Nodo anterior, actual;\n anterior = actual = primero;\n auxres = comp.evaluar(dato, actual.getDato());\n while ((actual.getReferencia() != null) && (auxres == 1)) {\n anterior = actual;\n actual = actual.getReferencia();\n auxres = comp.evaluar(dato, actual.getDato());\n }\n if (auxres == 1) {\n anterior = actual;\n }\n nuevo.setReferencia(anterior.getReferencia());\n anterior.setReferencia(nuevo);\n\n }\n }\n\n }", "@Transactional\n DataRistorante insert(DataRistorante risto);", "@Override\n\tpublic void insertarServicio(Servicio nuevoServicio) {\n\t\tservicioDao= new ServicioDaoImpl();\n\t\tservicioDao.insertarServicio(nuevoServicio);\n\t\t\n\t\t\n\t}", "public void inserir(Conserto conserto) throws SQLException{\r\n conecta = FabricaConexao.conexaoBanco();\r\n Date dataentradasql = new Date(conserto.getDataEntrada().getTime());\r\n //Date datasaidasql = new Date(conserto.getDataSaida().getTime());\r\n sql = \"insert into conserto (concodigo, condataentrada, condatasaida, concarchassi, conoficodigo) values (?, ?, ?, ?, ?)\";\r\n pstm = conecta.prepareStatement(sql);\r\n pstm.setInt(1, conserto.getCodigo());\r\n pstm.setDate(2, (Date) dataentradasql);\r\n pstm.setDate(3, null);\r\n pstm.setString(4, conserto.getCarro().getChassi());\r\n pstm.setInt(5, conserto.getOficina().getCodigo());\r\n pstm.execute();\r\n FabricaConexao.fecharConexao();\r\n \r\n }", "int insert(Movimiento record);", "@Override\r\n\tpublic Ngo insert(Ngo obj) {\n\t\treturn null;\r\n\t}", "@SuppressWarnings(\"UnnecessaryLocalVariable\")\r\n private int create(T o) throws PersistenceException {\r\n String query = PREFIX_INSERT_QUERY + this.type.getSimpleName();\r\n Integer status = getSqlSession().insert(query, o);\r\n // ne doit pas être utilisé avec une session Spring\r\n // getSqlSession().commit();\r\n return status;\r\n }", "@Override\n\tpublic void insert() {\n\t\tSystem.out.println(\"Mysql DB 서버에 접속해서 등록을 하다.\");\n\t}", "protected int insert(Object obj, Connection conn) throws SQLException {\r\n ObjectHelper helper = helperFactory.getObjectHelper(obj);\r\n return helper.insert(obj, conn);\r\n }", "void insert(CTipoComprobante record) throws SQLException;", "@Override\n public void add(Curso entity) {\n Connection c = null;\n PreparedStatement pstmt = null;\n\n try {\n c = DBUtils.getConnection();\n pstmt = c.prepareStatement(\"INSERT INTO curso (nombrecurso, idprofesor, claveprofesor, clavealumno) values (?, ?, ?, ?)\");\n\n pstmt.setString(1, entity.getNombre());\n pstmt.setInt(2, (entity.getIdProfesor() == 0)?4:entity.getIdProfesor() ); //creo que es sin profesor confirmado o algo por el estilo\n pstmt.setString(3, entity.getClaveProfesor());\n pstmt.setString(4, entity.getClaveAlumno());\n \n pstmt.execute();\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n try {\n if (pstmt != null) {\n pstmt.close();\n }\n DBUtils.closeConnection(c);\n } catch (SQLException ex) {\n Logger.getLogger(JdbcCursoRepository.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }", "public void InsertarProceso(Proceso nuevo) {\n\t\tif (raiz.sig == raiz) {\n\t\t\traiz.sig = nuevo;\n\t\t\tthis.cabeza = nuevo;\n\t\t\tnuevo.sig = raiz;\n\t\t\tnuevo.padre = raiz;\n\t\t\traiz.padre = nuevo;\n\t\t} else {\n\t\t\tProceso aux = raiz.padre;\n\t\t\taux.sig = nuevo;\n\t\t\tnuevo.sig = raiz;\n\t\t\traiz.padre = nuevo;\n\t\t\tnuevo.padre = aux;\n\t\t}\n\t\tthis.numProcesos++;\n\t}", "private void insertData() {\n PodamFactory factory = new PodamFactoryImpl();\n for (int i = 0; i < 3; i++) {\n ViajeroEntity entity = factory.manufacturePojo(ViajeroEntity.class);\n\n em.persist(entity);\n data.add(entity);\n }\n }", "public void insertar(Proceso p, int tiempo) {\n\t\tif (p == null || tiempo < 0) {\n\t\t\treturn;\n\t\t}\n\t\tProceso nuevo = new Proceso();\n\t\tnuevo.rafaga = p.rafaga;\n\t\tnuevo.id = p.id;\n\t\tnuevo.IdCola = this.IdCola;\n\t\tnuevo.NombreCola = this.NombreCola;\n\t\tnuevo.tllegada = tiempo;\n\t\tnuevo.ColaProviene = p.ColaProviene;\n\n\t\tif (raiz.sig == raiz) {\n\t\t\traiz.sig = nuevo;\n\t\t\tcabeza = nuevo;\n\t\t\tnuevo.sig = raiz;\n\t\t\tnuevo.padre = raiz;\n\t\t\traiz.padre = nuevo;\n\t\t} else {\n\t\t\tProceso aux = raiz.padre;\n\t\t\taux.sig = nuevo;\n\t\t\tnuevo.sig = raiz;\n\t\t\traiz.padre = nuevo;\n\t\t\tnuevo.padre = aux;\n\t\t}\n\t\tthis.numProcesos++;\n\t\tthis.rafagaTotal += nuevo.rafaga;\n\t\tthis.Ordenamiento();\n\t}", "private void inseredados() {\n // Insert Funcionários\n\n FuncionarioDAO daoF = new FuncionarioDAO();\n Funcionario func1 = new Funcionario();\n func1.setCpf(\"08654683970\");\n func1.setDataNasc(new Date(\"27/04/1992\"));\n func1.setEstadoCivil(\"Solteiro\");\n func1.setFuncao(\"Garcom\");\n func1.setNome(\"Eduardo Kempf\");\n func1.setRg(\"10.538.191-3\");\n func1.setSalario(1000);\n daoF.persisteObjeto(func1);\n\n Funcionario func2 = new Funcionario();\n func2.setCpf(\"08731628974\");\n func2.setDataNasc(new Date(\"21/08/1992\"));\n func2.setEstadoCivil(\"Solteira\");\n func2.setFuncao(\"Caixa\");\n func2.setNome(\"Juliana Iora\");\n func2.setRg(\"10.550.749-6\");\n func2.setSalario(1200);\n daoF.persisteObjeto(func2);\n\n Funcionario func3 = new Funcionario();\n func3.setCpf(\"08731628974\");\n func3.setDataNasc(new Date(\"03/05/1989\"));\n func3.setEstadoCivil(\"Solteiro\");\n func3.setFuncao(\"Gerente\");\n func3.setNome(\"joão da Silva\");\n func3.setRg(\"05.480.749-2\");\n func3.setSalario(3000);\n daoF.persisteObjeto(func3);\n\n Funcionario func4 = new Funcionario();\n func4.setCpf(\"01048437990\");\n func4.setDataNasc(new Date(\"13/04/1988\"));\n func4.setEstadoCivil(\"Solteiro\");\n func4.setFuncao(\"Garçon\");\n func4.setNome(\"Luiz Fernandodos Santos\");\n func4.setRg(\"9.777.688-1\");\n func4.setSalario(1000);\n daoF.persisteObjeto(func4);\n\n TransactionManager.beginTransaction();\n Funcionario func5 = new Funcionario();\n func5.setCpf(\"01048437990\");\n func5.setDataNasc(new Date(\"13/04/1978\"));\n func5.setEstadoCivil(\"Casada\");\n func5.setFuncao(\"Cozinheira\");\n func5.setNome(\"Sofia Gomes\");\n func5.setRg(\"3.757.688-8\");\n func5.setSalario(1500);\n daoF.persisteObjeto(func5);\n\n // Insert Bebidas\n BebidaDAO daoB = new BebidaDAO();\n Bebida bebi1 = new Bebida();\n bebi1.setNome(\"Coca Cola\");\n bebi1.setPreco(3.25);\n bebi1.setQtde(1000);\n bebi1.setTipo(\"Refrigerante\");\n bebi1.setDataValidade(new Date(\"27/04/2014\"));\n daoB.persisteObjeto(bebi1);\n\n Bebida bebi2 = new Bebida();\n bebi2.setNome(\"Cerveja\");\n bebi2.setPreco(4.80);\n bebi2.setQtde(1000);\n bebi2.setTipo(\"Alcoolica\");\n bebi2.setDataValidade(new Date(\"27/11/2013\"));\n daoB.persisteObjeto(bebi2);\n\n Bebida bebi3 = new Bebida();\n bebi3.setNome(\"Guaraná Antatica\");\n bebi3.setPreco(3.25);\n bebi3.setQtde(800);\n bebi3.setTipo(\"Refrigerante\");\n bebi3.setDataValidade(new Date(\"27/02/2014\"));\n daoB.persisteObjeto(bebi3);\n\n Bebida bebi4 = new Bebida();\n bebi4.setNome(\"Água com gás\");\n bebi4.setPreco(2.75);\n bebi4.setQtde(500);\n bebi4.setTipo(\"Refrigerante\");\n bebi4.setDataValidade(new Date(\"27/08/2013\"));\n daoB.persisteObjeto(bebi4);\n\n Bebida bebi5 = new Bebida();\n bebi5.setNome(\"Whisky\");\n bebi5.setPreco(3.25);\n bebi5.setQtde(1000);\n bebi5.setTipo(\"Alcoolica\");\n bebi5.setDataValidade(new Date(\"03/05/2016\"));\n daoB.persisteObjeto(bebi5);\n\n // Insert Comidas\n ComidaDAO daoC = new ComidaDAO();\n Comida comi1 = new Comida();\n comi1.setNome(\"Batata\");\n comi1.setQuantidade(30);\n comi1.setTipo(\"Kilograma\");\n comi1.setDataValidade(new Date(\"27/04/2013\"));\n daoC.persisteObjeto(comi1);\n\n Comida comi2 = new Comida();\n comi2.setNome(\"Frango\");\n comi2.setQuantidade(15);\n comi2.setTipo(\"Kilograma\");\n comi2.setDataValidade(new Date(\"22/04/2013\"));\n daoC.persisteObjeto(comi2);\n\n Comida comi3 = new Comida();\n comi3.setNome(\"Mussarela\");\n comi3.setQuantidade(15000);\n comi3.setTipo(\"Grama\");\n comi3.setDataValidade(new Date(\"18/04/2013\"));\n daoC.persisteObjeto(comi3);\n\n Comida comi4 = new Comida();\n comi4.setNome(\"Presunto\");\n comi4.setQuantidade(10000);\n comi4.setTipo(\"Grama\");\n comi4.setDataValidade(new Date(\"18/04/2013\"));\n daoC.persisteObjeto(comi4);\n\n Comida comi5 = new Comida();\n comi5.setNome(\"Bife\");\n comi5.setQuantidade(25);\n comi5.setTipo(\"Kilograma\");\n comi5.setDataValidade(new Date(\"22/04/2013\"));\n daoC.persisteObjeto(comi5);\n\n\n // Insert Mesas\n MesaDAO daoM = new MesaDAO();\n Mesa mes1 = new Mesa();\n mes1.setCapacidade(4);\n mes1.setStatus(true);\n daoM.persisteObjeto(mes1);\n\n Mesa mes2 = new Mesa();\n mes2.setCapacidade(4);\n mes2.setStatus(true);\n daoM.persisteObjeto(mes2);\n\n Mesa mes3 = new Mesa();\n mes3.setCapacidade(6);\n mes3.setStatus(true);\n daoM.persisteObjeto(mes3);\n\n Mesa mes4 = new Mesa();\n mes4.setCapacidade(6);\n mes4.setStatus(true);\n daoM.persisteObjeto(mes4);\n\n Mesa mes5 = new Mesa();\n mes5.setCapacidade(8);\n mes5.setStatus(true);\n daoM.persisteObjeto(mes5);\n\n // Insert Pratos\n PratoDAO daoPr = new PratoDAO();\n Prato prat1 = new Prato();\n List<Comida> comI = new ArrayList<Comida>();\n comI.add(comi1);\n prat1.setNome(\"Porção de Batata\");\n prat1.setIngredientes(comI);\n prat1.setQuantidadePorcoes(3);\n prat1.setPreco(13.00);\n daoPr.persisteObjeto(prat1);\n\n Prato prat2 = new Prato();\n List<Comida> comII = new ArrayList<Comida>();\n comII.add(comi2);\n prat2.setNome(\"Porção de Frango\");\n prat2.setIngredientes(comII);\n prat2.setQuantidadePorcoes(5);\n prat2.setPreco(16.00);\n daoPr.persisteObjeto(prat2);\n\n Prato prat3 = new Prato();\n List<Comida> comIII = new ArrayList<Comida>();\n comIII.add(comi1);\n comIII.add(comi3);\n comIII.add(comi4);\n prat3.setNome(\"Batata Recheada\");\n prat3.setIngredientes(comIII);\n prat3.setQuantidadePorcoes(3);\n prat3.setPreco(13.00);\n daoPr.persisteObjeto(prat3);\n\n Prato prat4 = new Prato();\n List<Comida> comIV = new ArrayList<Comida>();\n comIV.add(comi2);\n comIV.add(comi3);\n comIV.add(comi4);\n prat4.setNome(\"Lanche\");\n prat4.setIngredientes(comIV);\n prat4.setQuantidadePorcoes(3);\n prat4.setPreco(13.00);\n daoPr.persisteObjeto(prat4);\n\n Prato prat5 = new Prato();\n prat5.setNome(\"Porção especial\");\n List<Comida> comV = new ArrayList<Comida>();\n comV.add(comi1);\n comV.add(comi3);\n comV.add(comi4);\n prat5.setIngredientes(comV);\n prat5.setQuantidadePorcoes(3);\n prat5.setPreco(13.00);\n daoPr.persisteObjeto(prat5);\n\n // Insert Pedidos Bebidas\n PedidoBebidaDAO daoPB = new PedidoBebidaDAO();\n PedidoBebida pb1 = new PedidoBebida();\n pb1.setPago(false);\n List<Bebida> bebI = new ArrayList<Bebida>();\n bebI.add(bebi1);\n bebI.add(bebi2);\n pb1.setBebidas(bebI);\n pb1.setIdFuncionario(func5);\n pb1.setIdMesa(mes5);\n daoPB.persisteObjeto(pb1);\n\n PedidoBebida pb2 = new PedidoBebida();\n pb2.setPago(false);\n List<Bebida> bebII = new ArrayList<Bebida>();\n bebII.add(bebi1);\n bebII.add(bebi4);\n pb2.setBebidas(bebII);\n pb2.setIdFuncionario(func4);\n pb2.setIdMesa(mes4);\n daoPB.persisteObjeto(pb2);\n\n TransactionManager.beginTransaction();\n PedidoBebida pb3 = new PedidoBebida();\n pb3.setPago(false);\n List<Bebida> bebIII = new ArrayList<Bebida>();\n bebIII.add(bebi2);\n bebIII.add(bebi3);\n pb3.setBebidas(bebIII);\n pb3.setIdFuncionario(func2);\n pb3.setIdMesa(mes2);\n daoPB.persisteObjeto(pb3);\n\n PedidoBebida pb4 = new PedidoBebida();\n pb4.setPago(false);\n List<Bebida> bebIV = new ArrayList<Bebida>();\n bebIV.add(bebi2);\n bebIV.add(bebi5);\n pb4.setBebidas(bebIV);\n pb4.setIdFuncionario(func3);\n pb4.setIdMesa(mes3);\n daoPB.persisteObjeto(pb4);\n\n PedidoBebida pb5 = new PedidoBebida();\n pb5.setPago(false);\n List<Bebida> bebV = new ArrayList<Bebida>();\n bebV.add(bebi1);\n bebV.add(bebi2);\n bebV.add(bebi3);\n pb5.setBebidas(bebV);\n pb5.setIdFuncionario(func1);\n pb5.setIdMesa(mes5);\n daoPB.persisteObjeto(pb5);\n\n // Insert Pedidos Pratos\n PedidoPratoDAO daoPP = new PedidoPratoDAO();\n PedidoPrato pp1 = new PedidoPrato();\n pp1.setPago(false);\n List<Prato> praI = new ArrayList<Prato>();\n praI.add(prat1);\n praI.add(prat2);\n praI.add(prat3);\n pp1.setPratos(praI);\n pp1.setIdFuncionario(func5);\n pp1.setIdMesa(mes5);\n daoPP.persisteObjeto(pp1);\n\n PedidoPrato pp2 = new PedidoPrato();\n pp2.setPago(false);\n List<Prato> praII = new ArrayList<Prato>();\n praII.add(prat1);\n praII.add(prat3);\n pp2.setPratos(praII);\n pp2.setIdFuncionario(func4);\n pp2.setIdMesa(mes4);\n daoPP.persisteObjeto(pp2);\n\n PedidoPrato pp3 = new PedidoPrato();\n pp3.setPago(false);\n List<Prato> praIII = new ArrayList<Prato>();\n praIII.add(prat1);\n praIII.add(prat2);\n pp3.setPratos(praIII);\n pp3.setIdFuncionario(func2);\n pp3.setIdMesa(mes2);\n daoPP.persisteObjeto(pp3);\n\n PedidoPrato pp4 = new PedidoPrato();\n pp4.setPago(false);\n List<Prato> praIV = new ArrayList<Prato>();\n praIV.add(prat1);\n praIV.add(prat3);\n pp4.setPratos(praIV);\n pp4.setIdFuncionario(func3);\n pp4.setIdMesa(mes3);\n daoPP.persisteObjeto(pp4);\n\n PedidoPrato pp5 = new PedidoPrato();\n pp5.setPago(false);\n List<Prato> praV = new ArrayList<Prato>();\n praV.add(prat1);\n praV.add(prat2);\n praV.add(prat3);\n praV.add(prat4);\n pp5.setPratos(praV);\n pp5.setIdFuncionario(func1);\n pp5.setIdMesa(mes5);\n daoPP.persisteObjeto(pp5);\n\n }", "int insert(Promo record);", "private void insertData() {\n PodamFactory factory = new PodamFactoryImpl();\n for (int i = 0; i < 3; i++) {\n VueltasConDemoraEnOficinaEntity entity = factory.manufacturePojo(VueltasConDemoraEnOficinaEntity.class);\n \n em.persist(entity);\n data.add(entity);\n }\n }", "public int InsertarAnuncioTematico(AnuncioTematicoDTO anuncio){\n int status=0;\n try{\n Connection conect = getConection();\n Properties sqlProp = new Properties();\n InputStream is = new FileInputStream(sqlPropertiesPath);\n sqlProp.load(is); \n PreparedStatement ps= conect.prepareStatement(sqlProp.getProperty(\"insertar.AnuncioTematico\"));\n ps.setString(1, anuncio.getTipoAnuncio().toString());\n ps.setString(2, anuncio.getTitulo());\n ps.setString(3, anuncio.getCuerpo());\n java.sql.Date fechaPublicacion=new java.sql.Date(anuncio.getFechaPublicacion().getTime());\n ps.setDate(4, fechaPublicacion);\n ps.setString(5, anuncio.getPropietario().getEmail());\n ps.setString(6, anuncio.getEstadoAnuncio().toString());\n String intereses=\"\"; \n \n for(String interes : anuncio.getTemas()){\n intereses+=interes.toLowerCase()+\",\";\n }\n \n if(intereses.length()>0){\n \n intereses=intereses.substring(0,intereses.length()-1);\n }\n \n ps.setString(7, intereses);\n\n status=ps.executeUpdate();\n\n int idAnuncio=GetMaxID();\n for(Contacto c : anuncio.getDestinatarios()){\n PreparedStatement psDestinatario=conect.prepareStatement(sqlProp.getProperty(\"insertar.Destinatario\"));\n psDestinatario.setInt(1, idAnuncio);\n psDestinatario.setString(2, c.getEmail());\n psDestinatario.executeUpdate();\n }\n\n }catch(Exception e){\n e.printStackTrace();\n }\n return status;\n }", "public static void guardarEstudianteBD(Estudiante estudiante) {\r\n //metimos este metodo dentro de la base de datos \r\n try {\r\n Class.forName(\"com.mysql.jdbc.Driver\");\r\n //ingresamos la direccion donde se encuntra la base de datos \r\n Connection conexion = DriverManager.getConnection(\"jdbc:mysql://localhost/registrolaboratorios\", \"root\", \"admin\");\r\n System.out.println(\"Conexion establecida!\");\r\n Statement sentencia = (Statement) conexion.createStatement();\r\n int insert = sentencia.executeUpdate(\"insert into estudiante values(\"\r\n + \"'\" + estudiante.getNro_de_ID()\r\n + \"','\" + estudiante.getNombres()\r\n + \"','\" + estudiante.getApellidos()\r\n + \"','\" + estudiante.getLaboratorio()\r\n + \"','\" + estudiante.getCarrera()\r\n + \"','\" + estudiante.getModulo()\r\n + \"','\" + estudiante.getMateria()\r\n + \"','\" + estudiante.getFecha()\r\n + \"','\" + estudiante.getHora_Ingreso()\r\n + \"','\" + estudiante.getHora_Salida()\r\n + \"')\");\r\n\r\n sentencia.close();\r\n conexion.close();\r\n\r\n } catch (Exception ex) {\r\n System.out.println(\"Error en la conexion\" + ex);\r\n }\r\n }", "int insert(Prueba record);", "public void almacenoDatos(){\n BaseDatosSecundaria administrador= new BaseDatosSecundaria(this);\n SQLiteDatabase bdsecunadaria= administrador.getWritableDatabase();\n _valuesPedido.put(\"Producto\", this._productoNombre);\n _valuesPedido.put(\"Precio\",this._productoPrecio);\n _valuesPedido.put(\"Cantidad\",this._etAdquirir.getText().toString());\n _valuesPedido.put(\"Vendedor\",this.username);\n _valuesPedido.put(\"Id_Producto\",this._productoId);\n bdsecunadaria.insert(\"DATOS\",null,this._valuesPedido);\n bdsecunadaria.close();\n }", "public void insert(@NotNull T object) {\n Logger logger = getLogger();\n try (Connection connection = getConnection();\n PreparedStatement preparedStatement = connection.prepareStatement(getInsert())) {\n\n logger.info(\"Inserting into DB\");\n setStatement(preparedStatement, object);\n logger.info(\"Executing statement: \" + preparedStatement);\n preparedStatement.executeUpdate();\n\n } catch (SQLException | NotEnoughDataException e) {\n logger.error(e.getMessage());\n }\n logger.info(\"Insert: success\");\n }", "int insert(ParUsuarios record);", "public int insert(IsEntityInDB obj) throws SQLException {\n if (!obj.getEntityName().equals(entityName)) {\n throw new IllegalArgumentException(\"Entity name and entity no match\");\n }\n HashMap<String, String> fields = obj.getNotNullFields();\n return execUpdate(new SqlBuilder(entityName)\n .insert(fields.keySet().toArray(new String[0]),\n fields.values().toArray(new String[0]))\n .toString());\n }", "@Override\n\tpublic void insertIPODetail(IPODetail ipo) throws SQLException {\n\t\t\n\t}", "public int InsertarAnuncioIndividualizado(AnuncioIndividualizadoDTO anuncio){\n int status=0;\n\n try{\n Connection conect = getConection();\n Properties sqlProp = new Properties();\n InputStream is = new FileInputStream(sqlPropertiesPath);\n sqlProp.load(is);\n PreparedStatement ps = conect.prepareStatement(sqlProp.getProperty(\"insertar.AnuncioIndividualizado\"));\n ps.setString(1, anuncio.getTipoAnuncio().toString());\n ps.setString(2,anuncio.getTitulo());\n ps.setString(3,anuncio.getCuerpo());\n java.sql.Date fechaPublicacion=new java.sql.Date(anuncio.getFechaPublicacion().getTime());\n ps.setDate(4, fechaPublicacion);\n ps.setString(5,anuncio.getPropietario().getEmail());\n ps.setString(6,anuncio.getEstadoAnuncio().toString());\n status=ps.executeUpdate();\n\n int idAnuncio=GetMaxID();\n for(Contacto c : anuncio.getDestinatarios()){\n PreparedStatement psDestinatario=conect.prepareStatement(sqlProp.getProperty(\"insertar.Destinatario\"));\n psDestinatario.setInt(1, idAnuncio);\n psDestinatario.setString(2, c.getEmail());\n psDestinatario.executeUpdate();\n }\n\n }catch(Exception e){\n System.out.println(e);\n }\n\n return status;\n }", "@Override\n\tpublic int admin_insert(BoardVO obj) {\n\t\treturn 0;\n\t}", "int insertSelective(Tipologia record);", "int insert(Cargo record);", "@Override\n\tpublic boolean crear(Connection connection, Object DetalleSolicitud) {\t\n\t\tDetalleSolicitud detalleSolicitud = (DetalleSolicitud)DetalleSolicitud;\n\t\tString query = \"INSERT INTO detallesolicitudes (cantidad, fechaEntrega, disenoFk, solicitudFk) \"\n\t\t\t\t+ \"values ( ?, ?, ?, ?)\";\n\t\ttry {\t\n\t\t\tPreparedStatement preparedStatement = (PreparedStatement) connection.prepareStatement(query);\n\t\t\tpreparedStatement.setInt(1, detalleSolicitud.getCantidad());\n\t\t\tpreparedStatement.setDate(2, detalleSolicitud.getFechaEntrega());\n\t\t\tpreparedStatement.setInt(3, detalleSolicitud.getDisenoFk());\n\t\t\tpreparedStatement.setInt(4, detalleSolicitud.getSolicitudFk());\n\t\t\tpreparedStatement.execute();\n\t\t\treturn true; \n\t\t} catch (SQLException ex) {\n\t\t\tNotificacion.dialogoException(ex);\n\t\t\treturn false;\t\t\t\n\t\t}//FIN TRY/CATCH\n\t}", "void insert(CTipoPersona record) throws SQLException;", "int insertSelective(Movimiento record);", "@Override\r\n\tpublic Usuario insert(Usuario t) {\n\t\treturn null;\r\n\t}", "@Override\n\tpublic int insertarSalida(AlmacenDTO obj) {\n\t\tint rs=-1;\n\t\tConnection con=null;\n\t\tPreparedStatement pst=null;\n\t\ttry {\n\t\t\tcon=new MySqlDbConexion().getConexion();\n\t\t\tString sql=\"insert into MATERIAL_SALIDA values (null,?,?,?)\";\n\t\t\tpst=con.prepareStatement(sql);\n\t\t\t\n\t\t\tpst.setInt(1,obj.getCodigo_producto());\n\t\t\tpst.setInt(2,obj.getCantidad_salida());\n\t\t\tpst.setDate(3,obj.getFecha_salida());\n\t\t\t\n\t\t\trs=pst.executeUpdate();\n\t\t \n\t\t\t\n\t\t}\n\t\tcatch(Exception e) {\n\t\t\tSystem.out.println(\"Error en la Sentencia\"+e.getMessage());\n\t\t\t\n\t\t}\n\t\tfinally {\n\t\t\ttry {\n\t\t\t\tif(pst!=null) pst.close();\n\t\t\t\tif(con!=null) con.close();\n\t\t\t}\n\t\t\tcatch (SQLException e) {\n\t\t\t\tSystem.out.println(\"Error al cerrar\");\n\t\t\t}\n\t\t}\n\t\treturn rs;\n\t}", "public void insertar(String dato){\r\n \r\n if(estaVacia()){\r\n \r\n primero = new NodoJugador(dato);\r\n }else{\r\n NodoJugador temporal = primero;\r\n while(temporal.getSiguiente()!=null){\r\n temporal = temporal.getSiguiente();\r\n }\r\n \r\n temporal.setSiguiente(new NodoJugador(dato));\r\n }\r\n }", "public void insertMobil(MobilModel mobil) throws SQLException;", "public void insertar() {\r\n if (vista.jTNombreempresa.getText().equals(\"\") || vista.jTTelefono.getText().equals(\"\") || vista.jTRFC.getText().equals(\"\") || vista.jTDireccion.getText().equals(\"\")) {\r\n JOptionPane.showMessageDialog(null, \"Faltan Datos: No puedes dejar cuadros en blanco\");//C.P.M Verificamos si las casillas esta vacia si es asi lo notificamos\r\n } else {//C.P.M de lo contrario prosegimos\r\n modelo.setNombre(vista.jTNombreempresa.getText());//C.P.M mandamos las variabes al modelo \r\n modelo.setDireccion(vista.jTDireccion.getText());\r\n modelo.setRfc(vista.jTRFC.getText());\r\n modelo.setTelefono(vista.jTTelefono.getText());\r\n \r\n Error = modelo.insertar();//C.P.M Ejecutamos el metodo del modelo \r\n if (Error.equals(\"\")) {//C.P.M Si el modelo no regresa un error es que todo salio bien\r\n JOptionPane.showMessageDialog(null, \"Se guardo exitosamente la configuracion\");//C.P.M notificamos a el usuario\r\n vista.dispose();//C.P.M y cerramos la vista\r\n } else {//C.P.M de lo contrario \r\n JOptionPane.showMessageDialog(null, Error);//C.P.M notificamos a el usuario el error\r\n }\r\n }\r\n }", "public TipoPk insert(Tipo dto) throws TipoDaoException;", "void insertSelective(CTipoComprobante record) throws SQLException;", "@Override\r\n\tpublic boolean create(Moteur obj, Connection conn) throws SQLException {\n\t\treturn false;\r\n\t}", "private void insertar() {\n String nombre = edtNombre.getText().toString();\n String telefono = edtTelefono.getText().toString();\n String correo = edtCorreo.getText().toString();\n // Validaciones\n if (!esNombreValido(nombre)) {\n TextInputLayout mascaraCampoNombre = (TextInputLayout) findViewById(R.id.mcr_edt_nombre_empresa);\n mascaraCampoNombre.setError(\"Este campo no puede quedar vacío\");\n } else {\n mostrarProgreso(true);\n String[] columnasFiltro = {Configuracion.COLUMNA_EMPRESA_NOMBRE, Configuracion.COLUMNA_EMPRESA_TELEFONO\n , Configuracion.COLUMNA_EMPRESA_CORREO, Configuracion.COLUMNA_EMPRESA_STATUS};\n String[] valorFiltro = {nombre, telefono, correo, estado};\n Log.v(\"AGET-ESTADO\", \"ENVIADO: \" + estado);\n resultado = new ObtencionDeResultadoBcst(this, Configuracion.INTENT_EMPRESA_CLIENTE, columnasFiltro, valorFiltro, tabla, null, false);\n if (ID.isEmpty()) {\n resultado.execute(Configuracion.PETICION_EMPRESA_REGISTRO, tipoPeticion);\n } else {\n resultado.execute(Configuracion.PETICION_EMPRESA_MODIFICAR_ELIMINAR + ID, tipoPeticion);\n }\n }\n }", "int insert(TblMotherSon record);", "@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 void insertar(Proceso p) {\n\t\tif (p == null) {\n\t\t\treturn;\n\t\t}\n\t\tProceso nuevo = new Proceso();\n\t\tnuevo.rafaga = p.rafaga;\n\t\tnuevo.tllegada = p.tllegada;\n\t\tnuevo.IdCola = this.IdCola;\n\t\tnuevo.NombreCola = this.NombreCola;\n\t\tnuevo.rrejecutada = p.rrejecutada;\n\t\tnuevo.ColaProviene = p.ColaProviene;\n\t\tint tamaņo = p.id.length();\n\t\tif (tamaņo == 1) {\n\t\t\tnuevo.id = p.id + \"1\";\n\t\t} else {\n\t\t\tchar id = p.id.charAt(0);\n\t\t\tint numeroId = Integer.parseInt(String.valueOf(p.id.charAt(1))) + 1;\n\t\t\tnuevo.id = String.valueOf(id) + String.valueOf(numeroId);\n\t\t}\n\t\tif (raiz.sig == raiz) {\n\t\t\traiz.sig = nuevo;\n\t\t\tcabeza = nuevo;\n\t\t\tnuevo.sig = raiz;\n\t\t\tnuevo.padre = raiz;\n\t\t\traiz.padre = nuevo;\n\t\t} else {\n\t\t\tProceso aux = raiz.padre;\n\t\t\taux.sig = nuevo;\n\t\t\tnuevo.sig = raiz;\n\t\t\traiz.padre = nuevo;\n\t\t\tnuevo.padre = aux;\n\t\t}\n\t\tthis.numProcesos++;\n\t\tthis.rafagaTotal += nuevo.rafaga;\n\t\tthis.Ordenamiento();\n\t}", "private void insertData() {\n PodamFactory factory = new PodamFactoryImpl();\n for (int i = 0; i < 3; i++) {\n ServicioEntity entity = factory.manufacturePojo(ServicioEntity.class);\n em.persist(entity);\n dataServicio.add(entity);\n }\n for (int i = 0; i < 3; i++) {\n QuejaEntity entity = factory.manufacturePojo(QuejaEntity.class);\n if (i == 0) {\n entity.setServicio(dataServicio.get(0));\n }\n em.persist(entity);\n data.add(entity);\n }\n }", "private void insert() {//将数据录入数据库\n\t\tUser eb = new User();\n\t\tUserDao ed = new UserDao();\n\t\teb.setUsername(username.getText().toString().trim());\n\t\tString pass = new String(this.pass.getPassword());\n\t\teb.setPassword(pass);\n\t\teb.setName(name.getText().toString().trim());\n\t\teb.setSex(sex1.isSelected() ? sex1.getText().toString().trim(): sex2.getText().toString().trim());\t\n\t\teb.setAddress(addr.getText().toString().trim());\n\t\teb.setTel(tel.getText().toString().trim());\n\t\teb.setType(role.getSelectedIndex()+\"\");\n\t\teb.setState(\"1\");\n\t\t\n\t\tif (ed.addUser(eb) == 1) {\n\t\t\teb=ed.queryUserone(eb);\n\t\t\tJOptionPane.showMessageDialog(null, \"帐号为\" + eb.getUsername()\n\t\t\t\t\t+ \"的客户信息,录入成功\");\n\t\t\tclear();\n\t\t}\n\n\t}", "int insert(GoodsPo record);", "public void insert(Teacher o) throws SQLException {\n\t\t\r\n\t}", "@Override\r\n\tpublic void inserir(Evento evento) {\n\t\trepository.save(evento);\r\n\t}", "@Override\n public int insertar(ClienteBean cliente) {\n clienteDAO = new ClienteDAOImpl();\n return clienteDAO.insertar (cliente);\n }", "int insert(Commet record);", "@Override\n\tpublic void insert(User objetc) {\n\t\tuserDao.insert(objetc);\n\t\t\n\t}", "private void insertData() \n {\n for (int i = 0; i < 3; i++) {\n TarjetaPrepagoEntity entity = factory.manufacturePojo(TarjetaPrepagoEntity.class);\n em.persist(entity);\n data.add(entity);\n }\n for(int i = 0; i < 3; i++)\n {\n PagoEntity pagos = factory.manufacturePojo(PagoEntity.class);\n em.persist(pagos);\n pagosData.add(pagos);\n\n }\n \n data.get(2).setSaldo(0.0);\n data.get(2).setPuntos(0.0);\n \n double valor = (Math.random()+1) *100;\n data.get(0).setSaldo(valor);\n data.get(0).setPuntos(valor); \n data.get(1).setSaldo(valor);\n data.get(1).setPuntos(valor);\n \n }", "@Override\r\n\tpublic void inserir(Funcionario funcionario) throws SQLException {\n\t\topen();\r\n\t\t\r\n\t\tclose();\r\n\t\t\r\n\t}", "private void insertData() {\n \n for (int i = 0; i < 3; i++) {\n ClienteEntity editorial = factory.manufacturePojo(ClienteEntity.class);\n em.persist(editorial);\n ClienteData.add(editorial);\n }\n \n for (int i = 0; i < 3; i++) {\n ContratoPaseoEntity paseo = factory.manufacturePojo(ContratoPaseoEntity.class);\n em.persist(paseo);\n contratoPaseoData.add(paseo);\n }\n \n for (int i = 0; i < 3; i++) {\n ContratoHotelEntity editorial = factory.manufacturePojo(ContratoHotelEntity.class);\n em.persist(editorial);\n contratoHotelData.add(editorial);\n }\n \n for (int i = 0; i < 3; i++) {\n PerroEntity perro = factory.manufacturePojo(PerroEntity.class);\n //perro.setCliente(ClienteData.get(0));\n //perro.setEstadias((List<ContratoHotelEntity>) contratoHotelData.get(0));\n //perro.setPaseos((List<ContratoPaseoEntity>) contratoPaseoData.get(0));\n em.persist(perro);\n Perrodata.add(perro);\n }\n\n }", "public OrdemDeServico inserir (OrdemDeServico servico) {\n\t\tservico.setId((Long) null);\n\t\treturn repoOrdem.save(servico);\n\t}", "int insert(TCar record);", "public void insertar() throws SQLException {\n String sentIn = \" INSERT INTO datosnodoactual(AmigoIP, AmigoPuerto, AmigoCertificado, AmigoNombre, AmigoSobreNombre, AmigoLogueoName, AmigoPassword) \"\r\n + \"VALUES (\" + AmigoIp + \",\" + AmigoPuerto + \",\" + AmigoCertificado + \",\" + AmigoNombre + \",\" + AmigoSobreNombre + \",\" + AmigoLogueoName + \",\" + AmigoPassword + \")\";\r\n System.out.println(sentIn);\r\n InsertApp command = new InsertApp();\r\n try (Connection conn = command.connect();\r\n PreparedStatement pstmt = conn.prepareStatement(sentIn)) {\r\n if (pstmt.executeUpdate() != 0) {\r\n System.out.println(\"guardado\");\r\n } else {\r\n System.out.println(\"error\");\r\n }\r\n } catch (SQLException e) {\r\n System.out.println(e.getMessage());\r\n }\r\n }", "Lancamento persistir(Lancamento lancamento);", "public void guardarDietaComida(DietaComida dietaComida){\r\n try {\r\n \r\n String sql = \"INSERT INTO dietacomida (idDieta,idComida) VALUES ( ? , ? );\";\r\n \r\n PreparedStatement ps = con.prepareStatement(sql, Statement.RETURN_GENERATED_KEYS);\r\n ps.setInt(1, dietaComida.getIdDieta());\r\n ps.setInt(2, dietaComida.getIdComida());\r\n \r\n ps.executeQuery();\r\n \r\n ResultSet rs = ps.getGeneratedKeys();\r\n\r\n /* if (rs.next()) {\r\n dietaComida.setId(rs.getInt(1));\r\n } else {\r\n System.out.println(\"No se pudo obtener el id luego de insertar una DietaComida\");\r\n }*/\r\n ps.close();\r\n \r\n } catch (SQLException ex) {\r\n System.out.println(\"Error al insertar una DietaComida \" + ex.getMessage());\r\n }\r\n }", "private boolean executeInsertIntoDBMaster(final Class myClass,\n final Object obj) {\n\n if (myClass == null) {\n return false;\n }\n if (obj == null) {\n //This means they want to delete the item from the DB. Remove then leave\n return (this.deleteFromMasterDB(myClass));\n }\n\n Realm realm = DatabaseUtilities.buildRealm(this.realmConfiguration);\n String className = myClass.getName();\n String jsonString = null;\n try {\n jsonString = GsonUtilities.convertObjectToJson(obj, myClass);\n } catch (Exception e) {\n }\n\n if (jsonString == null) {\n try {\n realm.close();\n } catch (Exception e) {\n }\n return false;\n }\n\n MasterDatabaseObject mdo = new MasterDatabaseObject();\n mdo.setId(className);\n mdo.setJsonString(jsonString);\n\n final MasterDatabaseObject mdoFinal = mdo;\n\n try {\n realm.executeTransaction(new Realm.Transaction() {\n @Override\n public void execute(Realm realm) {\n realm.copyToRealmOrUpdate(mdoFinal);\n }\n });\n realm.close();\n return true;\n } catch (IllegalArgumentException e1) {\n e1.printStackTrace();\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n try {\n if (!realm.isClosed()) {\n realm.close();\n }\n } catch (Exception e) {\n }\n }\n return false;\n\n }", "@Override\n public void save(T pojo) {\n\n Map<Class, Set<ReflectionUtils.DataDescriptor>> valueMap = new HashMap<>();\n\n try {\n ReflectionUtils.valuesForClasses(valueMap, null, pojo);\n\n for (Map.Entry<Class, Set<ReflectionUtils.DataDescriptor>> entry : valueMap.entrySet()) {\n Insert insert = null;\n if (entry.getKey().getName().equals(pojo.getClass().getName())) {\n logger.info(\"Working on the root class \" + pojo);\n for (ReflectionUtils.DataDescriptor descriptor : entry.getValue()) {\n insert = QueryBuilder.insertInto(keySpace, tableName).values(ReflectionUtils.fieldNames(entry.getKey()),\n descriptor.getValues());\n\n logger.debug(\"Insert \" + insert);\n ResultSet res = session.execute(insert);\n logger.debug(\"Result \" + res);\n }\n } else {\n for (ReflectionUtils.DataDescriptor descriptor : entry.getValue()) {\n String nestedtableName = descriptor.getTableName();\n logger.debug(\"Insert builder \" + descriptor + \" into \" + keySpace + \".\" + nestedtableName);\n insert = QueryBuilder.insertInto(keySpace, nestedtableName).values(ReflectionUtils.fieldNames(entry.getKey()),\n descriptor.getValues());\n ResultSet res = session.execute(insert);\n logger.debug(\"Result \" + res);\n }\n }\n }\n }\n catch (HecateException e) {\n logger.error(\"Hecate problem \" + e);\n }\n }", "@Override\r\n public void inserirConcursando(Concursando concursando) throws Exception {\n rnConcursando.inserir(concursando);\r\n }", "private void insertData() {\r\n PodamFactory factory = new PodamFactoryImpl();\r\n for (int i = 0; i < 3; i++) {\r\n MonitoriaEntity entity = factory.manufacturePojo(MonitoriaEntity.class);\r\n\r\n em.persist(entity);\r\n data.add(entity);\r\n }\r\n }", "public void insert() {\n SiswaModel m = new SiswaModel();\n m.setNisn(view.getTxtNis().getText());\n m.setNik(view.getTxtNik().getText());\n m.setNamaSiswa(view.getTxtNama().getText());\n m.setTempatLahir(view.getTxtTempatLahir().getText());\n \n //save date format\n String date = view.getDatePickerLahir().getText();\n DateFormat df = new SimpleDateFormat(\"MM/dd/yyyy\"); \n Date d = null;\n try {\n d = df.parse(date);\n } catch (ParseException ex) {\n System.out.println(\"Error : \"+ex.getMessage());\n }\n m.setTanggalLahir(d);\n \n //Save Jenis kelamin\n if(view.getRadioLaki().isSelected()){\n m.setJenisKelamin(JenisKelaminEnum.Pria);\n }else{\n m.setJenisKelamin(JenisKelaminEnum.Wanita);\n }\n \n m.setAsalSekolah(view.getTxtAsalSekolah().getText());\n m.setHobby(view.getTxtHoby().getText());\n m.setCita(view.getTxtCita2().getText());\n m.setJumlahSaudara(Integer.valueOf(view.getTxtNis().getText()));\n m.setAyah(view.getTxtNamaAyah().getText());\n m.setAlamat(view.getTxtAlamat().getText());\n \n if(view.getRadioLkkAda().isSelected()){\n m.setLkk(LkkEnum.ada);\n }else{\n m.setLkk(LkkEnum.tidak_ada);\n }\n \n //save agama\n m.setAgama(view.getComboAgama().getSelectedItem().toString());\n \n dao.save(m);\n clean();\n }", "public void GuardarSerologia(RecepcionSero obj)throws Exception{\n Session session = sessionFactory.getCurrentSession();\n session.saveOrUpdate(obj);\n }", "private void populaObjetivoCat()\n {\n objetivoCatDAO.insert(new ObjetivoCat(\"Hipertrofia\", \"weight\"));\n objetivoCatDAO.insert(new ObjetivoCat(\"Saude\", \"apple\"));\n objetivoCatDAO.insert(new ObjetivoCat(\"Emagrecer\", \"gloves\"));\n }", "public TipologiaStrutturaPk insert(TipologiaStruttura dto) throws TipologiaStrutturaDaoException;", "public RespuestaDTO registrarUsuario(Connection conexion, UsuarioDTO usuario) throws SQLException {\n PreparedStatement ps = null;\n ResultSet rs = null;\n int nRows = 0;\n StringBuilder cadSQL = null; //para crear el ddl \n RespuestaDTO registro = null;\n \n try {\n registro = new RespuestaDTO();\n System.out.println(\"usuario----\" + usuario.toStringJson());\n cadSQL = new StringBuilder();\n cadSQL.append(\" INSERT INTO usuario(usua_correo, usua_usuario,tius_id, usua_clave)\");\n cadSQL.append(\" VALUES (?, ?, ?, SHA2(?,256)) \");\n \n ps = conexion.prepareStatement(cadSQL.toString(), Statement.RETURN_GENERATED_KEYS);\n \n AsignaAtributoStatement.setString(1, usuario.getCorreo(), ps);// se envian los datos a los ?, el orden importa mucho\n AsignaAtributoStatement.setString(2, usuario.getUsuario(), ps);\n AsignaAtributoStatement.setString(3, usuario.getIdTipoUsuario(), ps);\n AsignaAtributoStatement.setString(4, usuario.getClave(), ps);\n \n nRows = ps.executeUpdate(); // ejecuta el proceso\n if (nRows > 0) { //nRows es el numero de filas que hubo de movimiento, es decir si hizo el registro, con este if se sabe\n rs = ps.getGeneratedKeys(); // esto se usa para capturar el id recien ingresado en caso de necesitarlo despues\n if (rs.next()) {\n registro.setRegistro(true);\n registro.setIdResgistrado(rs.getString(1)); // guardo el id en en este atributo del objeto\n\n }\n // cerramos los rs y ps\n ps.close();\n ps = null;\n rs.close();\n rs = null;\n }\n } catch (SQLException se) {\n LoggerMessage.getInstancia().loggerMessageException(se);\n return null;\n }\n return registro;\n }", "private void insert(HttpServletRequest request)throws Exception {\n\t\tPedido p = new Pedido();\r\n\t\tCliente c = new Cliente();\r\n\t\tCancion ca = new Cancion();\r\n\t\tp.setCod_pedido(request.getParameter(\"codigo\"));\r\n\t\tca.setCod_cancion(request.getParameter(\"cod_cancion\"));\r\n\t\tc.setCod_cliente(request.getParameter(\"cod_cliente\"));\r\n\t\tp.setCan(ca);\r\n\t\tp.setCl(c);\r\n\t\t\r\n\t\tpdmodel.RegistrarPedido(p);\r\n\t\t\r\n\t}", "int insertSelective(Prueba record);", "public void insereCliente(Cliente cliente){\n cliente.setClieCadDt(new Date());\r\n \r\n //nova conexão\r\n Connection connection = new ConnectionFactory().getConnection();\r\n \r\n //consulta\r\n String query = \"INSERT INTO cliente\"\r\n + \"(clie_debito,\"\r\n + \"clie_debito_ant,\"\r\n + \"clie_cpf,\"\r\n + \"clie_rg,\"\r\n + \"clie_cnh,\"\r\n + \"clie_nasc_dt,\"\r\n + \"clie_cad_dt,\"\r\n + \"clie_nm,\"\r\n + \"clie_end_ds,\"\r\n + \"clie_cid_ds,\"\r\n + \"clie_uf,\"\r\n + \"clie_telefone_ds,\"\r\n + \"clie_telefone_ddd,\"\r\n + \"clie_telefone_ddi)\"\r\n \r\n + \"VALUES(\"\r\n + \"?,\" //clie_debito\r\n + \"?,\" //clie_debito_ant\r\n + \"?,\" //clie_cpf\r\n + \"?,\" //clie_rg\r\n + \"?,\" //clie_cnh\r\n + \"?,\" //clie_nasc_dt\r\n + \"?,\" //clie_cad_dt\r\n + \"?,\" //clie_nm\r\n + \"?,\" //clie_end_ds\r\n + \"?,\" //clie_cid_ds\r\n + \"?,\" //clie_uf\r\n + \"?,\" //clie_telefone_ds\r\n + \"?,\" //clie_telefone_ddd\r\n + \"?)\";//clie_telefone_ddi\r\n \r\n try{\r\n PreparedStatement stmt = connection.prepareStatement(query);\r\n //débito atual do cliente\r\n stmt.setFloat(1, cliente.getClieDebito());\r\n //débito anterior do cliente\r\n stmt.setFloat(2, cliente.getClieDebitoAnt());\r\n //CPF\r\n stmt.setString(3, cliente.getClieCPF());\r\n //RG\r\n stmt.setString(4, cliente.getClieRG());\r\n //CNH\r\n stmt.setString(5, cliente.getClieCNH());\r\n \r\n //Data de nascimento\r\n stmt.setString(6, this.converteDataSimples(cliente.getClieNascDt()));\r\n //Data de cadastro no sistema\r\n stmt.setString(7, this.converteDataSimples(cliente.getClieCadDt()));\r\n \r\n //Nome do cliente\r\n stmt.setString(8, cliente.getClieNm());\r\n \r\n //Endereço do cliente(logradouro e número)\r\n stmt.setString(9, cliente.getClieEndDs());\r\n //Cidade do cliente\r\n stmt.setString(10, cliente.getClieCidDs());\r\n //UF do cliente\r\n stmt.setString(11, cliente.getClieUf());\r\n //Telefone do cliente\r\n stmt.setString(12, cliente.getClieTelefoneDs());\r\n //DDD do telefone\r\n stmt.setString(13, cliente.getClieTelefoneDDD());\r\n //DDI\r\n stmt.setString(14, cliente.getClieTelefoneDDI());\r\n \r\n stmt.execute(); //executa transação\r\n stmt.close(); //fecha conexção com o banco de dados\r\n \r\n }catch(SQLException u){\r\n throw new RuntimeException(u);\r\n }\r\n }" ]
[ "0.689253", "0.68358797", "0.6819401", "0.67231685", "0.6693144", "0.6625733", "0.6573372", "0.65551764", "0.6521586", "0.6510672", "0.6504964", "0.6495675", "0.6492221", "0.646006", "0.64311296", "0.64259493", "0.64244294", "0.64139897", "0.64043826", "0.6401931", "0.639896", "0.6391521", "0.63718927", "0.636793", "0.6367169", "0.63640094", "0.6361192", "0.6348993", "0.6341503", "0.633176", "0.6331551", "0.6325947", "0.6308892", "0.63061476", "0.6296096", "0.6295129", "0.628527", "0.62783283", "0.6271754", "0.62689173", "0.62604535", "0.62535113", "0.62493765", "0.6246521", "0.6223524", "0.6222463", "0.6220095", "0.6213346", "0.620361", "0.61996704", "0.6176935", "0.6173323", "0.61549866", "0.6146362", "0.6142797", "0.61410517", "0.6126451", "0.612486", "0.61233795", "0.6119142", "0.6118806", "0.61164266", "0.611496", "0.61094797", "0.61034316", "0.6102627", "0.61017966", "0.60983646", "0.6096149", "0.60946983", "0.6091495", "0.608231", "0.6076531", "0.60719645", "0.60692084", "0.6066658", "0.6065843", "0.60636693", "0.6058861", "0.6054132", "0.60418355", "0.60379535", "0.6035156", "0.6031778", "0.60275656", "0.60262233", "0.60241157", "0.6020905", "0.60207796", "0.60135776", "0.6013115", "0.6013069", "0.6001916", "0.59973866", "0.5995234", "0.5993911", "0.5989687", "0.5983736", "0.5980591", "0.5972772", "0.59680605" ]
0.0
-1
Metodos para leer infromacion de la BD. Reciben la llave primaria del registro que se desea buscar.
public Estado ReadEstado(int estadoID){ SQLiteDatabase sqLiteDatabase = conn.getReadableDatabase(); String query = "select * from estados WHERE estadoID=?"; Cursor c= sqLiteDatabase.rawQuery(query, new String[]{String.valueOf(estadoID)}); if (c.moveToFirst()) return new Estado(estadoID,c.getString(c.getColumnIndex("descripcion"))); return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getClaveEntidad() {\n return claveEntidad;\n }", "public void limpiarProcesoBusqueda() {\r\n parametroEstado = 1;\r\n parametroNombre = null;\r\n parametroApellido = null;\r\n parametroDocumento = null;\r\n parametroTipoDocumento = null;\r\n parametroCorreo = null;\r\n parametroUsuario = null;\r\n parametroEstado = 1;\r\n parametroGenero = 1;\r\n listaTrabajadores = null;\r\n inicializarFiltros();\r\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 }", "ParqueaderoEntidad agregar(ParqueaderoEntidad parqueadero);", "private Malote buscaMaloteDestino(Localidade destinoMalote) {\n\t\tlogger.info(\"buscar Malote Destino:\"+destinoMalote.getDescricao());\r\n\t\t\t\t\t\t \r\n\t\tLocalidade destinoFinal = destinoMalote;\r\n\t\tTipoMalote tipoMalote = TipoMalote.SEPEX;\r\n\t\t\r\n\t\tif (destinoMalote.getTipoRemessa().equals(TipoRemessa.VARAS_INT) &&\r\n\t\t\t\tdestinoMalote.temCodUnidadeAdmCentral()) {\r\n\t\t\tlogger.info(\"<<< malote seadm interior >>\");\r\n\t\t\tdestinoFinal = destinoMalote.getUnidadeAdmCentral();\r\n\t\t\ttipoMalote = TipoMalote.SEADM_INT;\r\n\t\t} else {\r\n\t\t\tif (destinoMalote.getTipoRemessa().equals(TipoRemessa.INTERNO) && destinoMalote.isAgrupado()) {\r\n\t\t\t\tlogger.info(\"<<< malote agrupado >>\");\r\n\t\t\t\tdestinoFinal = destinoMalote.getMaloteAgrupado();\r\n\t\t\t} else {\t\t\r\n\t\t\t\tlogger.info(\"<<< malote interno nao agrupado>>>\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\tStringBuilder sb = new StringBuilder(\"from Malote m \");\r\n\t\tsb.append(\"where m.fechado = false and \");\r\n\t\tsb.append(\"m.tipoMalote = :pTipoMalote \");\r\n\t\tsb.append(\"and m.destino = :pDestino\");\r\n\t\tQuery q = em.createQuery(sb.toString());\r\n\t\tq.setParameter(\"pTipoMalote\", tipoMalote);\r\n\t\tq.setParameter(\"pDestino\", destinoFinal);\r\n\t\t\r\n\t\tMalote maloteEnviar = (Malote) q.getSingleResult();\r\n\t\t\r\n\t\tif (null == maloteEnviar) {\r\n\t\t\tlogger.info(\"<<<bmd - malote novo>>\");\r\n\t\t\tLocalidadeManager locDAO = new LocalidadeManager();\r\n\t\t\tmaloteEnviar = new Malote();\r\n\t\t\tmaloteEnviar.setDestino(destinoFinal);\r\n\t\t\t// rem : sepex ou sistema\r\n\t\t\tmaloteEnviar.setRemetente(locDAO.remetenteSepex());\r\n\t\t\tmaloteEnviar.setTipoMalote(tipoMalote);\r\n\t\t\tmaloteEnviar.setDtEnvio(Calendar.getInstance().getTime());\r\n\t\t\tsalva(maloteEnviar);\r\n\t\t\t//closeSession();\r\n\t\t}\r\n\t\treturn maloteEnviar;\r\n\t}", "public Usuario buscarUsuario(String usuario) {\n Usuario usuario1 = new Usuario();\n try{\n\t\tString seleccion = \"SELECT usuario, nombre, clave FROM usuarios where usuario=? \";\n\t\tPreparedStatement ps = con.prepareStatement(seleccion);\n ps.setString(1, usuario);\n \n\t\t//Savepoint sp1 = con.setSavepoint(\"SAVE_POINT_ONE\");\n \n\t\tResultSet rs = ps.executeQuery();\n\t\tcon.commit();\n\t\twhile(rs.next()){\n usuario1.setUsuario(rs.getString(\"usuario\")); \n usuario1.setNombre(rs.getString(\"nombre\")); \n usuario1.setClave(rs.getString(\"clave\")); \n return usuario1;\n\t\t} \n \n }catch(Exception e){\n System.out.println(e.getMessage());\n e.printStackTrace();\n }\n return null; \n\n }", "public void buscarEstudiante(String codEstudiante){\n estudianteModificar=new Estudiante();\n estudianteGradoModificar=new EstudianteGrado();\n StringBuilder query=new StringBuilder();\n query.append(\"select e.idestudiante,e.nombre,e.apellido,e.ci,e.cod_est,e.idgrado,e.idcurso,g.grado,c.nombre_curso \" );\n query.append(\" from estudiante e \");\n query.append(\" inner join grado g on e.idgrado=g.idgrado \");\n query.append(\" inner join cursos c on e.idcurso=c.idcurso \");\n query.append(\" where idestudiante=? \");\n try {\n PreparedStatement pst=connection.prepareStatement(query.toString());\n pst.setInt(1, Integer.parseInt(codEstudiante));\n ResultSet resultado=pst.executeQuery();\n //utilizamos una condicion porque la busqueda nos devuelve 1 registro\n if(resultado.next()){\n //cargando la informacion a nuestro objeto categoriaModificarde tipo categoria\n estudianteModificar.setCodEstudiante(resultado.getInt(1));\n estudianteModificar.setNomEstudiante(resultado.getString(2));\n estudianteModificar.setApEstudiante(resultado.getString(3));\n estudianteModificar.setCiEstudiante(resultado.getInt(4));\n estudianteModificar.setCodigoEstudiante(resultado.getString(5));\n estudianteModificar.setIdgradoEstudiante(resultado.getInt(6));\n estudianteModificar.setIdCursoEstudiante(resultado.getInt(7));\n estudianteGradoModificar.setNomGrado(resultado.getString(8));\n estudianteGradoModificar.setNomCurso(resultado.getString(9));\n }\n } catch (SQLException e) {\n System.out.println(\"Error de conexion\");\n e.printStackTrace();\n }\n }", "@Override\r\n\tpublic void solicitarClave(String clave) {\n\t\tSystem.out.println(\"Comprobar clave\");\r\n\t\tSystem.out.println(\"Analizar base de datos\");\r\n\t\tSystem.out.println(\"Clave correcta\");\r\n\t}", "public synchronized static ConectorBBDD saberEstado() throws SQLException{\n\t\tif(instancia==null){\n\t\t\tinstancia=new ConectorBBDD();\n\t\t\t\n\t\t}\n\t\treturn instancia;\n\t}", "@Override\n\n public void run(String... strings) throws Exception {\n \n Usuario u= new Usuario(1521L, \"Viridiana Hernandez\",\"[email protected]\");\n \n //la guardamos\n \n // repoUsu.save(u);\n \n //GENERAMOS LA DIRECCION QUE VAMOS A GUARDAR\n \n Direccion d = new Direccion(new Usuario(1521L),\"Calle 13\", 55120, \"Ecatepec\");\n //repoDir.save(d);\n \n \n //AQUI HAREMOS EL JOIN\n \n \n Direccion d2= repoDir.findOne(2L);\n System.out.println(\"Correo:\"+d2.getU().getEmail()+ \" municipio \"+d2.getMunicipio());\n \n \n \n \n \n \n //repoMensa.save (new Mensajito(\"Primero\",\"Mi primera vez con hibernate\"))\n /*\n Mensajito m= repoMensa.findOne(1);\n System.out.println(m.getTitulo());\n \n \n \n // repoMensa.save(new Mensajito(\"17 de octubre\",\"No temblo\"));\n System.out.println(\"vamos a uscar todos\");\n \n for (Mensajito mensa:repoMensa.findAll()){\n System.out.println(mensa);\n \n }\n \n //para buscar por id FINDONE\n System.out.println(\"vamos a buscar por id\");\n System.out.println(repoMensa.findOne(1));\n \n \n // Actualizar \n repoMensa.save(new Mensajito(1,\"nuevo titulo\",\"nuevo cuerpo\"));\n System.out.println(repoMensa.findOne(1));\n*/\n }", "Reserva Obtener();", "@Override\n public Long getClave() {\n return clave;\n }", "public Institucion buscarInstitucionDeSolicitud(String cod_solicitud){\n\tString sql=\"select * from institucion where cod_institucion='\"+cod_solicitud+\"';\";\n\t\n\treturn db.queryForObject(sql, new InstitucionRowMapper());\n}", "private void cargaInfoEmpleado(){\r\n Connection conn = null;\r\n Conexion conex = null;\r\n try{\r\n if(!Config.estaCargada){\r\n Config.cargaConfig();\r\n }\r\n conex = new Conexion();\r\n conex.creaConexion(Config.host, Config.user, Config.pass, Config.port, Config.name, Config.driv, Config.surl);\r\n conn = conex.getConexion();\r\n if(conn != null){\r\n ArrayList<Object> paramsIn = new ArrayList();\r\n paramsIn.add(txtLogin);\r\n QryRespDTO resp = new Consulta().ejecutaSelectSP(conn, IQryUsuarios.NOM_FN_OBTIENE_INFO_USUARIOWEB, paramsIn);\r\n System.out.println(\"resp: \" + resp.getRes() + \"-\" + resp.getMsg());\r\n if(resp.getRes() == 1){\r\n ArrayList<ColumnaDTO> listaColumnas = resp.getColumnas();\r\n for(HashMap<String, CampoDTO> fila : resp.getDatosTabla()){\r\n usuario = new UsuarioDTO();\r\n \r\n for(ColumnaDTO col: listaColumnas){\r\n switch(col.getIdTipo()){\r\n case java.sql.Types.INTEGER:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"0\":Integer.parseInt(fila.get(col.getEtiqueta()).getValor().toString().replaceAll(\",\", \"\").replaceAll(\"$\", \"\").replaceAll(\" \", \"\")));\r\n break;\r\n \r\n case java.sql.Types.DOUBLE:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"0\":Double.parseDouble(fila.get(col.getEtiqueta()).getValor().toString()));\r\n break;\r\n \r\n case java.sql.Types.FLOAT:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"0\":Float.parseFloat(fila.get(col.getEtiqueta()).getValor().toString()));\r\n break;\r\n \r\n case java.sql.Types.DECIMAL:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"0\":Float.parseFloat(fila.get(col.getEtiqueta()).getValor().toString()));\r\n break;\r\n \r\n case java.sql.Types.VARCHAR:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"\":fila.get(col.getEtiqueta()).getValor().toString());\r\n break;\r\n \r\n case java.sql.Types.NUMERIC:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"0\":Float.parseFloat(fila.get(col.getEtiqueta()).getValor().toString()));\r\n break;\r\n \r\n default:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"\":fila.get(col.getEtiqueta()).getValor().toString());\r\n break;\r\n } \r\n }\r\n }\r\n sesionMap.put(\"UsuarioDTO\", usuario);\r\n }else{\r\n context.getExternalContext().getApplicationMap().clear();\r\n context.getExternalContext().redirect(\"index.xhtml\");\r\n }\r\n }\r\n }catch(Exception ex){\r\n System.out.println(\"Excepcion en la cargaInfoEmpleado: \" + ex);\r\n }finally{\r\n try{\r\n conn.close();\r\n }catch(Exception ex){\r\n \r\n }\r\n }\r\n }", "@Override\n\tpublic ArrayList<Object> leer(Connection connection, String campoBusqueda, String valorBusqueda) {\n\t\tString query = \"\";\n\t\tDetalleSolicitud detalleSolicitud = null;\n\t\tArrayList<Object> listaDetalleSolicitud = new ArrayList<Object>();\n\t\tif (campoBusqueda.isEmpty() || valorBusqueda.isEmpty()) {\n\t\t\tquery = \"SELECT * FROM detallesolicitudes ORDER BY sysPK;\";\n\t\t\ttry {\n\t\t\t\tStatement statement = connection.createStatement();\n\t\t\t\tResultSet resultSet = statement.executeQuery(query); \t\t\t\t\n\t\t\t\twhile (resultSet.next()) {\n\t\t\t\t\tdetalleSolicitud = new DetalleSolicitud();\n\t\t\t\t\tdetalleSolicitud.setSysPk(resultSet.getInt(1));\n\t\t\t\t\tdetalleSolicitud.setCantidad(resultSet.getInt(2));\n\t\t\t\t\tdetalleSolicitud.setFechaEntrega(resultSet.getDate(3));\n\t\t\t\t\tdetalleSolicitud.setDisenoFk(resultSet.getInt(4));\n\t\t\t\t\tdetalleSolicitud.setSolicitudFk(resultSet.getInt(5));\n\t\t\t\t\tlistaDetalleSolicitud.add(detalleSolicitud);\n\t\t\t\t}//FIN WHILE\n\t\t\t} catch (SQLException ex) {\n\t\t\t\tNotificacion.dialogoException(ex);\n\t\t\t}//FIN TRY/CATCH\n\t\t} else {\n\t\t\tquery = \"SELECT * FROM detallesolicitudes WHERE \" + campoBusqueda + \" = ? ORDER BY sysPK;\";\n\t\t\ttry {\n\t\t\t\tPreparedStatement preparedStatement = connection.prepareStatement(query);\n\t\t\t\tpreparedStatement.setString(1, valorBusqueda);\n\t\t\t\tResultSet resultSet=preparedStatement.executeQuery();\n\t\t\t\twhile (resultSet.next()) {\n\t\t\t\t\tdetalleSolicitud = new DetalleSolicitud();\n\t\t\t\t\tdetalleSolicitud.setSysPk(resultSet.getInt(1));\n\t\t\t\t\tdetalleSolicitud.setCantidad(resultSet.getInt(2));\n\t\t\t\t\tdetalleSolicitud.setFechaEntrega(resultSet.getDate(3));\n\t\t\t\t\tdetalleSolicitud.setDisenoFk(resultSet.getInt(4));\n\t\t\t\t\tdetalleSolicitud.setSolicitudFk(resultSet.getInt(5));\n\t\t\t\t\tlistaDetalleSolicitud.add(detalleSolicitud);\n\t\t\t\t}//FIN WHILE\n\t\t\t}catch (SQLException ex) {\n\t\t\t\tNotificacion.dialogoException(ex);\n\t\t\t}//FIN TRY/CATCH\n\t\t}//FIN IF/ELSE\n\t\treturn listaDetalleSolicitud;\n\t}", "public FlujoDetalleDTO leerRegistro() {\n/* */ try {\n/* 82 */ FlujoDetalleDTO reg = new FlujoDetalleDTO();\n/* */ \n/* 84 */ reg.setCodigoFlujo(this.rs.getInt(\"codigo_flujo\"));\n/* 85 */ reg.setSecuencia(this.rs.getInt(\"secuencia\"));\n/* 86 */ reg.setServicioInicio(this.rs.getInt(\"servicio_inicio\"));\n/* 87 */ reg.setCodigoEstado(this.rs.getInt(\"codigo_estado\"));\n/* 88 */ reg.setServicioDestino(this.rs.getInt(\"servicio_destino\"));\n/* 89 */ reg.setNombreProcedimiento(this.rs.getString(\"nombre_procedimiento\"));\n/* 90 */ reg.setCorreoDestino(this.rs.getString(\"correo_destino\"));\n/* 91 */ reg.setEnviarSolicitud(this.rs.getString(\"enviar_solicitud\"));\n/* 92 */ reg.setMismoProveedor(this.rs.getString(\"ind_mismo_proveedor\"));\n/* 93 */ reg.setMismoCliente(this.rs.getString(\"ind_mismo_cliente\"));\n/* 94 */ reg.setEstado(this.rs.getString(\"estado\"));\n/* 95 */ reg.setUsuarioInsercion(this.rs.getString(\"usuario_insercion\"));\n/* 96 */ reg.setFechaInsercion(this.rs.getString(\"fecha_insercion\"));\n/* 97 */ reg.setUsuarioModificacion(this.rs.getString(\"usuario_modificacion\"));\n/* 98 */ reg.setFechaModificacion(this.rs.getString(\"fecha_modificacion\"));\n/* 99 */ reg.setNombreServicioInicio(this.rs.getString(\"nombre_servicio_inicio\"));\n/* 100 */ reg.setNombreCodigoEstado(this.rs.getString(\"nombre_codigo_estado\"));\n/* 101 */ reg.setNombreServicioDestino(this.rs.getString(\"nombre_servicio_destino\"));\n/* 102 */ reg.setNombreEstado(this.rs.getString(\"nombre_estado\"));\n/* 103 */ reg.setCaracteristica(this.rs.getInt(\"caracteristica\"));\n/* 104 */ reg.setCaracteristicaValor(this.rs.getInt(\"valor_caracteristica\"));\n/* 105 */ reg.setCaracteristicaCorreo(this.rs.getInt(\"caracteristica_correo\"));\n/* 106 */ reg.setNombreCaracteristica(this.rs.getString(\"nombre_caracteristica\"));\n/* 107 */ reg.setDescripcionValor(this.rs.getString(\"descripcion_valor\"));\n/* 108 */ reg.setMetodoSeleccionProveedor(this.rs.getString(\"metodo_seleccion_proveedor\"));\n/* 109 */ reg.setIndCorreoCliente(this.rs.getString(\"ind_correo_clientes\"));\n/* */ \n/* */ try {\n/* 112 */ reg.setEnviar_hermana(this.rs.getString(\"enviar_hermana\"));\n/* 113 */ reg.setEnviar_si_hermana_cerrada(this.rs.getString(\"enviar_si_hermana_cerrada\"));\n/* 114 */ reg.setInd_cliente_inicial(this.rs.getString(\"ind_cliente_inicial\"));\n/* */ \n/* */ \n/* */ }\n/* 118 */ catch (Exception e) {}\n/* */ \n/* */ \n/* */ \n/* 122 */ return reg;\n/* */ }\n/* 124 */ catch (Exception e) {\n/* 125 */ e.printStackTrace();\n/* 126 */ Utilidades.writeError(\"FlujoDetalleDAO:leerRegistro \", e);\n/* */ \n/* 128 */ return null;\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}", "@Override\n public boolean SearchSQL() {\n\n /*\n appunto su query.next()\n inizialmente query.next è posto prima della prima riga\n alla prima chiaata si posiziona sulla prima row\n alla seconda chiamata si posiziona sulla seconda row e cosi via\n */\n\n boolean controllo = false;\n\n openConnection();\n\n String sql =\"select user,pass,vol_o_cand from pass where user='\"+userInserito+\"'\";\n ResultSet query = selectQuery(sql);\n\n try {\n\n if(query.next()){\n\n String pass = query.getString(\"pass\");\n\n if(pass.equals(passInserita)) {\n controllo = true;\n volocand = query.getString(\"vol_o_cand\");\n }\n\n }\n\n\n }catch(SQLException se){\n se.printStackTrace();\n }finally{\n closeConnection();\n }\n\n\n return controllo;\n\n }", "public BeanDatosAlumno() {\r\n bo = new BoPrestamoEjemplarImpl();\r\n verEjemplares(\"ABC0001\"); \r\n numerodelibrosPrestados();\r\n }", "public ParametroPorParametroPK() {\r\n\t}", "@Override\r\n\tpublic void inhabilitar(Alumno alumno) throws Exception {\n\t\tem=emf.createEntityManager();\r\n\r\n\t\t//1.inicia la transacción\r\n\t\tem.getTransaction().begin();\r\n\r\n\t\t//2. ejecuta las operaciones \r\n\t\t//2.1 busca Empleado por llave primaria\r\n\t\tAlumno entidadAlumno = em.find(Alumno.class, alumno.getStrCodigoAlumno());\r\n\t\r\n\t\t//2.3 actualiza Empleado\r\n\t\tem.merge(entidadAlumno);\r\n\t\tem.flush();\r\n\t\t\t\t\r\n\t\t//3.ejecuta commit a la transacción\r\n\t\tem.getTransaction().commit();\r\n\t\tem.close();\r\n\t}", "@Override\r\npublic List<Map<String, Object>> readAll() {\n\treturn detalle_pedidoDao.realAll();\r\n}", "@Override\n\tpublic DatosEnc obtenerDatos(DatosEnc datos) {\n\t\tConnection con = null;\n\t\tCallableStatement stmt = null;\n//\t\tPreparedStatement ps = null;\n\t\tResultSet rs = null;\n\t\ttry{\n//\t\t\tcon = new ConectarDB().getConnection();\n//\t\t\tString query = \"select * from pv_cotizaciones_det where no_cotizacion = ?\";\n//\t\t\tps = con.prepareStatement(query);\n//\t\t\tps.setString(1, datos.getNoDocumento());\n//\t\t\trs = ps.executeQuery();\n//\t\t\texiste=0;\n//\t\t\twhile(rs.next()){\n//\t\t\t\tif(rs.getString(\"no_cotizacion\") == null){\n//\t\t\t\t\texiste=0;\n//\t\t\t\t}else if(rs.getString(\"no_cotizacion\").equals(datos.getNoDocumento())){\n//\t\t\t\t\texiste=1;\n//\t\t\t\t}\n//\t\t\t}\n//\t\t\tcon.close();\n//\t\t\tps.close();\n//\t\t\trs.close();\n//\t\t\tif(existe==0){\n\t\t\t\tcon = new ConectarDB().getConnection();\n\t\t\t\tstmt = con.prepareCall(\"{call stp_UDPV_InUp_Mov_Enc(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}\");\n\t\t\t\tstmt.setString(1, datos.getCodigoCliente());\n\t\t\t\tstmt.setString(2, datos.getNit());\n\t\t\t\tstmt.setString(3, datos.getNombreCliente());\n\t\t\t\tstmt.setString(4, datos.getDirecFactura());\n\t\t\t\tstmt.setString(5, datos.getTel());\n\t\t\t\tstmt.setString(6, datos.getTarjeta());\n\t\t\t\tstmt.setString(7, datos.getDirecEnvio());\n\t\t\t\tstmt.setString(8, datos.getCodigoVendedor());\n\t\t\t\tstmt.setString(9, datos.getUsername());\n\t\t\t\tstmt.setString(10, datos.getTipoDocumento());\n\t\t\t\tstmt.setString(11, datos.getNoDocumento());\n\t\t\t\tstmt.setString(12, datos.getFechaVence());\n\t\t\t\tstmt.setString(13, datos.getTipoPago());\n\t\t\t\tstmt.setString(14, datos.getTipoCredito());\n\t\t\t\tstmt.setString(15, datos.getAutoriza());\n\t\t\t\tstmt.setString(16, datos.getFechaDocumento());\n\t\t\t\tstmt.setString(17, datos.getCargosEnvio());\n\t\t\t\tstmt.setString(18, datos.getOtrosCargos());\n\t\t\t\tstmt.setString(19, datos.getMontoVenta());\n\t\t\t\tstmt.setString(20, datos.getMontoTotal());\n\t\t\t\tstmt.setString(21, datos.getSerieDev());\n\t\t\t\tstmt.setString(22, datos.getNoDocDev());\n\t\t\t\tstmt.setString(23, datos.getObservaciones());\n\t\t\t\tstmt.setString(24, datos.getTipoNota());\n\t\t\t\tstmt.setString(25, datos.getCaja());\n\t\t\t\tstmt.setString(26, datos.getFechaEntrega());\n\t\t\t\tstmt.setString(27, datos.getCodigoDept());\n\t\t\t\tstmt.setString(28, datos.getCodGen());\n\t\t\t\tstmt.setString(29, datos.getNoConsigna());\n\t\t\t\tstmt.setString(30, datos.getCodMovDev());\n\t\t\t\tstmt.setString(31, datos.getGeneraSolicitud());\n\t\t\t\tstmt.setString(32, datos.getTipoPagoNC());\n\t\t\t\tstmt.setString(33, datos.getTipoCliente());\n\t\t\t\tstmt.setString(34, datos.getCodigoNegocio());\n\t\t\t\tstmt.setString(35, datos.getCantidadDevolver());\n\t\t\t\tstmt.setString(36, datos.getAutorizoDespacho());\n\t\t\t\tstmt.setString(37, datos.getSaldo());\n\t\t\t\trs = stmt.executeQuery();\n\t\t\t\t\n\t\t\t\twhile(rs.next()){\n\t\t\t\t\tif(rs.getString(1)!=null){\n\t\t\t\t\t\tdatos.setSerieEnc(rs.getString(1));\n\t\t\t\t\t}else{\n\t\t\t\t\t\tdatos.setSerieEnc(\"NA\");\n\t\t\t\t\t}\n\t\t\t\t\tdatos.setNoEnc(rs.getString(2));\n//\t\t\t\t\tif(rs.getString(1)!=null){\n//\t\t\t\t\t\tdatos.setSerieEnc(rs.getString(1));\n//\t\t\t\t\t}else{\n//\t\t\t\t\t\tdatos.setSerieEnc(\"NA\");\n//\t\t\t\t\t}\n//\t\t\t\t\tdatos.setNoEnc(rs.getString(2));\n//\t\t\t\t\tdocumento = rs.getInt(2);\n\t\t\t\t}\n\t\t\t\tcon.close();\n\t\t\t\tstmt.close();\n\t\t\t\trs.close();\n//\t\t\t}\n\t\t\t\n\t\t\t\n//\t\t\tcon = new ConectarDB().getConnection();\n//\t\t\tstmt = con.prepareCall(\"{call stp_UDPV_Del_Mov_Det(?,?,?)}\");\n//\t\t\tstmt.setInt(1, Integer.parseInt(datos.getTipoDocumento()));\n//\t\t\tstmt.setString(2, \"\");\n//\t\t\tstmt.setInt(3, documento);\n//\t\t\trs = stmt.executeQuery();\n//\t\t\t\n//\t\t\twhile(rs.next()){\n//\t\t\t\tSystem.out.println(rs.getString(\"limpiado\"));\n//\t\t\t}\n//\t\t\tcon.close();\n//\t\t\tstmt.close();\n//\t\t\trs.close();\n\t\t\t\n//\t\t\tcon = new ConectarDB().getConnection();\n//\t\t\tstmt = con.prepareCall(\"{call stp_udpv_VerificaCotiza(?,?)}\");\n//\t\t\tstmt.setString(1, \"\");\n//\t\t\tstmt.setInt(2, documento);\n//\t\t\trs = stmt.executeQuery();\n//\t\t\t\n//\t\t\twhile(rs.next()){\n//\t\t\t\tSystem.out.println(rs.getString(\"error\"));\n//\t\t\t}\n//\t\t\tcon.close();\n//\t\t\tstmt.close();\n//\t\t\trs.close();\n\t\t\t\n\t\t}catch(SQLException e ){\n\t\t\tSystem.out.println(\"Error Enc: \" + e.getMessage());\n\t\t}\n\t\treturn datos;\n\t}", "public void inicializar() {\n\t\t// TODO Auto-generated method stub\n\t\tISHORARIO_IDISHORARIO=\"\";\n\t\tISAULA_IDISAULA=\"\";\n\t\tISCURSO_IDISCURSO=\"\";\n\t\t\n\t}", "private Object buscaRegistro(BaseJDBC baseJDBC, Class<?> classe, Object id, int profundidade, Class<?>[] classes, int classesVerifica, List<OMObtido> jaObtidos) throws Exception\r\n\t{\r\n\t\tObject objetoAux, idAux;\r\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\tfor(int i=0; i<jaObtidos.size(); i++)\r\n\t\t\t{\r\n\t\t\t\tobjetoAux = jaObtidos.get(i).getOm();\r\n\t\t\t\tif(objetoAux!=null && objetoAux.getClass()==classe)\r\n\t\t\t\t{\r\n\t\t\t\t\tidAux = getIdValue(objetoAux);\r\n\t\t\t\t\tif(idAux!=null && idAux.equals(id))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif(jaObtidos.get(i).getProfundidade()>=profundidade) \t{ return objetoAux; }\r\n\t\t\t\t\t\telse \t\t\t\t\t\t\t\t\t\t\t\t\t{ break; }\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(Exception e)\r\n\t\t{\r\n\t\t\tLogs.addWarn(\"Nao foi possivel buscar o registro\", e);\r\n\t\t}\r\n\t\t\r\n\t\tobjetoAux = obtemUnico(baseJDBC, classe, id, profundidade, classes, classesVerifica, jaObtidos);\r\n\t\tjaObtidos.add(new OMObtido(objetoAux, profundidade));\r\n\t\treturn objetoAux;\r\n\t}", "BaseDatosMemoria() {\n baseDatos = new HashMap<>();\n secuencias = new HashMap<>();\n }", "public static Estudiante buscarEstudiante(String Nro_de_ID) {\r\n //meter este método a la base de datos\r\n Estudiante est = new Estudiante();\r\n try {\r\n Class.forName(\"com.mysql.jdbc.Driver\");\r\n Connection conexion = DriverManager.getConnection(\"jdbc:mysql://localhost/registrolaboratorios\", \"root\", \"admin\");\r\n System.out.print(\"Conexion establecida!\");\r\n Statement sentencia = conexion.createStatement();\r\n ResultSet necesario = sentencia.executeQuery(\"select * from estudiante where Nro_de_ID ='\" + Nro_de_ID + \"'\");\r\n\r\n while (necesario.next()) {\r\n\r\n String ced = necesario.getString(\"Nro_de_ID\");\r\n String nomb = necesario.getString(\"Nombres\");\r\n String ape = necesario.getString(\"Apellidos\");\r\n String lab = necesario.getString(\"Laboratorio\");\r\n String carr = necesario.getString(\"Carrera\");\r\n String mod = necesario.getString(\"Modulo\");\r\n String mta = necesario.getString(\"Materia\");\r\n String fecha = necesario.getString(\"Fecha\");\r\n String HI = necesario.getString(\"Hora_Ingreso\");\r\n String HS = necesario.getString(\"Hora_Salida\");\r\n\r\n est.setNro_de_ID(ced);\r\n est.setNombres(nomb);\r\n est.setApellidos(ape);\r\n est.setLaboratorio(lab);\r\n est.setCarrera(carr);\r\n est.setModulo(mod);\r\n est.setMateria(mta);\r\n est.setFecha(fecha);\r\n est.setHora_Ingreso(HI);\r\n est.setHora_Salida(HS);\r\n\r\n }\r\n sentencia.close();\r\n conexion.close();\r\n\r\n } catch (Exception ex) {\r\n System.out.print(\"Error en la conexion\" + ex);\r\n }\r\n return est;\r\n }", "Turno consultarTurno();", "public abstract void leerPersistencia();", "public UsuarioBean Buscar(String cod_usuario){\n UsuarioBean bean = null;\n MiConexion con = new MiConexion(contexto, null, null, 1);\n SQLiteDatabase sql = con.getReadableDatabase();\n Cursor cur = sql.rawQuery(\"SELECT * FROM Tb_Usuario where cod_usuario=?\",\n new String[]{cod_usuario});\n\n if(cur.moveToNext()){\n bean = new UsuarioBean();\n bean.setId_cargo(cur.getString(0));\n bean.setNom_usuario(cur.getString(1));\n bean.setApe_usuario(cur.getString(2));\n bean.setTip_usuario(cur.getString(3));\n bean.setEmail_usuario( cur.getString(4));\n bean.setPwd_usuario(cur.getString(5));\n bean.setId_cargo(cur.getString(6));\n }\n return bean;\n }", "public Usuarios(String Cedula){ //método que retorna atributos asociados con la cedula que recibamos\n conexion = base.GetConnection();\n PreparedStatement select;\n try {\n select = conexion.prepareStatement(\"select * from usuarios where Cedula = ?\");\n select.setString(1, Cedula);\n boolean consulta = select.execute();\n if(consulta){\n ResultSet resultado = select.getResultSet();\n if(resultado.next()){\n this.Cedula= resultado.getString(1);\n this.Nombres= resultado.getString(2);\n \n this.Sexo= resultado.getString(3);\n this.Edad= resultado.getInt(4);\n this.Direccion= resultado.getString(5);\n this.Ciudad=resultado.getString(6);\n this.Contrasena=resultado.getString(7);\n this.Estrato=resultado.getInt(8);\n this.Rol=resultado.getString(9);\n }\n resultado.close();\n }\n conexion.close();\n } catch (SQLException ex) {\n System.err.println(\"Ocurrió un error: \"+ex.getMessage().toString());\n }\n}", "@Override\n\t@Transactional\n\n\tpublic void initCinemas() {\n\t\tvilleRepository.findAll().forEach(v->{\n\t\t\tStream.of(\"Megarama\",\"Pathé\",\"UGC\",\"MK2\").forEach(c->{\n\t\t\t\tCinema cinema=new Cinema();\n\t\t\t\tcinema.setName(c);\n\t\t\t\tcinema.setNombreSalles(3+(int) (Math.random()*7));\n\t\t\t\tcinema.setVille(v);\n\t\t\t\t\n\t\t\t cinemaRepository.save(cinema);\t\n\t\t\t});\n\t\t\t\n\t\t\t\n\t\t});\n\t}", "public PerfilVO buscarPerfilUsuario(long idUsuario) throws SQLException {\n\t\tlogger.debug(\"Inicia metodo - buscarPerfilUsuario\");\n\t\tCONSULTA_PERFIL_CANDIDATO = \"BUSCAR_PERFIL_USUARIO\";\n\t\tLong[] parametros = { idUsuario };\n\t\tCachedRowSet cachedRowSet = executeQuery(parametros);\n\n\t\tPerfilVO perfil = null;\n\t\ttry {\n\t\t\tif (cachedRowSet.next()) {\n\t\t\t\tperfil = new PerfilVO();\n\t\t\t\tperfil.setIdCandidato(cachedRowSet.getLong(1));\n\t\t\t\tperfil.setIdUsuario(idUsuario);\n\t\t\t\tperfil.setIdOficina(cachedRowSet.getLong(2));\n\t\t\t\tperfil.setCurp(cachedRowSet.getString(3));\n\t\t\t\tperfil.setNombre(cachedRowSet.getString(4));\n\t\t\t\tperfil.setApellido1(cachedRowSet.getString(5));\n\t\t\t\tperfil.setApellido2(cachedRowSet.getString(6));\n\t\t\t\tperfil.setIdGenero(cachedRowSet.getInt(7));\n\t\t\t\tperfil.setFechaNacimiento(cachedRowSet.getDate(8));\n\t\t\t\tperfil.setEdad(obtenEdad(cachedRowSet.getDate(8)));\n\t\t\t\tperfil.setIdEntidadNacimiento(cachedRowSet.getLong(9));\n\t\t\t\tperfil.setEntidadNacimiento(cachedRowSet.getString(10));\n\t\t\t\tperfil.setIdEstadoCivil(cachedRowSet.getLong(11));\n\t\t\t\tperfil.setIdTipoDiscapacidad(cachedRowSet.getLong(12));\n\t\t\t\tperfil.setConfidencialidad(cachedRowSet.getInt(13));\n\t\t\t\tperfil.setContactoCorreo(cachedRowSet.getInt(14));\n\t\t\t\tperfil.setContactoTelefono(cachedRowSet.getInt(15));\n\t\t\t\tperfil.setHoraContactoIni(cachedRowSet.getLong(16));\n\t\t\t\tperfil.setHoraContactoFin(cachedRowSet.getLong(17));\n\t\t\t\tperfil.setIdRecibeOferta(cachedRowSet.getInt(18));\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tperfil.setIdTrabaja(Utils.validarCandidatoEmpleadoActualmente(cachedRowSet.getInt(19)));\n\t\t\t\tperfil.setIdRazonBusqueda(Utils.validarCandidatoRazonBusqueda(perfil.getIdTrabaja(), cachedRowSet.getLong(20)));\n\t\t\t\tperfil.setInicioBusqueda(cachedRowSet.getDate(21));\n\t\t\t\tperfil.setCorreoElectronico(cachedRowSet.getString(22));\n\t\t\t\tperfil.setEstiloCV(cachedRowSet.getInt(23));\n\t\t\t\tperfil.setIdMedioPortal(cachedRowSet.getLong(24));\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\tlogger.error(e);\n\t\t\tthrow new SQLException(e);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tlogger.error(e);\n\t\t}\n\t\treturn perfil;\n\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "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 GestionBD(){\r\n\t\tlineConnection=SingleDBConnection.getConexionBD().conectarBD();\r\n\t}", "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 }", "private void valider() {\n\n\t\t/**\n\t\t * Renvoie un tableau de caractères qui sera transformé en chaine de caractère\n\t\t **/\n\n\t\tString passewordTraduit = new String(passeword.getPassword());\n\n\t\t/**\n\t\t * login.getText() récupère le contenu de la barre de saisie\n\t\t **/\n\t\t\n\t\tString user = login.getText();\n\t\tString passwd = passewordTraduit;\n\t\t/**\n\t\t *Permettra de savoir si la connexion à la BDD SQL c'est bien passée.\n\t\t */\n\t\tboolean reussite;\n\t\t/**\n\t\t * On va créer la BDD si elle n'existe pas\n\t\t */\n\t\t\n\t\treussite = Initialisation.getInstance().creerBDD(user, passwd);\n\t\t/**\n\t\t * On set le password et l'utilisateur pour que les paramètres de connexion soient les bons\n\t\t */\n\t\tInitialisation.getInstance().setPasswd(passwd);\n\t\tInitialisation.getInstance().setUser(user);\n\t\tModification.getInstance().setPasswd(passwd);\n\t\tModification.getInstance().setUser(user);\n\t\tif(reussite) {\n\t\t\t/**\n\t\t\t *Si tout c'est bien passé on regarde si l'utilisateur existe dans le fichier et dans le cas contraire on le crée.\n\t\t\t */\n\t\t\tif(personnesDejaInscrite.getInstance().getMaListDePersonneInscrite().get(user) == null) {\n\t\t\t\tpersonnesDejaInscrite.getInstance().getMaListDePersonneInscrite().put(user, new CompteAdministrateur(passwd));\n\t\t\t\tpersonnesDejaInscrite.getInstance().sauvegarder();\n\t\t\t}\n\t\t\tFenetreLogin.getInstance().dispose();\n\t\t\tFenetreFond.getInstance().changerFenetre(login.getText());\n\t\t\t/**\n\t\t\t *On remet les champs à nul pour que quand on se déconnecte on est pas le login et le mot de passe de l'utilisateur précédent.\n\t\t\t */\n\t\t\tlogin.setText(\"\");\n\t\t\tpasseword.setText(\"\");\n\t\t}\n\t\n\t}", "@Override\r\n\tpublic void inicializar() {\n\t\tproveedorDatamanager.setProveedorSearch(new Tcxpproveedor());\r\n\t\tproveedorDatamanager.getProveedorSearch().setTsyspersona(new Tsyspersona());\r\n\t\tproveedorDatamanager.setTipoIdColl(bunsysService.buscarObtenerCatalogos(proveedorDatamanager.getLoginDatamanager().getLogin().getPk().getCodigocompania(), ContenidoMessages.getInteger(\"cod_catalogo_tipoid_persona\")));\r\n\t\tproveedorDatamanager.setGrupoProvColl(bunsysService.buscarObtenerCatalogos(proveedorDatamanager.getLoginDatamanager().getLogin().getPk().getCodigocompania(), ContenidoMessages.getInteger(\"cod_catalogo_grupo_prov\")));\r\n\t\tproveedorDatamanager.setEstadoProvColl(bunsysService.buscarObtenerCatalogos(proveedorDatamanager.getLoginDatamanager().getLogin().getPk().getCodigocompania(), ContenidoMessages.getInteger(\"cod_catalogo_estado_persona\")));\r\n\t\tproveedorDatamanager.setProveedorComponente(new ProveedorComponent(proveedorDatamanager.getLoginDatamanager().getLogin().getPk().getCodigocompania()));\r\n\t}", "QuartoConsumo[] busca(Object dadoBusca, String coluna) throws SQLException;", "@Override\n public HashMap<String, ArrayList<ResultadoBusca>> efetuaLeitura(ArrayList<Produto> Produto) throws RemoteException {\n controle.setListaProdutos(Produto);\n //Dispara leitura e processamento\n controle.disparaPrograma();\n //classifica \n controle.classificaResultados();\n \n return controle.getHashResultado();\n }", "public CalMetasDTO leerRegistro() {\n/* */ try {\n/* 56 */ CalMetasDTO reg = new CalMetasDTO();\n/* 57 */ reg.setCodigoCiclo(this.rs.getInt(\"codigo_ciclo\"));\n/* 58 */ reg.setCodigoPlan(this.rs.getInt(\"codigo_plan\"));\n/* 59 */ reg.setCodigoMeta(this.rs.getInt(\"codigo_meta\"));\n/* 60 */ reg.setCodigoObjetivo(this.rs.getInt(\"codigo_objetivo\"));\n/* 61 */ reg.setDescripcion(this.rs.getString(\"descripcion\"));\n/* 62 */ reg.setJustificacion(this.rs.getString(\"justificacion\"));\n/* 63 */ reg.setValorMeta(this.rs.getDouble(\"valor_meta\"));\n/* 64 */ reg.setTipoMedicion(this.rs.getString(\"tipo_medicion\"));\n/* 65 */ reg.setFuenteDato(this.rs.getString(\"fuente_dato\"));\n/* 66 */ reg.setAplicaEn(this.rs.getString(\"aplica_en\"));\n/* 67 */ reg.setUnidadMedida(this.rs.getString(\"unidad_medida\"));\n/* 68 */ reg.setValorMinimo(this.rs.getDouble(\"valor_minimo\"));\n/* 69 */ reg.setValorMaximo(this.rs.getDouble(\"valor_maximo\"));\n/* 70 */ reg.setMes01(this.rs.getString(\"mes01\"));\n/* 71 */ reg.setMes02(this.rs.getString(\"mes02\"));\n/* 72 */ reg.setMes03(this.rs.getString(\"mes03\"));\n/* 73 */ reg.setMes04(this.rs.getString(\"mes04\"));\n/* 74 */ reg.setMes05(this.rs.getString(\"mes05\"));\n/* 75 */ reg.setMes06(this.rs.getString(\"mes06\"));\n/* 76 */ reg.setMes07(this.rs.getString(\"mes07\"));\n/* 77 */ reg.setMes08(this.rs.getString(\"mes08\"));\n/* 78 */ reg.setMes09(this.rs.getString(\"mes09\"));\n/* 79 */ reg.setMes10(this.rs.getString(\"mes10\"));\n/* 80 */ reg.setMes11(this.rs.getString(\"mes11\"));\n/* 81 */ reg.setMes12(this.rs.getString(\"mes12\"));\n/* 82 */ reg.setEstado(this.rs.getString(\"estado\"));\n/* 83 */ reg.setTipoGrafica(this.rs.getString(\"tipo_grafica\"));\n/* 84 */ reg.setFechaInsercion(this.rs.getString(\"fecha_insercion\"));\n/* 85 */ reg.setUsuarioInsercion(this.rs.getString(\"usuario_insercion\"));\n/* 86 */ reg.setFechaModificacion(this.rs.getString(\"fecha_modificacion\"));\n/* 87 */ reg.setUsuarioModificacion(this.rs.getString(\"usuario_modificacion\"));\n/* 88 */ reg.setNombreTipoMedicion(this.rs.getString(\"nombreTipoMedicion\"));\n/* 89 */ reg.setNombreEstado(this.rs.getString(\"nombreEstado\"));\n/* 90 */ reg.setNombreUnidadMedida(this.rs.getString(\"nombre_unidad_medida\"));\n/* */ \n/* */ try {\n/* 93 */ reg.setNumeroAcciones(this.rs.getInt(\"acciones\"));\n/* */ }\n/* 95 */ catch (Exception e) {}\n/* */ \n/* */ \n/* */ \n/* 99 */ return reg;\n/* */ }\n/* 101 */ catch (Exception e) {\n/* 102 */ e.printStackTrace();\n/* 103 */ Utilidades.writeError(\"CalPlanMetasFactory:leerRegistro \", e);\n/* */ \n/* 105 */ return null;\n/* */ } \n/* */ }", "public DAOImpl(String baseDatos, String usuario, String clave){\n this.baseDatos = baseDatos;\n this.usuario = usuario;\n this.clave = clave;\n }", "@Override\n\tpublic Map<String, Object> IngresarNeocomer(String correo, String password) {\n\t\tMap<String, Object> rpta = new HashMap<>();\n\t\tPersonas param = new Personas();\n\t\tPersonas rptapersonas = new Personas();\n\t\tRoles rolparam = new Roles();\n\t\tTrabajadores trabajadores = null;\n\t\ttrabajadores = tramapper.SelectByCorreoAndPassword(correo, password);\n\t\tif (trabajadores != null) {\n\t\t\tparam.setId_persona(trabajadores.getId_persona());\n\t\t\trptapersonas = permapper.SelectById(param);\n\t\t\trolparam.setId_rol(trabajadores.getId_rol());\n\t\t\trolparam = rolesmapper.SelectById(rolparam);\n\t\t\trpta.put(\"msgserver\", \"Welcome \" + rptapersonas.getNombres() + \" es UD. \" + rolparam.getDetalle());\n\t\t\trpta.put(\"Persona\", rptapersonas);\n\t\t} else {\n\t\t\trpta.put(\"msgserver\", \"Datos no Encontrados\");\n\t\t}\n\t\treturn rpta;\n\t}", "public DatoGeneralMinimo getEntityDatoGeneralMinimoGenerico(Connexion connexion,QueryWhereSelectParameters queryWhereSelectParameters,ArrayList<Classe> classes) throws SQLException,Exception { //Banco\r\n\t\tDatoGeneralMinimo datoGeneralMinimo= new DatoGeneralMinimo();\r\n\t\t\r\n\t\tBanco entity = new Banco();\r\n\t\t\t\t\r\n try {\t\t\t\r\n\t\t\tString sQuery=\"\";\r\n \t String sQuerySelect=\"\";\r\n\t\t\t\r\n\t\t\tStatement statement = connexion.getConnection().createStatement();\t\t\t\r\n\t\t\t\r\n\t\t\tif(!queryWhereSelectParameters.getSelectQuery().equals(\"\")) {\r\n\t\t\t\tsQuerySelect=queryWhereSelectParameters.getSelectQuery();\r\n\t\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\tif(!this.isForForeingKeyData) {\r\n\t\t\t\t\tsQuerySelect=BancoDataAccess.QUERYSELECTNATIVE;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tsQuerySelect=BancoDataAccess.QUERYSELECTNATIVEFORFOREINGKEY;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n \t sQuery=DataAccessHelper.buildSqlGeneralGetEntitiesJDBC(entity,BancoDataAccess.TABLENAME+\".\",queryWhereSelectParameters,sQuerySelect);\r\n\t\t\t\r\n\t\t\tif(Constantes2.ISDEVELOPING_SQL) {\r\n \tFunciones2.mostrarMensajeDeveloping(sQuery);\r\n }\r\n\t\t\t\r\n \t \tResultSet resultSet = statement.executeQuery(sQuery);//Tesoreria.Banco.isActive=1\r\n \t \r\n\t\t\t//ResultSetMetaData metadata = resultSet.getMetaData();\r\n \t \t\r\n \t \t//int iTotalCountColumn = metadata.getColumnCount();\r\n\t\t\t\t\r\n\t\t\t//if(queryWhereSelectParameters.getIsGetGeneralObjects()) {\r\n\t\t\t\tif(resultSet.next()) {\t\t\t\t\r\n\t\t\t\t\tfor(Classe classe:classes) {\r\n\t\t\t\t\t\tDataAccessHelperBase.setFieldDynamic(datoGeneralMinimo,classe,resultSet);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t/*\r\n\t\t\t\t\tint iIndexColumn = 1;\r\n\t\t\t\t \r\n\t\t\t\t\twhile(iIndexColumn <= iTotalCountColumn) {\r\n\t\t\t\t\t\t//arrayListObject.add(resultSet.getObject(iIndexColumn++));\r\n\t\t\t\t }\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t*/\r\n\t\t\t\t} else {\r\n\t\t\t\t\tentity =null;\r\n\t\t\t\t}\r\n\t\t\t//}\r\n\t\t\t\r\n\t\t\tif(entity!=null) {\r\n\t\t\t\t//this.setIsNewIsChangedFalseBanco(entity);\r\n\t\t\t}\r\n\t\t\t\r\n \t statement.close(); \r\n\t\t\r\n\t\t} \r\n\t\tcatch(Exception e) {\r\n\t\t\tthrow e;\r\n \t}\r\n\t\t\r\n \t//return entity;\t\r\n\t\t\r\n\t\treturn datoGeneralMinimo;\r\n }", "public ArrayList<AnuncioDTO> ObtenerAnunciosUsuario(String email){\n ArrayList<AnuncioDTO> ret = new ArrayList<AnuncioDTO>();\n try{\n Connection conect = getConection();\n Properties sqlProp = new Properties();\n InputStream is = new FileInputStream(sqlPropertiesPath);\n sqlProp.load(is);\n PreparedStatement ps = conect.prepareStatement(sqlProp.getProperty(\"getByEmailPropietario.Anuncio\"));\n ps.setString(1, email);\n ResultSet rs=ps.executeQuery();\n while(rs.next()){\n int id=rs.getInt(1);\n TipoAnuncio tipoAnuncio=TipoAnuncio.valueOf(rs.getString(2));\n String titulo = rs.getString(3);\n String cuerpo = rs.getString(4);\n Date fechaPublicacion = new Date(rs.getDate(5).getTime());\n Date fechaFin=null;\n if(tipoAnuncio.equals(TipoAnuncio.Flash)){\n fechaFin= new Date(rs.getDate(6).getTime());\n }\n String emailPropietario = rs.getString(7);\n EstadoAnuncio estadoAnuncio = EstadoAnuncio.valueOf(rs.getString(8));\n \n ArrayList<String>temas = null;\n if(tipoAnuncio.equals(TipoAnuncio.Tematico)){\n temas=new ArrayList<String>();\n ArrayList<String>temasId = null;\n temasId=new ArrayList<String>(Arrays.asList(rs.getString(9).split(\",\")));\n InteresesDAO interesesDAO = new InteresesDAO(sqlPropertiesPath);\n Hashtable<Integer,String> intereses = interesesDAO.DevolverIntereses();\n for(String interes : temasId){\n temas.add(intereses.get(Integer.parseInt(interes)));\n }\n }\n ArrayList<String> destinatarios= ObtenerDestinatariosAnuncio(id);\n AnuncioDTO anuncioDTO=new AnuncioDTO(id, tipoAnuncio, titulo, cuerpo, fechaPublicacion, fechaFin, emailPropietario, estadoAnuncio, temas,destinatarios);\n\n ret.add(anuncioDTO);\n }\n }catch(Exception e){\n e.printStackTrace();\n }\n return ret;\n }", "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}", "@Override\n\t/*Método que se va a utilizar cuando el usuario inicie sesión, para ver si los datos son o no correctos*/\n\tpublic String comprobarinicio(String nombreusuario, String clave) {\n\t\tDBConnection con = new DBConnection();\n\t\tString sql=\"Select * from usuarios where nombreusuario='\"+nombreusuario+\"'and clave='\"+clave+\"'\"; //búsqueda del usuario en la BD\n\t\tBoolean encontrado=false; //Booleano que indicará si el usuario está o no en la BD\n\t\ttry {\n\t\t\tStatement st = con.getConnection().createStatement(); \n\t\t\tResultSet rs = st.executeQuery(sql);\n\t\t\t/*De lo que devuelve la consulta, se va a coger el nombre de usuario y la clave (aunque no haya datos en ellos lo devuelve pero vacio)*/\n\t\t\twhile(rs.next()) {\n\t\t\tString nombre_usu= rs.getString(\"nombreusuario\");\n\t\t\tString pass= rs.getString(\"clave\");\n\t\t\t/*En caso de que los datos coincidan con los que se han pasado como parámetros desde el inicio de sesión, significará que los datos son correctos\n\t\t\t * y la variable encontrado cambia su valor para dejar constancia de que el usuario es correcto*/\n\t\t\tif(nombre_usu.equals(nombreusuario) && pass.equals(clave)) {\n\t\t\t\tencontrado=true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tst.close();\n\t\t\t//En caso del valor de encontrado, se devolverá ok (si se encuentra) o not ok (\"si no se encuentra\")\n\t\t\tif(encontrado) {\n\t\t\t\treturn \"ok\";\n\t\t\t}else {\n\t\t\t\treturn \"not ok\";\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}catch(Exception e) {\n\t\t\te.printStackTrace();\n return(e.getMessage());\n\t\t}finally {\n\t\t\tcon.desconectar();\n\t\t}\n\t\t\n\t\t\n\t}", "public void inicializarDatos(aplicacion.Usuario u){\n //Pestaña Informacion\n this.usuario=fa.obtenerUsuarioVivo(u.getIdUsuario());\n ModeloTablaBuenasAcciones mba;\n mba = (ModeloTablaBuenasAcciones) tablaBA.getModel();\n mba.setFilas(usuario.getBuenasAcciones());\n ModeloTablaPecados mp;\n mp = (ModeloTablaPecados) tablaPecados.getModel();\n mp.setFilas(usuario.getPecados());\n textoNombre.setText(usuario.getNombre());\n textoUsuario.setText(usuario.getNombreUsuario());\n textoContrasena.setText(usuario.getClave());\n textoLocalidad.setText(usuario.getLocalidad());\n textoFechaNacimiento.setText(String.valueOf(usuario.getFechaNacimiento()));\n //PestañaVenganzas\n ModeloTablaUsuarios mu;\n mu = (ModeloTablaUsuarios) tablaUsuarios.getModel();\n mu.setFilas(fa.consultarUsuariosMenos(usuario.getIdUsuario(), textoNombreBusqueda.getText()));\n ModeloTablaVenganzas mv;\n mv = (ModeloTablaVenganzas) tablaVenganzas.getModel();\n mv.setFilas(fa.listaVenganzas());\n }", "private void registroProcesado(InterfazParams interfazParams) {\n\t\tLong registrosProcesados = (Long) interfazParams.getQueryParams().get(\n\t\t\t\t\"registrosProcesados\");\n\t\tregistrosProcesados = new Long(registrosProcesados.longValue() + 1);\n\t\tinterfazParams.getQueryParams().put(\"registrosProcesados\",\n\t\t\t\tregistrosProcesados);\n\t}", "@Override\n public RspPermiso getPermisoPorIdPermiso(int idPermiso) {\n ConectorBDMySQL conectorBD = new ConectorBDMySQL();\n RspPermiso rspPermiso = new RspPermiso();\n //INICIALIZAR VARIABLES\n rspPermiso.setEsConexionAbiertaExitosamente(false);\n rspPermiso.setEsConexionCerradaExitosamente(false);\n rspPermiso.setEsSentenciaSqlEjecutadaExitosamente(false);\n //INTENTA ESTABLECER LA CONEXIÓN CON LA BASE DE DATOS\n if (conectorBD.iniciarConexion()) {\n rspPermiso.setEsConexionAbiertaExitosamente(true);\n rspPermiso.setRespuestaInicioDeConexion(conectorBD.getAtributosConector().getRespuestaInicioConexion());\n String consultaSQL = \"SELECT * FROM permiso WHERE estado = 1 AND id_permiso = '\" + idPermiso + \"'\";\n try {\n Statement sentencia = conectorBD.getConnection().createStatement();\n boolean bandera = sentencia.execute(consultaSQL);\n if (bandera) {\n ResultSet rs = sentencia.getResultSet();\n rspPermiso.setEsSentenciaSqlEjecutadaExitosamente(true);\n rspPermiso.setRespuestaServicio(utilidadSistema.imprimirConsulta(sentencia.toString(), \"getPermisoPorIdPermiso(int idPermiso)\", this.getClass().toString()));\n if (rs.next()) {\n Permiso permiso = new Permiso();\n permiso = rsPermiso(rs, permiso);\n rspPermiso.setPermiso(permiso);\n }\n }\n } catch (SQLException e) {\n rspPermiso.setRespuestaServicio(utilidadSistema.imprimirExcepcion(e, \"getPermisoPorIdPermiso(int idPermiso)\", this.getClass().toString()));\n } finally {\n if (conectorBD.cerrarConexion()) {\n rspPermiso.setEsConexionCerradaExitosamente(true);\n }\n rspPermiso.setRespuestaCierreDeConexion(conectorBD.getAtributosConector().getRespuestaCierreDeConexion());\n return rspPermiso;\n }\n } else {\n rspPermiso.setRespuestaInicioDeConexion(conectorBD.getAtributosConector().getRespuestaInicioConexion());\n return rspPermiso;\n }\n }", "public TblActividadFinanciamientoDet() {\n // Este lo usa Jpa para realizar los Mapping\n }", "public PosicionDTO consultarInformacionSatelite(){\n logger.debug(\"MensajeService::PosicionDTO()\");\n PosicionDTO posicionDTO = new PosicionDTO();\n CoordenadasDTO posiciones = asignarCoordenadas();\n if(posiciones != null){\n posicionDTO.setCoordenadasDTO(posiciones);\n List<String[]> mensajeSatelites = obtenerMensajes(listaNave);\n String mensaje = organizarMensaje(mensajeSatelites);\n posicionDTO.setMensaje(mensaje);\n return posicionDTO;\n }\n return posicionDTO;\n }", "@Override\n\tpublic Map<String, Object> datos(String username) {\n\t\tString SQL=\"select u.idusuario,p.nombre,p.apellidos,p.edad,p.telefono,p.correo,p.dni,r.nomrol from persona as p, usuario as u, trabajador as t,rol as r where u.idusuario=t.idusuario and t.idrol =r.idrol and p.idpersona =u.idpersona and u.username = ? \";\n\t\t\t\tMap<String,Object> map = jdbc.queryForMap(SQL,username);\n\t\treturn map;\n\t}", "Tablero consultarTablero();", "public void almacenoDatos(){\n BaseDatosSecundaria administrador= new BaseDatosSecundaria(this);\n SQLiteDatabase bdsecunadaria= administrador.getWritableDatabase();\n _valuesPedido.put(\"Producto\", this._productoNombre);\n _valuesPedido.put(\"Precio\",this._productoPrecio);\n _valuesPedido.put(\"Cantidad\",this._etAdquirir.getText().toString());\n _valuesPedido.put(\"Vendedor\",this.username);\n _valuesPedido.put(\"Id_Producto\",this._productoId);\n bdsecunadaria.insert(\"DATOS\",null,this._valuesPedido);\n bdsecunadaria.close();\n }", "public ExistenciaMaq generar(final String clave,final Date fecha, final Long almacenId);", "public FlujoDetalleDTO cargarRegistro(int codigoFlujo, int secuencia) {\n/* */ try {\n/* 201 */ String s = \"select t.codigo_flujo,t.secuencia,t.servicio_inicio,r1.descripcion as nombre_servicio_inicio,t.accion,t.codigo_estado,r3.descripcion as nombre_codigo_estado,t.servicio_destino,r4.descripcion as nombre_servicio_destino,t.nombre_procedimiento,t.correo_destino,t.enviar_solicitud,t.ind_mismo_proveedor,t.ind_mismo_cliente,t.estado,t.caracteristica,t.valor_caracteristica,t.caracteristica_correo,m5.descripcion as nombre_estado,c.DESCRIPCION nombre_caracteristica,cv.DESCRIPCION descripcion_valor,t.metodo_seleccion_proveedor,t.ind_correo_clientes,t.enviar_hermana,t.enviar_si_hermana_cerrada,t.ind_cliente_inicial,t.usuario_insercion,t.fecha_insercion,t.usuario_modificacion,t.fecha_modificacion from wkf_detalle t left join SERVICIOS r1 on (r1.CODIGO=t.servicio_inicio) left join ESTADOS r3 on (r3.codigo=t.codigo_estado) left join SERVICIOS r4 on (r4.CODIGO=t.servicio_destino) left join sis_multivalores m5 on (m5.tabla='ESTADO_REGISTRO' and m5.valor=t.estado) LEFT JOIN CARACTERISTICAS c ON (t.Caracteristica = c.CODIGO) LEFT JOIN CARACTERISTICAS_VALOR cv ON (t.CARACTERISTICA=cv.CARACTERISTICA AND t.VALOR_CARACTERISTICA = cv.VALOR) where t.codigo_flujo=\" + codigoFlujo + \" and t.secuencia=\" + secuencia + \"\";\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 243 */ boolean rtaDB = this.dat.parseSql(s);\n/* 244 */ if (!rtaDB) {\n/* 245 */ return null;\n/* */ }\n/* 247 */ this.rs = this.dat.getResultSet();\n/* 248 */ if (this.rs.next()) {\n/* 249 */ return leerRegistro();\n/* */ }\n/* */ }\n/* 252 */ catch (Exception e) {\n/* 253 */ e.printStackTrace();\n/* 254 */ Utilidades.writeError(\"FlujoDetalleDAO:cargarFlujoDetalle\", e);\n/* */ } \n/* 256 */ return null;\n/* */ }", "public void inicializaEntradas(){\n\t\tentrada = TipoMotivoEntradaEnum.getList();\n\t\tentrada.remove(0);\n\t}", "public void buscar() {\r\n sessionProyecto.getProyectos().clear();\r\n sessionProyecto.getFilterProyectos().clear();\r\n try {\r\n List<ProyectoCarreraOferta> proyectoCarreraOfertas = proyectoCarreraOfertaService.buscar(\r\n new ProyectoCarreraOferta(null, sessionProyecto.getCarreraSeleccionada().getId() != null\r\n ? sessionProyecto.getCarreraSeleccionada().getId() : null, null, Boolean.TRUE));\r\n \r\n if (proyectoCarreraOfertas == null) {\r\n return;\r\n }\r\n for (ProyectoCarreraOferta proyectoCarreraOferta : proyectoCarreraOfertas) {\r\n proyectoCarreraOferta.getProyectoId().setEstado(itemService.buscarPorId(proyectoCarreraOferta.getProyectoId().\r\n getEstadoProyectoId()).getNombre());\r\n proyectoCarreraOferta.getProyectoId().setCatalogo(itemService.buscarPorId(proyectoCarreraOferta.getProyectoId().\r\n getCatalogoProyectoId()).getNombre());\r\n proyectoCarreraOferta.getProyectoId().setTipo(itemService.buscarPorId(proyectoCarreraOferta.getProyectoId().\r\n getTipoProyectoId()).getNombre());\r\n proyectoCarreraOferta.getProyectoId().setAutores(autores(proyectoCarreraOferta.getProyectoId()));\r\n proyectoCarreraOferta.getProyectoId().setDirectores(directores(proyectoCarreraOferta.getProyectoId()));\r\n proyectoCarreraOferta.getProyectoId().setNombreOferta(ofertaAcademicaService.find(proyectoCarreraOferta.getOfertaAcademicaId()).getNombre());\r\n if (!this.sessionProyecto.getProyectos().contains(proyectoCarreraOferta.getProyectoId())) {\r\n proyectoCarreraOferta.getProyectoId().setCarrera(carreraService.find(proyectoCarreraOferta.getCarreraId()).getNombre());\r\n this.sessionProyecto.getProyectos().add(proyectoCarreraOferta.getProyectoId());\r\n }\r\n }\r\n sessionProyecto.setFilterProyectos(sessionProyecto.getProyectos());\r\n } catch (Exception e) {\r\n LOG.info(e.getMessage());\r\n }\r\n }", "public DatoGeneralMinimo getEntityDatoGeneralMinimoGenerico(Connexion connexion,QueryWhereSelectParameters queryWhereSelectParameters,ArrayList<Classe> classes) throws SQLException,Exception { //Empresa\r\n\t\tDatoGeneralMinimo datoGeneralMinimo= new DatoGeneralMinimo();\r\n\t\t\r\n\t\tEmpresa entity = new Empresa();\r\n\t\t\t\t\r\n try {\t\t\t\r\n\t\t\tString sQuery=\"\";\r\n \t String sQuerySelect=\"\";\r\n\t\t\t\r\n\t\t\tStatement statement = connexion.getConnection().createStatement();\t\t\t\r\n\t\t\t\r\n\t\t\tif(!queryWhereSelectParameters.getSelectQuery().equals(\"\")) {\r\n\t\t\t\tsQuerySelect=queryWhereSelectParameters.getSelectQuery();\r\n\t\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\tif(!this.isForForeingKeyData) {\r\n\t\t\t\t\tsQuerySelect=EmpresaDataAccess.QUERYSELECTNATIVE;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tsQuerySelect=EmpresaDataAccess.QUERYSELECTNATIVEFORFOREINGKEY;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n \t sQuery=DataAccessHelper.buildSqlGeneralGetEntitiesJDBC(entity,EmpresaDataAccess.TABLENAME+\".\",queryWhereSelectParameters,sQuerySelect);\r\n\t\t\t\r\n\t\t\tif(Constantes2.ISDEVELOPING_SQL) {\r\n \tFunciones2.mostrarMensajeDeveloping(sQuery);\r\n }\r\n\t\t\t\r\n \t \tResultSet resultSet = statement.executeQuery(sQuery);//Seguridad.Empresa.isActive=1\r\n \t \r\n\t\t\t//ResultSetMetaData metadata = resultSet.getMetaData();\r\n \t \t\r\n \t \t//int iTotalCountColumn = metadata.getColumnCount();\r\n\t\t\t\t\r\n\t\t\t//if(queryWhereSelectParameters.getIsGetGeneralObjects()) {\r\n\t\t\t\tif(resultSet.next()) {\t\t\t\t\r\n\t\t\t\t\tfor(Classe classe:classes) {\r\n\t\t\t\t\t\tDataAccessHelperBase.setFieldDynamic(datoGeneralMinimo,classe,resultSet);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t/*\r\n\t\t\t\t\tint iIndexColumn = 1;\r\n\t\t\t\t \r\n\t\t\t\t\twhile(iIndexColumn <= iTotalCountColumn) {\r\n\t\t\t\t\t\t//arrayListObject.add(resultSet.getObject(iIndexColumn++));\r\n\t\t\t\t }\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t*/\r\n\t\t\t\t} else {\r\n\t\t\t\t\tentity =null;\r\n\t\t\t\t}\r\n\t\t\t//}\r\n\t\t\t\r\n\t\t\tif(entity!=null) {\r\n\t\t\t\t//this.setIsNewIsChangedFalseEmpresa(entity);\r\n\t\t\t}\r\n\t\t\t\r\n \t statement.close(); \r\n\t\t\r\n\t\t} \r\n\t\tcatch(Exception e) {\r\n\t\t\tthrow e;\r\n \t}\r\n\t\t\r\n \t//return entity;\t\r\n\t\t\r\n\t\treturn datoGeneralMinimo;\r\n }", "public Antecedentes getData(long dni) {\n\n\t\t\tMapSqlParameterSource params = new MapSqlParameterSource();\n\t\t\tparams.addValue(\"dni\", dni);\n\t\t\t\n\n\t\t \n\t\t\ttry {\n\t\t\t\treturn jdbc.queryForObject(\"select * from antecedentes where dni = :dni \", params, new RowMapper<Antecedentes>() {\n\t\t\n\t\t\t\t\t\t\tpublic Antecedentes mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tAntecedentes antecedentes = new Antecedentes();\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tantecedentes.setDni(rs.getBigDecimal(\"dni\"));\n\t\t\t\t\t\t\t\tantecedentes.setBecario(rs.getString(\"becario\"));\n\t\t\t\t\t\t\t\tantecedentes.setTesista_doctoral(rs.getString(\"tesista_doctoral\"));\n\t\t\t\t\t\t\t\tantecedentes.setTesista_maestria(rs.getString(\"tesista_maestria\"));\n\t\t\t\t\t\t\t\tantecedentes.setTesista_grado(rs.getString(\"tesista_grado\"));\n\t\t\t\t\t\t\t\tantecedentes.setInvestigadores(rs.getString(\"investigadores\"));\n\t\t\t\t\t\t\t\tantecedentes.setPasantes_id_y_facademica(rs.getString(\"pasantes_id_y_facademica\"));\n\t\t\t\t\t\t\t\tantecedentes.setPersonal_apoyo_id(rs.getString(\"personal_apoyo_id\"));\n\t\t\t\t\t\t\t\tantecedentes.setFinanciamiento_cientifico_tecnologico(rs.getString(\"financiamiento_cientifico_tecnologico\"));\n\t\t\t\t\t\t\t\tantecedentes.setActividades_divulgacion(rs.getString(\"actividades_divulgacion\"));\n\t\t\t\t\t\t\t\tantecedentes.setExtension_rural_industrial(rs.getString(\"extension_rural_industrial\"));\n\t\t\t\t\t\t\t\tantecedentes.setPrestacion_servicios_sociales(rs.getString(\"prestacion_servicios_sociales\"));\n\t\t\t\t\t\t\t\tantecedentes.setProduccion_divulgacion_artistica(rs.getString(\"produccion_divulgacion_artistica\"));\n\t\t\t\t\t\t\t\tantecedentes.setOtro_tipo_actividad(rs.getString(\"otro_tipo_actividad\"));\n\t\t\t\t\t\t\t\tantecedentes.setEvaluacion_personal(rs.getString(\"evaluacion_personal\"));\n\t\t\t\t\t\t\t\tantecedentes.setEvaluacion_programas(rs.getString(\"evaluacion_programas\"));\n\t\t\t\t\t\t\t\tantecedentes.setEvaluacion_institucional(rs.getString(\"evaluacion_institucional\"));\n\t\t\t\t\t\t\t\tantecedentes.setOtro_tipo_evaluacion(rs.getString(\"otro_tipo_evaluacion\"));\n\t\t\t\t\t\t\t\tantecedentes.setBecas(rs.getString(\"becas\"));\n\t\t\t\t\t\t\t\tantecedentes.setEstancias_pasantias(rs.getString(\"estancias_pasantias\"));\n\t\t\t\t\t\t\t\tantecedentes.setOperacion_mantenimiento(rs.getString(\"operacion_mantenimiento\"));\n\t\t\t\t\t\t\t\tantecedentes.setProduccion(rs.getString(\"produccion\"));\n\t\t\t\t\t\t\t\tantecedentes.setNormalizacion(rs.getString(\"normalizacion\"));\n\t\t\t\t\t\t\t\tantecedentes.setEjercicio_profesion_ambito_no_academico(rs.getString(\"ejercicio_profesion_ambito_no_academico\"));\n\t\t\t\t\t\t\t\tantecedentes.setOtra_actividad_cyt(rs.getString(\"otra_actividad_cyt\"));\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\treturn antecedentes;\n\t\t\t\t\t\t\t}\n\t\t\n\t\t\t\t\t\t});\n\t\t\t}\n\t\t\t catch(EmptyResultDataAccessException erdae) {\n\t\t\t\t System.out.println(\"en antecedentesDAO devuelve null\");\n\t\t\t return null;\n\t\t\t }\n\t\t}", "@Override\n public RspPermiso getPermisoPorTraza(String traza) {\n ConectorBDMySQL conectorBD = new ConectorBDMySQL();\n RspPermiso rspPermiso = new RspPermiso();\n //INICIALIZAR VARIABLES\n rspPermiso.setEsConexionAbiertaExitosamente(false);\n rspPermiso.setEsConexionCerradaExitosamente(false);\n rspPermiso.setEsSentenciaSqlEjecutadaExitosamente(false);\n //INTENTA ESTABLECER LA CONEXIÓN CON LA BASE DE DATOS\n if (conectorBD.iniciarConexion()) {\n rspPermiso.setEsConexionAbiertaExitosamente(true);\n rspPermiso.setRespuestaInicioDeConexion(conectorBD.getAtributosConector().getRespuestaInicioConexion());\n String consultaSQL = \"SELECT * FROM permiso WHERE estado = 1 AND traza = '\" + traza + \"'\";\n try {\n Statement sentencia = conectorBD.getConnection().createStatement();\n boolean bandera = sentencia.execute(consultaSQL);\n if (bandera) {\n ResultSet rs = sentencia.getResultSet();\n rspPermiso.setEsSentenciaSqlEjecutadaExitosamente(true);\n rspPermiso.setRespuestaServicio(utilidadSistema.imprimirConsulta(sentencia.toString(), \"getPermisoPorTraza(String traza)\", this.getClass().toString()));\n if (rs.next()) {\n Permiso permiso = new Permiso();\n permiso = rsPermiso(rs, permiso);\n rspPermiso.setPermiso(permiso);\n }\n }\n } catch (SQLException e) {\n rspPermiso.setRespuestaServicio(utilidadSistema.imprimirExcepcion(e, \"getPermisoPorTraza(String traza)\", this.getClass().toString()));\n } finally {\n if (conectorBD.cerrarConexion()) {\n rspPermiso.setEsConexionCerradaExitosamente(true);\n }\n rspPermiso.setRespuestaCierreDeConexion(conectorBD.getAtributosConector().getRespuestaCierreDeConexion());\n return rspPermiso;\n }\n } else {\n rspPermiso.setRespuestaInicioDeConexion(conectorBD.getAtributosConector().getRespuestaInicioConexion());\n return rspPermiso;\n }\n }", "@Override\n\t@SuppressWarnings(\"unchecked\")\n\tpublic Usuario iniciarSesion(String identificacion, String clave) throws Exception {\n\t\tList<Usuario> lista = new ArrayList<>();\n\n\t\tString sql = \"select u.* from usuario as u inner join empleado as e \"\n\t\t\t\t+ \"on u.id = e.id where e.identificacion = :identificacion and u.clave = :clave ;\";\n\n\t\tQuery query = entityManager.createNativeQuery(sql, Usuario.class);\n\n\t\tquery.setParameter(\"identificacion\", identificacion);\n\t\tquery.setParameter(\"clave\", clave);\n\n\t\tlista = (List<Usuario>) query.getResultList();\n\n\t\tUsuario usuario = null;\n\n\t\t// Nos aseguramos que exista un valor para retornar\n\t\tif (lista != null && !lista.isEmpty()) {\n\t\t\tusuario = lista.get(0);\n\t\t}\n\n\t\treturn usuario;\n\t}", "@Override\n\tpublic List<AlmacenDTO> listarEntrada() {\n\t\tList<AlmacenDTO> data = new ArrayList<AlmacenDTO>();\n\t\tAlmacenDTO obj = null;\n\t\tConnection cn = null;\n\t\tPreparedStatement pstm = null;\n\t\tResultSet rs = null;\n\t\ttry {\n\t\t\tcn = new MySqlDbConexion().getConexion();\n\t\t\tString sql = \"select me.codigo_entrada,p.nombre_producto,me.cantidad_entrada,me.fecha_entrada\\r\\n\" + \n\t\t\t\t\t\"from material_entrada me inner join producto p on me.codigo_producto=p.codigo_producto\";\n\n\t\t\tpstm = cn.prepareStatement(sql);\n\t\t\trs = pstm.executeQuery();\n\t\t\twhile (rs.next()) {\n\t\t\t\tobj = new AlmacenDTO();\n\t\t\t\tobj.setCodigo_entrada(rs.getInt(1));\n\t\t\t\tobj.setNombre_producto(rs.getString(2));\n\t\t\t\tobj.setCantidad_entrada(rs.getInt(3));\n\t\t\t\tobj.setFecha_entrada(rs.getDate(4));\n\n\t\t\t\tdata.add(obj);\n\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn data;\n\t}", "public Conserto buscarCodigo(int codigo) throws SQLException{\r\n Conserto conserto = null;\r\n conecta = FabricaConexao.conexaoBanco();\r\n sql = \"select * from conserto join carro on carchassi = concarchassi join modelo on oficodigo = conoficodigo where concodigo = ? \";\r\n pstm = conecta.prepareStatement(sql);\r\n pstm.setInt(1, codigo);\r\n rs = pstm.executeQuery();\r\n \r\n if(rs.next()){\r\n conserto = new Conserto();\r\n conserto.setCodigo(rs.getInt(\"concodigo\"));\r\n conserto.setDataEntrada(rs.getDate(\"condataentrada\"));\r\n conserto.setDataSaida(rs.getDate(\"condatasaida\"));\r\n \r\n //instanciando o carro\r\n Carro carro = new Carro();\r\n carro.setChassi(rs.getString(\"carchassi\"));\r\n carro.setPlaca(rs.getString(\"carplaca\"));\r\n carro.setAno(rs.getInt(\"carano\"));\r\n carro.setCor(rs.getString(\"carcor\"));\r\n carro.setStatus(rs.getInt(\"carstatus\"));\r\n conserto.setCarro(carro);\r\n \r\n //instanciando a oficina\r\n Oficina oficina = new Oficina();\r\n oficina.setCodigo(rs.getInt(\"oficodigo\"));\r\n oficina.setNome(rs.getString(\"ofinome\"));\r\n conserto.setOficina(oficina);\r\n }\r\n FabricaConexao.fecharConexao();\r\n \r\n return conserto;\r\n }", "public ArrayList<AnuncioDTO> ObtenerAnuncios(){\n ArrayList<AnuncioDTO> ret=new ArrayList<AnuncioDTO>();\n\n try{\n Connection conect = getConection();\n Properties sqlProp = new Properties();\n InputStream is = new FileInputStream(sqlPropertiesPath);\n sqlProp.load(is);\n PreparedStatement ps = conect.prepareStatement(sqlProp.getProperty(\"getAll.Anuncio\"));\n ResultSet rs = ps.executeQuery();\n while(rs.next()){\n int id=rs.getInt(1);\n TipoAnuncio tipoAnuncio=TipoAnuncio.valueOf(rs.getString(2));\n String titulo = rs.getString(3);\n String cuerpo = rs.getString(4);\n Date fechaPublicacion = new Date(rs.getDate(5).getTime());\n Date fechaFin=null;\n if(tipoAnuncio.equals(TipoAnuncio.Flash)){\n fechaFin= new Date(rs.getDate(6).getTime());\n }\n String emailPropietario = rs.getString(7);\n EstadoAnuncio estadoAnuncio = EstadoAnuncio.valueOf(rs.getString(8));\n \n ArrayList<String>temas=null;\n if(tipoAnuncio.equals(TipoAnuncio.Tematico)){\n temas=new ArrayList<String>();\n ArrayList<String>temasId = null;\n temasId=new ArrayList<String>(Arrays.asList(rs.getString(9).split(\",\")));\n InteresesDAO interesesDAO = new InteresesDAO(sqlPropertiesPath);\n Hashtable<Integer,String> intereses = interesesDAO.DevolverIntereses();\n for(String interes : temasId){\n temas.add(intereses.get(Integer.parseInt(interes)));\n }\n\n }\n ArrayList<String>destinatarios = ObtenerDestinatariosAnuncio(id);\n AnuncioDTO anuncioDTO=new AnuncioDTO(id, tipoAnuncio, titulo, cuerpo, fechaPublicacion, fechaFin, emailPropietario, estadoAnuncio, temas,destinatarios);\n\n ret.add(anuncioDTO);\n }\n }catch(Exception e){\n e.printStackTrace();\n }\n return ret;\n }", "@Override\n public ArrayList<Endereco> buscar() {\n PreparedStatement stmt;\n ResultSet rs;\n ArrayList<Endereco> arrayEndereco = new ArrayList<>();\n try {\n \n stmt = ConexaoBD.conectar().prepareStatement(\"SELECT * FROM Endereco\");\n rs = stmt.executeQuery();\n \n \n while (rs.next()) {\n Endereco endereco = new Endereco();\n endereco.setCodigo(rs.getInt(\"CODIGOENDERECO\"));\n endereco.setRua(rs.getString(\"RUA\"));\n endereco.setNumero(rs.getString(\"NUMERO\"));\n endereco.setBairro(rs.getString(\"BAIRRO\"));\n endereco.setCidade(rs.getString(\"CIDADE\"));\n arrayEndereco.add(endereco);\n }\n \n \n } catch (SQLException ex) {\n Logger.getLogger(FuncionarioDAO.class.getName()).log(Level.SEVERE, null, ex);\n }\n return arrayEndereco; \n }", "@PostConstruct\r\n public void iniciar() {\n notaEntrada.setIdnotaentrada(0);\r\n notaEntrada.setOrdenCompra(new OrdenCompra());\r\n notaEntrada.setNumero(maxNumero() + 1);\r\n notaEntrada.setFechaReg(new Date());\r\n notaEntrada.setFechaDocref(null);\r\n notaEntrada.setNroDocref(\"\");\r\n notaEntrada.setObservacion(\"\");\r\n notaEntrada.setTipoIngreso(\"\");\r\n notaEntrada.setProveedor(new Proveedor());\r\n notaEntrada.setAlmacenDestino(new Almacen());\r\n listNotaEntradaDetalle.clear();\r\n this.producto = null;\r\n }", "public ResultSet getEntradas() {\n\n\t\ttry {\n\t\t\tConnection conexion = DriverManager.getConnection(\"jdbc:mysql://localhost/keyring\", \"root\" ,\"\");\n\t\t\tStatement sql = conexion.createStatement();\n\t\t\tResultSet resultado = sql.executeQuery(\"SELECT Id, Titulo, Usuario, Password, URL, Nota FROM entrada\");\n\n\t\t\treturn resultado;\n\t\t\t/*\t\t\tif (resultado.next()) {\n\t\t\t\treturn resultado;\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn null;\n\t\t\t}\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\treturn null;\n\t\t}\n\t}", "Persistencia() {\n\t}", "@Override\n public Asesor getAsesorId(int idUsuarioSistema){\n Asesor asesor = null;\n ConexionSQL conexionSql = new ConexionSQL();\n Connection conexion = conexionSql.getConexion();\n try{\n PreparedStatement orden = conexion.prepareStatement(\"select * from asesor where idUsuarioSistema =?\");\n orden.setInt(1, idUsuarioSistema);\n ResultSet resultadoConsulta = orden.executeQuery();\n if(resultadoConsulta.first()){\n String nombre;\n String idioma;\n String correo;\n String telefono;\n String numeroPersonal;\n nombre = resultadoConsulta.getString(4) +\" \"+ resultadoConsulta.getString(6) +\" \"+ resultadoConsulta.getString(5);\n idioma = resultadoConsulta.getString(2);\n telefono = resultadoConsulta.getString(8);\n correo = resultadoConsulta.getString(7);\n numeroPersonal = resultadoConsulta.getString(1);\n asesor = new Asesor(numeroPersonal, nombre, idioma,telefono,correo);\n }else{\n Logger logger = Logger.getLogger(\"Logger\");\n logger.log(Level.WARNING, \"No se encuentra el asesor\");\n }\n }catch(SQLException | NullPointerException excepcion){\n Logger logger = Logger.getLogger(\"Logger\");\n logger.log(Level.WARNING, \"La conexión podría ser nula | la sentencia SQL esta mal\");\n }\n return asesor;\n }", "@Override\n\tpublic void search() {\n\t\tSystem.out.println(\"Mysql DB 서버에 접속해서 조회를 하다.\");\n\t}", "public List<tipoDetalle> obtenerDetallesBD(){\n List<tipoDetalle> detalles=new ArrayList<>();\n try{\n //Obteniendo el ID del auto desde la activity de Mostrar_datos\n String idAuto;\n Bundle extras=getIntent().getExtras();\n if(extras!=null)\n {\n idAuto=extras.getString(\"id_auto\");\n Log.e(\"auto\",\"el auto id es= \"+idAuto);\n ResultSet rs = (ResultSet) TNT.mostrarDetalles(idAuto);\n while (rs.next()){\n detalles.add(new tipoDetalle(rs.getString(\"id\"), rs.getString(\"nombre\"), rs.getString(\"fecha_entrada\"), rs.getString(\"fecha_salida\"), rs.getString(\"fecha_terminacion\"), rs.getString(\"estado\"), rs.getString(\"descripcion\"), rs.getString(\"costo\")));\n }\n }\n }catch(SQLException e){\n Toast.makeText(getApplicationContext(),e.getMessage(),Toast.LENGTH_SHORT).show();\n }\n return detalles;\n }", "public Cliente buscarCliente(int codigo) {\n Cliente cliente =new Cliente();\n try{\n\t\tString seleccion = \"SELECT codigo, nit, email, pais, fecharegistro, razonsocial, \"\n + \"idioma, categoria FROM clientes where codigo=? \";\n\t\tPreparedStatement ps = con.prepareStatement(seleccion);\n ps.setInt(1, codigo);\n\t\tSavepoint sp1 = con.setSavepoint(\"SAVE_POINT_ONE\");\n\t\tResultSet rs = ps.executeQuery();\n\t\tcon.commit();\n\t\twhile(rs.next()){\n cliente.setCodigo(rs.getInt(\"codigo\"));\n cliente.setNit(rs.getString(\"nit\"));\n cliente.setEmail(rs.getString(\"email\"));\n cliente.setPais(rs.getString(\"pais\"));\n cliente.setFechaRegistro(rs.getDate(\"fecharegistro\"));\n cliente.setRazonSocial(rs.getString(\"razonsocial\"));\n cliente.setIdioma(rs.getString(\"idioma\"));\n cliente.setCategoria(rs.getString(\"categoria\")); \n\t\t} \n }catch(Exception e){\n System.out.println(e.getMessage());\n e.printStackTrace();\n }\n return cliente;\n\t}", "ParqueaderoEntidad agregar(String nombre);", "public RespuestaDTO registrarUsuario(Connection conexion, UsuarioDTO usuario) throws SQLException {\n PreparedStatement ps = null;\n ResultSet rs = null;\n int nRows = 0;\n StringBuilder cadSQL = null; //para crear el ddl \n RespuestaDTO registro = null;\n \n try {\n registro = new RespuestaDTO();\n System.out.println(\"usuario----\" + usuario.toStringJson());\n cadSQL = new StringBuilder();\n cadSQL.append(\" INSERT INTO usuario(usua_correo, usua_usuario,tius_id, usua_clave)\");\n cadSQL.append(\" VALUES (?, ?, ?, SHA2(?,256)) \");\n \n ps = conexion.prepareStatement(cadSQL.toString(), Statement.RETURN_GENERATED_KEYS);\n \n AsignaAtributoStatement.setString(1, usuario.getCorreo(), ps);// se envian los datos a los ?, el orden importa mucho\n AsignaAtributoStatement.setString(2, usuario.getUsuario(), ps);\n AsignaAtributoStatement.setString(3, usuario.getIdTipoUsuario(), ps);\n AsignaAtributoStatement.setString(4, usuario.getClave(), ps);\n \n nRows = ps.executeUpdate(); // ejecuta el proceso\n if (nRows > 0) { //nRows es el numero de filas que hubo de movimiento, es decir si hizo el registro, con este if se sabe\n rs = ps.getGeneratedKeys(); // esto se usa para capturar el id recien ingresado en caso de necesitarlo despues\n if (rs.next()) {\n registro.setRegistro(true);\n registro.setIdResgistrado(rs.getString(1)); // guardo el id en en este atributo del objeto\n\n }\n // cerramos los rs y ps\n ps.close();\n ps = null;\n rs.close();\n rs = null;\n }\n } catch (SQLException se) {\n LoggerMessage.getInstancia().loggerMessageException(se);\n return null;\n }\n return registro;\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 }", "@Override\n public ArrayList<Propiedad> getPropiedadesCliente() throws SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ESTADO \"\n + \"= 'Activo'\");\n return resultado;\n }", "public CalMetasDTO cargarRegistro(int codigoCiclo, int codigoPlan, int codigoMeta) {\n/* */ try {\n/* 416 */ String s = \"select m.*,\";\n/* 417 */ s = s + \"tm.descripcion as nombreTipoMedicion,\";\n/* 418 */ s = s + \"est.descripcion as nombreEstado,\";\n/* 419 */ s = s + \"Um.Descripcion as nombre_unidad_medida\";\n/* 420 */ s = s + \" from cal_plan_metas m,sis_multivalores tm,sis_multivalores est,Sis_Multivalores Um\";\n/* 421 */ s = s + \" where \";\n/* 422 */ s = s + \" m.tipo_medicion =tm.valor\";\n/* 423 */ s = s + \" and tm.tabla='CAL_TIPO_MEDICION'\";\n/* 424 */ s = s + \" and m.estado =est.valor\";\n/* 425 */ s = s + \" and est.tabla='CAL_ESTADO_META'\";\n/* 426 */ s = s + \" and m.Unidad_Medida = Um.Valor\";\n/* 427 */ s = s + \" and Um.Tabla = 'CAL_UNIDAD_MEDIDA_META'\";\n/* 428 */ s = s + \" and m.codigo_ciclo=\" + codigoCiclo;\n/* 429 */ s = s + \" and m.codigo_plan=\" + codigoPlan;\n/* 430 */ s = s + \" and m.codigo_meta=\" + codigoMeta;\n/* 431 */ boolean rtaDB = this.dat.parseSql(s);\n/* 432 */ if (!rtaDB) {\n/* 433 */ return null;\n/* */ }\n/* */ \n/* 436 */ this.rs = this.dat.getResultSet();\n/* 437 */ if (this.rs.next()) {\n/* 438 */ return leerRegistro();\n/* */ }\n/* */ }\n/* 441 */ catch (Exception e) {\n/* 442 */ e.printStackTrace();\n/* 443 */ Utilidades.writeError(\"CalPlanMetasFactory:cargarCalMetas \", e);\n/* */ } \n/* 445 */ return null;\n/* */ }", "public void setContrasena(String contrasena) {this.contrasena = contrasena;}", "private void limpiarDatos() {\n\t\t\n\t}", "@Transactional\n public void llenarTabla(ResultSet rs){\n if (rs==null) {\n System.out.println(\"el rs vino vacio\");\n }\n try {\n while (rs.next()) {\n //para cada fila de la consulta creo un pedido\n PedidoMaterial pedido = new PedidoMaterial();\n System.out.println(\"empezamos\");\n pedido.setId(rs.getInt(1));\n pedido.setNumeroPedido(rs.getInt(2));\n pedido.setNotaDeVenta(rs.getInt(3));\n pedido.setDescripProyecto(rs.getString(4));\n pedido.setCliente(rs.getString(5));\n pedido.setCantidadPedida(rs.getLong(6));\n pedido.setCantidadModificada(rs.getLong(7));\n Calendar fecha = Calendar.getInstance();\n fecha.setTime(rs.getDate(8));\n pedido.setUltimaActualizacionDespiece(fecha);\n pedido.setArticulo(rs.getString(9));\n pedido.setAriCod(rs.getString(10));\n pedido.setArea(rs.getString(11));\n pedido.setUnidadOrg(rs.getInt(12));\n pedido.setTarea(rs.getString(13));\n pedido.setCantidadAPD(rs.getLong(14));\n if (rs.getDate(15) != null) {\n fecha.setTime(rs.getDate(15));\n pedido.setFechaAsignacion(fecha); \n }\n pedido.setCantidadFinalP(rs.getLong(16));\n pedido.setCantidadRealU(rs.getLong(17));\n pedido.setTareaCod(rs.getInt(18));\n fecha.setTime(rs.getDate(19));\n pedido.setFechaUti(fecha);\n fecha.setTime(rs.getDate(20));\n pedido.setFechaFinUtili(fecha);\n \n guardarPedido(pedido);\n \n \n }\n } catch (SQLException ex) {\n \n System.out.println(ex.toString());\n }\n }", "@SuppressWarnings(\"deprecation\")\n\tpublic void inicializaBD() {\n\t\t\n\t\t/*Registros de Orden*/\n\t\tint n1=1;\n\t\tString p1=\"Taco Azteca\", p2=\"Sopa\";\n\t\tjava.util.Date utilDate = new java.util.Date();\n\t\tjava.util.Date utilDate1 = new java.util.Date();\n\t\tutilDate.setMonth(1);\n\t\tutilDate.setYear(119);\n\t\tutilDate.setMinutes(1);\n\t\tutilDate1.setMonth(1);\n\t\tutilDate1.setYear(119);\n\t\tutilDate1.setMinutes(59);\n\t\tlong lnMilisegundos = utilDate.getTime();\n\t\tlong lnMilisegundos1 = utilDate1.getTime()+10;\n\t\tTimestamp fecha1= new Timestamp(lnMilisegundos);\n\t\tTimestamp fecha2 = new Timestamp(lnMilisegundos+9999999);\n\t\tTimestamp fecha3= new Timestamp(lnMilisegundos1);\n\t\tTimestamp fecha4 = new Timestamp(lnMilisegundos1+999999);\n\t\tOrden orden1 = new Orden(n1,p1, fecha1, fecha2, 60, 3);\n\t\tOrden orden2 = new Orden(n1,p2, fecha3, fecha4, 30, 3);\n\t\torden1.setEstado(3);\n\t\torden2.setEstado(3);\n\t\tordenRepository.save(orden1);\n\t\tordenRepository.save(orden2);\n\t\t\n\t\t/*Registros de producto*/\n\t\tProducto producto1 = new Producto();\n\t\tproducto1.setFecha(\"2020-05-10\");\n\t\tproducto1.setNombreProducto(\"Chiles Verdes\");\n\t\tproducto1.setDescripcion(\"Bolsas de 1 kg de Chiles\");\n\t\tproducto1.setCantidad(15);\n\t\tproducto1.setMinimo(20);\n\t\tproductoRepository.save(producto1);\n\t\t\n\t\tProducto producto2 = new Producto();\n\t\tproducto2.setFecha(\"2020-10-05\");\n\t\tproducto2.setNombreProducto(\"Papas\");\n\t\tproducto2.setDescripcion(\"Costal de 32 Kg de papas\");\n\t\tproducto2.setCantidad(58);\n\t\tproducto2.setMinimo(10);\n\t\tproductoRepository.save(producto2);\n\t\t\n\t\tProducto producto3 = new Producto();\n\t\tproducto3.setFecha(\"2020-10-20\");\n\t\tproducto3.setNombreProducto(\"Frijoles\");\n\t\tproducto3.setDescripcion(\"Costales de 13 kg de Frijoles\");\n\t\tproducto3.setCantidad(2);\n\t\tproducto3.setMinimo(20);\n\t\tproductoRepository.save(producto3);\n\t\t\n\t\tProducto producto4 = new Producto();\n\t\tproducto4.setFecha(\"2020-08-16\");\n\t\tproducto4.setNombreProducto(\"Sopa de fideo\");\n\t\tproducto4.setDescripcion(\"Bolsas de 500g de sopa de fideo\");\n\t\tproducto4.setCantidad(8);\n\t\tproducto4.setMinimo(10);\n\t\tproductoRepository.save(producto4);\n\t\t\n\t\t//Registro de recordatorio\n\t\tRecordatorio recordatorio = new Recordatorio();\n\t\trecordatorio.setId(1);\n\t\trecordatorio.setInfo(\"1. A partir de mañana se empezará a ofrecer los \\n\"\n\t\t\t\t+ \"beneficios para los clientes preferenciales\\n\"\n\t\t\t\t+ \"2. Los empleados que no se han registrado para \\n\"\n\t\t\t\t+ \"algo algotienen hasta el 25 de Julio para \\n\"\n\t\t\t\t+ \"registrarse.\");\n\t\trecordatorioRepository.save(recordatorio);\n\t\t\n\t\t//Registro empleados\n\t\tEmpleado empleado1 = new Empleado();\n\t\templeado1.setNombre(\"Paola\");\n\t\templeado1.setApellidos(\"Aguillón\");\n\t\templeado1.setEdad(24);\n\t\templeado1.setSueldo(2120.50);\n\t\templeado1.setOcupacion(\"Mesera\");\n\t\templeadoRepository.save(empleado1);\n\t\t\n\t\tEmpleado empleado2 = new Empleado();\n\t\templeado2.setNombre(\"Jorge\");\n\t\templeado2.setApellidos(\"Luna\");\n\t\templeado2.setEdad(20);\n\t\templeado2.setSueldo(2599.50);\n\t\templeado2.setOcupacion(\"Cocinero\");\n\t\templeadoRepository.save(empleado2);\n\t\t\n\t\tEmpleado empleado3 = new Empleado();\n\t\templeado3.setNombre(\"Mariana\");\n\t\templeado3.setApellidos(\"Mendoza\");\n\t\templeado3.setEdad(32);\n\t\templeado3.setSueldo(1810.80);\n\t\templeado3.setOcupacion(\"Ayudante general\");\n\t\templeadoRepository.save(empleado3);\n\t\t\n\t\tEmpleado empleado4 = new Empleado();\n\t\templeado4.setNombre(\"Diego\");\n\t\templeado4.setApellidos(\"Ayala\");\n\t\templeado4.setEdad(28);\n\t\templeado4.setSueldo(3560.60);\n\t\templeado4.setOcupacion(\"Chef\");\n\t\templeadoRepository.save(empleado4);\n\t\t\n\t\tCliente cliente1 = new Cliente();\n\t\tcliente1.setNombre(\"Mario\");\n\t\tcliente1.setCorreo(\"[email protected]\");\n\t\tcliente1.setPromocion(\"Sopa 2x1\");\n\t\tclienteRepository.save(cliente1);\n\n\t\t//Registro Ventas de menú\n\t\tVentasMenu dia1 = new VentasMenu();\n\t\tdia1.setFecha(LocalDate.of(2021,02,01));\n\t\tdia1.setMenu(\"Tacos,Sopa de papa, Agua de limón\");\n\t\tdia1.setVentas(20);\n\t\tventasMenuRepository.save(dia1);\n\t\t\n\t\tVentasMenu dia2 = new VentasMenu();\n\t\tdia2.setFecha(LocalDate.of(2021,02,02));\n\t\tdia2.setMenu(\"Tortas de papa,Sopa de verdura, Agua de piña\");\n\t\tdia2.setVentas(22);\n\t\tventasMenuRepository.save(dia2);\n\t\t\n\t\tVentasMenu dia21 = new VentasMenu();\n\t\tdia21.setFecha(LocalDate.of(2021,02,03));\n\t\tdia21.setMenu(\"Tortas de papa,Sopa de tortilla, Agua de mango\");\n\t\tdia21.setVentas(25);\n\t\tventasMenuRepository.save(dia21);\n\t\t\n\t\tVentasMenu dia211 = new VentasMenu();\n\t\tdia211.setFecha(LocalDate.of(2021,02,04));\n\t\tdia211.setMenu(\"Papas a la francesa,sopa de arroz, Agua de jamaica \");\n\t\tdia211.setVentas(30);\n\t\tventasMenuRepository.save(dia211);\n\t\t\n\t\t\n\t\t\n\t\t//Registro de menú\n\t\tMenu menu = new Menu();\n\t\tmenu.setId(1);\n\t\tmenu.setMen(\"Sopa \\n\"\n\t\t\t\t+ \"Consome\\n\"\n\t\t\t\t+ \"Arroz\\n\"\n\t\t\t\t+ \"Pasta\\n\"\n\t\t\t\t+ \"Chile relleno \\n\"\n\t\t\t\t+ \"Taco Azteca \\n\"\n\t\t\t\t+ \"Filete de Pescado empanizado\"\n\t\t + \"Enchiladas\\n\"\n\t\t + \"Gelatina\\n\"\n\t\t + \"Flan\\n\");\n\t\tmenuRepository.save(menu);\n\t\t\n\t\t//Registro de algunos proveedores\n\t\t\n\t\tProveedor proveedor1 = new Proveedor();\n\t\tproveedor1.setNomProveedor(\"Aaron\");\n\t\tproveedor1.setMarca(\"Alpura\");\n\t\tproveedor1.setTipo(\"Embutidos y lacteos\");\n\t\tproveedor1.setCosto(4600);\n\t\tproveedorRepository.save(proveedor1);\n\t\t\n\t\tProveedor proveedor2 = new Proveedor();\n\t\tproveedor2.setNomProveedor(\"Angelica\");\n\t\tproveedor2.setMarca(\"Coca-Cola\");\n\t\tproveedor2.setTipo(\"Bebidas\");\n\t\tproveedor2.setCosto(1810.11);\n\t\tproveedorRepository.save(proveedor2);\n\t\t\n\t\tProveedor proveedor3 = new Proveedor();\n\t\tproveedor3.setNomProveedor(\"Ernesto\");\n\t\tproveedor3.setMarca(\"Patito\");\n\t\tproveedor3.setTipo(\"Productos de limpieza\");\n\t\tproveedor3.setCosto(2455.80);\n\t\tproveedorRepository.save(proveedor3);\n\t\t\n\t\t// Registro Sugerencias \n\t\t\n\t\t \n\t\tSugerencia sugerencia= new Sugerencia();\n\t\tsugerencia.setIdSugeregncia(1);\n\t\tsugerencia.setNombre(\"Pedro\");\n\t\tsugerencia.setSugerencia(\"Pollo Frito\");\n\t\tsugerenciaRepository.save(sugerencia);\n\t\t\n\t\tSugerencia sugerencia1= new Sugerencia();\n\t\tsugerencia1.setIdSugeregncia(2);\n\t\tsugerencia1.setNombre(\"Miriam\");\n\t\tsugerencia1.setSugerencia(\"Sopes\");\n\t\tsugerenciaRepository.save(sugerencia1);\n\t\t\n\t\tSugerencia sugerencia2= new Sugerencia();\n\t\tsugerencia2.setIdSugeregncia(3);\n\t\tsugerencia2.setNombre(\"Rebeca\");\n\t\tsugerencia2.setSugerencia(\"Tamales Oaxaqueños\");\n\t\tsugerenciaRepository.save(sugerencia2);\n\t\t\n\t}", "Kaiwa selectByPrimaryKey(String maht);", "public Propiedad() {\n bdPropiedad = new DaoPropiedad();\n bdComentario = new DaoComentario();\n }", "private void controladorInformes(Controlador controlador) {\n this.contUpdateCol = controlador.getUpdateColectivos();\n informes.setControlSelectColectivo(contUpdateCol);\n\n }", "@Override\r\n public Cliente buscarCliente(String cedula) throws Exception {\r\n return entity.find(Cliente.class, cedula);//busca el cliente\r\n }", "public RespuestaBD crearRegistro(int codigoFlujo, int secuencia, int servicioInicio, int accion, int codigoEstado, int servicioDestino, String nombreProcedimiento, String correoDestino, String enviar, String mismoProveedor, String mismoCliente, String estado, int caracteristica, int caracteristicaValor, int caracteristicaCorreo, String metodoSeleccionProveedor, String indCorreoCliente, String indHermana, String indHermanaCerrada, String indfuncionario, String usuarioInsercion) {\n/* 342 */ RespuestaBD rta = new RespuestaBD();\n/* */ \n/* 344 */ int elSiguiente = siguienteRegistro(codigoFlujo);\n/* 345 */ if (elSiguiente == 0) {\n/* 346 */ rta.setMensaje(\"Generando secuencia\");\n/* 347 */ return rta;\n/* */ } \n/* */ \n/* */ try {\n/* 351 */ String s = \"insert into wkf_detalle(codigo_flujo,secuencia,servicio_inicio,accion,codigo_estado,servicio_destino,nombre_procedimiento,correo_destino,enviar_solicitud,ind_mismo_proveedor,ind_mismo_cliente,estado,caracteristica,valor_caracteristica,caracteristica_correo,metodo_seleccion_proveedor,ind_correo_clientes,enviar_hermana,enviar_si_hermana_cerrada,ind_cliente_inicial,usuario_insercion,fecha_insercion) values (\" + codigoFlujo + \",\" + \"\" + elSiguiente + \",\" + \"\" + servicioInicio + \",\" + \"\" + accion + \",\" + \"\" + codigoEstado + \",\" + \"\" + ((servicioDestino == 0) ? \"null\" : Integer.valueOf(servicioDestino)) + \",\" + \"'\" + nombreProcedimiento + \"',\" + \"'\" + correoDestino + \"',\" + \"'\" + enviar + \"',\" + \"'\" + mismoProveedor + \"',\" + \"'\" + mismoCliente + \"',\" + \"'\" + estado + \"',\" + ((caracteristica == 0) ? \"null\" : (\"\" + caracteristica)) + \",\" + ((caracteristicaValor == 0) ? \"null\" : (\"\" + caracteristicaValor)) + \",\" + ((caracteristicaCorreo == 0) ? \"null\" : (\"\" + caracteristicaCorreo)) + \",\" + ((metodoSeleccionProveedor.length() == 0) ? \"null\" : (\"'\" + metodoSeleccionProveedor + \"'\")) + \",\" + ((indCorreoCliente.length() == 0) ? \"null\" : (\"'\" + indCorreoCliente + \"'\")) + \",\" + ((indHermana.length() == 0) ? \"null\" : (\"'\" + indHermana + \"'\")) + \",\" + ((indHermanaCerrada.length() == 0) ? \"null\" : (\"'\" + indHermanaCerrada + \"'\")) + \",\" + ((indfuncionario.length() == 0) ? \"null\" : (\"'\" + indfuncionario + \"'\")) + \",\" + \"'\" + usuarioInsercion + \"',\" + \"\" + Utilidades.getFechaBD() + \"\" + \")\";\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 398 */ rta = this.dat.executeUpdate2(s);\n/* 399 */ rta.setSecuencia(elSiguiente);\n/* */ }\n/* 401 */ catch (Exception e) {\n/* 402 */ e.printStackTrace();\n/* 403 */ Utilidades.writeError(\"%FlujoDetalleDAO:crearRegistro \", e);\n/* 404 */ rta.setMensaje(e.getMessage());\n/* */ } \n/* 406 */ return rta;\n/* */ }", "TblSecuencia findByIdSecuencia(long idSecuencia );", "@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 Map<Long, List<ObligacionCoactivoDTO>> consultaObligacionesComparendo() {\n logger.debug(\"CoactivoEJB::consultaObligacionesComparendo()\");\n Map<Long, List<ObligacionCoactivoDTO>> obligacionesDeudor = new HashMap<>();\n StringBuilder consulta = new StringBuilder();\n consulta.append(\"SELECT \");\n consulta.append(\"p.id_cartera, \");\n consulta.append(\"ca.saldo_capital, \");\n consulta.append(\"ca.saldo_interes, \");\n consulta.append(\"p.numero_obligacion, \");\n consulta.append(\"p.id_deudor, \");\n consulta.append(\"p.fecha_obligacion, \");\n consulta.append(\"p.id_funcionario, \");\n consulta.append(\"p.id_cargue_coactivo, \");\n consulta.append(\"p.id_precoactivo \");\n consulta.append(\"FROM precoactivo p \");\n consulta.append(\"JOIN cartera ca on ca.id_cartera = p.id_cartera \");\n consulta.append(\"WHERE p.id_estado_precoactivo = :estadoAprobado \");\n consulta.append(\"AND p.codigo_tipo_obligacion = :tipoComparendo \");\n\n Query query = em.createNativeQuery(consulta.toString());\n query.setParameter(\"estadoAprobado\", EnumEstadoPrecoactivo.AUTORIZADO.getValue());\n query.setParameter(\"tipoComparendo\", EnumTipoObligacion.COMPARENDO.getValue());\n @SuppressWarnings({ \"unchecked\" })\n List<Object[]> lsObligacionesComparendos = Utilidades.safeList(query.getResultList());\n\n for (Object[] obligacionComparendo : lsObligacionesComparendos) {\n int i = 0;\n BigInteger idCartera = (BigInteger) obligacionComparendo[i++];\n BigDecimal saldoCapital = (BigDecimal) obligacionComparendo[i++];\n BigDecimal saldoInteres = (BigDecimal) obligacionComparendo[i++];\n String numObligacion = (String) obligacionComparendo[i++];\n Long idDeudor = ((BigInteger) obligacionComparendo[i++]).longValue();\n Date fechaObligacion = (Date) obligacionComparendo[i++];\n Integer idFuncionario = (Integer) obligacionComparendo[i++];\n Long idCargue = ((BigInteger) obligacionComparendo[i++]).longValue();\n Long idPrecoactivo = ((BigInteger) obligacionComparendo[i++]).longValue();\n\n CoactivoDTO coactivo = new CoactivoDTO();\n coactivo.setCargueCoactivo(new CargueCoactivoDTO(idCargue));\n coactivo.setFuncionario(new FuncionarioDTO(idFuncionario));\n coactivo.setPersona(new PersonaDTO(idDeudor));\n // Arma obligacion que va a entrar a coactivo\n ObligacionCoactivoDTO obligacion = new ObligacionCoactivoDTO();\n obligacion.setCodigoTipoObligacion(EnumTipoObligacion.COMPARENDO.getValue());\n obligacion.setCartera(new CarteraDTO(idCartera.longValue()));\n obligacion.setNumeroObligacion(numObligacion);\n obligacion.setCoactivo(coactivo);\n obligacion.setFechaObligacion(fechaObligacion);\n obligacion.setValorObligacion(saldoCapital);\n obligacion.setValorInteresMoratorios(saldoInteres);\n obligacion.setIdPrecoativo(idPrecoactivo);\n if (!obligacionesDeudor.containsKey(idDeudor)) {\n obligacionesDeudor.put(idDeudor, new ArrayList<ObligacionCoactivoDTO>());\n }\n obligacionesDeudor.get(idDeudor).add(obligacion);\n }\n return obligacionesDeudor;\n }", "@SuppressWarnings(\"unchecked\")\r\n\tprivate Long buscarIdPais() {\r\n\t\tString cad = \"select p.* from general.pais p where lower(p.descripcion) = 'paraguay'\";\r\n\t\tList<Pais> lista = new ArrayList<Pais>();\r\n\t\tlista = em.createNativeQuery(cad, Pais.class).getResultList();\r\n\t\tif (lista.size() > 0)\r\n\t\t\treturn lista.get(0).getIdPais();\r\n\t\telse\r\n\t\t\treturn null;\r\n\t}", "@SuppressWarnings(\"unchecked\")\r\n\tprivate Long buscarIdPais() {\r\n\t\tString cad = \"select p.* from general.pais p where lower(p.descripcion) = 'paraguay'\";\r\n\t\tList<Pais> lista = new ArrayList<Pais>();\r\n\t\tlista = em.createNativeQuery(cad, Pais.class).getResultList();\r\n\t\tif (lista.size() > 0)\r\n\t\t\treturn lista.get(0).getIdPais();\r\n\t\telse\r\n\t\t\treturn null;\r\n\t}", "@Override\n public Asesor getAsesor(String numeroPersonal) {\n Asesor asesor = null;\n ConexionSQL conexionSql = new ConexionSQL();\n Connection conexion = conexionSql.getConexion();\n try{\n PreparedStatement orden = conexion.prepareStatement(\"select * from asesor where numeroPersonal =?\");\n orden.setString(1, numeroPersonal);\n ResultSet resultadoConsulta = orden.executeQuery();\n if(resultadoConsulta.first()){\n String nombre;\n String idioma;\n String correo;\n String telefono;\n numeroPersonal = resultadoConsulta.getString(1);\n nombre = resultadoConsulta.getString(4) +\" \"+ resultadoConsulta.getString(6) +\" \"+ resultadoConsulta.getString(5);\n idioma = resultadoConsulta.getString(2);\n telefono = resultadoConsulta.getString(8);\n correo = resultadoConsulta.getString(7);\n asesor = new Asesor(numeroPersonal, nombre, idioma,telefono,correo);\n }else{\n Logger logger = Logger.getLogger(\"Logger\");\n logger.log(Level.WARNING, \"No se encuentra el asesor\");\n }\n }catch(SQLException | NullPointerException excepcion){\n Logger logger = Logger.getLogger(\"Logger\");\n logger.log(Level.WARNING, \"La conexión podría ser nula | la sentencia SQL esta mal\");\n }\n return asesor;\n }", "@Override\n \tpublic LidPOJO findLidByPasw(String pasw) throws SQLException {\n \tConnection connect = getConnection();\n\n \t\n \t\tString queryString = \"SELECT * FROM leden WHERE password = \" + pasw;\n \t\tResultSet res = getConnection().prepareStatement(queryString).executeQuery();\n \t\tLidPOJO lid = new LidPOJO();\n \t\twhile (res.next()) {\n \t\t\tlid = new LidPOJO(res.getString(\"naam\"), res.getString(\"achternaam\"), res.getInt(\"leeftijd\"), res.getInt(\"teamcode\"), res.getString(\"pasw\"));\n \t\t}\n \t\tconnect.close();\n \t\treturn lid;\n }", "public UsuarioDTO conocerUsuario(String usuario) {\n UsuarioDTO u = null;\n Conexion c = new Conexion();\n ResultSet rs = null;\n PreparedStatement ps = null;\n String sql = \"SELECT * FROM usuario WHERE usuario.usuario = ?\";\n try {\n ps = c.getConexion().prepareStatement(sql);\n u = new UsuarioDTO();\n ps.setString(1, usuario);\n rs = ps.executeQuery();\n while (rs.next()) {\n u.setID(rs.getInt(1));\n u.setNombre(rs.getString(2));\n u.setApellido(rs.getString(3));\n u.setDescripcion(rs.getString(4));\n u.setTelefono(rs.getString(5));\n u.setDireccion(rs.getString(6));\n u.setUsuario(rs.getString(7));\n u.setEmail(rs.getString(8));\n u.setPassword(rs.getString(9));\n u.setFecha_Nacimiento(rs.getString(10));\n u.setFecha_Creacion(rs.getString(11));\n u.setSexo(rs.getString(12));\n u.setImagen(rs.getAsciiStream(13));\n }\n\n } catch (Exception ex) {\n System.out.println(ex.getMessage());\n } finally {\n try {\n ps.close();\n rs.close();\n c.cerrarConexion();\n } catch (Exception ex) {\n }\n }\n return u;\n }", "public Cliente[] findWhereClaveEquals(String clave) throws ClienteDaoException;", "public String getIdbasedatos() {\n return idbasedatos;\n }", "public ParametroPorParametroPK(Integer idpadre, Integer idhijo) {\r\n\t\tparametroIdParametroPadre = idpadre;\r\n\t\tparametroIdParametroHijo = idhijo;\r\n\t}", "public void recuperandoDadosUsuarioescolhido(){\n Bundle bundle = getIntent().getExtras();\n if (bundle != null){\n if (bundle.containsKey(\"usuarioSelecionado\")){\n dadosDoUsuario = (Usuario) bundle.getSerializable(\"usuarioSelecionado\");\n }\n }\n\n // Configurando Toolbar\n\n toolbar.setTitle(dadosDoUsuario.getNome());\n setSupportActionBar(toolbar);\n getSupportActionBar().setDisplayHomeAsUpEnabled(true);\n\n // Configurando Imagem\n if (dadosDoUsuario.getFoto() != null){\n if (!dadosDoUsuario.getFoto().isEmpty()){\n Uri url = Uri.parse(dadosDoUsuario.getFoto());\n Glide.with(getApplicationContext()).load(url).into(civFotoPerfil);\n }\n }\n\n // Configurando Seguidores Postagens e Seguindo\n\n //stPublicacao = String.valueOf(dadosDoUsuario.getPublicacoes());\n stSeguidores = String.valueOf(dadosDoUsuario.getSeguidores());\n stSeguindo = String.valueOf(dadosDoUsuario.getSeguindo());\n\n tvSeguindo.setText(stSeguindo);\n tvSeguidores.setText(stSeguidores);\n //tvPublicacao.setText(stPublicacao);\n\n // Configurando Referencia postagens Usuario Escolhido\n postagensUsuarioRef = ConfiguracaoFirebase.getFirebaseDatabase()\n .child(\"postagens\")\n .child(dadosDoUsuario.getId());\n\n // Inicializa o Universal Image Loader\n inicializarImageLoader();\n // Recupera as Postagens do nosso Banco de Dados\n carregarFotosPostagem();\n }" ]
[ "0.5943768", "0.56734395", "0.5627233", "0.558856", "0.5561196", "0.5560026", "0.5556294", "0.5504555", "0.54765606", "0.546879", "0.54631567", "0.5428852", "0.5421949", "0.5398215", "0.5373424", "0.53709984", "0.5366772", "0.53643906", "0.5363476", "0.5359507", "0.5357471", "0.534861", "0.5341879", "0.5311982", "0.53075886", "0.52773863", "0.5274954", "0.52577186", "0.5254152", "0.5232885", "0.52325207", "0.5227016", "0.5225219", "0.5216692", "0.52103055", "0.5209612", "0.5192097", "0.5190961", "0.51833814", "0.51809424", "0.5167081", "0.516633", "0.5165727", "0.5155216", "0.51535136", "0.51465666", "0.51458913", "0.5144467", "0.5143675", "0.5143659", "0.5141942", "0.5140883", "0.51356024", "0.51352525", "0.5131084", "0.512427", "0.51125205", "0.5097171", "0.50846004", "0.5074548", "0.5068008", "0.5065911", "0.5065392", "0.50623196", "0.50584626", "0.50571406", "0.50554717", "0.5049847", "0.50470877", "0.50462955", "0.5045648", "0.5039345", "0.50341237", "0.50293666", "0.50287163", "0.50282377", "0.50256616", "0.5024352", "0.5022248", "0.50167465", "0.5015754", "0.5014858", "0.5014597", "0.5008837", "0.5007788", "0.5007146", "0.50040406", "0.5002865", "0.49976557", "0.49922997", "0.4990159", "0.49878672", "0.49841583", "0.49841583", "0.49833086", "0.49766555", "0.49710256", "0.49701735", "0.49652532", "0.49644428", "0.4962915" ]
0.0
-1
Metodos utilizados para actualizar la BD Reciben la llave primaria de la tabla en cuestion y un objeto con los parametros que se desean cambiar.
public int UpdateEstado(Estado estado,int estadoID){ SQLiteDatabase sqLiteDatabase = conn.getWritableDatabase(); return sqLiteDatabase.update("estados",estado.toContentValues(),"estadoID LIKE ?",new String[]{String.valueOf(estadoID)}); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public RespuestaBD modificarRegistro(int codigoFlujo, int secuencia, int servicioInicio, int accion, int codigoEstado, int servicioDestino, String nombreProcedimiento, String correoDestino, String enviar, String mismoProveedor, String mismomismoCliente, String estado, int caracteristica, int caracteristicaValor, int caracteristicaCorreo, String metodoSeleccionProveedor, String indCorreoCliente, String indHermana, String indHermanaCerrada, String indfuncionario, String usuarioModificacion) {\n/* 437 */ RespuestaBD rta = new RespuestaBD();\n/* */ \n/* */ try {\n/* 440 */ String s = \"update wkf_detalle set servicio_inicio=\" + servicioInicio + \",\" + \" accion=\" + accion + \",\" + \" codigo_estado=\" + codigoEstado + \",\" + \" servicio_destino=\" + ((servicioDestino == 0) ? \"null\" : Integer.valueOf(servicioDestino)) + \",\" + \" nombre_procedimiento='\" + nombreProcedimiento + \"',\" + \" correo_destino='\" + correoDestino + \"',\" + \" enviar_solicitud='\" + enviar + \"',\" + \" ind_mismo_proveedor='\" + mismoProveedor + \"',\" + \" ind_mismo_cliente='\" + mismomismoCliente + \"',\" + \" estado='\" + estado + \"',\" + \" caracteristica=\" + ((caracteristica == 0) ? \"null\" : (\"\" + caracteristica)) + \",\" + \" valor_caracteristica=\" + ((caracteristicaValor == 0) ? \"null\" : (\"\" + caracteristicaValor)) + \",\" + \" caracteristica_correo=\" + ((caracteristicaCorreo == 0) ? \"null\" : (\"\" + caracteristicaCorreo)) + \",\" + \" metodo_seleccion_proveedor=\" + ((metodoSeleccionProveedor.length() == 0) ? \"null\" : (\"'\" + metodoSeleccionProveedor + \"'\")) + \",\" + \" ind_correo_clientes=\" + ((indCorreoCliente.length() == 0) ? \"null\" : (\"'\" + indCorreoCliente + \"'\")) + \",\" + \" enviar_hermana=\" + ((indHermana.length() == 0) ? \"null\" : (\"'\" + indHermana + \"'\")) + \",\" + \" enviar_si_hermana_cerrada=\" + ((indHermanaCerrada.length() == 0) ? \"null\" : (\"'\" + indHermanaCerrada + \"'\")) + \",\" + \" ind_cliente_inicial=\" + ((indfuncionario.length() == 0) ? \"null\" : (\"'\" + indfuncionario + \"'\")) + \",\" + \" usuario_modificacion='\" + usuarioModificacion + \"',\" + \" fecha_modificacion=\" + Utilidades.getFechaBD() + \"\" + \" where\" + \" codigo_flujo=\" + codigoFlujo + \" and secuencia=\" + secuencia + \"\";\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 465 */ rta = this.dat.executeUpdate2(s);\n/* */ }\n/* 467 */ catch (Exception e) {\n/* 468 */ e.printStackTrace();\n/* 469 */ Utilidades.writeError(\"FlujoDetalleDAO:modificarRegistro \", e);\n/* 470 */ rta.setMensaje(e.getMessage());\n/* */ } \n/* 472 */ return rta;\n/* */ }", "ParqueaderoEntidad actualizar(ParqueaderoEntidad parqueadero);", "public void actualizaAntNoPato(String id_antNP, String religion_antNP, String lugarNaci_antNP, String estaCivil_antNP, \n String escolaridad_antNP, String higiene_antNP, String actividadFisica_antNP, int frecuencia_antNP, \n String sexualidad_antNP, int numParejas_antNP, String sangre_antNP, String alimentacion_antNP, String id_paciente,\n boolean escoCompInco_antNP, String frecVeces_antNP, Connection conex){\n String sqlst = \" UPDATE `antnopato`\\n\" +\n \"SET\\n\" +\n \"`id_antNP` = ?,\\n\" +\n \"`religion_antNP` = ?,\\n\" +\n \"`lugarNaci_antNP` = ?,\\n\" +\n \"`estaCivil_antNP` = ?,\\n\" +\n \"`escolaridad_antNP` = ?,\\n\" +\n \"`higiene_antNP` = ?,\\n\" +\n \"`actividadFisica_antNP` = ?,\\n\" +\n \"`frecuencia_antNP` = ?,\\n\" +\n \"`sexualidad_antNP` = ?,\\n\" +\n \"`numParejas_antNP` = ?,\\n\" +\n \"`sangre_antNP` = ?,\\n\" +\n \"`alimentacion_antNP` = ?,\\n\" +\n \"`id_paciente` = ?,\\n\" +\n \"`escoCompInco_antNP` = ?,\\n\" +\n \"`frecVeces_antNP` = ?\\n\" +\n \"WHERE `id_antNP` = ?;\";\n try(PreparedStatement sttm = conex.prepareStatement(sqlst)) {\n conex.setAutoCommit(false);\n sttm.setString (1, id_antNP);\n sttm.setString (2, religion_antNP);\n sttm.setString (3, lugarNaci_antNP);\n sttm.setString (4, estaCivil_antNP);\n sttm.setString (5, escolaridad_antNP);\n sttm.setString (6, higiene_antNP);\n sttm.setString (7, actividadFisica_antNP);\n sttm.setInt (8, frecuencia_antNP);\n sttm.setString (9, sexualidad_antNP);\n sttm.setInt (10, numParejas_antNP);\n sttm.setString (11, sangre_antNP);\n sttm.setString (12, alimentacion_antNP);\n sttm.setString (13, id_paciente);\n sttm.setBoolean (14, escoCompInco_antNP);\n sttm.setString (15, frecVeces_antNP);\n sttm.setString (16, id_antNP);\n sttm.addBatch();\n sttm.executeBatch();\n conex.commit();\n aux.informacionUs(\"Antecedentes personales no patológicos modificados\", \n \"Antecedentes personales no patológicos modificados\", \n \"Antecedentes personales no patológicos han sido modificados exitosamente en la base de datos\");\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n }", "@Update({\n \"update soggetto_personale_scolastico\",\n \"set codice_fiscale = #{codiceFiscale,jdbcType=VARCHAR},\",\n \"id_asr = #{idAsr,jdbcType=BIGINT},\",\n \"cognome = #{cognome,jdbcType=VARCHAR},\",\n \"nome = #{nome,jdbcType=VARCHAR},\",\n \"data_nascita_str = #{dataNascitaStr,jdbcType=VARCHAR},\",\n \"comune_residenza_istat = #{comuneResidenzaIstat,jdbcType=VARCHAR},\",\n \"comune_domicilio_istat = #{comuneDomicilioIstat,jdbcType=VARCHAR},\",\n \"indirizzo_domicilio = #{indirizzoDomicilio,jdbcType=VARCHAR},\",\n \"telefono_recapito = #{telefonoRecapito,jdbcType=VARCHAR},\",\n \"data_nascita = #{dataNascita,jdbcType=DATE},\",\n \"asl_residenza = #{aslResidenza,jdbcType=VARCHAR},\",\n \"asl_domicilio = #{aslDomicilio,jdbcType=VARCHAR},\",\n \"email = #{email,jdbcType=VARCHAR},\",\n \"lat = #{lat,jdbcType=NUMERIC},\",\n \"lng = #{lng,jdbcType=NUMERIC},\",\n \"id_tipo_soggetto = #{idTipoSoggetto,jdbcType=INTEGER},\",\n \"utente_operazione = #{utenteOperazione,jdbcType=VARCHAR},\",\n \"data_creazione = #{dataCreazione,jdbcType=TIMESTAMP},\",\n \"data_modifica = #{dataModifica,jdbcType=TIMESTAMP},\",\n \"data_cancellazione = #{dataCancellazione,jdbcType=TIMESTAMP},\",\n \"id_soggetto_fk = #{idSoggettoFk,jdbcType=INTEGER},\",\n \"id_medico = #{idMedico,jdbcType=BIGINT}\",\n \"where id_soggetto = #{idSoggetto,jdbcType=BIGINT}\"\n })\n int updateByPrimaryKey(SoggettoPersonaleScolastico record);", "@Override\n\tpublic void update() {\n\t\tSystem.out.println(\"Mysql DB 서버에 접속해서 수정을 하다.\");\n\t}", "public void saveToDB() throws java.sql.SQLException\n\t{\n\t\tStringBuffer sSQL=null;\n Vector vParams=new Vector();\n\t\t//-- Chequeamos a ver si es un objeto nuevo\n\t\tif(getID_BBDD()==-1) {\n\t\t\tsSQL = new StringBuffer(\"INSERT INTO INF_BBDD \");\n\t\t\tsSQL.append(\"(NOMBRE,DRIVER,URL,USUARIO,CLAVE,JNDI\");\n\t\t\tsSQL.append(\") VALUES (?,?,?,?,?,?)\");\n\n vParams = new Vector();\n vParams.add(getNOMBRE());\n vParams.add(getDRIVER());\n vParams.add(getURL());\n vParams.add(getUSUARIO());\n vParams.add(getCLAVE());\n vParams.add(getJNDI());\n\t\t}\n\t\telse {\n\t\t\tsSQL = new StringBuffer(\"UPDATE INF_BBDD SET \");\n sSQL.append(\" NOMBRE=?\");\n sSQL.append(\", DRIVER=?\");\n sSQL.append(\", URL=?\");\n sSQL.append(\", USUARIO=?\");\n sSQL.append(\", CLAVE=?\");\n\t\t\tsSQL.append(\", JNDI=?\");\n\t\t\tsSQL.append(\" WHERE ID_BBDD=?\");\n\n vParams = new Vector();\n vParams.add(getNOMBRE());\n vParams.add(getDRIVER());\n vParams.add(getURL());\n vParams.add(getUSUARIO());\n vParams.add(getCLAVE());\n vParams.add(getJNDI());\n vParams.add(new Integer(getID_BBDD()));\n\t\t}\n\n\t\tAbstractDBManager dbm = DBManager.getInstance();\n dbm.executeUpdate(sSQL.toString(),vParams);\n\n // Actualizamos la caché\n com.emesa.bbdd.cache.QueryCache.reloadQuery(\"base_datos\");\n\t}", "private void cargaInfoEmpleado(){\r\n Connection conn = null;\r\n Conexion conex = null;\r\n try{\r\n if(!Config.estaCargada){\r\n Config.cargaConfig();\r\n }\r\n conex = new Conexion();\r\n conex.creaConexion(Config.host, Config.user, Config.pass, Config.port, Config.name, Config.driv, Config.surl);\r\n conn = conex.getConexion();\r\n if(conn != null){\r\n ArrayList<Object> paramsIn = new ArrayList();\r\n paramsIn.add(txtLogin);\r\n QryRespDTO resp = new Consulta().ejecutaSelectSP(conn, IQryUsuarios.NOM_FN_OBTIENE_INFO_USUARIOWEB, paramsIn);\r\n System.out.println(\"resp: \" + resp.getRes() + \"-\" + resp.getMsg());\r\n if(resp.getRes() == 1){\r\n ArrayList<ColumnaDTO> listaColumnas = resp.getColumnas();\r\n for(HashMap<String, CampoDTO> fila : resp.getDatosTabla()){\r\n usuario = new UsuarioDTO();\r\n \r\n for(ColumnaDTO col: listaColumnas){\r\n switch(col.getIdTipo()){\r\n case java.sql.Types.INTEGER:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"0\":Integer.parseInt(fila.get(col.getEtiqueta()).getValor().toString().replaceAll(\",\", \"\").replaceAll(\"$\", \"\").replaceAll(\" \", \"\")));\r\n break;\r\n \r\n case java.sql.Types.DOUBLE:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"0\":Double.parseDouble(fila.get(col.getEtiqueta()).getValor().toString()));\r\n break;\r\n \r\n case java.sql.Types.FLOAT:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"0\":Float.parseFloat(fila.get(col.getEtiqueta()).getValor().toString()));\r\n break;\r\n \r\n case java.sql.Types.DECIMAL:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"0\":Float.parseFloat(fila.get(col.getEtiqueta()).getValor().toString()));\r\n break;\r\n \r\n case java.sql.Types.VARCHAR:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"\":fila.get(col.getEtiqueta()).getValor().toString());\r\n break;\r\n \r\n case java.sql.Types.NUMERIC:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"0\":Float.parseFloat(fila.get(col.getEtiqueta()).getValor().toString()));\r\n break;\r\n \r\n default:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"\":fila.get(col.getEtiqueta()).getValor().toString());\r\n break;\r\n } \r\n }\r\n }\r\n sesionMap.put(\"UsuarioDTO\", usuario);\r\n }else{\r\n context.getExternalContext().getApplicationMap().clear();\r\n context.getExternalContext().redirect(\"index.xhtml\");\r\n }\r\n }\r\n }catch(Exception ex){\r\n System.out.println(\"Excepcion en la cargaInfoEmpleado: \" + ex);\r\n }finally{\r\n try{\r\n conn.close();\r\n }catch(Exception ex){\r\n \r\n }\r\n }\r\n }", "public static void updateActividadUsuario(Actividad a) {\n ConnectionPool pool = ConnectionPool.getInstance();\n Connection connection = pool.getConnection();\n PreparedStatement ps = null;\n int diaInicio, mesInicio, anoInicio, diaFin, mesFin, anoFin;\n //int[] fechaInicio = getFechaInt(a.getFechaInicio());\n diaInicio = Integer.valueOf(a.getFechaInicio().substring(8));\n mesInicio = Integer.valueOf(a.getFechaInicio().substring(5,7));\n anoInicio = Integer.valueOf(a.getFechaInicio().substring(0,4));\n // int[] fechaFin = getFechaInt(a.getFechaFin());\n diaFin = Integer.valueOf(a.getFechaFin().substring(8));\n mesFin = Integer.valueOf(a.getFechaFin().substring(5,7));\n anoFin = Integer.valueOf(a.getFechaFin().substring(0,4));\n String query = \"UPDATE Actividades SET login=?, descripcion=?, rol=?, duracionEstimada=?, diaInicio=?, mesInicio=?, anoInicio=?, diaFin=?, mesFin=?, anoFin=?, duracionReal=?, estado=?, idFase=? WHERE id=?\";\n try {\n ps = connection.prepareStatement(query);\n ps.setString(1, a.getLogin());\n ps.setString(2, a.getDescripcion());\n ps.setString(3, a.getRolNecesario());\n ps.setInt(4, a.getDuracionEstimada());\n ps.setInt(5, diaInicio);\n ps.setInt(6, mesInicio);\n ps.setInt(7, anoInicio);\n ps.setInt(8, diaFin);\n ps.setInt(9, mesFin);\n ps.setInt(10, anoFin);\n ps.setInt(11, a.getDuracionReal());\n ps.setString(12, String.valueOf(a.getEstado()));\n ps.setInt(13, a.getIdFase());\n ps.setInt(14, a.getIdentificador());\n ps.executeUpdate();\n ps.close();\n pool.freeConnection(connection);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "public void actualizarUsuario(Long idUsr,String nick,String nombres,String pass){\n\t\t\t\t\t //buscamos el objeto que debe ser actualizado:\n\t\t\t\t\t Usuario u = findbyIdUsuario(idUsr);\n\t\t\t\t\t em.getTransaction().begin();\n\t\t\t\t\t // no se actualiza la clave primaria, en este caso solo la descripcion\n\t\t\t\t\t u.setNick(nick);\n\t\t\t\t\t u.setNombres(nombres);\n\t\t\t\t\t u.setPass(pass);\n\t\t\t\t\t em.merge(u);\n\t\t\t\t\t em.getTransaction().commit();\n\t\t\t\t }", "@Override\n\tprotected void updateImpl(Connection conn, VtbObject anObject)\n\t\t\tthrows SQLException, MappingException {\n\n\t}", "@Override\n\tpublic void initParameters() {\n\t\ttransferDbData = new TransferDbData();\n\t}", "private static void atualizarBD(){\n SchemaUpdate se = new SchemaUpdate(hibernateConfig);\n se.execute(true, true);\n }", "private void saveDBValues() {\r\n this.pl_DB.setParam(\"Hostname\", this.rhostfield.getText());\r\n this.pl_DB.setParam(\"Port\", this.rportfield.getText());\r\n this.pl_DB.setParam(\"Username\", this.ruserfield.getText());\r\n\r\n String pw = \"\";\r\n for (int i = 0; i < this.rpasswdfield.getPassword().length; i++) {\r\n pw += this.rpasswdfield.getPassword()[i];\r\n }\r\n this.pl_DB.setParam(\"Password\", pw);\r\n this.pl_DB.setParam(\"Database\", this.rdatabasefield.getText());\r\n this.pl_DB.setParam(\"nodeTableName\", this.rtablename1efield.getText());\r\n this.pl_DB.setParam(\"nodeColIDName\", this.colnodeIdfield.getText());\r\n this.pl_DB.setParam(\"nodeColLabelName\", this.colnodeLabelfield.getText());\r\n this.pl_DB.setParam(\"edgeTableName\", this.rtablename2efield.getText());\r\n this.pl_DB.setParam(\"edgeCol1Name\", this.coledge1field.getText());\r\n this.pl_DB.setParam(\"edgeCol2Name\", this.coledge2field.getText());\r\n this.pl_DB.setParam(\"edgeColWeightName\", this.colweightfield.getText());\r\n this.pl_DB.setParam(\"resultTableName\", this.otablenamefield.getText());\r\n\r\n this.is_alg_started = false;\r\n this.is_already_read_from_DB = false;\r\n this.is_already_renumbered = false;\r\n }", "public abstract ParametersBuilder saveOrUpdateParameters();", "public void saveORUpdateObra(Obra obra) throws Exception;", "public static void main(String[] args) {\n\n String select = \"select direccion from cliente where idCliente = 3;\", update;\n Connection conexion = BddConnection.newConexionPostgreSQL(\"Ventas\");\n PreparedStatement sentencia;\n Direccion dirCliente;\n ResultSet resul;\n\n try {\n sentencia = conexion.prepareStatement(select);\n resul = sentencia.executeQuery();\n if (resul.next()){\n dirCliente = Direccion.newInstance(resul.getString(1));\n dirCliente.getPoblacion().getProvincia().setProvincia(\"Granada update\");\n update = \"update cliente set direccion = \" + dirCliente.getStringTypeT_Direccion() + \" where idCliente = 3\";\n sentencia = conexion.prepareStatement(update);\n sentencia.executeUpdate();\n }\n resul.close();\n sentencia.close();\n conexion.close();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "@Override\r\n /* OSINE791 - RSIS1 - Inicio */\r\n //public ExpedienteDTO asignarOrdenServicio(ExpedienteDTO expedienteDTO,String codigoTipoSupervisor,UsuarioDTO usuarioDTO) throws ExpedienteException{\r\n public ExpedienteGSMDTO asignarOrdenServicio(ExpedienteGSMDTO expedienteDTO,String codigoTipoSupervisor,UsuarioDTO usuarioDTO,String sigla) throws ExpedienteException{\r\n LOG.error(\"asignarOrdenServicio\");\r\n ExpedienteGSMDTO retorno=expedienteDTO;\r\n try{\r\n //cambiarEstado expediente \r\n \tExpedienteGSMDTO expedCambioEstado=cambiarEstadoProceso(expedienteDTO.getIdExpediente(),expedienteDTO.getPersonal().getIdPersonal(),expedienteDTO.getPersonal().getIdPersonal(),expedienteDTO.getPersonal().getIdPersonal(),expedienteDTO.getEstadoProceso().getIdEstadoProceso(),null,usuarioDTO);\r\n LOG.info(\"expedCambioEstado:\"+expedCambioEstado);\r\n //update expediente\r\n PghExpediente registroDAO = crud.find(expedienteDTO.getIdExpediente(), PghExpediente.class);\r\n registroDAO.setDatosAuditoria(usuarioDTO);\r\n if(expedienteDTO.getTramite()!=null){\r\n registroDAO.setIdTramite(new PghTramite(expedienteDTO.getTramite().getIdTramite()));\r\n }else if(expedienteDTO.getProceso()!=null){\r\n registroDAO.setIdProceso(new PghProceso(expedienteDTO.getProceso().getIdProceso()));\r\n }\r\n if(expedienteDTO.getObligacionTipo()!=null){\r\n registroDAO.setIdObligacionTipo(new PghObligacionTipo(expedienteDTO.getObligacionTipo().getIdObligacionTipo()));\r\n }\r\n if(expedienteDTO.getObligacionSubTipo()!=null && expedienteDTO.getObligacionSubTipo().getIdObligacionSubTipo()!=null){\r\n registroDAO.setIdObligacionSubTipo(new PghObligacionSubTipo(expedienteDTO.getObligacionSubTipo().getIdObligacionSubTipo()));\r\n }\r\n registroDAO.setIdUnidadSupervisada(new MdiUnidadSupervisada(expedienteDTO.getUnidadSupervisada().getIdUnidadSupervisada()));\r\n crud.update(registroDAO);\r\n //inserta ordenServicio\r\n Long idLocador=codigoTipoSupervisor.equals(Constantes.CODIGO_TIPO_SUPERVISOR_PERSONA_NATURAL)?expedienteDTO.getOrdenServicio().getLocador().getIdLocador():null;\r\n Long idSupervisoraEmpresa=codigoTipoSupervisor.equals(Constantes.CODIGO_TIPO_SUPERVISOR_PERSONA_JURIDICA)?expedienteDTO.getOrdenServicio().getSupervisoraEmpresa().getIdSupervisoraEmpresa():null;\r\n OrdenServicioDTO OrdenServicioDTO=ordenServicioDAO.registrar(expedienteDTO.getIdExpediente(), \r\n expedienteDTO.getOrdenServicio().getIdTipoAsignacion(), expedienteDTO.getOrdenServicio().getEstadoProceso().getIdEstadoProceso(), \r\n /* OSINE791 - RSIS1 - Inicio */\r\n //codigoTipoSupervisor, idLocador, idSupervisoraEmpresa, usuarioDTO);\r\n codigoTipoSupervisor, idLocador, idSupervisoraEmpresa, usuarioDTO,sigla);\r\n /* OSINE791 - RSIS1 - Fin */\r\n LOG.info(\"OrdenServicioDTO:\"+OrdenServicioDTO.getNumeroOrdenServicio());\r\n //busca idPersonalDest\r\n PersonalDTO personalDest=null;\r\n List<PersonalDTO> listPersonalDest=null;\r\n if(codigoTipoSupervisor.equals(Constantes.CODIGO_TIPO_SUPERVISOR_PERSONA_NATURAL)){\r\n listPersonalDest=personalDAO.find(new PersonalFilter(expedienteDTO.getOrdenServicio().getLocador().getIdLocador(),null));\r\n }else if(codigoTipoSupervisor.equals(Constantes.CODIGO_TIPO_SUPERVISOR_PERSONA_JURIDICA)){\r\n listPersonalDest=personalDAO.find(new PersonalFilter(null,expedienteDTO.getOrdenServicio().getSupervisoraEmpresa().getIdSupervisoraEmpresa()));\r\n }\r\n if(listPersonalDest==null || listPersonalDest.isEmpty() || listPersonalDest.get(0).getIdPersonal()==null){\r\n throw new ExpedienteException(\"La Empresa Supervisora no tiene un Personal asignado\",null);\r\n }else{\r\n personalDest=listPersonalDest.get(0);\r\n }\r\n //inserta historico Orden Servicio\r\n EstadoProcesoDTO estadoProcesoDto=estadoProcesoDAO.find(new EstadoProcesoFilter(Constantes.IDENTIFICADOR_ESTADO_PROCESO_OS_REGISTRO)).get(0);\r\n MaestroColumnaDTO tipoHistorico=maestroColumnaDAO.findMaestroColumna(Constantes.DOMINIO_TIPO_COMPONENTE, Constantes.APLICACION_INPS, Constantes.CODIGO_TIPO_COMPONENTE_ORDEN_SERVICIO).get(0);\r\n /* OSINE_SFS-480 - RSIS 40 - Inicio */\r\n HistoricoEstadoDTO historicoEstado=historicoEstadoDAO.registrar(null, OrdenServicioDTO.getIdOrdenServicio(), estadoProcesoDto.getIdEstadoProceso(), expedienteDTO.getPersonal().getIdPersonal(), personalDest.getIdPersonal(), tipoHistorico.getIdMaestroColumna(),null,null, null, usuarioDTO); \r\n LOG.info(\"historicoEstado:\"+historicoEstado);\r\n /* OSINE_SFS-480 - RSIS 40 - Fin */\r\n retorno=ExpedienteGSMBuilder.toExpedienteDto(registroDAO);\r\n retorno.setOrdenServicio(new OrdenServicioDTO(OrdenServicioDTO.getIdOrdenServicio(),OrdenServicioDTO.getNumeroOrdenServicio()));\r\n }catch(Exception e){\r\n LOG.error(\"error en asignarOrdenServicio\",e);\r\n ExpedienteException ex = new ExpedienteException(e.getMessage(), e);\r\n throw ex;\r\n }\r\n return retorno;\r\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 static void clubTecSync(Connection con, InputStreamReader isr, String club) {\n\n PreparedStatement pstmt2 = null;\n Statement stmt = null;\n ResultSet rs = null;\n\n\n Member member = new Member();\n\n String line = \"\";\n String password = \"\";\n String temp = \"\";\n\n int i = 0;\n int inact = 0;\n int pri_indicator = 0;\n\n // Values from MFirst records\n //\n String fname = \"\";\n String lname = \"\";\n String mi = \"\";\n String suffix = \"\";\n String posid = \"\";\n String gender = \"\";\n String ghin = \"\";\n String memid = \"\";\n String mNum = \"\";\n String u_hndcp = \"\";\n String c_hndcp = \"\";\n String mship = \"\";\n String mtype = \"\";\n String msub_type = \"\";\n String bag = \"\";\n String email = \"\";\n String email2 = \"\";\n String phone = \"\";\n String phone2 = \"\";\n String phone3 = \"\";\n String mobile = \"\";\n String primary = \"\";\n String webid = \"\";\n String custom1 = \"\";\n String custom2 = \"\";\n String custom3 = \"\";\n\n float u_hcap = 0;\n float c_hcap = 0;\n int birth = 0;\n\n // Values from ForeTees records\n //\n String fname_old = \"\";\n String lname_old = \"\";\n String mi_old = \"\";\n String mship_old = \"\";\n String mtype_old = \"\";\n String email_old = \"\";\n String mNum_old = \"\";\n String ghin_old = \"\";\n String bag_old = \"\";\n String posid_old = \"\";\n String email2_old = \"\";\n String phone_old = \"\";\n String phone2_old = \"\";\n String suffix_old = \"\";\n String msub_type_old = \"\";\n\n float u_hcap_old = 0;\n float c_hcap_old = 0;\n int birth_old = 0;\n\n // Values for New ForeTees records\n //\n String memid_new = \"\";\n String webid_new = \"\";\n String fname_new = \"\";\n String lname_new = \"\";\n String mi_new = \"\";\n String mship_new = \"\";\n String mtype_new = \"\";\n String email_new = \"\";\n String mNum_new = \"\";\n String ghin_new = \"\";\n String bag_new = \"\";\n String posid_new = \"\";\n String email2_new = \"\";\n String phone_new = \"\";\n String phone2_new = \"\";\n String suffix_new = \"\";\n String msub_type_new = \"\";\n String dupuser = \"\";\n String dupwebid = \"\";\n String dupmnum = \"\";\n\n float u_hcap_new = 0;\n float c_hcap_new = 0;\n int birth_new = 0;\n int errCount = 0;\n int warnCount = 0;\n int totalErrCount = 0;\n int totalWarnCount = 0;\n int email_bounce1 = 0;\n int email_bounce2 = 0;\n\n String errorMsg = \"\";\n String errMemInfo = \"\";\n String errMsg = \"\";\n String warnMsg = \"\";\n\n ArrayList<String> errList = new ArrayList<String>();\n ArrayList<String> warnList = new ArrayList<String>();\n\n boolean failed = false;\n boolean changed = false;\n boolean skip = false;\n boolean found = false;\n boolean genderMissing = false;\n boolean useWebid = false;\n boolean useWebidQuery = false;\n boolean headerFound = false;\n\n\n // Overwrite log file with fresh one for today's logs\n SystemUtils.logErrorToFile(\"ClubTec: Error log for \" + club + \"\\nStart time: \" + new java.util.Date().toString() + \"\\n\", club, false);\n\n try {\n\n Calendar caly = new GregorianCalendar(); // get todays date\n int thisYear = caly.get(Calendar.YEAR); // get this year value\n\n thisYear = thisYear - 2000;\n\n BufferedReader bfrin = new BufferedReader(isr);\n line = new String();\n\n // format of each line in the file:\n //\n // memid, mNum, fname, mi, lname, suffix, mship, mtype, gender, email, email2,\n // phone, phone2, bag, hndcp#, uhndcp, chndcp, birth, posid, mobile, primary\n //\n //\n while ((line = bfrin.readLine()) != null) { // get one line of text\n\n\n // Skip the 1st row (header row)\n\n if (headerFound == false) {\n\n headerFound = true;\n\n } else {\n\n // Remove the dbl quotes and check for embedded commas\n line = cleanRecord4( line );\n\n // parse the line to gather all the info\n\n StringTokenizer tok = new StringTokenizer( line, \",\" ); // delimiters are comma\n\n if ( tok.countTokens() >= 32 ) { // enough data ?\n\n // Gather data from input (* indicates field is used)\n mNum = tok.nextToken(); // Col A*\n fname = tok.nextToken(); // Col B*\n lname = tok.nextToken(); // Col C*\n suffix = tok.nextToken(); // Col D*\n primary = tok.nextToken(); // Col E*\n tok.nextToken(); // Col F\n mship = tok.nextToken(); // Col G*\n tok.nextToken(); // Col H\n tok.nextToken(); // Col I\n tok.nextToken(); // Col J\n tok.nextToken(); // Col K\n tok.nextToken(); // Col L\n tok.nextToken(); // Col M\n tok.nextToken(); // Col N\n phone = tok.nextToken(); // Col O*\n email = tok.nextToken(); // Col P*\n tok.nextToken(); // Col Q\n tok.nextToken(); // Col R\n tok.nextToken(); // Col S\n tok.nextToken(); // Col T\n tok.nextToken(); // Col U\n tok.nextToken(); // Col V\n tok.nextToken(); // Col W\n phone2 = tok.nextToken(); // Col X*\n email2 = tok.nextToken(); // Col Y*\n phone3 = tok.nextToken(); // Col Z*\n tok.nextToken(); // Col AA\n mi = tok.nextToken(); // Col AB*\n gender = tok.nextToken(); // Col AC*\n temp = tok.nextToken(); // Col AD*\n // AE and AF are skipped\n\n\n //\n // Check for ? (not provided)\n //\n if (webid.equals(\"?\")) webid = \"\";\n if (memid.equals(\"?\")) memid = \"\";\n if (mNum.equals(\"?\")) mNum = \"\";\n if (primary.equals(\"?\")) primary = \"\";\n if (fname.equals(\"?\")) fname = \"\";\n if (mi.equals(\"?\")) mi = \"\";\n if (lname.equals(\"?\")) lname = \"\";\n if (suffix.equals(\"?\")) suffix = \"\";\n if (mship.equals(\"?\")) mship = \"\";\n if (email.equals(\"?\")) email = \"\";\n if (email2.equals(\"?\")) email2 = \"\";\n if (phone.equals(\"?\")) phone = \"\";\n if (phone2.equals(\"?\")) phone2 = \"\";\n if (phone3.equals(\"?\")) phone3 = \"\";\n if (temp.equals(\"?\")) temp = \"\";\n\n if (gender.equals( \"?\" ) || (!gender.equalsIgnoreCase(\"M\") && !gender.equalsIgnoreCase(\"F\"))) {\n\n if (gender.equals( \"?\" )) {\n genderMissing = true;\n } else {\n genderMissing = false;\n }\n gender = \"\";\n }\n\n // trim gender in case followed be spaces\n gender = gender.trim();\n\n //\n // Determine if we should process this record (does it meet the minimum requirements?)\n //\n if (!mNum.equals( \"\" ) && !lname.equals( \"\" ) && !fname.equals( \"\" )) {\n\n //\n // Remove spaces, etc. from name fields\n //\n tok = new StringTokenizer( fname, \" \" ); // delimiters are space\n fname = tok.nextToken(); // remove any spaces and middle name\n\n if ( tok.countTokens() > 0 && mi.equals( \"\" )) {\n\n mi = tok.nextToken();\n }\n\n if (!suffix.equals( \"\" )) { // if suffix provided\n\n tok = new StringTokenizer( suffix, \" \" ); // delimiters are space\n suffix = tok.nextToken(); // remove any extra (only use one value)\n }\n\n tok = new StringTokenizer( lname, \" \" ); // delimiters are space\n lname = tok.nextToken(); // remove suffix and spaces\n\n if (!suffix.equals( \"\" ) && tok.countTokens() > 0 && club.equals(\"pradera\")) { // Pradera - if suffix AND 2-part lname, use both\n\n String lpart2 = tok.nextToken();\n\n lname = lname + \"_\" + lpart2; // combine them (i.e. Van Ess = Van_Ess)\n\n } else {\n\n if (suffix.equals( \"\" ) && tok.countTokens() > 0) { // if suffix not provided\n\n suffix = tok.nextToken();\n }\n }\n\n //\n // Make sure name is titled (most are already)\n //\n /*\n fname = toTitleCase(fname);\n lname = toTitleCase(lname);\n */\n\n if (!suffix.equals( \"\" )) { // if suffix provided\n\n lname = lname + \"_\" + suffix; // append suffix to last name\n }\n\n //\n // Determine the handicaps\n //\n u_hcap = -99; // indicate no hndcp\n c_hcap = -99; // indicate no c_hndcp\n\n if (!u_hndcp.equals( \"\" ) && !u_hndcp.equalsIgnoreCase(\"NH\") && !u_hndcp.equalsIgnoreCase(\"NHL\")) {\n\n u_hndcp = u_hndcp.replace('L', ' '); // isolate the handicap - remove spaces and trailing 'L'\n u_hndcp = u_hndcp.replace('H', ' '); // or 'H' if present\n u_hndcp = u_hndcp.replace('N', ' '); // or 'N' if present\n u_hndcp = u_hndcp.replace('J', ' '); // or 'J' if present\n u_hndcp = u_hndcp.replace('R', ' '); // or 'R' if present\n u_hndcp = u_hndcp.trim();\n\n u_hcap = Float.parseFloat(u_hndcp); // usga handicap\n\n if ((!u_hndcp.startsWith(\"+\")) && (!u_hndcp.startsWith(\"-\"))) {\n\n u_hcap = 0 - u_hcap; // make it a negative hndcp (normal)\n }\n }\n\n if (!c_hndcp.equals( \"\" ) && !c_hndcp.equalsIgnoreCase(\"NH\") && !c_hndcp.equalsIgnoreCase(\"NHL\")) {\n\n c_hndcp = c_hndcp.replace('L', ' '); // isolate the handicap - remove spaces and trailing 'L'\n c_hndcp = c_hndcp.replace('H', ' '); // or 'H' if present\n c_hndcp = c_hndcp.replace('N', ' '); // or 'N' if present\n c_hndcp = c_hndcp.replace('J', ' '); // or 'J' if present\n c_hndcp = c_hndcp.replace('R', ' '); // or 'R' if present\n c_hndcp = c_hndcp.trim();\n\n c_hcap = Float.parseFloat(c_hndcp); // usga handicap\n\n if ((!c_hndcp.startsWith(\"+\")) && (!c_hndcp.startsWith(\"-\"))) {\n\n c_hcap = 0 - c_hcap; // make it a negative hndcp (normal)\n }\n }\n\n password = lname;\n\n //\n // if lname is less than 4 chars, fill with 1's\n //\n int length = password.length();\n\n while (length < 4) {\n\n password = password + \"1\";\n length++;\n }\n\n // if phone #2 is empty then assign phone #3 to it\n if (phone2.equals(\"\")) phone2 = phone3;\n\n //\n // Verify the email addresses\n //\n if (!email.equals( \"\" )) { // if specified\n\n email = email.trim(); // remove spaces\n\n FeedBack feedback = (member.isEmailValid(email));\n\n if (!feedback.isPositive()) { // if error\n\n email = \"\"; // do not use it\n }\n }\n if (!email2.equals( \"\" )) { // if specified\n\n email2 = email2.trim(); // remove spaces\n\n FeedBack feedback = (member.isEmailValid(email2));\n\n if (!feedback.isPositive()) { // if error\n\n email2 = \"\"; // do not use it\n }\n }\n\n // if email #1 is empty then assign email #2 to it\n if (email.equals(\"\")) email = email2;\n\n //\n // convert birth date (mm/dd/yyyy to yyyymmdd)\n //\n if (!temp.equals( \"\" )) {\n\n int mm = 0;\n int dd = 0;\n int yy = 0;\n\n tok = new StringTokenizer( temp, \"/-\" ); // delimiters are / & -\n\n if ( tok.countTokens() > 2 ) {\n\n String b1 = tok.nextToken();\n String b2 = tok.nextToken();\n String b3 = tok.nextToken();\n\n mm = Integer.parseInt(b1);\n dd = Integer.parseInt(b2);\n yy = Integer.parseInt(b3);\n\n } else { // try 'Jan 20, 1951' format\n\n tok = new StringTokenizer( temp, \", \" ); // delimiters are comma and space\n\n if ( tok.countTokens() > 2 ) {\n\n String b1 = tok.nextToken();\n String b2 = tok.nextToken();\n String b3 = tok.nextToken();\n\n if (b1.startsWith( \"Jan\" )) {\n mm = 1;\n } else {\n if (b1.startsWith( \"Feb\" )) {\n mm = 2;\n } else {\n if (b1.startsWith( \"Mar\" )) {\n mm = 3;\n } else {\n if (b1.startsWith( \"Apr\" )) {\n mm = 4;\n } else {\n if (b1.startsWith( \"May\" )) {\n mm = 5;\n } else {\n if (b1.startsWith( \"Jun\" )) {\n mm = 6;\n } else {\n if (b1.startsWith( \"Jul\" )) {\n mm = 7;\n } else {\n if (b1.startsWith( \"Aug\" )) {\n mm = 8;\n } else {\n if (b1.startsWith( \"Sep\" )) {\n mm = 9;\n } else {\n if (b1.startsWith( \"Oct\" )) {\n mm = 10;\n } else {\n if (b1.startsWith( \"Nov\" )) {\n mm = 11;\n } else {\n if (b1.startsWith( \"Dec\" )) {\n mm = 12;\n } else {\n mm = Integer.parseInt(b1);\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n\n dd = Integer.parseInt(b2);\n yy = Integer.parseInt(b3);\n\n } else {\n\n birth = 0;\n }\n }\n\n if (mm > 0) { // if birth provided\n\n if (mm == 1 && dd == 1 && yy == 1) { // skip if 1/1/0001\n\n birth = 0;\n\n } else {\n\n if (yy < 100) { // if 2 digit year\n\n if (yy <= thisYear) {\n\n yy += 2000; // 20xx\n\n } else {\n\n yy += 1900; // 19xx\n }\n }\n\n birth = (yy * 10000) + (mm * 100) + dd; // yyyymmdd\n\n if (yy < 1900) { // check for invalid date\n\n birth = 0;\n }\n }\n\n } else {\n\n birth = 0;\n }\n\n } else {\n\n birth = 0;\n }\n\n\n skip = false;\n errCount = 0; // reset error count\n warnCount = 0; // reset warning count\n errMsg = \"\"; // reset error message\n warnMsg = \"\"; // reset warning message\n errMemInfo = \"\"; // reset error member info\n found = false; // init club found\n\n\n //\n // Format member info for use in error logging before club-specific manipulation\n //\n errMemInfo = \"Member Details:\\n\" +\n \" name: \" + lname + \", \" + fname + \" \" + mi + \"\\n\" +\n \" mtype: \" + mtype + \" mship: \" + mship + \"\\n\" +\n \" memid: \" + memid + \" mNum: \" + mNum + \" gender: \" + gender;\n\n // if gender is incorrect or missing, flag a warning in the error log\n if (gender.equals(\"\")) {\n\n // report only if not a club that uses blank gender fields (set to true for now, change if club's want other options down the line)\n if (true) {\n\n warnCount++;\n if (genderMissing) {\n warnMsg = warnMsg + \"\\n\" +\n \" -GENDER missing! (Defaulted to 'M')\";\n } else {\n warnMsg = warnMsg + \"\\n\" +\n \" -GENDER incorrect! (Defaulted to 'M')\";\n }\n\n gender = \"M\";\n\n } else if (false) { // default to female instead (left in for future clubs)\n\n warnCount++;\n if (genderMissing) {\n warnMsg = warnMsg + \"\\n\" +\n \" -GENDER missing! (Defaulted to 'F')\";\n } else {\n warnMsg = warnMsg + \"\\n\" +\n \" -GENDER incorrect! (Defaulted to 'F)\";\n }\n\n gender = \"F\";\n\n } else if (false) { // skip anyone missing gender (left in for future clubs)\n\n errCount++;\n skip = true;\n if (genderMissing) {\n errMsg = errMsg + \"\\n\" +\n \" -SKIPPED: GENDER missing!\";\n } else {\n errMsg = errMsg + \"\\n\" +\n \" -SKIPPED: GENDER incorrect!\";\n }\n }\n }\n\n //\n // Skip entries with first/last names of 'admin'\n //\n if (fname.equalsIgnoreCase(\"admin\") || lname.equalsIgnoreCase(\"admin\")) {\n errCount++;\n skip = true;\n errMsg = errMsg + \"\\n\" +\n \" -INVALID NAME! 'Admin' or 'admin' not allowed for first or last name\";\n }\n\n //\n // *********************************************************************\n //\n // The following will be dependent on the club - customized\n //\n // *********************************************************************\n //\n\n //******************************************************************\n // Rolling Hills CC - CO - rhillscc\n //******************************************************************\n //\n if (club.equals(\"rhillscc\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n posid = mNum; // use their member numbers as their posid\n\n while (mNum.startsWith(\"0\")) {\n mNum = mNum.substring(1);\n }\n\n memid = mNum;\n\n StringTokenizer temptok = new StringTokenizer(mNum, \"-\");\n\n if (temptok.countTokens() > 1) {\n mNum = temptok.nextToken();\n }\n\n if (mship.contains(\"social\") || mship.contains(\"Social\")) {\n mship = \"Social\";\n } else if (mship.contains(\"absentee\") || mship.contains(\"Absentee\")) {\n mship = \"Absentee\";\n } else {\n mship = \"Golf\";\n }\n\n if (memid.endsWith(\"-000\")) {\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Primary Female\";\n } else {\n mtype = \"Primary Male\";\n }\n\n } else if (memid.endsWith(\"-001\")) {\n\n if (gender.equalsIgnoreCase(\"M\")) {\n mtype = \"Secondary Male\";\n } else {\n mtype = \"Secondary Female\";\n }\n\n } else {\n\n mtype = \"Dependent\";\n }\n\n }\n } // end if rhillscc\n\n\n //******************************************************************\n // All clubs\n //******************************************************************\n //\n if (skip == false && found == true && !fname.equals(\"\") && !lname.equals(\"\") && !memid.equals(\"\")) {\n\n //\n // now determine if we should update an existing record or add the new one\n //\n fname_old = \"\";\n lname_old = \"\";\n mi_old = \"\";\n mship_old = \"\";\n mtype_old = \"\";\n email_old = \"\";\n mNum_old = \"\";\n ghin_old = \"\";\n bag_old = \"\";\n posid_old = \"\";\n email2_old = \"\";\n phone_old = \"\";\n phone2_old = \"\";\n suffix_old = \"\";\n u_hcap_old = 0;\n c_hcap_old = 0;\n birth_old = 0;\n msub_type_old = \"\";\n email_bounce1 = 0;\n email_bounce2 = 0;\n\n\n //\n // Truncate the string values to avoid sql error\n //\n if (!mi.equals( \"\" )) { // if mi specified\n\n mi = truncate(mi, 1); // make sure it is only 1 char\n }\n if (!memid.equals( \"\" )) {\n\n memid = truncate(memid, 15);\n }\n if (!password.equals( \"\" )) {\n\n password = truncate(password, 15);\n }\n if (!lname.equals( \"\" )) {\n\n lname = truncate(lname, 20);\n }\n if (!fname.equals( \"\" )) {\n\n fname = truncate(fname, 20);\n }\n if (!mship.equals( \"\" )) {\n\n mship = truncate(mship, 30);\n }\n if (!mtype.equals( \"\" )) {\n\n mtype = truncate(mtype, 30);\n }\n if (!email.equals( \"\" )) {\n\n email = truncate(email, 50);\n }\n if (!email2.equals( \"\" )) {\n\n email2 = truncate(email2, 50);\n }\n if (!mNum.equals( \"\" )) {\n\n mNum = truncate(mNum, 10);\n }\n if (!ghin.equals( \"\" )) {\n\n ghin = truncate(ghin, 16);\n }\n if (!bag.equals( \"\" )) {\n\n bag = truncate(bag, 12);\n }\n if (!posid.equals( \"\" )) {\n\n posid = truncate(posid, 15);\n }\n if (!phone.equals( \"\" )) {\n\n phone = truncate(phone, 24);\n }\n if (!phone2.equals( \"\" )) {\n\n phone2 = truncate(phone2, 24);\n }\n if (!suffix.equals( \"\" )) {\n\n suffix = truncate(suffix, 4);\n }\n if (!webid.equals( \"\" )) {\n\n webid = truncate(webid, 15);\n }\n if (!msub_type.equals( \"\" )) {\n\n msub_type = truncate(msub_type, 30);\n }\n\n //\n // Set Gender and Primary values\n //\n if (!gender.equalsIgnoreCase( \"M\" ) && !gender.equalsIgnoreCase( \"F\" )) {\n\n gender = \"\";\n }\n\n pri_indicator = 0; // default = Primary\n\n if (primary.equalsIgnoreCase( \"S\" )) { // Spouse\n\n pri_indicator = 1;\n }\n if (primary.equalsIgnoreCase( \"D\" )) { // Dependent\n\n pri_indicator = 2;\n }\n\n\n //\n // See if a member already exists with this id (username or webid)\n //\n // **** NOTE: memid and webid MUST be set to their proper values before we get here!!!!!!!!!!!!!!!\n //\n //\n // 4/07/2010\n // We now use 2 booleans to indicate what to do with the webid field.\n // useWebid is the original boolean that was used to indicate that we should use the webid to identify the member.\n // We lost track of when this flag was used and why. It was no longer used to indicate the webid should be\n // used in the query, so we don't know what its real purpose is. We don't want to disrupt any clubs that are\n // using it, so we created a new boolean for the query.\n // useWebidQuery is the new flag to indicate that we should use the webid when searching for the member. You should use\n // both flags if you want to use this one.\n //\n if (useWebid == true) { // use webid to locate member?\n\n webid_new = webid; // yes, set new ids\n memid_new = \"\";\n\n } else { // DO NOT use webid\n\n webid_new = \"\"; // set new ids\n memid_new = memid;\n }\n\n if (useWebidQuery == false) {\n\n pstmt2 = con.prepareStatement (\n \"SELECT * FROM member2b WHERE username = ?\");\n\n pstmt2.clearParameters(); // clear the parms\n pstmt2.setString(1, memid); // put the parm in stmt\n\n } else { // use the webid field\n\n pstmt2 = con.prepareStatement (\n \"SELECT * FROM member2b WHERE webid = ?\");\n\n pstmt2.clearParameters(); // clear the parms\n pstmt2.setString(1, webid); // put the parm in stmt\n }\n\n rs = pstmt2.executeQuery(); // execute the prepared stmt\n\n if (rs.next()) {\n\n memid = rs.getString(\"username\"); // get username in case we used webid (use this for existing members)\n lname_old = rs.getString(\"name_last\");\n fname_old = rs.getString(\"name_first\");\n mi_old = rs.getString(\"name_mi\");\n mship_old = rs.getString(\"m_ship\");\n mtype_old = rs.getString(\"m_type\");\n email_old = rs.getString(\"email\");\n mNum_old = rs.getString(\"memNum\");\n ghin_old = rs.getString(\"ghin\");\n bag_old = rs.getString(\"bag\");\n birth_old = rs.getInt(\"birth\");\n posid_old = rs.getString(\"posid\");\n msub_type_old = rs.getString(\"msub_type\");\n email2_old = rs.getString(\"email2\");\n phone_old = rs.getString(\"phone1\");\n phone2_old = rs.getString(\"phone2\");\n suffix_old = rs.getString(\"name_suf\");\n email_bounce1 = rs.getInt(\"email_bounced\");\n email_bounce2 = rs.getInt(\"email2_bounced\");\n\n if (useWebid == true) { // use webid to locate member?\n memid_new = memid; // yes, get this username\n } else {\n webid_new = rs.getString(\"webid\"); // no, get current webid\n }\n }\n pstmt2.close(); // close the stmt\n\n\n //\n // If member NOT found, then check if new member OR id has changed\n //\n boolean memFound = false;\n boolean dup = false;\n boolean userChanged = false;\n boolean nameChanged = false;\n String dupmship = \"\";\n\n if (fname_old.equals( \"\" )) { // if member NOT found\n\n //\n // New member - first check if name already exists\n //\n pstmt2 = con.prepareStatement (\n \"SELECT username, m_ship, memNum, webid FROM member2b WHERE name_last = ? AND name_first = ? AND name_mi = ?\");\n\n pstmt2.clearParameters();\n pstmt2.setString(1, lname);\n pstmt2.setString(2, fname);\n pstmt2.setString(3, mi);\n rs = pstmt2.executeQuery(); // execute the prepared stmt\n\n if (rs.next()) { // Allow duplicate names for Long Cove for members owning two properties at once\n\n dupuser = rs.getString(\"username\"); // get this username\n dupmship = rs.getString(\"m_ship\");\n dupmnum = rs.getString(\"memNum\");\n dupwebid = rs.getString(\"webid\"); // get this webid\n\n //\n // name already exists - see if this is the same member\n //\n if ((!dupmnum.equals( \"\" ) && dupmnum.equals( mNum )) || club.equals(\"imperialgc\")) { // if name and mNum match, then memid or webid must have changed\n\n if (useWebid == true) { // use webid to locate member?\n\n webid_new = webid; // set new ids\n memid_new = dupuser;\n memid = dupuser; // update this record\n\n } else {\n\n webid_new = dupwebid; // set new ids\n memid_new = memid;\n memid = dupuser; // update this record\n userChanged = true; // indicate the username has changed\n }\n\n memFound = true; // update the member\n\n pstmt2 = con.prepareStatement (\n \"SELECT * FROM member2b WHERE username = ?\");\n\n pstmt2.clearParameters(); // clear the parms\n pstmt2.setString(1, memid); // put the parm in stmt\n rs = pstmt2.executeQuery(); // execute the prepared stmt\n\n if (rs.next()) {\n\n lname_old = rs.getString(\"name_last\");\n fname_old = rs.getString(\"name_first\");\n mi_old = rs.getString(\"name_mi\");\n mship_old = rs.getString(\"m_ship\");\n mtype_old = rs.getString(\"m_type\");\n email_old = rs.getString(\"email\");\n mNum_old = rs.getString(\"memNum\");\n ghin_old = rs.getString(\"ghin\");\n bag_old = rs.getString(\"bag\");\n birth_old = rs.getInt(\"birth\");\n posid_old = rs.getString(\"posid\");\n msub_type_old = rs.getString(\"msub_type\");\n email2_old = rs.getString(\"email2\");\n phone_old = rs.getString(\"phone1\");\n phone2_old = rs.getString(\"phone2\");\n suffix_old = rs.getString(\"name_suf\");\n email_bounce1 = rs.getInt(\"email_bounced\");\n email_bounce2 = rs.getInt(\"email2_bounced\");\n }\n\n } else {\n dup = true; // dup member - do not add\n }\n\n }\n pstmt2.close(); // close the stmt\n\n } else { // member found\n memFound = true;\n }\n\n //\n // Now, update the member record if existing member\n //\n if (memFound == true) { // if member exists\n\n changed = false; // init change indicator\n\n lname_new = lname_old;\n\n // do not change lname for Saucon Valley if lname_old ends with '_*'\n if (!lname.equals( \"\" ) && !lname_old.equals( lname )) {\n\n lname_new = lname; // set value from ClubTec record\n changed = true;\n nameChanged = true;\n }\n\n fname_new = fname_old;\n\n if (!fname.equals( \"\" ) && !fname_old.equals( fname )) {\n\n fname_new = fname; // set value from ClubTec record\n changed = true;\n nameChanged = true;\n }\n\n mi_new = mi_old;\n\n if (!mi_old.equals( mi )) {\n\n mi_new = mi; // set value from ClubTec record\n changed = true;\n nameChanged = true;\n }\n\n mship_new = mship_old;\n\n if (!mship.equals( \"\" ) && !mship_old.equals( mship )) {\n\n mship_new = mship; // set value from ClubTec record\n changed = true;\n }\n\n mtype_new = mtype_old;\n\n if (!mtype.equals( \"\" ) && !mtype_old.equals( mtype )) {\n\n mtype_new = mtype; // set value from ClubTec record\n changed = true;\n }\n\n mNum_new = mNum_old;\n\n if (!mNum.equals( \"\" ) && !mNum_old.equals( mNum )) {\n\n mNum_new = mNum; // set value from ClubTec record\n changed = true;\n }\n\n ghin_new = ghin_old;\n\n if (!ghin.equals( \"\" ) && !ghin_old.equals( ghin )) {\n\n ghin_new = ghin; // set value from ClubTec record\n changed = true;\n }\n\n bag_new = bag_old;\n\n if (!bag.equals( \"\" ) && !bag_old.equals( bag )) {\n\n bag_new = bag; // set value from ClubTec record\n changed = true;\n }\n\n posid_new = posid_old;\n\n if (!posid.equals( \"\" ) && !posid_old.equals( posid )) {\n\n posid_new = posid; // set value from ClubTec record\n changed = true;\n }\n\n email_new = email_old;\n\n if (!email_old.equals( email )) { // if MF's email changed or was removed\n\n email_new = email; // set value from ClubTec record\n changed = true;\n email_bounce1 = 0; // reset bounced flag\n }\n\n email2_new = email2_old;\n\n if (!email2_old.equals( email2 )) { // if MF's email changed or was removed\n\n email2_new = email2; // set value from ClubTec record\n changed = true;\n email_bounce2 = 0; // reset bounced flag\n }\n\n phone_new = phone_old;\n\n if (!phone.equals( \"\" ) && !phone_old.equals( phone )) {\n\n phone_new = phone; // set value from ClubTec record\n changed = true;\n }\n\n phone2_new = phone2_old;\n\n if (!phone2.equals( \"\" ) && !phone2_old.equals( phone2 )) {\n\n phone2_new = phone2; // set value from ClubTec record\n changed = true;\n }\n\n suffix_new = suffix_old;\n\n if (!suffix.equals( \"\" ) && !suffix_old.equals( suffix )) {\n\n suffix_new = suffix; // set value from ClubTec record\n changed = true;\n }\n\n birth_new = birth_old;\n\n if (birth > 0 && birth != birth_old) {\n\n birth_new = birth; // set value from ClubTec record\n changed = true;\n }\n\n if (!mobile.equals( \"\" )) { // if mobile phone provided\n\n if (phone_new.equals( \"\" )) { // if phone1 is empty\n\n phone_new = mobile; // use mobile number\n changed = true;\n\n } else {\n\n if (phone2_new.equals( \"\" )) { // if phone2 is empty\n\n phone2_new = mobile; // use mobile number\n changed = true;\n }\n }\n }\n\n msub_type_new = msub_type_old;\n\n if (!msub_type.equals( \"\" ) && !msub_type_old.equals( msub_type )) {\n\n msub_type_new = msub_type; // set value from ClubTec record\n changed = true;\n }\n\n // don't allow both emails to be the same\n if (email_new.equalsIgnoreCase(email2_new)) email2_new = \"\";\n\n //\n // Update our record (always now to set the last_sync_date)\n //\n pstmt2 = con.prepareStatement (\n \"UPDATE member2b SET username = ?, name_last = ?, name_first = ?, \" +\n \"name_mi = ?, m_ship = ?, m_type = ?, email = ?, \" +\n \"memNum = ?, ghin = ?, bag = ?, birth = ?, posid = ?, msub_type = ?, email2 = ?, phone1 = ?, \" +\n \"phone2 = ?, name_suf = ?, webid = ?, inact = 0, last_sync_date = now(), gender = ?, pri_indicator = ?, \" +\n \"email_bounced = ?, email2_bounced = ? \" +\n \"WHERE username = ?\");\n\n pstmt2.clearParameters(); // clear the parms\n pstmt2.setString(1, memid_new);\n pstmt2.setString(2, lname_new);\n pstmt2.setString(3, fname_new);\n pstmt2.setString(4, mi_new);\n pstmt2.setString(5, mship_new);\n pstmt2.setString(6, mtype_new);\n pstmt2.setString(7, email_new);\n pstmt2.setString(8, mNum_new);\n pstmt2.setString(9, ghin_new);\n pstmt2.setString(10, bag_new);\n pstmt2.setInt(11, birth_new);\n pstmt2.setString(12, posid_new);\n pstmt2.setString(13, msub_type_new);\n pstmt2.setString(14, email2_new);\n pstmt2.setString(15, phone_new);\n pstmt2.setString(16, phone2_new);\n pstmt2.setString(17, suffix_new);\n pstmt2.setString(18, webid_new);\n pstmt2.setString(19, gender);\n pstmt2.setInt(20, pri_indicator);\n pstmt2.setInt(21, email_bounce1);\n pstmt2.setInt(22, email_bounce2);\n\n pstmt2.setString(23, memid);\n pstmt2.executeUpdate();\n\n pstmt2.close(); // close the stmt\n\n\n } else { // member NOT found - add it if we can\n\n if (dup == false) { // if not duplicate member\n\n //\n // New member is ok - add it\n //\n pstmt2 = con.prepareStatement (\n \"INSERT INTO member2b (username, password, name_last, name_first, name_mi, \" +\n \"m_ship, m_type, email, count, c_hancap, g_hancap, wc, message, emailOpt, memNum, \" +\n \"ghin, locker, bag, birth, posid, msub_type, email2, phone1, phone2, name_pre, name_suf, webid, \" +\n \"last_sync_date, gender, pri_indicator) \" +\n \"VALUES (?,?,?,?,?,?,?,?,0,?,?,'','',1,?,?,'',?,?,?,?,?,?,?,'',?,?, now(),?,?)\");\n\n pstmt2.clearParameters(); // clear the parms\n pstmt2.setString(1, memid); // put the parm in stmt\n pstmt2.setString(2, password);\n pstmt2.setString(3, lname);\n pstmt2.setString(4, fname);\n pstmt2.setString(5, mi);\n pstmt2.setString(6, mship);\n pstmt2.setString(7, mtype);\n pstmt2.setString(8, email);\n pstmt2.setFloat(9, c_hcap);\n pstmt2.setFloat(10, u_hcap);\n pstmt2.setString(11, mNum);\n pstmt2.setString(12, ghin);\n pstmt2.setString(13, bag);\n pstmt2.setInt(14, birth);\n pstmt2.setString(15, posid);\n pstmt2.setString(16, msub_type);\n pstmt2.setString(17, email2);\n pstmt2.setString(18, phone);\n pstmt2.setString(19, phone2);\n pstmt2.setString(20, suffix);\n pstmt2.setString(21, webid);\n pstmt2.setString(22, gender);\n pstmt2.setInt(23, pri_indicator);\n pstmt2.executeUpdate(); // execute the prepared stmt\n\n pstmt2.close(); // close the stmt\n\n } else { // this member not found, but name already exists\n\n if (dup) {\n errCount++;\n errMsg = errMsg + \"\\n -Dup user found:\\n\" +\n \" new: memid = \" + memid + \" : cur: \" + dupuser + \"\\n\" +\n \" webid = \" + webid + \" : \" + dupwebid + \"\\n\" +\n \" mNum = \" + mNum + \" : \" + dupmnum;\n }\n }\n } // end of IF Member Found\n\n //\n // Member updated - now see if the username or name changed\n //\n if (userChanged == true || nameChanged == true) { // if username or name changed\n\n //\n // username or name changed - we must update other tables now\n //\n StringBuffer mem_name = new StringBuffer( fname_new ); // get the new first name\n\n if (!mi_new.equals( \"\" )) {\n mem_name.append(\" \" +mi_new); // new mi\n }\n mem_name.append(\" \" +lname_new); // new last name\n\n String newName = mem_name.toString(); // convert to one string\n\n Admin_editmem.updTeecurr(newName, memid_new, memid, con); // update teecurr with new values\n\n Admin_editmem.updTeepast(newName, memid_new, memid, con); // update teepast with new values\n\n Admin_editmem.updLreqs(newName, memid_new, memid, con); // update lreqs with new values\n\n Admin_editmem.updPartner(memid_new, memid, con); // update partner with new values\n\n Admin_editmem.updEvents(newName, memid_new, memid, con); // update evntSignUp with new values\n\n Admin_editmem.updLessons(newName, memid_new, memid, con); // update the lesson books with new values\n }\n\n } else {\n\n // Only report errors that AREN'T due to skip == true, since those were handled earlier!\n if (!found) {\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBER NOT FOUND!\";\n }\n if (fname.equals(\"\")) {\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -FIRST NAME missing!\";\n }\n if (lname.equals(\"\")) {\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -LAST NAME missing!\";\n }\n if (memid.equals(\"\")) {\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -USERNAME missing!\";\n }\n } // end of IF skip\n\n } // end of IF minimum requirements\n\n } // end of IF tokens\n\n } // end of IF header row\n\n // log any errors and warnings that occurred\n if (errCount > 0) {\n totalErrCount += errCount;\n errList.add(errMemInfo + \"\\n *\" + errCount + \" error(s) found*\" + errMsg + \"\\n\");\n }\n if (warnCount > 0) {\n totalWarnCount += warnCount;\n warnList.add(errMemInfo + \"\\n *\" + warnCount + \" warning(s) found*\" + warnMsg + \"\\n\");\n }\n } // end of while (for each record in club's file)\n\n //\n // Done with this file for this club - now set any members that were excluded from this file inactive\n //\n if (found == true) { // if we processed this club\n\n pstmt2 = con.prepareStatement (\n \"UPDATE member2b SET inact = 1 \" +\n \"WHERE last_sync_date != now() AND last_sync_date != '0000-00-00'\");\n\n pstmt2.clearParameters(); // clear the parms\n pstmt2.executeUpdate();\n\n pstmt2.close(); // close the stmt\n\n\n //\n // Roster File Found for this club - make sure the roster sync indicator is set in the club table\n //\n setRSind(con, club);\n }\n }\n catch (Exception e3) {\n\n errorMsg = errorMsg + \" Error processing roster for \" +club+ \": \" + e3.getMessage() + \"\\n\"; // build msg\n SystemUtils.logError(errorMsg); // log it\n }\n\n // Print error and warning count totals to error log\n SystemUtils.logErrorToFile(\"\" +\n \"Total Errors Found: \" + totalErrCount + \"\\n\" +\n \"Total Warnings Found: \" + totalWarnCount + \"\\n\", club, true);\n\n // Print errors and warnings to error log\n if (totalErrCount > 0) {\n SystemUtils.logErrorToFile(\"\" +\n \"********************************************************************\\n\" +\n \"****ERRORS FOR \" + club + \" (Member WAS NOT synced!)\\n\" +\n \"********************************************************************\\n\", club, true);\n while (errList.size() > 0) {\n SystemUtils.logErrorToFile(errList.remove(0), club, true);\n }\n }\n if (totalWarnCount > 0) {\n SystemUtils.logErrorToFile(\"\" +\n \"********************************************************************\\n\" +\n \"****WARNINGS FOR \" + club + \" (Member MAY NOT have synced!)\\n\" +\n \"********************************************************************\\n\", club, true);\n while (warnList.size() > 0) {\n SystemUtils.logErrorToFile(warnList.remove(0), club, true);\n }\n }\n\n // Print end tiem to error log\n SystemUtils.logErrorToFile(\"End time: \" + new java.util.Date().toString() + \"\\n\", club, true);\n\n }", "@PUT\n @JWTTokenNeeded\n @Consumes({MediaType.APPLICATION_JSON})\n @Produces({MediaType.APPLICATION_JSON})\n public Response update(EscenarioDTO entidad) {\n logger.log(Level.INFO, \"entidad:{0}\", entidad);\n \n try {\n \tConciliacion entidadPadreJPA = null;\n if (entidad.getIdConciliacion() != null) {\n entidadPadreJPA = padreDAO.find(entidad.getIdConciliacion());\n if (entidadPadreJPA == null) {\n throw new DataNotFoundException(Response.Status.NOT_FOUND.getReasonPhrase() + entidad.getIdConciliacion());\n }\n }\n //Hallar La entidad actual para actualizarla\n Escenario entidadJPA = managerDAO.find(entidad.getId());\n if (entidadJPA != null) {\n entidadJPA.setFechaActualizacion(Date.from(Instant.now()));\n entidadJPA.setNombre(entidad.getNombre() != null ? entidad.getNombre() : entidadJPA.getNombre());\n entidadJPA.setImpacto(entidad.getImpacto() != null ? entidad.getImpacto() : entidadJPA.getImpacto());\n entidadJPA.setDescripcion(entidad.getDescripcion() != null ? entidad.getDescripcion() : entidadJPA.getDescripcion());\n \n Boolean actualizarConciliacion = false;\n entidadJPA.setConciliacion(entidad.getIdConciliacion() != null ? (entidadPadreJPA != null ? entidadPadreJPA : null) : entidadJPA.getConciliacion());\n \n Conciliacion conciliacionpadreactual = null;\n \n \n if (entidadJPA.getConciliacion() != null && !Objects.equals(entidadJPA.getConciliacion().getId(), entidad.getIdConciliacion())){\n actualizarConciliacion = true;\n conciliacionpadreactual = padreDAO.find(entidadJPA.getConciliacion().getId());\n }\n //entidadJPA.setConciliacion(entidad.getIdConciliacion() != null ? (entidadPadreJPA != null ? entidadPadreJPA : null) : entidadJPA.getConciliacion());\n managerDAO.edit(entidadJPA);\n if (actualizarConciliacion){\n if ((entidadPadreJPA != null)) {\n entidadPadreJPA.addEscenario(entidadJPA);\n padreDAO.edit(entidadPadreJPA);\n conciliacionpadreactual.removeEscenario(entidadJPA);\n padreDAO.edit(conciliacionpadreactual);\n }\n }\n LogAuditoria logAud = new LogAuditoria(this.modulo, Constantes.Acciones.EDITAR.name(), Date.from(Instant.now()), entidad.getUsername(), entidadJPA.toString());\n logAuditoriaDAO.create(logAud);\n \n ResponseWrapper wraper = new ResponseWrapper(true,I18N.getMessage(\"escenario.update\", entidad.getNombre()) ,entidadJPA.toDTO());\n \treturn Response.ok(wraper,MediaType.APPLICATION_JSON).build();\n }\n \n ResponseWrapper wraper = new ResponseWrapper(false,I18N.getMessage(\"escenario.notfound\", entidad.getNombre()));\n \treturn Response.ok(wraper,MediaType.APPLICATION_JSON).build();\n }catch (Exception e) {\n \tif(e.getCause() != null && (e.getCause() instanceof DataAlreadyExistException || e.getCause() instanceof DataNotFoundException)) {\n \t\tlogger.log(Level.SEVERE, e.getMessage(), e);\n \t\tResponseWrapper wraper = new ResponseWrapper(false, e.getCause().getMessage(), 500);\n \t\treturn Response.ok(wraper,MediaType.APPLICATION_JSON).build();\n \t}else {\n \t\tlogger.log(Level.SEVERE, e.getMessage(), e);\n \t\tResponseWrapper wraper = new ResponseWrapper(false, I18N.getMessage(\"general.readerror\"), 500);\n \t\treturn Response.ok(wraper,MediaType.APPLICATION_JSON).build();\n \t}\n }\n }", "public void daoActualizar(Miembro m) throws SQLException {\r\n\t\tPreparedStatement ps= con.prepareCall(\"UPDATE miembros SET nombre=?, apellido1=?, apellido2=?, edad=?, cargo=? WHERE id=?\");\r\n\t\tps.setString(1,m.getNombre());\r\n\t\tps.setString(2,m.getApellido1());\r\n\t\tps.setString(3,m.getApellido2());\r\n\t\tps.setInt(4,m.getEdad());\r\n\t\tps.setInt(5,m.getCargo());\r\n\t\tps.setInt(6,m.getId());\t\r\n\t\tps.executeUpdate();\r\n\t\tps.close();\r\n\t}", "public boolean actualizar(){\n conexion=base.GetConnection();\n if(conexion!=null){\n try{\n String peticion= \"update usuarios set Cedula=? ,Nombres=? ,Sexo=? ,Edad=? ,Direccion=? ,Ciudad=? ,Contrasena=? ,Estrato=? ,Rol=? where Cedula='\";\n PreparedStatement actualizar= conexion.prepareStatement(peticion+this.Cedula+\"'\");\n actualizar.setString(1,this.Cedula);\n actualizar.setString(2,this.Nombres);\n actualizar.setString(3,this.Sexo);\n actualizar.setInt(4,this.Edad);\n actualizar.setString(5,this.Direccion);\n actualizar.setString(6,this.Ciudad);\n actualizar.setString(7,this.Contrasena);\n actualizar.setInt(8,this.Estrato);\n actualizar.setString(9,this.Rol);\n actualizar.executeUpdate();\n conexion.close();\n JOptionPane.showMessageDialog(null,\"Usuario Actualizado\",\"Éxito al actualizar\",1);\n return true;\n }\n catch(SQLException ex){\n JOptionPane.showMessageDialog(null,\"Error al actualizar: \"+ex.getMessage(),\"error\",1);\n return false;\n }}\n else{\n JOptionPane.showMessageDialog(null,\"error al conectar\",\"error\",1);\n return false;\n }\n}", "<T> int update(T obj, String keyColumn);", "int updateByPrimaryKey(CTipoComprobante record) throws SQLException;", "int updateByPrimaryKey(Prueba record);", "public String updateByExampleSelective(Map<String, Object> parameter) {\n Car record = (Car) parameter.get(\"record\");\n CarExample example = (CarExample) parameter.get(\"example\");\n \n SQL sql = new SQL();\n sql.UPDATE(\"`basedata_car`\");\n \n if (record.getCarId() != null) {\n sql.SET(\"car_id = #{record.carId,jdbcType=INTEGER}\");\n }\n \n if (record.getCarBrandId() != null) {\n sql.SET(\"car_brand_id = #{record.carBrandId,jdbcType=INTEGER}\");\n }\n \n if (record.getCarModel() != null) {\n sql.SET(\"car_model = #{record.carModel,jdbcType=VARCHAR}\");\n }\n \n if (record.getCarType() != null) {\n sql.SET(\"car_type = #{record.carType,jdbcType=TINYINT}\");\n }\n \n if (record.getAlias() != null) {\n sql.SET(\"alias = #{record.alias,jdbcType=VARCHAR}\");\n }\n \n if (record.getSeatType() != null) {\n sql.SET(\"seat_type = #{record.seatType,jdbcType=TINYINT}\");\n }\n \n if (record.getSeatNum() != null) {\n sql.SET(\"seat_num = #{record.seatNum,jdbcType=TINYINT}\");\n }\n \n if (record.getCarClass() != null) {\n sql.SET(\"car_class = #{record.carClass,jdbcType=INTEGER}\");\n }\n \n if (record.getGuestNum() != null) {\n sql.SET(\"guest_num = #{record.guestNum,jdbcType=INTEGER}\");\n }\n \n if (record.getLuggageNum() != null) {\n sql.SET(\"luggage_num = #{record.luggageNum,jdbcType=INTEGER}\");\n }\n \n if (record.getSpell() != null) {\n sql.SET(\"spell = #{record.spell,jdbcType=VARCHAR}\");\n }\n \n if (record.getEnName() != null) {\n sql.SET(\"en_name = #{record.enName,jdbcType=VARCHAR}\");\n }\n \n if (record.getUpdatedAt() != null) {\n sql.SET(\"updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}\");\n }\n \n if (record.getCreatedAt() != null) {\n sql.SET(\"created_at = #{record.createdAt,jdbcType=TIMESTAMP}\");\n }\n \n applyWhere(sql, example, true);\n return sql.toString();\n }", "public void saveParameter(){\r\n \tif(editParameter != null){\r\n \t\tint id = editParameter.getId();\r\n \t\tif(id == 0){\r\n \t\t\tthis.getLog().info(\" addParameter()\");\r\n \t\t\talgorithmList.addNewAlgorithmParameterToDB(editParameter, getSelectedAlgorithm().getId());\r\n \t }else{\r\n \t\t\tthis.getLog().info(\" updateParameter(\" + id + \")\");\r\n \t\t\talgorithmList.updateAlgorithmParameterToDB(editParameter, getSelectedAlgorithm().getId());\r\n \t\t}\r\n \t\t\r\n \t\ttry {\r\n \t\t\tthis.getSelectedAlgorithm().setParameters(ConnectionFactory.createConnection().getAlgorithmParameterArray(getSelectedAlgorithm().getId()));\r\n\t\t\t} catch (DataStorageException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n \t}\r\n }", "public DatosNombre actualizarNombre(DatosNombre nombreEmpleado) throws SQLException{\n DatosNombre empleadoNombre = null;\n Connection conexion = null;\n JDBCUtilities conex = new JDBCUtilities();\n \n try{\n conexion= conex.getConnection();\n\n String consulta = \"UPDATE empleado SET nombre=? \"\n + \"WHERE usuario=? and contrasenia=?\";\n \n\n PreparedStatement statement = conexion.prepareStatement(consulta);\n \n statement.setString(1, nombreEmpleado.getNombreNuevo());\n statement.setString(2, nombreEmpleado.getUsuario());\n statement.setString(3, nombreEmpleado.getContrasenia());\n \n statement.executeUpdate();\n\n //Cerrar interacciones con BD \n statement.close();\n\n //Si el proceso fue exitoso cambiar el estado\n empleadoNombre = nombreEmpleado;\n\n }catch(SQLException e){\n System.err.println(\"Error actualizando nombre empleado! \"+e);\n }finally{\n //Cierre del controlador\n if(conexion != null){\n conexion.close();\n }\n }\n return empleadoNombre; \n }", "public RespuestaBD crearRegistro(int codigoFlujo, int secuencia, int servicioInicio, int accion, int codigoEstado, int servicioDestino, String nombreProcedimiento, String correoDestino, String enviar, String mismoProveedor, String mismoCliente, String estado, int caracteristica, int caracteristicaValor, int caracteristicaCorreo, String metodoSeleccionProveedor, String indCorreoCliente, String indHermana, String indHermanaCerrada, String indfuncionario, String usuarioInsercion) {\n/* 342 */ RespuestaBD rta = new RespuestaBD();\n/* */ \n/* 344 */ int elSiguiente = siguienteRegistro(codigoFlujo);\n/* 345 */ if (elSiguiente == 0) {\n/* 346 */ rta.setMensaje(\"Generando secuencia\");\n/* 347 */ return rta;\n/* */ } \n/* */ \n/* */ try {\n/* 351 */ String s = \"insert into wkf_detalle(codigo_flujo,secuencia,servicio_inicio,accion,codigo_estado,servicio_destino,nombre_procedimiento,correo_destino,enviar_solicitud,ind_mismo_proveedor,ind_mismo_cliente,estado,caracteristica,valor_caracteristica,caracteristica_correo,metodo_seleccion_proveedor,ind_correo_clientes,enviar_hermana,enviar_si_hermana_cerrada,ind_cliente_inicial,usuario_insercion,fecha_insercion) values (\" + codigoFlujo + \",\" + \"\" + elSiguiente + \",\" + \"\" + servicioInicio + \",\" + \"\" + accion + \",\" + \"\" + codigoEstado + \",\" + \"\" + ((servicioDestino == 0) ? \"null\" : Integer.valueOf(servicioDestino)) + \",\" + \"'\" + nombreProcedimiento + \"',\" + \"'\" + correoDestino + \"',\" + \"'\" + enviar + \"',\" + \"'\" + mismoProveedor + \"',\" + \"'\" + mismoCliente + \"',\" + \"'\" + estado + \"',\" + ((caracteristica == 0) ? \"null\" : (\"\" + caracteristica)) + \",\" + ((caracteristicaValor == 0) ? \"null\" : (\"\" + caracteristicaValor)) + \",\" + ((caracteristicaCorreo == 0) ? \"null\" : (\"\" + caracteristicaCorreo)) + \",\" + ((metodoSeleccionProveedor.length() == 0) ? \"null\" : (\"'\" + metodoSeleccionProveedor + \"'\")) + \",\" + ((indCorreoCliente.length() == 0) ? \"null\" : (\"'\" + indCorreoCliente + \"'\")) + \",\" + ((indHermana.length() == 0) ? \"null\" : (\"'\" + indHermana + \"'\")) + \",\" + ((indHermanaCerrada.length() == 0) ? \"null\" : (\"'\" + indHermanaCerrada + \"'\")) + \",\" + ((indfuncionario.length() == 0) ? \"null\" : (\"'\" + indfuncionario + \"'\")) + \",\" + \"'\" + usuarioInsercion + \"',\" + \"\" + Utilidades.getFechaBD() + \"\" + \")\";\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 398 */ rta = this.dat.executeUpdate2(s);\n/* 399 */ rta.setSecuencia(elSiguiente);\n/* */ }\n/* 401 */ catch (Exception e) {\n/* 402 */ e.printStackTrace();\n/* 403 */ Utilidades.writeError(\"%FlujoDetalleDAO:crearRegistro \", e);\n/* 404 */ rta.setMensaje(e.getMessage());\n/* */ } \n/* 406 */ return rta;\n/* */ }", "public void actualizar(Dia dia) {\n Session session = sessionFactory.openSession();\n //la transaccion a relizar\n Transaction tx = null;\n try {\n tx = session.beginTransaction();\n //actualizar el Dia\n session.update(dia);\n \n tx.commit();\n }\n catch (Exception e) {\n //Se regresa a un estado consistente \n if (tx!=null){ \n tx.rollback();\n }\n e.printStackTrace(); \n }\n finally {\n //cerramos siempre la sesion\n session.close();\n }\n}", "public int Edbroker(Long broker_id, String firstname, String lastname,\r\n\t\tString address, String gender, String eMail, Long phone,\r\n\t\tString experience) throws SQLException {\n\tint i=DbConnect.getStatement().executeUpdate(\"update broker set first_name='\"+firstname+\"',last_name='\"+lastname+\"',address='\"+address+\"',gender='\"+gender+\"',e_mail='\"+eMail+\"',phone=\"+phone+\",experience='\"+experience+\"' where broker_id=\"+broker_id+\"\");\r\n\treturn i;\r\n}", "public EditHoteleriaBD(Connection connection)\r\n\t{\r\n\t\t\r\n\t\tconn = connection;\r\n\t\ttry \r\n\t\t{\r\n\t\t\tString query=\"\";\r\n\t\t\t\r\n\t\t\t//Consulta a la tabla atencionalojamiento de la base de datos\r\n\t\t\tquery = \"UPDATE atencionalojamiento\"+\r\n\t\t\t \" SET servicio = ?, hora = ?, fechaingreso = ?, costo = ?, responsable = ?, cliente = ?, mascota = ?, canil = ?, fechasalida = ?, comentario = ?, diasestadia = ?, eliminado = ? \"+\r\n\t\t\t\t \"WHERE fechaingreso = ? AND fechasalida = ? AND canil = ?;\";\r\n\t\t\t\r\n\t\t\tupdate = connection.prepareStatement(query);\r\n\t\t\t\r\n\t\t} \r\n\t\tcatch (SQLException e) \r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "private void updateDB() {\n }", "public void almacenoDatos(){\n BaseDatosSecundaria administrador= new BaseDatosSecundaria(this);\n SQLiteDatabase bdsecunadaria= administrador.getWritableDatabase();\n _valuesPedido.put(\"Producto\", this._productoNombre);\n _valuesPedido.put(\"Precio\",this._productoPrecio);\n _valuesPedido.put(\"Cantidad\",this._etAdquirir.getText().toString());\n _valuesPedido.put(\"Vendedor\",this.username);\n _valuesPedido.put(\"Id_Producto\",this._productoId);\n bdsecunadaria.insert(\"DATOS\",null,this._valuesPedido);\n bdsecunadaria.close();\n }", "public boolean insertarNuevoClienteVista(Cliente cliente, Cuenta cuenta) {\n \n String queryDividido1 = \"INSERT INTO Usuario(Codigo, Nombre, DPI, Direccion, Sexo, Password, Tipo_Usuario) \"\n + \"VALUES(?,?,?,?,?,aes_encrypt(?,'AES'),?)\";\n\n String queryDividido2 = \"INSERT INTO Cliente(Usuario_Codigo, Nombre, Nacimiento, DPI_Escaneado, Estado) \"\n + \"VALUES(?,?,?,?,?)\";\n \n String queryDividido3 = \"INSERT INTO Cuenta(No_Cuenta, Fecha_Creacion, Saldo_Cuenta, Cliente_Usuario_Codigo) \"\n + \"VALUES(?,?,?,?)\";\n \n \n try {\n\n PreparedStatement enviarDividido1 = Conexion.conexion.prepareStatement(queryDividido1);\n\n //Envio de los Datos Principales del cliente a la Tabla Usuario\n enviarDividido1.setInt(1, cliente.getCodigo());\n enviarDividido1.setString(2, cliente.getNombre());\n enviarDividido1.setString(3, cliente.getDPI());\n enviarDividido1.setString(4, cliente.getDireccion());\n enviarDividido1.setString(5, cliente.getSexo());\n enviarDividido1.setString(6, cliente.getPassword());\n enviarDividido1.setInt(7, 3);\n enviarDividido1.executeUpdate();\n\n //Envia los Datos Complementarios del Usuario a la tabla cliente\n PreparedStatement enviarDividido2 = Conexion.conexion.prepareStatement(queryDividido2);\n enviarDividido2.setInt(1, cliente.getCodigo());\n enviarDividido2.setString(2, cliente.getNombre());\n enviarDividido2.setString(3, cliente.getNacimiento());\n enviarDividido2.setBlob(4, cliente.getDPIEscaneado());\n enviarDividido2.setBoolean(5, cliente.isEstado());\n enviarDividido2.executeUpdate();\n \n //Envia los Datos de la Cuenta Adjudicada al Cliente\n PreparedStatement enviarDividido3 = Conexion.conexion.prepareStatement(queryDividido3);\n\n //Envio de los Datos Principales de una Cuenta a la Tabla Cuenta, perteneciente a un cliente en Especifico\n enviarDividido3.setInt(1, cuenta.getNoCuenta());\n enviarDividido3.setString(2, cuenta.getFechaCreacion());\n enviarDividido3.setDouble(3, cuenta.getSaldo());\n enviarDividido3.setInt(4, cliente.getCodigo());\n enviarDividido3.executeUpdate();\n \n \n return true;\n\n } catch (SQLException ex) {\n ex.printStackTrace(System.out);\n return false;\n }\n\n }", "@Override\n public void update(Person p) throws SQLException, ClassNotFoundException\n {\n\n BasicDBObject query = new BasicDBObject();\n query.put(\"Id\", p.getId()); // old data, find key Id\n\n BasicDBObject newDocument = new BasicDBObject();\n\n// newDocument.put(\"Id\", p.getId()); // new data\n newDocument.put(\"FName\", p.getFName()); // new data\n newDocument.put(\"LName\", p.getLName()); // new data\n newDocument.put(\"Age\", p.getAge()); // new data\n System.out.println(newDocument);\n\n BasicDBObject updateObj = new BasicDBObject();\n updateObj.put(\"$set\", newDocument);\n System.out.println(updateObj);\n\n table.update(query, updateObj);\n }", "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_parto his_parto = new His_parto();\r\n\t\t\t\this_parto.setCodigo_empresa(empresa.getCodigo_empresa());\r\n\t\t\t\this_parto.setCodigo_sucursal(sucursal.getCodigo_sucursal());\r\n\t\t\t\this_parto.setCodigo_historia(tbxCodigo_historia.getValue());\r\n\t\t\t\this_parto.setIdentificacion(tbxIdentificacion.getValue());\r\n\t\t\t\this_parto.setFecha_inicial(new Timestamp(dtbxFecha_inicial\r\n\t\t\t\t\t\t.getValue().getTime()));\r\n\t\t\t\this_parto.setConyugue(tbxConyugue.getValue());\r\n\t\t\t\this_parto.setId_conyugue(tbxId_conyugue.getValue());\r\n\t\t\t\this_parto.setEdad_conyugue(tbxEdad_conyugue.getValue());\r\n\t\t\t\this_parto.setEscolaridad_conyugue(tbxEscolaridad_conyugue\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_parto.setMotivo(tbxMotivo.getValue());\r\n\t\t\t\this_parto.setEnfermedad_actual(tbxEnfermedad_actual.getValue());\r\n\t\t\t\this_parto.setAntecedentes_familiares(tbxAntecedentes_familiares\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_parto.setPreeclampsia(rdbPreeclampsia.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setHipertension(rdbHipertension.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setEclampsia(rdbEclampsia.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setH1(rdbH1.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setH2(rdbH2.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setPostimadurez(rdbPostimadurez.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setRot_pre(rdbRot_pre.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setPolihidramnios(rdbPolihidramnios.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setRcui(rdbRcui.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setPelvis(rdbPelvis.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setFeto_macrosonico(rdbFeto_macrosonico\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setIsoinmunizacion(rdbIsoinmunizacion\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setAo(rdbAo.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setCirc_cordon(rdbCirc_cordon.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setPostparto(rdbPostparto.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setDiabetes(rdbDiabetes.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setCardiopatia(rdbCardiopatia.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setAnemias(rdbAnemias.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setEnf_autoinmunes(rdbEnf_autoinmunes\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setEnf_renales(rdbEnf_renales.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setInf_urinaria(rdbInf_urinaria.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setEpilepsia(rdbEpilepsia.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto\r\n\t\t\t\t\t\t.setTbc(rdbTbc.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setMiomas(rdbMiomas.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setHb(rdbHb.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setFumadora(rdbFumadora.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setInf_puerperal(rdbInf_puerperal.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setInfertilidad(rdbInfertilidad.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setMenarquia(tbxMenarquia.getValue());\r\n\t\t\t\this_parto.setCiclos(tbxCiclos.getValue());\r\n\t\t\t\this_parto.setVida_marital(tbxVida_marital.getValue());\r\n\t\t\t\this_parto.setVida_obstetrica(tbxVida_obstetrica.getValue());\r\n\t\t\t\this_parto.setNo_gestaciones(lbxNo_gestaciones.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setParto(lbxParto.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setAborto(lbxAborto.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setCesarias(lbxCesarias.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setFecha_um(new Timestamp(dtbxFecha_um.getValue()\r\n\t\t\t\t\t\t.getTime()));\r\n\t\t\t\this_parto.setUm(tbxUm.getValue());\r\n\t\t\t\this_parto.setFep(tbxFep.getValue());\r\n\t\t\t\this_parto.setGemerales(lbxGemerales.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setMalformados(lbxMalformados.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setNacidos_vivos(lbxNacidos_vivos.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setNacidos_muertos(lbxNacidos_muertos\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setPreterminos(lbxPreterminos.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setMedico(chbMedico.isChecked());\r\n\t\t\t\this_parto.setEnfermera(chbEnfermera.isChecked());\r\n\t\t\t\this_parto.setAuxiliar(chbAuxiliar.isChecked());\r\n\t\t\t\this_parto.setPartera(chbPartera.isChecked());\r\n\t\t\t\this_parto.setOtros(chbOtros.isChecked());\r\n\t\t\t\this_parto.setControlado(rdbControlado.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setLugar_consulta(rdbLugar_consulta.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setNo_consultas(lbxNo_consultas.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setEspecialistas(chbEspecialistas.isChecked());\r\n\t\t\t\this_parto.setGeneral(chbGeneral.isChecked());\r\n\t\t\t\this_parto.setPartera_consulta(chbPartera_consulta.isChecked());\r\n\t\t\t\this_parto.setSangrado_vaginal(rdbSangrado_vaginal\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setCefalias(rdbCefalias.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setEdema(rdbEdema.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setEpigastralgia(rdbEpigastralgia.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setVomitos(rdbVomitos.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setTinutus(rdbTinutus.getSelectedItem().getValue()\r\n\t\t\t\t\t\t.toString());\r\n\t\t\t\this_parto.setEscotomas(rdbEscotomas.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setInfeccion_urinaria(rdbInfeccion_urinaria\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setInfeccion_vaginal(rdbInfeccion_vaginal\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setOtros_embarazo(tbxOtros_embarazo.getValue());\r\n\t\t\t\this_parto.setCardiaca(tbxCardiaca.getValue());\r\n\t\t\t\this_parto.setRespiratoria(tbxRespiratoria.getValue());\r\n\t\t\t\this_parto.setPeso(tbxPeso.getValue());\r\n\t\t\t\this_parto.setTalla(tbxTalla.getValue());\r\n\t\t\t\this_parto.setTempo(tbxTempo.getValue());\r\n\t\t\t\this_parto.setPresion(tbxPresion.getValue());\r\n\t\t\t\this_parto.setPresion2(tbxPresion2.getValue());\r\n\t\t\t\this_parto.setInd_masa(tbxInd_masa.getValue());\r\n\t\t\t\this_parto.setSus_masa(tbxSus_masa.getValue());\r\n\t\t\t\this_parto.setCabeza_cuello(tbxCabeza_cuello.getValue());\r\n\t\t\t\this_parto.setCardiovascular(tbxCardiovascular.getValue());\r\n\t\t\t\this_parto.setMamas(tbxMamas.getValue());\r\n\t\t\t\this_parto.setPulmones(tbxPulmones.getValue());\r\n\t\t\t\this_parto.setAbdomen(tbxAbdomen.getValue());\r\n\t\t\t\this_parto.setUterina(tbxUterina.getValue());\r\n\t\t\t\this_parto.setSituacion(tbxSituacion.getValue());\r\n\t\t\t\this_parto.setPresentacion(tbxPresentacion.getValue());\r\n\t\t\t\this_parto.setV_presentacion(tbxV_presentacion.getValue());\r\n\t\t\t\this_parto.setPosicion(tbxPosicion.getValue());\r\n\t\t\t\this_parto.setV_posicion(tbxV_posicion.getValue());\r\n\t\t\t\this_parto.setC_uterina(tbxC_uterina.getValue());\r\n\t\t\t\this_parto.setTono(tbxTono.getValue());\r\n\t\t\t\this_parto.setFcf(tbxFcf.getValue());\r\n\t\t\t\this_parto.setGenitales(tbxGenitales.getValue());\r\n\t\t\t\this_parto.setDilatacion(tbxDilatacion.getValue());\r\n\t\t\t\this_parto.setBorramiento(tbxBorramiento.getValue());\r\n\t\t\t\this_parto.setEstacion(tbxEstacion.getValue());\r\n\t\t\t\this_parto.setMembranas(tbxMembranas.getValue());\r\n\t\t\t\this_parto.setExtremidades(tbxExtremidades.getValue());\r\n\t\t\t\this_parto.setSnc(tbxSnc.getValue());\r\n\t\t\t\this_parto.setObservacion(tbxObservacion.getValue());\r\n\t\t\t\this_parto.setCodigo_consulta_pyp(lbxCodigo_consulta_pyp\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setFinalidad_cons(lbxFinalidad_cons.getSelectedItem()\r\n\t\t\t\t\t\t.getValue().toString());\r\n\t\t\t\this_parto.setCausas_externas(lbxCausas_externas\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setTipo_disnostico(lbxTipo_disnostico\r\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\r\n\t\t\t\this_parto.setTipo_principal(tbxTipo_principal.getValue());\r\n\t\t\t\this_parto.setTipo_relacionado_1(tbxTipo_relacionado_1\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_parto.setTipo_relacionado_2(tbxTipo_relacionado_2\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_parto.setTipo_relacionado_3(tbxTipo_relacionado_3\r\n\t\t\t\t\t\t.getValue());\r\n\t\t\t\this_parto.setTratamiento(tbxTratamiento.getValue());\r\n\r\n\t\t\t\tdatos.put(\"codigo_historia\", his_parto);\r\n\t\t\t\tdatos.put(\"accion\", tbxAccion.getText());\r\n\r\n\t\t\t\this_parto = getServiceLocator().getHis_partoService().guardar(\r\n\t\t\t\t\t\tdatos);\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\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}", "public boolean insertarCreacionHistorialCliente(Cliente cliente) {\n String queryDividido1 = \"INSERT INTO Historial_Cliente(Usuario_Codigo, Nombre, DPI, Direccion, Sexo, Password, Nacimiento, DPI_Escaneado, Tipo, Fecha_Cambio) \"\n + \"VALUES(?,?,?,?,?,aes_encrypt(?,'AES'),?,?,?,?)\";\n java.sql.Date fechaCreacion = new java.sql.Date(Calendar.getInstance().getTime().getTime());\n\n try {\n\n PreparedStatement enviarDividido1 = Conexion.conexion.prepareStatement(queryDividido1);\n\n //Envio de los Datos de Creacion de un Nuevo Cliente a la Tabla Historial_Cliente\n enviarDividido1.setInt(1, cliente.getCodigo());\n enviarDividido1.setString(2, cliente.getNombre());\n enviarDividido1.setString(3, cliente.getDPI());\n enviarDividido1.setString(4, cliente.getDireccion());\n enviarDividido1.setString(5, cliente.getSexo());\n enviarDividido1.setString(6, cliente.getPassword());\n enviarDividido1.setString(7, cliente.getNacimiento());\n enviarDividido1.setBlob(8, cliente.getDPIEscaneado());\n enviarDividido1.setString(9, \"Creacion\");\n enviarDividido1.setString(10, fechaCreacion.toString());\n enviarDividido1.executeUpdate();\n\n \n return true;\n\n } catch (SQLException ex) {\n ex.printStackTrace(System.out);\n return false;\n }\n\n }", "@Override\n public void modificarConfiguracion(Entity e) throws SQLException {\n Connection conexion;\n ResultSet result = null;\n String select= \"UPDATE config_notificacion SET \" +\n \"con_not_boletin = ?, con_not_recibir =? , \" +\n \"con_not_preferencias = ?, con_not_suscripciones = ?, \" +\n \"con_not_etiquetado = ?, con_not_estadisticas =? \" +\n \"WHERE con_not_id = ?;\";\n PreparedStatement ps = null;\n Entity config = (ConfiguracionNotificaciones) e;\n try {\n conexion = getBdConnect();\n ps = conexion.prepareStatement(select);\n ps.setInt(1, config.get_id());\n }\n catch (SQLException error){\n error.printStackTrace();\n }\n finally {\n closeConnection();\n }\n }", "public String updateByExampleSelective(Map<String, Object> parameter) {\n BsNewsWithBLOBs record = (BsNewsWithBLOBs) parameter.get(\"record\");\n BsNewsExample example = (BsNewsExample) parameter.get(\"example\");\n \n BEGIN();\n UPDATE(\"bs_news\");\n \n if (record.getId() != null) {\n SET(\"ID = #{record.id,jdbcType=INTEGER}\");\n }\n \n if (record.getTitle() != null) {\n SET(\"title = #{record.title,jdbcType=VARCHAR}\");\n }\n \n if (record.getNote() != null) {\n SET(\"note = #{record.note,jdbcType=VARCHAR}\");\n }\n \n if (record.getCreatetime() != null) {\n SET(\"createTime = #{record.createtime,jdbcType=TIMESTAMP}\");\n }\n \n if (record.getCreateuserid() != null) {\n SET(\"createUserId = #{record.createuserid,jdbcType=INTEGER}\");\n }\n \n if (record.getCreateusername() != null) {\n SET(\"createUserName = #{record.createusername,jdbcType=VARCHAR}\");\n }\n \n if (record.getUpdatetime() != null) {\n SET(\"updateTime = #{record.updatetime,jdbcType=TIMESTAMP}\");\n }\n \n if (record.getUpdateuserid() != null) {\n SET(\"updateUserId = #{record.updateuserid,jdbcType=INTEGER}\");\n }\n \n if (record.getUpdateusername() != null) {\n SET(\"updateUserName = #{record.updateusername,jdbcType=VARCHAR}\");\n }\n \n if (record.getIntcolumn1() != null) {\n SET(\"intColumn1 = #{record.intcolumn1,jdbcType=INTEGER}\");\n }\n \n if (record.getIntcolumn2() != null) {\n SET(\"intColumn2 = #{record.intcolumn2,jdbcType=INTEGER}\");\n }\n \n if (record.getStrcolumn1() != null) {\n SET(\"strColumn1 = #{record.strcolumn1,jdbcType=VARCHAR}\");\n }\n \n if (record.getStrcolumn2() != null) {\n SET(\"strColumn2 = #{record.strcolumn2,jdbcType=VARCHAR}\");\n }\n \n if (record.getHtmlvalue() != null) {\n SET(\"htmlValue = #{record.htmlvalue,jdbcType=LONGVARCHAR}\");\n }\n \n applyWhere(example, true);\n return SQL();\n }", "public DAOImpl(String baseDatos, String usuario, String clave){\n this.baseDatos = baseDatos;\n this.usuario = usuario;\n this.clave = clave;\n }", "private static void ceSync(Connection con, InputStreamReader isr, String club) {\n\n PreparedStatement pstmt2 = null;\n Statement stmt = null;\n ResultSet rs = null;\n\n\n Member member = new Member();\n\n String line = \"\";\n String password = \"\";\n String temp = \"\";\n\n int i = 0;\n int ext = 1;\n\n // Values from CE records\n //\n String fname = \"\";\n String lname = \"\";\n String mi = \"\";\n String suffix = \"\";\n String posid = \"\";\n String gender = \"\";\n String ghin = \"\";\n String memid = \"\";\n String webid = \"\";\n String mNum = \"\";\n String u_hndcp = \"\";\n String c_hndcp = \"\";\n String mship = \"\";\n String mtype = \"\";\n String bag = \"\";\n String email = \"\";\n String email2 = \"\";\n String phone = \"\";\n String phone2 = \"\";\n String mobile = \"\";\n String primary = \"\";\n String active = \"\";\n String webid_new = \"\";\n String memid_new = \"\";\n String lnamePart2;\n\n String mship2 = \"\"; // used to tell if match was found\n\n float u_hcap = 0;\n float c_hcap = 0;\n int birth = 0;\n int inact = 0;\n\n // Values from ForeTees records\n //\n String memid_old = \"\";\n String fname_old = \"\";\n String lname_old = \"\";\n String mi_old = \"\";\n String mship_old = \"\";\n String mtype_old = \"\";\n String email_old = \"\";\n String mNum_old = \"\";\n String ghin_old = \"\";\n String bag_old = \"\";\n String posid_old = \"\";\n String email2_old = \"\";\n String phone_old = \"\";\n String phone2_old = \"\";\n String suffix_old = \"\";\n\n float u_hcap_old = 0;\n float c_hcap_old = 0;\n int birth_old = 0;\n int inact_old = 0;\n\n // Values for New ForeTees records\n //\n String fname_new = \"\";\n String lname_new = \"\";\n String mi_new = \"\";\n String mship_new = \"\";\n String mtype_new = \"\";\n String email_new = \"\";\n String mNum_new = \"\";\n String ghin_new = \"\";\n String bag_new = \"\";\n String posid_new = \"\";\n String email2_new = \"\";\n String phone_new = \"\";\n String phone2_new = \"\";\n String suffix_new = \"\";\n String last_mship = \"\";\n String last_mnum = \"\";\n String openParen = \"(\";\n String closeParen = \")\";\n String asterik = \"*\";\n String slash = \"/\";\n String backslash = \"\\\\\";\n\n float u_hcap_new = 0;\n float c_hcap_new = 0;\n int birth_new = 0;\n int inact_new = 0;\n int rcount = 0;\n int pcount = 0;\n int ncount = 0;\n int ucount = 0;\n int errCount = 0;\n int warnCount = 0;\n int totalErrCount = 0;\n int totalWarnCount = 0;\n int email_bounce1 = 0;\n int email_bounce2 = 0;\n\n String errorMsg = \"\";\n String errMsg = \"\";\n String warnMsg = \"\";\n String errMemInfo = \"\";\n\n boolean failed = false;\n boolean changed = false;\n boolean skip = false;\n boolean headerFound = false;\n boolean found = false;\n boolean useWebid = false;\n boolean genderMissing = false;\n\n ArrayList<String> errList = new ArrayList<String>();\n ArrayList<String> warnList = new ArrayList<String>();\n\n\n // Overwrite log file with fresh one for today's logs\n SystemUtils.logErrorToFile(\"Clubessential: Error log for \" + club + \"\\nStart time: \" + new java.util.Date().toString() + \"\\n\", club, false);\n\n try {\n\n Calendar caly = new GregorianCalendar(); // get todays date\n int thisYear = caly.get(Calendar.YEAR); // get this year value\n\n thisYear = thisYear - 2000; // 2 digit value\n\n\n BufferedReader br = new BufferedReader(isr);\n\n // format of each line in the file:\n //\n // memid, mNum, fname, mi, lname, suffix, mship, mtype, gender, email, email2,\n // phone, phone2, bag, hndcp#, uhndcp, chndcp, birth, posid, mobile, primary, act/inact\n //\n //\n while (true) {\n\n line = br.readLine();\n\n if (line == null) {\n break;\n }\n\n // Skip the 1st row (header row)\n\n if (headerFound == false) {\n\n headerFound = true;\n\n } else {\n\n // Remove the dbl quotes and check for embedded commas\n\n line = cleanRecord( line );\n\n rcount++; // count the records\n\n // parse the line to gather all the info\n\n StringTokenizer tok = new StringTokenizer( line, \",\" ); // delimiters are comma\n\n if ( tok.countTokens() > 20 ) { // enough data ?\n\n memid = tok.nextToken(); // a\n mNum = tok.nextToken(); // b\n fname = tok.nextToken(); // c\n mi = tok.nextToken(); // d\n lname = tok.nextToken(); // e\n suffix = tok.nextToken(); // f\n mship = tok.nextToken(); // g\n mtype = tok.nextToken(); // h\n gender = tok.nextToken(); // i\n email = tok.nextToken(); // j\n email2 = tok.nextToken(); // k\n phone = tok.nextToken(); // l\n phone2 = tok.nextToken(); // m\n bag = tok.nextToken(); // n\n ghin = tok.nextToken(); // o\n u_hndcp = tok.nextToken(); // p\n c_hndcp = tok.nextToken(); // q\n temp = tok.nextToken(); // r\n posid = tok.nextToken(); // s\n mobile = tok.nextToken(); // t\n primary = tok.nextToken(); // u\n active = tok.nextToken(); // v\n\n //\n // Check for ? (not provided)\n //\n if (memid.equals( \"?\" )) {\n\n memid = \"\";\n }\n if (mNum.equals( \"?\" )) {\n\n mNum = \"\";\n }\n if (fname.equals( \"?\" )) {\n\n fname = \"\";\n }\n if (mi.equals( \"?\" )) {\n\n mi = \"\";\n }\n if (lname.equals( \"?\" )) {\n\n lname = \"\";\n }\n if (suffix.equals( \"?\" )) {\n\n suffix = \"\";\n }\n if (mship.equals( \"?\" )) {\n\n mship = \"\";\n }\n if (mtype.equals( \"?\" )) {\n\n mtype = \"\";\n }\n if (gender.equals( \"?\" ) || (!gender.equalsIgnoreCase(\"M\") && !gender.equalsIgnoreCase(\"F\"))) {\n\n if (gender.equals( \"?\" )) {\n genderMissing = true;\n } else {\n genderMissing = false;\n }\n gender = \"\";\n }\n if (email.equals( \"?\" )) {\n\n email = \"\";\n }\n if (email2.equals( \"?\" )) {\n\n email2 = \"\";\n }\n if (phone.equals( \"?\" )) {\n\n phone = \"\";\n }\n if (phone2.equals( \"?\" )) {\n\n phone2 = \"\";\n }\n if (bag.equals( \"?\" )) {\n\n bag = \"\";\n }\n if (ghin.equals( \"?\" )) {\n\n ghin = \"\";\n }\n if (u_hndcp.equals( \"?\" )) {\n\n u_hndcp = \"\";\n }\n if (c_hndcp.equals( \"?\" )) {\n\n c_hndcp = \"\";\n }\n if (temp.equals( \"?\" ) || temp.equals( \"0\" )) {\n\n temp = \"\";\n }\n if (posid.equals( \"?\" )) {\n\n posid = \"\";\n }\n if (mobile.equals( \"?\" )) {\n\n mobile = \"\";\n }\n if (primary.equals( \"?\" )) {\n\n primary = \"\";\n }\n if (active.equals( \"?\" )) {\n\n active = \"\";\n }\n\n\n //\n // Westchester memids will be empty for dependents\n //\n if (club.equals( \"westchester\" ) && memid.equals( \"\" )) {\n\n memid = mNum; // use mNum\n }\n\n\n if (club.equals( \"virginiacc\" )) {\n\n //\n // Make sure name is titled\n //\n fname = toTitleCase(fname);\n lname = toTitleCase(lname);\n }\n\n\n //\n // Ignore mi if not alpha\n //\n if (mi.endsWith( \"0\" ) || mi.endsWith( \"1\" ) || mi.endsWith( \"2\" ) || mi.endsWith( \"3\" ) ||\n mi.endsWith( \"4\" ) || mi.endsWith( \"5\" ) || mi.endsWith( \"6\" ) || mi.endsWith( \"7\" ) ||\n mi.endsWith( \"8\" ) || mi.endsWith( \"9\" )) {\n\n mi = \"\";\n }\n\n\n tok = new StringTokenizer( lname, openParen ); // check for open paren '('\n\n if ( tok.countTokens() > 1 ) {\n\n lname = tok.nextToken(); // skip open paren and anything following it\n }\n\n tok = new StringTokenizer( lname, slash ); // check for slash\n\n if ( tok.countTokens() > 1 ) {\n\n lname = tok.nextToken(); // skip them and anything following it\n }\n\n tok = new StringTokenizer( lname, backslash ); // check for backslash\n\n if ( tok.countTokens() > 1 ) {\n\n lname = tok.nextToken(); // skip them and anything following it\n }\n\n tok = new StringTokenizer( fname, openParen ); // check for open paren '('\n\n if ( tok.countTokens() > 1 ) {\n\n fname = tok.nextToken(); // skip open paren and anything following it\n }\n\n tok = new StringTokenizer( fname, \"/\\\\\" ); // check for slash and backslash\n\n if ( tok.countTokens() > 1 ) {\n\n fname = tok.nextToken(); // skip them and anything following it\n }\n\n\n //\n // Determine if we should process this record (does it meet the minimum requirements?)\n //\n if (!memid.equals( \"\" ) && !mNum.equals( \"\" ) && !lname.equals( \"\" ) && !fname.equals( \"\" )) {\n\n //\n // Remove spaces, etc. from name fields\n //\n tok = new StringTokenizer( fname, \" \" ); // delimiters are space\n\n fname = tok.nextToken(); // remove any spaces and middle name\n\n if ( tok.countTokens() > 0 ) {\n\n mi = tok.nextToken(); // over-write mi if already there\n\n if (mi.startsWith(\"&\")) {\n mi = \"\";\n }\n }\n\n if (!suffix.equals( \"\" )) { // if suffix provided\n\n tok = new StringTokenizer( suffix, \" \" ); // delimiters are space\n\n suffix = tok.nextToken(); // remove any extra (only use one value)\n }\n\n tok = new StringTokenizer( lname, \" \" ); // delimiters are space\n\n if ( tok.countTokens() > 0 ) { // more than just lname?\n\n lname = tok.nextToken(); // remove suffix and spaces\n }\n\n if (suffix.equals( \"\" )) { // if suffix not provided\n\n if ( tok.countTokens() > 1 ) { // check for suffix and 2 part lname (i.e. Van Buren)\n\n lnamePart2 = tok.nextToken();\n\n if (!lnamePart2.startsWith(\"&\") && !lnamePart2.startsWith(openParen)) { // if ok to add\n\n lname = lname + lnamePart2; // combine (i.e. VanBuren)\n }\n }\n\n if ( tok.countTokens() > 0 ) { // suffix?\n\n suffix = tok.nextToken();\n\n if (suffix.startsWith(\"&\")) {\n suffix = \"\";\n }\n }\n\n } else { // suffix provided in suffix field - check for 2 part lname (i.e. Van Buren)\n\n if ( tok.countTokens() > 0 ) {\n\n lnamePart2 = tok.nextToken();\n\n if (!lnamePart2.startsWith(\"&\") && !lnamePart2.startsWith(\"(\") && !lnamePart2.equals(suffix)) { // if ok to add\n\n lname = lname + lnamePart2; // combine (i.e. VanBuren)\n }\n }\n }\n\n if (suffix.startsWith(openParen)) { // if not really a suffix\n\n suffix = \"\";\n }\n\n\n //\n // Isolate the last name in case extra info attached (i.e. lname..yyyy/nnn)\n //\n if (!lname.equals( \"\" )) {\n\n tok = new StringTokenizer( lname, asterik ); // delimiters are slashes, asterics (backslash needs 2)\n\n if ( tok.countTokens() > 0 ) {\n\n lname = tok.nextToken(); // isolate lname\n }\n\n tok = new StringTokenizer( lname, slash );\n\n if ( tok.countTokens() > 0 ) {\n\n lname = tok.nextToken();\n }\n\n tok = new StringTokenizer( lname, backslash );\n\n if ( tok.countTokens() > 0 ) {\n\n lname = tok.nextToken();\n }\n }\n\n //\n // Append the suffix to last name if it exists and isn't already appended\n //\n if (!suffix.equals(\"\")) {\n\n if (!lname.endsWith(suffix)) {\n\n lname = lname + \"_\" + suffix; // append it\n }\n\n suffix = \"\"; // done with it now\n }\n\n\n //\n // Determine the handicaps\n //\n u_hcap = -99; // indicate no hndcp\n c_hcap = -99; // indicate no c_hndcp\n\n if (!u_hndcp.equals( \"\" ) && !u_hndcp.equalsIgnoreCase(\"NH\") && !u_hndcp.equalsIgnoreCase(\"NHL\")) {\n\n u_hndcp = u_hndcp.replace('L', ' '); // isolate the handicap - remove spaces and trailing 'L'\n u_hndcp = u_hndcp.replace('H', ' '); // or 'H' if present\n u_hndcp = u_hndcp.replace('N', ' '); // or 'N' if present\n u_hndcp = u_hndcp.replace('J', ' '); // or 'J' if present\n u_hndcp = u_hndcp.replace('R', ' '); // or 'R' if present\n u_hndcp = u_hndcp.trim();\n\n u_hcap = Float.parseFloat(u_hndcp); // usga handicap\n\n if ((!u_hndcp.startsWith(\"+\")) && (!u_hndcp.startsWith(\"-\"))) {\n\n u_hcap = 0 - u_hcap; // make it a negative hndcp (normal)\n }\n }\n\n if (!c_hndcp.equals( \"\" ) && !c_hndcp.equalsIgnoreCase(\"NH\") && !c_hndcp.equalsIgnoreCase(\"NHL\")) {\n\n c_hndcp = c_hndcp.replace('L', ' '); // isolate the handicap - remove spaces and trailing 'L'\n c_hndcp = c_hndcp.replace('H', ' '); // or 'H' if present\n c_hndcp = c_hndcp.replace('N', ' '); // or 'N' if present\n c_hndcp = c_hndcp.replace('J', ' '); // or 'J' if present\n c_hndcp = c_hndcp.replace('R', ' '); // or 'R' if present\n c_hndcp = c_hndcp.trim();\n\n c_hcap = Float.parseFloat(c_hndcp); // usga handicap\n\n if ((!c_hndcp.startsWith(\"+\")) && (!c_hndcp.startsWith(\"-\"))) {\n\n c_hcap = 0 - c_hcap; // make it a negative hndcp (normal)\n }\n }\n\n //\n // convert birth date (mm/dd/yyyy to yyyymmdd)\n //\n if (!temp.equals( \"\" )) {\n\n int mm = 0;\n int dd = 0;\n int yy = 0;\n\n tok = new StringTokenizer( temp, \"/-\" ); // delimiters are / & -\n\n if ( tok.countTokens() > 2 ) {\n\n String b1 = tok.nextToken();\n String b2 = tok.nextToken();\n String b3 = tok.nextToken();\n\n mm = Integer.parseInt(b1);\n dd = Integer.parseInt(b2);\n yy = Integer.parseInt(b3);\n\n } else { // try 'Jan 20, 1951' format\n\n tok = new StringTokenizer( temp, \", \" ); // delimiters are comma and space\n\n if ( tok.countTokens() > 2 ) {\n\n String b1 = tok.nextToken();\n String b2 = tok.nextToken();\n String b3 = tok.nextToken();\n\n if (b1.startsWith( \"Jan\" )) {\n mm = 1;\n } else {\n if (b1.startsWith( \"Feb\" )) {\n mm = 2;\n } else {\n if (b1.startsWith( \"Mar\" )) {\n mm = 3;\n } else {\n if (b1.startsWith( \"Apr\" )) {\n mm = 4;\n } else {\n if (b1.startsWith( \"May\" )) {\n mm = 5;\n } else {\n if (b1.startsWith( \"Jun\" )) {\n mm = 6;\n } else {\n if (b1.startsWith( \"Jul\" )) {\n mm = 7;\n } else {\n if (b1.startsWith( \"Aug\" )) {\n mm = 8;\n } else {\n if (b1.startsWith( \"Sep\" )) {\n mm = 9;\n } else {\n if (b1.startsWith( \"Oct\" )) {\n mm = 10;\n } else {\n if (b1.startsWith( \"Nov\" )) {\n mm = 11;\n } else {\n if (b1.startsWith( \"Dec\" )) {\n mm = 12;\n } else {\n mm = Integer.parseInt(b1);\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n\n dd = Integer.parseInt(b2);\n yy = Integer.parseInt(b3);\n\n } else {\n\n birth = 0;\n }\n }\n\n if (mm > 0) { // if birth provided\n\n if (mm == 1 && dd == 1 && yy == 1) { // skip if 1/1/0001\n\n birth = 0;\n\n } else {\n\n if (yy < 100) { // if 2 digit year\n\n if (yy <= thisYear) {\n\n yy += 2000; // 20xx\n\n } else {\n\n yy += 1900; // 19xx\n }\n }\n\n birth = (yy * 10000) + (mm * 100) + dd; // yyyymmdd\n\n if (yy < 1900) { // check for invalid date\n\n birth = 0;\n }\n }\n\n } else {\n\n birth = 0;\n }\n\n } else {\n\n birth = 0;\n }\n\n password = lname;\n\n //\n // if lname is less than 4 chars, fill with 1's\n //\n int length = password.length();\n\n while (length < 4) {\n\n password = password + \"1\";\n length++;\n }\n\n //\n // Verify the email addresses\n //\n if (!email.equals( \"\" )) { // if specified\n\n email = email.trim(); // remove spaces\n\n FeedBack feedback = (member.isEmailValid(email));\n\n if (!feedback.isPositive()) { // if error\n\n email = \"\"; // do not use it\n }\n }\n if (!email2.equals( \"\" )) { // if specified\n\n email2 = email2.trim(); // remove spaces\n\n FeedBack feedback = (member.isEmailValid(email2));\n\n if (!feedback.isPositive()) { // if error\n\n email2 = \"\"; // do not use it\n }\n }\n\n // if email #1 is empty then assign email #2 to it\n if (email.equals(\"\")) email = email2;\n\n\n skip = false;\n errCount = 0; // reset the error counter\n warnCount = 0; // reset warning counter\n errMsg = \"\"; // reset error message\n warnMsg = \"\"; // reset warning message\n errMemInfo = \"\"; // reset the error member info\n found = false; // default to club NOT found\n\n\n //\n // Set the active/inactive flag in case it is used\n //\n inact = 0; // default = active\nif (!club.equals(\"tpcwakefieldplantation\")) {\n if (active.equalsIgnoreCase( \"I\" )) {\n\n inact = 1; // set inactive\n }\n}\n\n //\n // Weed out any non-members\n //\n if (fname.equalsIgnoreCase(\"admin\") || lname.equalsIgnoreCase(\"admin\") ||\n fname.equalsIgnoreCase(\"test\") || lname.equalsIgnoreCase(\"test\")) {\n\n inact = 1; // skip this record\n }\n\n //\n // Format member info for use in error logging before club-specific manipulation\n //\n errMemInfo = \"Member Details:\\n\" +\n \" name: \" + lname + \", \" + fname + \" \" + mi + \"\\n\" +\n \" mtype: \" + mtype + \" mship: \" + mship + \"\\n\" +\n \" memid: \" + memid + \" mNum: \" + mNum + \" gender: \" + gender;\n\n\n // if gender is incorrect or missing, flag a warning in the error log\n if (gender.equals(\"\")) {\n warnCount++;\n if (genderMissing) {\n warnMsg = warnMsg + \"\\n\" +\n \" -GENDER missing! (Defaulted to 'M')\";\n } else {\n warnMsg = warnMsg + \"\\n\" +\n \" -GENDER incorrect! (Defaulted to 'M')\";\n }\n gender = \"M\";\n }\n\n //\n // Skip entries with no membership type\n //\n if (mship.equals(\"\")) {\n errCount++;\n skip = true;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n }\n\n //\n // Skip entries with first/last names of 'admin'\n //\n if (fname.equalsIgnoreCase(\"admin\") || lname.equalsIgnoreCase(\"admin\")) {\n errCount++;\n skip = true;\n errMsg = errMsg + \"\\n\" +\n \" -INVALID NAME! 'Admin' or 'admin' not allowed for first or last name\";\n }\n\n //\n // Make sure the member is not inactive - skip it it is\n //\n if (inact == 0 || club.equals( \"congressional\" )) { // if active or Congressional\n\n //\n // *********************************************************************\n //\n // The following will be dependent on the club - customized\n //\n // *********************************************************************\n //\n if (club.equals( \"weeburn\" )) {\n\n found = true; // club found\n\n //\n // Determine if we should process this record\n //\n if (mship.equalsIgnoreCase( \"house\" ) ||\n mship.equalsIgnoreCase( \"non-golf\" ) || mship.equalsIgnoreCase( \"non-resident house\" ) ||\n mship.equalsIgnoreCase( \"non-resident non-golf\" ) || mship.equalsIgnoreCase( \"senior house\" ) ||\n mship.equalsIgnoreCase( \"senior non-golf\" ) || mship.equalsIgnoreCase( \"senior non golf\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n\n } else if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: MEMBERSHIP TYPE NOT FOUND!\";\n \n } else {\n\n if (mship.startsWith( \"WFG\" )) {\n\n mship = \"WAITING FOR GOLF\"; // convert mship\n }\n\n if (mship.equalsIgnoreCase( \"golf\" )) {\n\n mship = \"Golf\"; // convert mship\n }\n\n //\n // set defaults\n //\n if (gender.equalsIgnoreCase( \"f\" )) {\n\n gender = \"F\"; // Female\n\n } else {\n\n gender = \"M\"; // default to Male\n }\n\n //\n // Set the Member Type\n //\n if (primary.equalsIgnoreCase( \"p\" )) {\n\n mtype = \"Primary Male\";\n\n if (gender.equals( \"F\" )) {\n\n mtype = \"Primary Female\";\n }\n\n posid = mNum;\n\n } else if (primary.equalsIgnoreCase( \"s\" )) {\n\n mtype = \"Spouse Male\";\n\n if (gender.equals( \"F\" )) {\n\n mtype = \"Spouse Female\";\n }\n\n posid = mNum + \"S\";\n\n } else {\n\n mtype = \"Junior\";\n }\n\n if (mship.equalsIgnoreCase( \"DEPENDENT CHILD\" )) {\n\n //\n // Determine the age in years\n //\n Calendar cal = new GregorianCalendar(); // get todays date\n\n int year = cal.get(Calendar.YEAR);\n int month = cal.get(Calendar.MONTH) +1;\n int day = cal.get(Calendar.DAY_OF_MONTH);\n\n year = year - 18; // backup 18 years\n\n int oldDate = (year * 10000) + (month * 100) + day; // get date\n\n if (birth > oldDate) { // if member is < 18 yrs old\n\n mtype = \"Junior\";\n\n } else {\n\n year = year - 5; // back up 5 more years (23 total)\n\n oldDate = (year * 10000) + (month * 100) + day; // get date\n\n if (birth > oldDate) { // if member is 18 - 22 yrs old (< 23)\n\n mtype = \"Adult Child\";\n\n } else {\n\n year = year - 6; // back up 6 more years (29 total)\n\n oldDate = (year * 10000) + (month * 100) + day; // get date\n\n if (birth > oldDate) { // if member is 23 - 28 yrs old (< 29)\n\n mtype = \"Extended Family\";\n\n } else {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: DEPENDENT CHILD OVER 29\";\n }\n }\n }\n }\n\n //\n // Try to set the correct mship type (spouses must be changed)\n //\n if (primary.equalsIgnoreCase( \"s\" ) || mship.equalsIgnoreCase( \"Dependent Spouse\" ) ||\n mship.equalsIgnoreCase(\"DEPENDENT CHILD\")) {\n\n if (mNum.equals( last_mnum )) { // if spouse of last member processed\n\n mship = last_mship; // get primary's mship value\n\n } else {\n\n //\n // Check the db for the primary's mship type\n //\n pstmt2 = con.prepareStatement (\n \"SELECT m_ship FROM member2b WHERE memNum = ? AND m_type like 'Primary%'\");\n\n pstmt2.clearParameters();\n pstmt2.setString(1, mNum);\n rs = pstmt2.executeQuery();\n\n if(rs.next()) {\n\n mship = rs.getString(\"m_ship\");\n\n } else {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n }\n pstmt2.close();\n }\n\n } else { // must be primary\n\n last_mnum = mNum; // save these for spouse\n last_mship = mship;\n }\n\n }\n\n } // end of IF club = ???\n\n\n if (club.equals( \"westchester\" )) {\n\n found = true; // club found\n\n //\n // Determine if we should process this record\n //\n if (mship.equalsIgnoreCase( \"courtesy\" ) || mship.equalsIgnoreCase( \"houseres\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n\n } else if (!mship.equals( \"\" )) {\n\n //\n // Set the Member & Membership Types\n //\n if (primary.equalsIgnoreCase( \"P\" )) { // if primary member\n\n mship = \"Members\";\n\n if (gender.equalsIgnoreCase( \"F\" )) {\n\n mtype = \"Member Female\";\n\n } else {\n\n mtype = \"Member Male\";\n }\n\n } else { // all others (spouse and dependents)\n\n mship = \"Family Members\";\n\n if (primary.equalsIgnoreCase( \"S\" )) { // if Spouse\n\n if (gender.equalsIgnoreCase( \"F\" )) {\n\n mtype = \"Spouse Female\";\n\n } else {\n\n mtype = \"Spouse Male\";\n }\n\n } else {\n\n mtype = \"Dependent\";\n\n //\n // Set memid for dependents\n //\n ext++; // bump common extension value (1 - nnnnn)\n memid = memid + ext;\n }\n }\n } else {\n\n skip = true;\n }\n } // end of IF club = westchester\n\n\n //\n // CC of Virginia\n //\n if (club.equals( \"virginiacc\" )) {\n\n found = true; // club found\n\n //\n // Determine if we should process this record\n //\n if (!mship.equals( \"\" )) {\n\n //\n // use memid as webid !! (do NOT change the username in records)\n //\n useWebid = true; // use webid to locate member\n\n webid = memid; // use webid for this club\n\n //\n // Set the Member Types (based on age and gender)\n //\n if (birth == 0) { // if age unknown\n\n mtype = \"Adult Male\";\n\n if (gender.equalsIgnoreCase( \"F\" )) {\n\n mtype = \"Adult Female\";\n }\n\n } else {\n\n //\n // Determine the age in years\n //\n Calendar cal = new GregorianCalendar(); // get todays date\n\n int year = cal.get(Calendar.YEAR);\n int month = cal.get(Calendar.MONTH) +1;\n int day = cal.get(Calendar.DAY_OF_MONTH);\n\n year = year - 16; // backup 16 years\n\n int oldDate = (year * 10000) + (month * 100) + day; // get date\n\n if (birth > oldDate) { // if member is < 16 yrs old\n\n mtype = \"Junior Male\";\n\n if (gender.equalsIgnoreCase( \"F\" )) {\n\n mtype = \"Junior Female\";\n }\n\n } else {\n\n year = year - 7; // backup 7 more years (23 total)\n\n oldDate = (year * 10000) + (month * 100) + day; // get date\n\n if (birth > oldDate) { // if member is 16 - 22 yrs old (< 23)\n\n mtype = \"Student Male\";\n\n if (gender.equalsIgnoreCase( \"F\" )) {\n\n mtype = \"Student Female\";\n }\n\n } else {\n\n year = year - 7; // backup 7 more years (30 total)\n\n oldDate = (year * 10000) + (month * 100) + day; // get date\n\n if (birth > oldDate) { // if member is 23 - 29 yrs old (< 30)\n\n mtype = \"Young Adult Male\";\n\n if (gender.equalsIgnoreCase( \"F\" )) {\n\n mtype = \"Young Adult Female\";\n }\n\n } else {\n\n year = year - 30; // backup 30 more years (60 total)\n\n oldDate = (year * 10000) + (month * 100) + day; // get date\n\n if (birth > oldDate) { // if member is 30 - 59 yrs old (< 60)\n\n mtype = \"Adult Male\";\n\n if (gender.equalsIgnoreCase( \"F\" )) {\n\n mtype = \"Adult Female\";\n }\n\n } else {\n\n mtype = \"Senior Male\";\n\n if (gender.equalsIgnoreCase( \"F\" )) {\n\n mtype = \"Senior Female\";\n }\n }\n }\n }\n }\n }\n\n if (mship.equalsIgnoreCase(\"HONORARY-MALE\")) {\n mtype = \"Honorary Male\";\n } else if (mship.equalsIgnoreCase(\"HONORARY-FEMALE\")) {\n mtype = \"Honorary Female\";\n } else if (mship.equalsIgnoreCase(\"HONORARY RETIREES\")) {\n mtype = \"Honorary Retirees\";\n }\n\n mship = \"Active\"; // convert all to Active\n\n } else {\n\n skip = true;\n }\n } // end of IF club =\n\n\n //\n // The Point Lake CLub\n //\n/*\n if (club.equals( \"pointlake\" )) {\n\n found = true; // club found\n\n //\n // Determine if we should process this record\n //\n if (!mship.equals( \"\" ) || mship.equalsIgnoreCase(\"CSH\")) {\n\n //\n // Set the Member Types\n //\n if (gender.equals( \"\" )) {\n\n gender = \"M\";\n }\n\n if (mship.equalsIgnoreCase( \"SPS\" ) || mship.equalsIgnoreCase( \"SPG\" )) { // TEMP until they fix their genders\n\n gender = \"F\";\n }\n\n if (primary.equalsIgnoreCase( \"P\" )) { // if primary member\n\n if (gender.equalsIgnoreCase( \"F\" )) {\n\n mtype = \"Primary Female\";\n\n } else {\n\n mtype = \"Primary Male\";\n }\n\n } else { // spouse\n\n if (gender.equalsIgnoreCase( \"F\" )) {\n\n mtype = \"Spouse Female\";\n\n } else {\n\n mtype = \"Spouse Male\";\n }\n }\n\n } else { // no mship\n\n skip = true; // skip this record\n }\n\n } // end of IF club =\n*/\n\n //\n // Wichita - uses mapping (webid) !!!\n //\n if (club.equals( \"wichita\" )) {\n\n found = true; // club found\n\n //\n // Determine if we should process this record\n //\n if (memid.equals( \"\" )) {\n\n skip = true; // skip it\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMID missing!\";\n\n } else if (!mship.equals( \"\" )) {\n\n //\n // use memid as webid !! (do NOT change the username in records)\n //\n useWebid = true; // use webid to locate member\n\n webid = memid; // use webid for this club\n\n\n //\n // Set the Member Types\n //\n if (gender.equalsIgnoreCase( \"F\" )) {\n\n mtype = \"Adult Female\";\n\n } else {\n\n mtype = \"Adult Male\";\n }\n\n if (mship.equalsIgnoreCase( \"child\" )) {\n\n //\n // if Child, set member type according to age\n //\n mtype = \"Juniors\"; // default\n\n if (birth > 0) { // if age provided\n\n //\n // Determine the age in years\n //\n Calendar cal = new GregorianCalendar(); // get todays date\n\n int year = cal.get(Calendar.YEAR);\n int month = cal.get(Calendar.MONTH) +1;\n int day = cal.get(Calendar.DAY_OF_MONTH);\n\n year = year - 18; // backup 18 years\n\n int oldDate = (year * 10000) + (month * 100) + day; // get date\n\n if (birth > oldDate) { // if member is < 18 yrs old\n\n mtype = \"Juniors\";\n\n } else {\n\n mtype = \"18-24\";\n }\n }\n }\n\n mship = \"Golf\"; // everyone is Golf\n\n } else { // no mship\n\n skip = true; // skip this record\n }\n\n } // end of IF club =\n\n\n //\n // Brantford\n //\n if (club.equals( \"brantford\" )) {\n\n found = true; // club found\n\n // if there is no posid, then use the mNum\n if (posid.equals(\"\")) posid = mNum;\n\n mship = mtype; // use member type for mship\n\n //\n // Determine if we should process this record\n //\n if (memid.equals( \"\" )) {\n\n skip = true; // skip it\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMID missing!\";\n\n } else if (mship.equalsIgnoreCase( \"1 day curl\" ) || mship.equalsIgnoreCase( \"asc crl ld\" ) ||\n mship.startsWith( \"ASSC CUR\" ) || mship.startsWith( \"RESIGN\" )) {\n\n skip = true; // skip this record\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n\n } else if (!mship.equals( \"\" )) { // mship ok\n\n //\n // Set the Membership Types\n //\n if (mship.startsWith( \"EXT\" )) {\n\n mship = \"Extended Junior\";\n }\n\n if (mship.startsWith( \"CURL\" ) || mship.equalsIgnoreCase( \"lds curl\" )) {\n\n mship = \"Curler\";\n }\n\n if (mship.startsWith( \"FULL\" ) || mship.startsWith( \"HONO\" ) || mship.startsWith( \"INT\" ) ||\n mship.startsWith( \"LDYFULL\" ) || mship.startsWith( \"MST FL\" ) || mship.startsWith( \"MSTR FU\" ) ||\n mship.startsWith( \"PLAYER\" ) || mship.startsWith( \"SEN\" ) || mship.startsWith( \"SR FULL\" )) {\n\n mship = \"Full\";\n }\n\n if (mship.startsWith( \"JR\" ) || mship.startsWith( \"JUNIO\" )) {\n\n mship = \"Junior\";\n }\n\n if (mship.startsWith( \"NOVIC\" )) {\n\n mship = \"Novice\";\n }\n\n if (mship.startsWith( \"OV65\" ) || mship.startsWith( \"OVR 65\" )) {\n\n mship = \"Over 65 Restricted\";\n }\n\n if (mship.startsWith( \"MST RST\" ) || mship.startsWith( \"MSTR/RE\" )) {\n\n mship = \"Restricted\";\n }\n\n if (mship.startsWith( \"SOCGLF\" )) {\n\n mship = \"Social Golf Waitlist\";\n }\n\n if (mship.startsWith( \"SOCIAL\" ) || mship.startsWith( \"MAIN\" )) {\n\n mship = \"Social\";\n }\n\n //\n // Now check the birth date and set anyone age 19 - 25 to 'Extended Junior'\n //\n if (birth > 0) { // if birth date provided\n\n Calendar cal = new GregorianCalendar(); // get todays date\n\n int year = cal.get(Calendar.YEAR);\n int month = cal.get(Calendar.MONTH) +1;\n int day = cal.get(Calendar.DAY_OF_MONTH);\n\n year = year - 19; // backup 19 years\n\n int oldDate1 = (year * 10000) + (month * 100) + day; // get date\n\n year = year - 7; // backup another 7 years (26 total)\n\n int oldDate2 = (year * 10000) + (month * 100) + day; // get date\n\n if (birth > oldDate2 && birth < oldDate1) { // if member is 19 to 25 yrs old\n\n mship = \"Extended Junior\";\n }\n }\n\n\n //\n // Set the Member Types\n //\n if (primary.equalsIgnoreCase( \"P\" )) { // if primary member\n\n if (gender.equalsIgnoreCase( \"F\" )) {\n\n mtype = \"Primary Female\";\n\n } else {\n\n mtype = \"Primary Male\";\n }\n\n } else if (primary.equalsIgnoreCase( \"S\" )) { // spouse\n\n if (gender.equalsIgnoreCase( \"F\" )) {\n\n mtype = \"Spouse Female\";\n\n } else {\n\n mtype = \"Spouse Male\";\n }\n } else {\n mtype = \"Dependent\";\n }\n\n } else {\n\n skip = true;\n }\n\n } // end of IF club =\n\n\n //\n // Congressional\n //\n if (club.equals( \"congressional\" )) {\n\n found = true; // club found\n\n // if there is no posid, then use the mNum\n if (posid.equals(\"\")) posid = mNum;\n\n if (mNum.startsWith( \"0\" )) { // if starts with a zero\n\n mNum = remZeroS(mNum); // remove the leading zero\n }\n\n //\n // use memid as webid !! (do NOT change the username in records)\n //\n useWebid = true; // use webid to locate member\n\n webid = memid; // use webid for this club\n\n\n //\n // Determine if we should process this record\n //\n if (memid.equals( \"\" )) {\n\n skip = true; // skip it\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMID missing!\";\n\n } else if (mship.equalsIgnoreCase( \"SG\" ) || mship.equalsIgnoreCase( \"BI\" )) {\n\n skip = true; // skip this record\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n\n } else if (!mship.equals( \"\" )) { // mship ok\n\n if (mship.equals( \"SP\" )) { // if Spouse\n\n mship = \"\";\n\n pstmt2 = con.prepareStatement (\n \"SELECT m_ship FROM member2b WHERE username = ?\");\n\n pstmt2.clearParameters();\n pstmt2.setString(1, mNum); // primary's username is the mNum\n rs = pstmt2.executeQuery();\n\n if(rs.next()) {\n\n mship = rs.getString(\"m_ship\"); // spouse = use primary's mship type\n }\n pstmt2.close();\n \n if (mship.equals(\"\")) { \n \n skip = true; // skip if mship or primary not found\n }\n }\n\n } else {\n\n skip = true;\n }\n\n if (skip == false) {\n\n //\n // Set the Membership Types\n //\n if (mship.equals( \"AG\" )) {\n\n mship = \"Annual Guest\";\n }\n if (mship.equals( \"BA\" )) {\n\n mship = \"Beneficiary Active\";\n }\n if (mship.equals( \"BS\" )) {\n\n mship = \"Beneficiary Special\";\n }\n if (mship.equals( \"BT\" )) {\n\n mship = \"Beneficiary Twenty\";\n }\n if (mship.equals( \"HL\" )) {\n\n mship = \"Honorary Life\";\n }\n if (mship.equals( \"HO\" )) {\n\n mship = \"Honorary\";\n }\n if (mship.equals( \"JA\" )) {\n\n mship = \"Junior A\";\n }\n if (mship.equals( \"JB\" )) {\n\n mship = \"Junior B\";\n }\n if (mship.equals( \"JC\" )) {\n\n mship = \"Junior C\";\n }\n if (mship.equals( \"JM\" )) {\n\n mship = \"Junior Military\";\n }\n if (mship.equals( \"JX\" )) {\n\n mship = \"Junior Absent\";\n }\n if (mship.equals( \"NR\" )) {\n\n mship = \"Non Resident\";\n }\n if (mship.equals( \"NS\" )) {\n\n mship = \"Non Resident Special\";\n }\n if (mship.equals( \"RA\" )) {\n\n mship = \"Resident Active\";\n }\n if (mship.equals( \"RI\" )) {\n\n mship = \"Resident Inactive\";\n }\n if (mship.equals( \"RT\" )) {\n\n mship = \"Resident Twenty\";\n }\n if (mship.equals( \"RX\" )) {\n\n mship = \"Resident Absent\";\n }\n\n\n //\n // Now check the birth date and set anyone age 19 - 25 to 'Extended Junior'\n //\n if (birth == 19000101) { // if birth date mot good\n\n birth = 0;\n }\n\n\n //\n // Set the Member Types\n //\n if (primary.equalsIgnoreCase( \"P\" )) { // if primary member\n\n if (gender.equalsIgnoreCase( \"F\" )) {\n\n mtype = \"Primary Female\";\n\n } else {\n\n mtype = \"Primary Male\";\n }\n\n } else { // spouse\n\n if (gender.equalsIgnoreCase( \"F\" )) {\n\n mtype = \"Spouse Female\";\n\n } else {\n\n mtype = \"Spouse Male\";\n }\n }\n\n //\n // Set the Username\n //\n if (mtype.startsWith( \"Primary\" )) { // if primary member\n\n memid = mNum; // use mNum\n\n } else {\n\n memid = mNum + \"A\"; // use mNum + A\n }\n\n //\n // Set the password for Monagus\n //\n password = \"jjjj\";\n\n }\n\n } // end of IF club =\n\n\n //\n // Cherry Creek\n //\n/*\n if (club.equals( \"cherrycreek\" )) {\n\n found = true; // club found\n\n if (mNum.startsWith( \"0\" )) { // if starts with a zero\n\n mNum = remZeroS(mNum); // remove the leading zero\n }\n\n //\n // use memid as webid !! (do NOT change the username in records)\n //\n useWebid = true; // use webid to locate member\n\n webid = memid; // use webid for this club\n\n\n mship = toTitleCase(mship);\n\n //\n // Determine if we should process this record\n //\n if (memid.equals( \"\" )) {\n\n skip = true; // skip it\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMID missing!\";\n\n } else if (mship.equalsIgnoreCase( \"professional member honorary\" ) ||\n mship.startsWith( \"Reciprocal\" ) || mship.startsWith( \"Social\" )) {\n\n skip = true; // skip this record\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n\n } else if (!mship.equals( \"\" )) { // mship ok\n\n if (mship.startsWith( \"Corp Full Golf Founders Individ\" )) {\n\n mship = \"Corp Full Golf Founders Indiv\";\n\n } else {\n\n\n /* 3-13-08 ALLOW CORP FULL GOLF FOUNDERS FAMILY TO COME ACROSS AS IS - PER LARRY\n if (mship.startsWith( \"Corp Full Golf Founders\" )) {\n\n mship = \"Corp Full Golf Founders\";\n }\n */\n /*\n }\n\n\n //\n // Set the Member Types\n //\n if (gender.equalsIgnoreCase( \"F\" )) {\n\n mtype = \"Adult Female\";\n\n } else {\n\n if (gender.equalsIgnoreCase( \"M\" )) {\n\n mtype = \"Adult Male\";\n\n } else { // unknown gender - check pri/spouse\n\n if (primary.equalsIgnoreCase( \"S\" )) {\n\n mtype = \"Adult Female\";\n\n } else {\n\n mtype = \"Adult Male\";\n }\n }\n }\n\n\n //\n // Set the Username\n //\n if (mtype.equals( \"Adult Male\" )) { // if primary member\n\n memid = mNum + \"-000\";\n\n } else {\n\n memid = mNum + \"-001\";\n }\n\n // if there is no posid, then use the memid\n if (posid.equals(\"\")) posid = memid;\n\n } else {\n\n skip = true;\n }\n\n } // end of IF club =\n*/\n\n //\n // Baltimore CC\n //\n if (club.equals( \"baltimore\" )) {\n\n found = true; // club found\n\n //\n // use memid as webid !! (do NOT change the username in records)\n //\n useWebid = true; // use webid to locate member\n\n webid = memid; // use webid for this club\n\n\n // if there is no posid, then use the mNum\n if (posid.equals(\"\")) posid = mNum;\n\n\n mship2 = mship;\n mship = \"\";\n\n //\n // convert mship\n //\n\n\n if (mship2.equalsIgnoreCase( \"A GENT GOLF NON ACTIV\" )) {\n\n mship = \"No Package\";\n mtype = \"Male No Package\";\n }\n\n if (mship2.equalsIgnoreCase( \"A GENT GOLF NON ACTIV NON RES FD\" )) {\n\n mship = \"Non Resident No Package\";\n mtype = \"Male No Package\";\n }\n\n if (mship2.equalsIgnoreCase( \"A GENT NON GOLF NON RES FD\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Male Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"A GENT NON GOLF\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Male Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"A GENT GOLF NON ACTIV NON RES\" )) {\n\n mship = \"Non Resident No Package\";\n mtype = \"Male No Package\";\n }\n\n if (mship2.equalsIgnoreCase( \"A GENT NON GOLF NON RES\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Male Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"A LADIES GOLF NON ACTIV\" )) {\n\n mship = \"No Package\";\n mtype = \"Female No Package\";\n }\n\n if (mship2.equalsIgnoreCase( \"A LADIES GOLF NON ACTIV NON RES FD\" )) {\n\n mship = \"Non Resident No Package\";\n mtype = \"Female No Package\";\n }\n\n if (mship2.equalsIgnoreCase( \"A LADIES NON GOLF NON RES FD\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Female Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"A LADIES NON GOLF\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Female Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"A LADIES GOLF NON ACTIV NON RES\" )) {\n\n mship = \"Non Resident No Package\";\n mtype = \"Female No Package\";\n }\n\n if (mship2.equalsIgnoreCase( \"A LADIES NON GOLF NON RES\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Female Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"B GENT GOLF NON ACTIV\" )) {\n\n mship = \"No Package\";\n mtype = \"Male No Package\";\n }\n\n if (mship2.equalsIgnoreCase( \"B GENT GOLF NON ACTIV NON RES FD\" )) {\n\n mship = \"Non Resident No Package\";\n mtype = \"Male No Package\";\n }\n\n if (mship2.equalsIgnoreCase( \"B GENT NON GOLF NON RES FD\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Male Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"B GENT NON GOLF\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Male Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"B GENT GOLF NON ACTIV NON RES\" )) {\n\n mship = \"Non Resident No Package\";\n mtype = \"Male No Package\";\n }\n\n if (mship2.equalsIgnoreCase( \"B GENT NON GOLF NON RES\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Male Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"B LADIES GOLF NON ACTIV\" )) {\n\n mship = \"No Package\";\n mtype = \"Female No Package\";\n }\n\n if (mship2.equalsIgnoreCase( \"B LADIES GOLF NON ACTIV NON RES FD\" )) {\n\n mship = \"Non Resident No Package\";\n mtype = \"Female No Package\";\n }\n\n if (mship2.equalsIgnoreCase( \"B LADIES NON GOLF NON RES FD\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Female Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"B LADIES NON GOLF\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Female Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"B LADIES GOLF NON ACTIV NON RES\" )) {\n\n mship = \"Non Resident No Package\";\n mtype = \"Female No Package\";\n }\n\n if (mship2.equalsIgnoreCase( \"B LADIES NON GOLF NON RES\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Female Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"D GENT GOLF NON ACTIV\" )) {\n\n mship = \"No Package\";\n mtype = \"Male No Package\";\n }\n\n if (mship2.equalsIgnoreCase( \"D GENT GOLF NON ACTIV NON RES FD\" )) {\n\n mship = \"Non Resident No Package\";\n mtype = \"Male No Package\";\n }\n\n if (mship2.equalsIgnoreCase( \"D GENT NON GOLF NON RES FD\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Male Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"D GENT NON GOLF\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Male Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"D GENT GOLF NON ACTIV NON RES\" )) {\n\n mship = \"Non Resident No Package\";\n mtype = \"Male No Package\";\n }\n\n if (mship2.equalsIgnoreCase( \"D GENT NON GOLF NON RES\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Male Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"D LADIES GOLF NON ACTIV\" )) {\n\n mship = \"No Package\";\n mtype = \"Female No Package\";\n }\n\n if (mship2.equalsIgnoreCase( \"D LADIES GOLF NON ACTIV NON RES FD\" )) {\n\n mship = \"Non Resident No Package\";\n mtype = \"Female No Package\";\n }\n\n if (mship2.equalsIgnoreCase( \"D LADIES NON GOLF NON RES FD\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Female Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"D LADIES NON GOLF\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Female Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"D LADIES GOLF NON ACTIV NON RES\" )) {\n\n mship = \"Non Resident No Package\";\n mtype = \"Female No Package\";\n }\n\n if (mship2.equalsIgnoreCase( \"D LADIES NON GOLF NON RES\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Female Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"H GENT GOLF NON ACTIV\" )) {\n\n mship = \"No Package\";\n mtype = \"Male No Package\";\n }\n\n if (mship2.equalsIgnoreCase( \"H GENT GOLF NON ACTIV DISC\" )) {\n\n mship = \"No Package\";\n mtype = \"Male No Package\";\n }\n\n if (mship2.equalsIgnoreCase( \"H GENT NON GOLF\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Male Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"H LADIES GOLF NON ACTIV\" )) {\n\n mship = \"No Package\";\n mtype = \"Female No Package\";\n }\n\n if (mship2.equalsIgnoreCase( \"H LADIES GOLF NON ACTIV DISC\" )) {\n\n mship = \"No Package\";\n mtype = \"Female No Package\";\n }\n\n if (mship2.equalsIgnoreCase( \"H LADIES NON GOLF\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Female Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"J GENT NON GOLF\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Male Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"J LADIES NON GOLF\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Female Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"L GENT GOLF NON ACTIV\" )) { // supposed to be non?\n\n mship = \"Non Golf\";\n mtype = \"Male Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"L GENT GOLF HONORARY\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Male Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"L GENT NON GOLF\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Male Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"L GENT GOLF FULL SEAS\")) {\n\n mship = \"Discounted Season Golfer\";\n mtype = \"Male Discounted Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"L LADIES GOLF HONORARY\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Female Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"L LADIES NON GOLF\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Female Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"M MINOR GENT\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Male Dependent\";\n }\n\n if (mship2.equalsIgnoreCase( \"M MINOR LADIES\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Female Dependent\";\n }\n\n // end non online members\n\n\n // start on members\n\n if (mship2.equalsIgnoreCase( \"A GENT GOLF PART SEAS NON RES FD\" )) {\n\n mship = \"Non Season Golfer\";\n mtype = \"Male Non Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"A GENT GOLF FULL SEAS NON RES FD\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Male Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"A GENT GOLF FULL SEAS NON RES\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Male Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"A GENT GOLF PART SEAS NON RES\" )) {\n\n mship = \"Non Season Golfer\";\n mtype = \"Male Non Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"A GENT GOLF PART SEAS\" )) {\n\n mship = \"Non Season Golfer\";\n mtype = \"Male Non Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"A GENT GOLF FULL SEAS\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Male Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"A LADIES GOLF PART SEAS NON RES FD\" )) {\n\n mship = \"Non Season Golfer\";\n mtype = \"Female Non Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"A LADIES GOLF FULL SEAS NON RES FD\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Female Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"A LADIES GOLF FULL SEAS NON RES\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Female Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"A LADIES GOLF PART SEAS NON RES\" )) {\n\n mship = \"Non Season Golfer\";\n mtype = \"Female Non Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"A LADIES GOLF PART SEAS\" )) {\n\n mship = \"Non Season Golfer\";\n mtype = \"Female Non Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"A LADIES GOLF FULL SEAS\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Female Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"B GENT GOLF PART SEAS NON RES FD\" )) {\n\n mship = \"Non Season Golfer\";\n mtype = \"Male Non Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"B GENT GOLF FULL SEAS NON RES FD\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Male Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"B GENT GOLF FULL SEAS NON RES\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Male Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"B GENT GOLF PART SEAS NON RES\" )) {\n\n mship = \"Non Season Golfer\";\n mtype = \"Non Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"B GENT GOLF PART SEAS\" )) {\n\n mship = \"Non Season Golfer\";\n mtype = \"Male Non Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"B GENT GOLF FULL SEAS\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Male Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"B LADIES GOLF PART SEAS\" )) {\n\n mship = \"Non Season Golfer\";\n mtype = \"Female Non Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"B LADIES GOLF FULL SEAS NON RES FD\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Female Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"B LADIES GOLF FULL SEAS NON RES\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Female Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"B LADIES GOLF PART SEAS NON RES\" )) {\n\n mship = \"Non Season Golfer\";\n mtype = \"Female Non Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"B LADIES GOLF PART SEAS\" )) {\n\n mship = \"Non Season Golfer\";\n mtype = \"Female Non Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"B LADIES GOLF FULL SEAS\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Female Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"D GENT GOLF PART SEAS NON RES FD\" )) {\n\n mship = \"Non Season Golfer\";\n mtype = \"Male Non Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"D GENT GOLF FULL SEAS NON RES FD\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Male Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"D GENT GOLF FULL SEAS NON RES\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Male Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"D GENT GOLF PART SEAS NON RES\" )) {\n\n mship = \"Non Season Golfer\";\n mtype = \"Male Non Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"D GENT GOLF PART SEAS\" )) {\n\n mship = \"Non Season Golfer\";\n mtype = \"Male Non Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"D GENT GOLF FULL SEAS\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Male Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"D LADIES GOLF PART SEAS NON RES FD\" )) {\n\n mship = \"Non Season Golfer\";\n mtype = \"Female Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"D LADIES GOLF FULL SEAS NON RES FD\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Female Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"D LADIES GOLF FULL SEAS NON RES\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Female Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"D LADIES GOLF PART SEAS NON RES\" )) {\n\n mship = \"Non Season Golfer\";\n mtype = \"Female Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"D LADIES GOLF PART SEAS\" )) {\n\n mship = \"Non Season Golfer\";\n mtype = \"Female Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"D LADIES GOLF FULL SEAS\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Female Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"H GENT GOLF PART SEAS DISC\" )) {\n\n mship = \"Non Season Golfer\";\n mtype = \"Male Non-Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"H GENT GOLF FULL SEAS DISC\" )) {\n\n mship = \"Discounted Season Golfer\";\n mtype = \"Male Discounted Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"H GENT GOLF PART SEAS\" )) {\n\n mship = \"Non Season Golfer\";\n mtype = \"Male Non Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"H GENT GOLF FULL SEAS\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Male Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"H LADIES GOLF PART SEAS DISC\" )) {\n\n mship = \"Non Season Golfer\";\n mtype = \"Female Non-Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"H LADIES GOLF FULL SEAS DISC\" )) {\n\n mship = \"Discounted Season Golfer\";\n mtype = \"Female Discounted Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"H LADIES GOLF PART SEAS\" )) {\n\n mship = \"Non Season Golfer\";\n mtype = \"Female Non Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"H LADIES GOLF FULL SEAS\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Female Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"JM Gent Season\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Male Junior Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"J GENT GOLF PART SEAS\" )) {\n\n mship = \"Non Season Golfer\";\n mtype = \"Male Junior Non Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"JW Ladies Season\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Female Junior Non Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"J LADIES GOLF PART SEAS\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Female Junior Non Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"LW Ladies Golf\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Female Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"J GENT GOLF NON ACTIV\" )) {\n\n mship = \"No Package\";\n mtype = \"Male No Package\";\n }\n\n if (mship2.equalsIgnoreCase( \"J LADIES GOLF NON ACTIV\" )) {\n\n mship = \"No Package\";\n mtype = \"Female No Package\";\n }\n\n if (mship2.equalsIgnoreCase( \"J GENT GOLF FULL SEAS\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Male Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"J LADIES GOLF FULL SEAS\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Female Season Golfer\";\n }\n\n //\n // New mship types (6/12/07)\n //\n if (mship2.equalsIgnoreCase( \"J GENT GOLF COLL STUD\" )) {\n\n mship = \"College Season Golfer\";\n mtype = \"Male Season Golfer\";\n }\n if (mship2.equalsIgnoreCase( \"J LADIES GOLF COLL STUD\" )) {\n\n mship = \"College Season Golfer\";\n mtype = \"Female Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"L LADIES GOLF FULL SEAS\" )) {\n\n mship = \"Discounted Season Golfer\";\n mtype = \"Female Discounted Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"L LADIES GOLF PART SEAS\" )) {\n\n mship = \"Non Season Golfer\";\n mtype = \"Female Non Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"M MINOR GENT GOLF ENT\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Male Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"M MINOR LADIES GOLF ENT\" )) {\n\n mship = \"Season Golfer\";\n mtype = \"Female Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"B GENT NON GOLF EXT LEGASY\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Male Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"B LADIES NON GOLF EXT LEGASY\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Female Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"J JUNIOR GENT NON GOLF GE\" )) {\n\n mship = \"Non Golf\";\n mtype = \"Male Non Golf\";\n }\n\n if (mship2.equalsIgnoreCase( \"L GENT GOLF PART SEAS\" )) {\n\n mship = \"Non Season Golfer\";\n mtype = \"Male Non Season Golfer\";\n }\n\n if (mship2.equalsIgnoreCase( \"L LADIES GOLF NON ACTIV\" )) {\n\n mship = \"No Package\";\n mtype = \"Female No Package\";\n }\n\n //\n // Skip this record if a valid mship type was not specified\n //\n if (mship.equals(\"\")) {\n skip = true; // skip these\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE!\";\n }\n\n } // end if club == baltimore\n\n\n //\n // Providence\n //\n if (club.equals( \"providence\" )) {\n\n found = true; // club found\n\n //\n // Determine if we should process this record\n //\n if (!mship.equals( \"\" ) && (mship.equalsIgnoreCase( \"A\" ) || mship.equalsIgnoreCase( \"E\" ) ||\n mship.equalsIgnoreCase( \"Z\" ) || mship.equalsIgnoreCase( \"H\" ) || mship.equalsIgnoreCase( \"I\" ) ||\n mship.equalsIgnoreCase( \"L\" ) || mship.equalsIgnoreCase( \"S\" ) || mship.equalsIgnoreCase( \"ZA\" ))) {\n\n //\n // use memid as webid !! (do NOT change the username in records)\n //\n useWebid = true; // use webid to locate member\n\n webid = memid; // use webid for this club\n\n if (posid.equals( \"\" )) {\n\n posid = mNum; // default posid = mnum\n }\n\n //\n // Set the Member Type\n //\n mtype = \"Primary Male\"; // default\n\n// if (mNum.endsWith( \"B\" ) ||mNum.endsWith( \"C\" ) ||\n// mNum.endsWith( \"D\" ) || mNum.endsWith( \"E\" ) ||mNum.endsWith( \"F\" ) ||\n// mNum.endsWith( \"G\" ) || mNum.endsWith( \"H\" ) ||mNum.endsWith( \"I\" )) {\n//\n// mtype = \"Dependent\";\n//\n// } else {\n\n if (primary.equalsIgnoreCase( \"S\" )) { // if Spouse\n\n if (gender.equals( \"M\" )) {\n\n mtype = \"Spouse Male\";\n\n } else {\n\n mtype = \"Spouse Female\";\n }\n\n } else { // primary\n\n if (primary.equalsIgnoreCase( \"P\" )) { // if Primary\n\n if (gender.equals( \"M\" )) {\n\n mtype = \"Primary Male\";\n\n } else {\n\n mtype = \"Primary Female\";\n }\n\n } else {\n\n mtype = \"Dependent\"; // all others = juniors\n }\n }\n\n //\n // Set the Mship Type\n //\n if (mship.equalsIgnoreCase( \"A\" )) {\n\n mship = \"Active\";\n\n } else {\n\n if (mship.equalsIgnoreCase( \"E\" )) {\n\n mship = \"Employee\";\n\n } else {\n\n if (mship.equalsIgnoreCase( \"H\" )) {\n\n mship = \"Honorary\";\n\n } else {\n\n if (mship.equalsIgnoreCase( \"I\" )) {\n\n mship = \"Inactive\";\n\n } else {\n\n if (mship.equalsIgnoreCase( \"L\" )) {\n\n mship = \"Member Resigning\";\n\n } else {\n\n if (mship.equalsIgnoreCase( \"S\" )) {\n\n mship = \"Suspended\";\n\n } else {\n\n if (mship.equalsIgnoreCase( \"Z\" ) || mship.equalsIgnoreCase( \"ZA\" )) {\n\n mship = \"Family Active\";\n\n } else {\n\n skip = true; // skip all others\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n }\n }\n }\n }\n }\n }\n }\n\n } else {\n\n skip = true; // skip this record\n\n if (!mship.equals( \"\" )) {\n\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n }\n }\n\n } // end of IF club\n\n //\n // Algonquin\n //\n if (club.equals( \"algonquin\" )) {\n\n found = true; // club found\n\n //\n // Determine if we should process this record\n //\n if (!mship.equals( \"\" )) {\n\n if (posid.equals( \"\" )) {\n\n posid = mNum; // default posid = mnum\n }\n\n while (mNum.startsWith( \"0\" )) { // if starts with a zero\n\n mNum = remZeroS(mNum); // remove the leading zero\n }\n\n //\n // Set the Membership and Member Types - both dependent on the mship received\n //\n mtype = \"Primary Male\"; // default\n\n mship2 = \"\"; // init as none\n\n if (mship.equalsIgnoreCase( \"Active\" )) {\n\n mship2 = \"Active\";\n\n if (gender.equals( \"F\" )) { // otherwise use default if Male\n\n mtype = \"Primary Female\"; // always a primary member\n }\n }\n\n if (mship.equalsIgnoreCase( \"Associate\" )) {\n\n mship2 = \"Associate\";\n\n if (gender.equals( \"F\" )) { // otherwise use default if Male\n\n mtype = \"Primary Female\"; // always a primary member\n }\n }\n\n if (mship.equalsIgnoreCase( \"Senior\" )) {\n\n mship2 = \"Senior\";\n\n if (gender.equals( \"F\" )) { // otherwise use default if Male\n\n mtype = \"Primary Female\"; // always a primary member\n }\n }\n\n if (mship.equalsIgnoreCase( \"non-res\" )) {\n\n mship2 = \"Non-Res\";\n\n if (gender.equals( \"F\" )) { // otherwise use default if Male\n\n mtype = \"Primary Female\"; // always a primary member\n }\n }\n\n if (mship.equalsIgnoreCase( \"nonresgolf\" )) {\n\n mship2 = \"Nonresgolf\";\n\n if (gender.equals( \"F\" )) { // otherwise use default if Male\n\n mtype = \"Primary Female\"; // always a primary member\n }\n }\n\n if (mship.equalsIgnoreCase( \"Social\" )) {\n\n mship2 = \"Social\";\n\n if (gender.equals( \"F\" )) { // otherwise use default if Male\n\n mtype = \"Primary Female\"; // always a primary member\n }\n }\n\n if (mship.equalsIgnoreCase( \"Clerical M\" )) {\n\n mship2 = \"Clerical M\";\n\n if (gender.equals( \"F\" )) { // otherwise use default if Male\n\n mtype = \"Primary Female\"; // always a primary member\n }\n }\n\n if (mship.equalsIgnoreCase( \"Junior Class A\" ) || mship.equalsIgnoreCase( \"Jr Class A\" )) {\n\n mship2 = \"Jr Class A\";\n\n if (gender.equals( \"F\" )) { // otherwise use default if Male\n\n mtype = \"Primary Female\"; // always a primary member\n }\n }\n\n if (mship.equalsIgnoreCase( \"Junior Class B\" ) || mship.equalsIgnoreCase( \"Jr Class B\" )) {\n\n mship2 = \"Jr Class B\";\n\n if (gender.equals( \"F\" )) { // otherwise use default if Male\n\n mtype = \"Primary Female\"; // always a primary member\n }\n }\n\n if (mship.equalsIgnoreCase( \"Junior Class C\" ) || mship.equalsIgnoreCase( \"Jr Class C\" )) {\n\n mship2 = \"Jr Class C\";\n\n if (gender.equals( \"F\" )) { // otherwise use default if Male\n\n mtype = \"Primary Female\"; // always a primary member\n }\n }\n\n if (mship.equalsIgnoreCase( \"Spouse\" ) || mship.equalsIgnoreCase( \"Child\" )) { // if Spouse or Dependent\n\n if (mship.equalsIgnoreCase( \"Child\" )) { // if Dependent\n\n mtype = \"Dependent\";\n\n } else {\n\n if (gender.equals( \"F\" )) {\n\n mtype = \"Spouse Female\";\n\n } else {\n\n mtype = \"Spouse Male\";\n }\n }\n\n\n //\n // Get the mship type from the primary\n //\n pstmt2 = con.prepareStatement (\n \"SELECT m_ship FROM member2b WHERE username != ? AND memNum = ?\");\n\n pstmt2.clearParameters();\n pstmt2.setString(1, memid);\n pstmt2.setString(2, mNum);\n rs = pstmt2.executeQuery();\n\n if(rs.next()) {\n\n mship2 = rs.getString(\"m_ship\"); // spouse = use primary's mship type\n }\n pstmt2.close();\n\n } // end of IF spouse or child\n\n if (mship2.equals( \"\" )) { // if matching mship NOT found\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n\n } else {\n\n mship = mship2; // set new mship\n }\n\n } else { // mship not provided\n\n skip = true; // skip this record\n }\n\n } // end of IF Algonquin\n\n\n //\n // Bent Tree\n //\n if (club.equals( \"benttreecc\" )) {\n\n found = true; // club found\n\n //\n // Determine if we should process this record\n //\n if (memid.equals( \"\" )) {\n\n skip = true; // skip it\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMID missing!\";\n\n } else if (!mship.equalsIgnoreCase( \"Active\" ) && !mship.startsWith( \"D\" )) { // if NOT Active or Dxx\n\n skip = true; // skip it\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MSHIP invalid!\";\n\n } else {\n\n //\n // use memid as webid !! (do NOT change the username in records)\n //\n useWebid = true; // use webid to locate member\n\n webid = memid; // use webid for this club\n\n if (posid.equals( \"\" )) {\n\n posid = mNum; // default posid = mnum\n }\n\n\n //\n // Set the Member Type\n //\n mtype = \"Member Male\"; // default\n\n if (primary.equalsIgnoreCase( \"S\" )) { // if Spouse\n\n if (gender.equals( \"M\" )) {\n\n mtype = \"Spouse Male\";\n\n } else {\n\n mtype = \"Spouse Female\";\n }\n\n } else { // primary\n\n if (primary.equalsIgnoreCase( \"P\" )) { // if Primary\n\n if (gender.equals( \"M\" )) {\n\n mtype = \"Member Male\";\n\n } else {\n\n mtype = \"Member Female\";\n }\n\n } else {\n\n mtype = \"Junior\"; // all others = juniors\n }\n }\n\n //\n // Convert the mship from Dxx to real value\n //\n if (!mship.equalsIgnoreCase( \"Active\" )) { // accept Active as is\n\n if (mship.equalsIgnoreCase( \"D01\" )) {\n\n mship = \"Resident\";\n\n } else if (mship.equalsIgnoreCase( \"D02\" )) {\n\n mship = \"Young Executive\";\n\n } else if (mship.equalsIgnoreCase( \"D03\" ) || mship.equalsIgnoreCase( \"D05\" )) {\n\n mship = \"Tennis\";\n\n } else if (mship.equalsIgnoreCase( \"D04\" ) || mship.equalsIgnoreCase( \"D11\" )) {\n\n mship = \"Junior\";\n\n } else if (mship.equalsIgnoreCase( \"D06\" )) {\n\n mship = \"Temp Non-Resident\";\n\n } else if (mship.equalsIgnoreCase( \"D08\" )) {\n\n mship = \"Non-Resident\";\n\n } else if (mship.equalsIgnoreCase( \"D09\" )) {\n\n mship = \"Senior\";\n\n } else if (mship.equalsIgnoreCase( \"D12\" )) {\n\n mship = \"Employee\";\n\n } else {\n\n skip = true;\n }\n }\n } // end of IF mship ok\n\n } // end of IF club\n\n\n //\n // Orchid Island\n //\n if (club.equals( \"orchidisland\" )) {\n\n found = true; // club found\n\n //\n // Determine if we should process this record\n //\n if (memid.equals( \"\" )) {\n\n skip = true; // skip it\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMID missing!\";\n\n } else if (!mship.equals( \"\" )) {\n\n //\n // use memid as webid !! (do NOT change the username in records)\n //\n useWebid = true; // use webid to locate member\n\n webid = memid; // use webid for this club\n\n if (posid.equals( \"\" )) {\n\n posid = mNum; // default posid = mnum\n }\n\n if (gender.equals( \"\" )) {\n\n gender = \"M\"; // default\n }\n\n\n //\n // Strip any leading zeros and extension from mNum\n //\n while (mNum.startsWith( \"0\" )) { // if starts with a zero\n\n mNum = remZeroS(mNum); // remove the leading zero\n }\n\n memid = mNum; // Primary = 1234\n\n if (mship.equalsIgnoreCase(\"Depend\") ||\n (!primary.equalsIgnoreCase(\"P\") && !primary.equalsIgnoreCase(\"S\"))) {\n\n memid = memid + \"-\" + primary; // 1234-2\n\n mtype = \"Dependents\";\n\n } else if (mship.equalsIgnoreCase( \"Spouse\" ) || primary.equalsIgnoreCase( \"S\" )) {\n\n memid = memid + \"-1\"; // 1234-1\n\n if (gender.equals( \"F\" )) {\n\n mtype = \"Adult Female\";\n }\n } else {\n \n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Adult Female\";\n } else {\n mtype = \"Adult Male\";\n }\n }\n\n\n\n\n //\n // Set mship\n //\n if (mship.endsWith( \"TEN\" )) {\n\n mship = \"Beach & Tennis\";\n\n } else if (mship.endsWith( \"GOLF\" ) || mship.equalsIgnoreCase(\"Employee\")) {\n\n if (mship.equalsIgnoreCase(\"I GOLF\")) {\n mship = \"Invitational Golf\";\n } else {\n mship = \"EQ Golf\";\n }\n\n } else {\n\n //\n // Spouse or Dependent - look for Primary mship type and use that\n //\n pstmt2 = con.prepareStatement (\n \"SELECT m_ship FROM member2b WHERE username != ? AND (m_ship = 'EQ Golf' OR m_ship = 'Beach & Tennis' OR m_ship = 'Invitational Golf') AND memNum = ?\");\n\n pstmt2.clearParameters();\n pstmt2.setString(1, memid);\n pstmt2.setString(2, mNum);\n rs = pstmt2.executeQuery();\n\n if(rs.next()) {\n\n mship = rs.getString(\"m_ship\"); // use primary mship type\n } else {\n skip = true;\n }\n pstmt2.close();\n }\n\n } else {\n\n skip = true; // skip this record\n }\n\n } // end of IF club\n\n\n //\n // Colleton River\n //\n if (club.equals( \"colletonriverclub\" )) {\n\n found = true; // club found\n\n //\n // Determine if we should process this record\n //\n if (memid.equals( \"\" )) {\n\n skip = true; // skip it\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMID missing!\";\n\n } else if (!mship.equals( \"\" )) {\n\n //\n // use memid as webid !! (do NOT change the username in records)\n //\n useWebid = true; // use webid to locate member\n\n webid = memid; // use webid for this club\n\n if (posid.equals( \"\" )) {\n\n posid = mNum; // default posid = mnum\n }\n\n if (gender.equals( \"\" )) {\n\n gender = \"M\"; // default\n }\n\n\n //\n // Strip any leading zeros and extension from mNum\n //\n while (mNum.startsWith( \"0\" )) { // if starts with a zero\n\n mNum = remZeroS(mNum); // remove the leading zero\n }\n\n memid = mNum; // Primary = 1234\n\n mtype = \"Adult Male\"; // default\n\n if (!primary.equalsIgnoreCase(\"P\") && !primary.equalsIgnoreCase(\"S\")) {\n\n memid = memid + \"-\" + primary; // 1234-2\n\n mtype = \"Dependents\";\n\n } else {\n\n if (primary.equalsIgnoreCase( \"S\" )) {\n\n memid = memid + \"-1\"; // 1234-1\n }\n\n if (gender.equals( \"F\" )) {\n\n mtype = \"Adult Female\";\n }\n }\n\n // Convert 'FULL3' mship to 'FULL'\n if (mship.equalsIgnoreCase(\"FULL3\")) {\n mship = \"FULL\";\n }\n\n\n //\n // Set mship\n //\n if (mship.equalsIgnoreCase( \"Member\" )) {\n\n //mship = \"Resident\"; // do not change others\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n }\n\n } else {\n\n skip = true; // skip this record\n }\n\n } // end of IF club\n\n\n //\n // Claremont CC\n //\n if (club.equals( \"claremontcc\" )) {\n\n found = true; // club found\n\n //\n // Determine if we should process this record\n //\n if (memid.equals( \"\" )) {\n\n skip = true; // skip it\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMID missing!\";\n\n } else if (!mship.equals( \"\" )) {\n\n //\n // use memid as webid !! (do NOT change the username in records)\n //\n useWebid = true; // use webid to locate member\n\n webid = memid; // use webid for this club\n\n if (posid.equals( \"\" )) {\n\n posid = mNum; // default posid = mnum\n }\n\n if (gender.equals( \"\" )) {\n\n gender = \"M\"; // default\n }\n\n\n //\n // Strip any leading zeros and extension from mNum\n //\n while (mNum.startsWith( \"0\" )) { // if starts with a zero\n\n mNum = remZeroS(mNum); // remove the leading zero\n }\n\n\n mtype = \"Adult Male\"; // default\n\n if (!primary.equalsIgnoreCase(\"P\") && !primary.equalsIgnoreCase(\"S\")) {\n\n mtype = \"Juniors\";\n\n } else {\n\n if (gender.equals( \"F\" )) {\n\n mtype = \"Adult Female\";\n }\n }\n\n //\n // Set mship - TEMP until CE fixes them !!!!!!!!!!!!!!!!!!!!!!!\n //\n if (mship.equalsIgnoreCase( \"Member\" )) {\n\n mship = \"Employee\";\n\n } else if (mship.equalsIgnoreCase(\"Exempt\")) {\n\n mship = \"REG\";\n\n } else if (mship.equalsIgnoreCase(\"active\") || mship.equalsIgnoreCase(\"Oak Tree\") || mship.equalsIgnoreCase(\"Standards\")) {\n\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n }\n\n\n } else {\n\n skip = true; // skip this record\n }\n\n } // end of IF club\n\n /*\n //\n // Meridian GC\n //\n if (club.equals( \"meridiangc\" )) {\n\n found = true; // club found\n\n //\n // Determine if we should process this record\n //\n if (memid.equals( \"\" )) {\n\n skip = true; // skip it\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMID missing!\";\n\n } else if (!mship.equals( \"\" )) {\n\n //\n // use memid as webid !! (do NOT change the username in records)\n //\n useWebid = true; // use webid to locate member\n\n webid = memid; // use webid for this club\n\n if (posid.equals( \"\" )) {\n\n posid = mNum; // default posid = mnum\n }\n\n if (gender.equals( \"\" )) {\n\n gender = \"M\"; // default\n }\n\n\n //\n // Strip any leading zeros and extension from mNum\n //\n while (mNum.startsWith( \"0\" )) { // if starts with a zero\n\n mNum = remZeroS(mNum); // remove the leading zero\n }\n\n\n mtype = \"Primary Male\"; // default\n\n if (!primary.equalsIgnoreCase(\"P\") && !primary.equalsIgnoreCase(\"S\")) {\n\n mtype = \"Dependent\";\n\n } else if (primary.equalsIgnoreCase(\"P\") && gender.equalsIgnoreCase( \"M\" )) {\n\n mtype = \"Primary Male\";\n\n } else if (primary.equalsIgnoreCase(\"P\") && gender.equalsIgnoreCase( \"F\" )) {\n\n mtype = \"Primary Female\";\n\n } else if (primary.equalsIgnoreCase(\"S\") && gender.equalsIgnoreCase( \"F\" )) {\n\n mtype = \"Non-Primary Female\";\n\n } else if (primary.equalsIgnoreCase(\"S\") && gender.equalsIgnoreCase( \"M\" )) {\n\n mtype = \"Non-Primary Male\";\n }\n\n } else {\n\n skip = true; // skip this record\n }\n\n } // end of IF club\n\n\n\n*/\n if (club.equals(\"berkeleyhall\")) {\n\n found = true; // club found\n\n //\n // Determine if we should process this record\n //\n if (memid.equals( \"\" )) {\n\n skip = true; // skip it\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMID missing!\";\n\n } else if (!mship.equals( \"\" )) {\n\n posid = mNum; // they use their member numbers as their posid\n webid = memid; // they use their member id (our username) as their webid\n\n //\n // Strip any leading zeros and extension from mNum\n //\n while (mNum.startsWith( \"0\" )) { // if starts with a zero\n\n mNum = remZeroS(mNum); // remove the leading zero\n }\n\n if (!primary.equalsIgnoreCase(\"P\") && !primary.equalsIgnoreCase(\"S\")) {\n\n mtype = \"Dependent\";\n\n } else if (gender.equalsIgnoreCase( \"M\" )) {\n\n mtype = \"Adult Male\";\n\n } else if (gender.equalsIgnoreCase( \"F\" )) {\n\n mtype = \"Adult Female\";\n\n } else {\n\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n\n }\n\n } else {\n\n skip = true; // skip this record\n }\n\n } // end if berkeleyhall\n\n\n if (club.equals(\"indianhillscc\")) {\n\n found = true; // club found\n\n //\n // Determine if we should process this record\n //\n if (memid.equals( \"\" )) {\n\n skip = true; // skip it\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMID missing!\";\n\n } else if (mship.equalsIgnoreCase( \"Social\" ) || mship.equalsIgnoreCase( \"Social SS\" ) || mship.equalsIgnoreCase( \"Spouse\" ) ||\n mship.equalsIgnoreCase( \"Spouse S\" ) || mship.equalsIgnoreCase( \"Child\" )) {\n\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n\n } else if (!mship.equals( \"\" )) {\n\n posid = mNum; // they use their member numbers as their posid\n\n //\n // use memid as webid !!\n //\n useWebid = true; // use webid to locate member\n\n webid = memid; // use webid for this club\n\n //\n // use the mnum for memid\n //\n if (primary.equalsIgnoreCase(\"P\")) {\n\n memid = mNum;\n\n } else {\n\n if (primary.equalsIgnoreCase(\"S\")) {\n\n memid = mNum + \"-1\"; // spouse\n\n } else {\n\n memid = mNum + \"-\" + primary; // dependents (2 and up)\n }\n }\n\n mship = toTitleCase(mship);\n\n //\n // Set the member types\n //\n if (mship.startsWith(\"Spouse\")) {\n\n if (gender.equalsIgnoreCase(\"M\")) {\n\n mtype = \"Spouse Male\";\n\n } else {\n\n mtype = \"Spouse Female\";\n }\n\n } else {\n\n if (mship.startsWith(\"Child\")) {\n\n if (gender.equalsIgnoreCase(\"M\")) {\n\n mtype = \"Junior Male\";\n\n } else {\n\n mtype = \"Junior Female\";\n }\n\n } else { // all others\n\n if (gender.equalsIgnoreCase(\"F\")) {\n\n mtype = \"Primary Female\";\n\n } else {\n\n mtype = \"Primary Male\";\n }\n }\n }\n\n //\n // Convert some mship types\n //\n if (mship.equals(\"Found\") || mship.equals(\"Spouse F\") || mship.equals(\"Child F\") ||\n mship.equalsIgnoreCase(\"G/F SS\") || mship.equalsIgnoreCase(\"Golf SS\")) {\n\n mship = \"Foundation\";\n\n } else {\n\n if (mship.equals(\"Interm\") || mship.equals(\"Spouse I\") || mship.equals(\"Child I\")) {\n\n mship = \"Intermediate\";\n }\n }\n\n } else { // missing field or mship not allowed\n\n skip = true; // skip this record\n }\n\n } // end if indianhillscc\n\n /*\n if (club.equals(\"rtjgc\")) { // Robert Trent Jones GC\n\n found = true; // club found\n\n //\n // Determine if we should process this record\n //\n if (!mship.equals( \"\" )) {\n\n posid = mNum; // use their member numbers as their posid\n\n //\n // use memid as webid !!\n //\n useWebid = true; // use webid to locate member\n\n webid = memid; // use webid for this club\n\n //\n // use the mnum for memid\n //\n if (primary.equalsIgnoreCase(\"S\") || gender.equalsIgnoreCase(\"F\")) {\n\n memid = mNum + \"A\"; // spouse or female\n\n } else {\n\n memid = mNum; // primary males\n }\n\n\n //\n // Set the member type\n //\n if (gender.equalsIgnoreCase(\"F\")) {\n\n mtype = \"Primary Female\";\n\n } else {\n\n mtype = \"Primary Male\";\n }\n\n\n //\n // Set the membership type\n //\n if (mship.equalsIgnoreCase(\"HON\")) {\n\n mship = \"Honorary\";\n\n } else {\n\n if (mship.endsWith(\"IR\")) {\n\n mship = \"Individual Resident\";\n\n } else {\n\n if (mship.endsWith(\"SNR\")) {\n\n mship = \"Senior Non Resident\";\n\n } else {\n\n if (mship.endsWith(\"SR\")) {\n\n mship = \"Senior\";\n\n } else {\n\n if (mship.endsWith(\"CR\")) {\n\n mship = \"Corporate Resident\";\n\n } else {\n\n if (mship.endsWith(\"CNR\")) {\n\n mship = \"Corporate Non Resident\";\n\n } else {\n\n if (mship.endsWith(\"INR\")) {\n\n mship = \"Individual Non Resident\";\n\n } else {\n\n if (mship.endsWith(\"P\")) {\n\n mship = \"Playing Member\";\n\n } else {\n\n mship = \"Junior\";\n }\n }\n }\n }\n }\n }\n }\n }\n\n } else { // missing field or mship not allowed\n\n skip = true; // skip this record\n }\n\n } // end if Robert Trent Jones GC\n */\n\n if (club.equals(\"oakhillcc\")) { // Oak Hill CC\n\n found = true; // club found\n\n //\n // Determine if we should process this record\n //\n if (!mship.equals( \"\" )) {\n\n posid = mNum; // use their member numbers as their posid\n\n //\n // use memid as webid !!\n //\n useWebid = true; // use webid to locate member\n\n webid = memid; // use webid for this club\n\n //\n // use the mnum for memid\n //\n if (primary.equalsIgnoreCase(\"S\")) {\n\n memid = mNum + \"A\"; // spouse\n\n } else {\n\n if (primary.equalsIgnoreCase(\"P\")) {\n\n memid = mNum; // Primary\n\n } else {\n\n memid = mNum + \"-\" + primary; // dependents (nnn-p)\n }\n }\n\n\n //\n // Set the member type\n //\n if (primary.equalsIgnoreCase(\"P\")) {\n\n if (gender.equalsIgnoreCase(\"F\")) {\n\n mtype = \"Primary Female\";\n\n } else {\n\n mtype = \"Primary Male\";\n }\n\n } else {\n\n if (primary.equalsIgnoreCase(\"S\")) {\n\n if (gender.equalsIgnoreCase(\"F\")) {\n\n mtype = \"Spouse Female\";\n\n } else {\n\n mtype = \"Spouse Male\";\n }\n\n } else {\n\n mtype = \"Dependent\";\n }\n }\n\n //\n // Set the membership type\n //\n mship = \"G\"; // all are Golf\n\n } else { // missing field or mship not allowed\n\n skip = true; // skip this record\n }\n\n } // end if Oak Hill CC\n\n\n if (club.equals(\"internationalcc\")) { // International CC\n\n found = true; // club found\n\n mship = toTitleCase(mship);\n\n //\n // Determine if we should process this record\n //\n if (mship.equalsIgnoreCase( \"Corp-Social\" ) || mship.equalsIgnoreCase( \"Employees\" ) ||\n mship.equalsIgnoreCase( \"Leave Of Absence\" ) || mship.equalsIgnoreCase( \"Member\" ) ||\n mship.equalsIgnoreCase( \"Social\" ) || mship.equalsIgnoreCase( \"Social-Wci\" ) ||\n mship.equalsIgnoreCase( \"Bad Addresses\" ) || mship.equalsIgnoreCase( \"Expelled\" ) ||\n mship.equalsIgnoreCase( \"Resigned\" ) || mship.equalsIgnoreCase( \"Parties\" ) ||\n mship.equalsIgnoreCase( \"Clubhouse\" )) {\n\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n\n } else if (!mship.equals( \"\" )) {\n \n posid = mNum; // use their member numbers as their posid\n\n //\n // use memid as webid !!\n //\n useWebid = true; // use webid to locate member\n\n webid = memid; // use webid for this club\n/*\n // Custom to handle memNum 1217 differently, as they have to have the primary and spouse flip-flopped\n if (mNum.equals(\"1217\")) {\n\n if (primary.equalsIgnoreCase(\"P\")) {\n primary = \"S\";\n } else if (primary.equalsIgnoreCase(\"S\")) {\n primary = \"P\";\n }\n }\n*/\n //\n // use the mnum for memid\n //\n if (primary.equalsIgnoreCase(\"S\")) {\n\n memid = mNum + \"A\"; // spouse\n\n } else {\n\n if (primary.equalsIgnoreCase(\"P\")) {\n\n memid = mNum; // Primary\n\n } else {\n\n memid = mNum + \"-\" + primary; // dependents (nnn-p)\n }\n }\n\n\n //\n // Set the member type\n //\n if (primary.equalsIgnoreCase(\"P\")) {\n\n if (gender.equalsIgnoreCase(\"F\")) {\n\n mtype = \"Primary Female\";\n\n } else {\n\n mtype = \"Primary Male\";\n }\n\n } else {\n\n if (primary.equalsIgnoreCase(\"S\")) {\n\n if (gender.equalsIgnoreCase(\"F\")) {\n\n mtype = \"Spouse Female\";\n\n } else {\n\n mtype = \"Spouse Male\";\n }\n\n } else {\n\n mtype = \"Dependent\";\n }\n\n // If Spouse/Dependent, hit the database and use the Primary's membership type (if exists)\n try {\n PreparedStatement pstmtTemp = null;\n ResultSet rsTemp = null;\n\n pstmtTemp = con.prepareStatement(\"SELECT m_ship FROM member2b WHERE username = ?\");\n pstmtTemp.clearParameters();\n pstmtTemp.setString(1, mNum);\n\n rsTemp = pstmtTemp.executeQuery();\n\n if (rsTemp.next()) {\n \n mship = rsTemp.getString(\"m_ship\"); // get primary's mship type\n \n } else {\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NO PRIMARY FOUND!\";\n }\n\n pstmtTemp.close();\n \n } catch (Exception ignore) { }\n }\n\n\n } else { // missing field or mship not allowed\n\n skip = true; // skip this record\n }\n\n } // end if International CC\n\n\n if (club.equals(\"greenwich\")) { // Greenwich CC\n\n found = true; // club found\n\n mship = toTitleCase(mship);\n\n //\n // Determine if we should process this record\n //\n if (!mship.equals( \"\" )) {\n\n posid = mNum; // use their member numbers as their posid\n\n //\n // Strip any leading zeros and extension from mNum\n //\n while (mNum.startsWith( \"0\" )) { // if starts with a zero\n\n mNum = remZeroS(mNum); // remove the leading zero\n }\n\n //\n // use memid as webid !!\n //\n useWebid = true; // use webid to locate member\n\n webid = memid; // use webid for this club\n\n\n //\n // mship - ALL = Golf !!!!!!\n //\n mship = \"Golf\";\n\n\n //\n // use the mnum for memid\n //\n if (primary.equalsIgnoreCase(\"S\")) {\n\n memid = mNum + \"A\"; // spouse\n\n } else {\n\n if (primary.equalsIgnoreCase(\"P\")) {\n\n memid = mNum; // Primary\n\n } else {\n\n memid = mNum + \"-\" + primary; // dependents (nnn-p)\n }\n }\n\n\n //\n // Set the member type\n //\n if (primary.equalsIgnoreCase(\"P\") || primary.equalsIgnoreCase(\"S\")) {\n\n if (gender.equalsIgnoreCase(\"F\")) {\n\n mtype = \"Primary Female\";\n\n } else {\n\n mtype = \"Primary Male\";\n }\n\n } else {\n\n mtype = \"Dependent\";\n }\n\n\n } else { // missing field or mship not allowed\n\n skip = true; // skip this record\n }\n\n } // end if Greenwich CC\n\n\n\n //******************************************************************\n // TPC Southwind\n //******************************************************************\n //\n if (club.equals(\"tpcsouthwind\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n mship = checkTPCmship(mship, club); // check for non-golf and trim the mships\n\n if (mship.equals( \"\" )) { // if mship to be skipped\n\n skip = true; // skip these\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE!\";\n }\n }\n\n if (skip == false) {\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n memid = mNum;\n\n posid = mNum; // set posid in case we need it in the future\n\n if (primary.equalsIgnoreCase(\"P\")) { // Primary\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Primary Female\";\n } else {\n mtype = \"Primary Male\";\n }\n } else if (primary.equalsIgnoreCase(\"S\")) { // Spouse\n\n memid = memid + \"A\";\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Spouse Female\";\n } else {\n mtype = \"Spouse Male\";\n }\n } else if (primary.equals(\"2\") || primary.equals(\"3\") || primary.equals(\"4\") ||\n primary.equals(\"5\") || primary.equals(\"6\")) { // Dependent\n\n if (birth > 0) { // if birth date provided\n\n mtype = checkTPCkids(birth, gender); // get mtype based on age\n\n if (mtype.equals(\"\")) { // if too old now (26)\n\n skip = true; // force them to go inactive\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: DEPENDENT OVER 25!\";\n }\n\n } else {\n\n if (gender.equalsIgnoreCase(\"F\")) { // defaults\n mtype = \"Dependent Female\";\n } else {\n mtype = \"Dependent Male\";\n }\n }\n\n if (primary.equals(\"2\")) {\n memid += \"B\";\n } else if (primary.equals(\"3\")) {\n memid += \"C\";\n } else if (primary.equals(\"4\")) {\n memid += \"D\";\n } else if (primary.equals(\"5\")) {\n memid += \"E\";\n } else if (primary.equals(\"6\")) {\n memid += \"F\";\n }\n\n primary = \"D\";\n\n } else { // Authorized Caller\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Authorized Caller Female\";\n } else {\n mtype = \"Authorized Caller Male\";\n }\n memid = memid + primary;\n primary = \"AC\";\n }\n }\n\n } // end if tpcsouthwind\n\n\n //******************************************************************\n // TPC Sugarloaf\n //******************************************************************\n //\n if (club.equals(\"tpcsugarloaf\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n mship = checkTPCmship(mship, club); // check for non-golf and trim the mships\n\n if (mship.equals( \"\" ) || mship.equalsIgnoreCase(\"Charter Social\") || mship.equalsIgnoreCase(\"Charter Swim/Tennis\")) { // if mship to be skipped\n\n skip = true; // skip these\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE!\";\n }\n }\n\n if (skip == false) {\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n memid = mNum;\n\n posid = mNum; // set posid in case we need it in the future\n\n if (primary.equalsIgnoreCase(\"P\")) { // Primary\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Primary Female\";\n } else {\n mtype = \"Primary Male\";\n }\n\n } else if (primary.equalsIgnoreCase(\"S\")) { // Spouse\n\n memid = memid + \"A\";\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Spouse Female\";\n } else {\n mtype = \"Spouse Male\";\n }\n\n } else if (primary.equals(\"2\") || primary.equals(\"3\") || primary.equals(\"4\") ||\n primary.equals(\"5\") || primary.equals(\"6\") || primary.equals(\"7\")) { // Dependent\n\n if (birth > 0) { // if birth date provided\n\n mtype = checkTPCkids(birth, gender); // get mtype based on age\n\n if (mtype.equals(\"\")) { // if too old now (26)\n\n skip = true; // force them to go inactive\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: DEPENDENT OVER 25!\";\n }\n\n } else {\n\n if (gender.equalsIgnoreCase(\"F\")) { // defaults\n mtype = \"Dependent Female\";\n } else {\n mtype = \"Dependent Male\";\n }\n }\n\n if (primary.equals(\"2\")) {\n memid += \"B\";\n } else if (primary.equals(\"3\")) {\n memid += \"C\";\n } else if (primary.equals(\"4\")) {\n memid += \"D\";\n } else if (primary.equals(\"5\")) {\n memid += \"E\";\n } else if (primary.equals(\"6\")) {\n memid += \"F\";\n } else if (primary.equals(\"7\")) {\n memid += \"G\";\n }\n\n primary = \"D\";\n\n } else { // Authorized Caller\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Authorized Caller Female\";\n } else {\n mtype = \"Authorized Caller Male\";\n }\n memid = memid + primary;\n primary = \"AC\";\n }\n }\n\n } // end if tpcsugarloaf\n\n\n //******************************************************************\n // TPC Wakefield Plantation\n //******************************************************************\n //\n if (club.equals(\"tpcwakefieldplantation\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n mship = checkTPCmship(mship, club); // check for non-golf and trim the mships\n\n if (mship.equals( \"\" ) || mship.equalsIgnoreCase(\"Sports Club\") || mship.equalsIgnoreCase(\"Sports Club Non-Resident\")) { // if mship to be skipped\n\n skip = true; // skip these\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE!\";\n }\n }\n\n if (skip == false) {\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n memid = mNum;\n\n posid = mNum; // set posid in case we need it in the future\n\n if (primary.equalsIgnoreCase(\"P\")) { // Primary\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Primary Female\";\n } else {\n mtype = \"Primary Male\";\n }\n\n } else if (primary.equalsIgnoreCase(\"S\")) { // Spouse\n\n memid = memid + \"1\";\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Spouse Female\";\n } else {\n mtype = \"Spouse Male\";\n }\n\n } else if (primary.equals(\"2\") || primary.equals(\"3\") || primary.equals(\"4\") ||\n primary.equals(\"5\") || primary.equals(\"6\")) { // Dependent\n\n if (birth > 0) { // if birth date provided\n\n mtype = checkTPCkids(birth, gender); // get mtype based on age\n\n if (mtype.equals(\"\")) { // if too old now (26)\n\n skip = true; // force them to go inactive\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: DEPENDENT OVER 25!\";\n }\n\n } else {\n\n if (gender.equalsIgnoreCase(\"F\")) { // defaults\n mtype = \"Dependent Female\";\n } else {\n mtype = \"Dependent Male\";\n }\n }\n\n memid = memid + primary;\n primary = \"D\";\n\n } else { // Authorized Caller\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Authorized Caller Female\";\n } else {\n mtype = \"Authorized Caller Male\";\n }\n memid = memid + primary;\n primary = \"AC\";\n }\n }\n\n } // end if tpcwakefieldplantation\n\n\n //******************************************************************\n // TPC River Highlands\n //******************************************************************\n //\n if (club.equals(\"tpcriverhighlands\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n mship = checkTPCmship(mship, club); // check for non-golf and trim the mships\n\n if (mship.equals( \"\" )) { // if mship to be skipped\n\n skip = true; // skip these\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE!\";\n }\n }\n\n if (skip == false) {\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n memid = mNum;\n\n posid = mNum; // set posid in case we need it in the future\n\n if (primary.equalsIgnoreCase(\"P\")) { // Primary\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Primary Female\";\n } else {\n mtype = \"Primary Male\";\n }\n\n } else if (primary.equalsIgnoreCase(\"S\")) { // Spouse\n\n memid = memid + \"1\";\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Spouse Female\";\n } else {\n mtype = \"Spouse Male\";\n }\n\n } else if (primary.equals(\"2\") || primary.equals(\"3\") || primary.equals(\"4\") ||\n primary.equals(\"5\") || primary.equals(\"6\")) { // Dependent\n\n if (birth > 0) { // if birth date provided\n\n mtype = checkTPCkids(birth, gender); // get mtype based on age\n\n if (mtype.equals(\"\")) { // if too old now (26)\n\n skip = true; // force them to go inactive\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: DEPENDENT OVER 25!\";\n }\n\n } else {\n\n if (gender.equalsIgnoreCase(\"F\")) { // defaults\n mtype = \"Dependent Female\";\n } else {\n mtype = \"Dependent Male\";\n }\n }\n\n memid = memid + primary;\n primary = \"D\";\n\n } else { // Authorized Caller\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Authorized Caller Female\";\n } else {\n mtype = \"Authorized Caller Male\";\n }\n memid = memid + primary;\n primary = \"AC\";\n }\n }\n\n } // end if tpcriverhighlands\n\n\n //******************************************************************\n // TPC River's Bend\n //******************************************************************\n //\n if (club.equals(\"tpcriversbend\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n mship = checkTPCmship(mship, club); // check for non-golf and trim the mships\n\n if (mship.equals( \"\" )) { // if mship to be skipped\n\n skip = true; // skip these\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE!\";\n }\n }\n\n if (skip == false) {\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n memid = mNum;\n\n posid = mNum; // set posid in case we need it in the future\n\n if (primary.equalsIgnoreCase(\"P\")) { // Primary\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Primary Female\";\n } else {\n mtype = \"Primary Male\";\n }\n\n } else if (primary.equalsIgnoreCase(\"S\")) { // Spouse\n\n memid = memid + \"1\";\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Spouse Female\";\n } else {\n mtype = \"Spouse Male\";\n }\n\n } else if (primary.equals(\"2\") || primary.equals(\"3\") || primary.equals(\"4\") ||\n primary.equals(\"5\") || primary.equals(\"6\")) { // Dependent\n\n if (birth > 0) { // if birth date provided\n\n mtype = checkTPCkids(birth, gender); // get mtype based on age\n\n if (mtype.equals(\"\")) { // if too old now (26)\n\n skip = true; // force them to go inactive\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: DEPENDENT OVER 25!\";\n }\n\n } else {\n\n if (gender.equalsIgnoreCase(\"F\")) { // defaults\n mtype = \"Dependent Female\";\n } else {\n mtype = \"Dependent Male\";\n }\n }\n\n memid = memid + primary;\n primary = \"D\";\n\n } else { // Authorized Caller\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Authorized Caller Female\";\n } else {\n mtype = \"Authorized Caller Male\";\n }\n memid = memid + primary;\n primary = \"AC\";\n }\n }\n\n } // end if tpcriversbend\n\n //******************************************************************\n // TPC Jasna Polana\n //******************************************************************\n //\n if (club.equals(\"tpcjasnapolana\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n mship = checkTPCmship(mship, club); // check for non-golf and trim the mships\n\n if (mship.equals( \"\" )) { // if mship to be skipped\n\n skip = true; // skip these\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE!\";\n }\n }\n\n if (skip == false) {\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n memid = mNum;\n\n posid = mNum; // set posid in case we need it in the future\n\n if (primary.equalsIgnoreCase(\"P\")) { // Primary\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Primary Female\";\n } else {\n mtype = \"Primary Male\";\n }\n\n } else if (primary.equalsIgnoreCase(\"S\")) { // Spouse\n\n memid = memid + \"1\";\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Spouse Female\";\n } else {\n mtype = \"Spouse Male\";\n }\n\n } else if (primary.equals(\"2\") || primary.equals(\"3\") || primary.equals(\"4\") ||\n primary.equals(\"5\") || primary.equals(\"6\")) { // Dependent\n\n if (birth > 0) { // if birth date provided\n\n mtype = checkTPCkids(birth, gender); // get mtype based on age\n\n if (mtype.equals(\"\")) { // if too old now (26)\n\n skip = true; // force them to go inactive\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: DEPENDENT OVER 25!\";\n }\n\n } else {\n\n if (gender.equalsIgnoreCase(\"F\")) { // defaults\n mtype = \"Dependent Female\";\n } else {\n mtype = \"Dependent Male\";\n }\n }\n\n memid = memid + primary;\n primary = \"D\";\n\n } else { // Authorized Caller\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Authorized Caller Female\";\n } else {\n mtype = \"Authorized Caller Male\";\n }\n memid = memid + primary;\n primary = \"AC\";\n }\n }\n\n } // end if tpcjasnapolana\n\n\n //******************************************************************\n // TPC Boston\n //******************************************************************\n //\n if (club.equals(\"tpcboston\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n mship = checkTPCmship(mship, club); // check for non-golf and trim the mships\n\n if (mship.equals( \"\" )) { // if mship to be skipped\n\n skip = true; // skip these\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE!\";\n }\n }\n\n if (skip == false) {\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n memid = mNum;\n\n posid = mNum; // set posid in case we need it in the future\n\n if (primary.equalsIgnoreCase(\"P\")) { // Primary\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Primary Female\";\n } else {\n mtype = \"Primary Male\";\n }\n\n } else if (primary.equalsIgnoreCase(\"S\")) { // Spouse\n\n memid = memid + \"1\";\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Spouse Female\";\n } else {\n mtype = \"Spouse Male\";\n }\n\n } else if (primary.equals(\"2\") || primary.equals(\"3\") || primary.equals(\"4\") ||\n primary.equals(\"5\") || primary.equals(\"6\")) { // Dependent\n\n if (birth > 0) { // if birth date provided\n\n mtype = checkTPCkids(birth, gender); // get mtype based on age\n\n if (mtype.equals(\"\")) { // if too old now (26)\n\n skip = true; // force them to go inactive\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: DEPENDENT OVER 25!\";\n }\n\n } else {\n\n if (gender.equalsIgnoreCase(\"F\")) { // defaults\n mtype = \"Dependent Female\";\n } else {\n mtype = \"Dependent Male\";\n }\n }\n\n memid = memid + primary;\n primary = \"D\";\n\n } else { // Authorized Caller\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Authorized Caller Female\";\n } else {\n mtype = \"Authorized Caller Male\";\n }\n memid = memid + primary;\n primary = \"AC\";\n }\n\n if (mship.equalsIgnoreCase(\"CHARTER NON-REFUNDABLE\")) {\n mship = \"CHARTER\";\n }\n }\n\n } // end if tpcboston\n\n //******************************************************************\n // TPC Craig Ranch\n //******************************************************************\n //\n if (club.equals(\"tpccraigranch\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n mship = checkTPCmship(mship, club); // check for non-golf and trim the mships\n\n if (mship.equals( \"\" )) { // if mship to be skipped\n\n skip = true; // skip these\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE!\";\n }\n }\n\n if (skip == false) {\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n memid = mNum;\n\n posid = mNum; // set posid in case we need it in the future\n\n if (primary.equalsIgnoreCase(\"P\")) { // Primary\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Primary Female\";\n } else {\n mtype = \"Primary Male\";\n }\n\n } else if (primary.equalsIgnoreCase(\"S\")) { // Spouse\n\n memid = memid + \"1\";\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Spouse Female\";\n } else {\n mtype = \"Spouse Male\";\n }\n\n } else if (primary.equals(\"2\") || primary.equals(\"3\") || primary.equals(\"4\") ||\n primary.equals(\"5\") || primary.equals(\"6\")) { // Dependent\n\n if (birth > 0) { // if birth date provided\n\n mtype = checkTPCkids(birth, gender); // get mtype based on age\n\n if (mtype.equals(\"\")) { // if too old now (26)\n\n skip = true; // force them to go inactive\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: DEPENDENT OVER 25!\";\n }\n\n } else {\n\n if (gender.equalsIgnoreCase(\"F\")) { // defaults\n mtype = \"Dependent Female\";\n } else {\n mtype = \"Dependent Male\";\n }\n }\n\n memid = memid + primary;\n primary = \"D\";\n\n } else { // Authorized Caller\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Authorized Caller Female\";\n } else {\n mtype = \"Authorized Caller Male\";\n }\n memid = memid + primary;\n primary = \"AC\";\n }\n }\n\n } // end if tpccraigranch\n\n\n //******************************************************************\n // TPC Potomac\n //******************************************************************\n //\n if (club.equals(\"tpcpotomac\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n mship = checkTPCmship(mship, club); // check for non-golf and trim the mships\n\n if (mship.equals( \"\" )) { // if mship to be skipped\n\n skip = true; // skip these\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE!\";\n }\n }\n\n if (skip == false) {\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n // memid = mNum;\n\n posid = mNum; // set posid in case we need it in the future\n\n if (primary.equalsIgnoreCase(\"P\")) { // Primary\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Primary Female\";\n } else {\n mtype = \"Primary Male\";\n }\n\n } else if (primary.equalsIgnoreCase(\"S\")) { // Spouse\n\n //memid = memid + \"A\";\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Spouse Female\";\n } else {\n mtype = \"Spouse Male\";\n }\n\n } else if (primary.equals(\"2\") || primary.equals(\"3\") || primary.equals(\"4\") ||\n primary.equals(\"5\") || primary.equals(\"6\") || primary.equals(\"7\")) { // Dependent\n\n if (birth > 0) { // if birth date provided\n\n mtype = checkTPCkids(birth, gender); // get mtype based on age\n\n if (mtype.equals(\"\")) { // if too old now (26)\n\n skip = true; // force them to go inactive\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: DEPENDENT OVER 25!\";\n }\n\n } else {\n\n if (gender.equalsIgnoreCase(\"F\")) { // defaults\n mtype = \"Dependent Female\";\n } else {\n mtype = \"Dependent Male\";\n }\n }\n/*\n if (primary.equals(\"2\")) {\n memid += \"B\";\n } else if (primary.equals(\"3\")) {\n memid += \"C\";\n } else if (primary.equals(\"4\")) {\n memid += \"D\";\n } else if (primary.equals(\"5\")) {\n memid += \"E\";\n } else if (primary.equals(\"6\")) {\n memid += \"F\";\n } else if (primary.equals(\"7\")) {\n memid += \"G\";\n }\n */\n primary = \"D\";\n\n } else { // Authorized Caller\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Authorized Caller Female\";\n } else {\n mtype = \"Authorized Caller Male\";\n }\n/*\n if (primary.equals(\"8\")) {\n memid += \"H\";\n } else if (primary.equals(\"9\")) {\n memid += \"I\";\n } else if (primary.equals(\"10\")) {\n memid += \"J\";\n } else if (primary.equals(\"11\")) {\n memid += \"K\";\n }\n */\n primary = \"AC\";\n }\n }\n\n } // end if tpcpotomac\n\n\n //******************************************************************\n // TPC Summerlin\n //******************************************************************\n //\n if (club.equals(\"tpcsummerlin\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n mship = checkTPCmship(mship, club); // check for non-golf and trim the mships\n\n if (mship.equals( \"\" )) { // if mship to be skipped\n\n skip = true; // skip these\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE!\";\n }\n }\n\n if (skip == false) {\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n memid = mNum;\n\n posid = mNum; // set posid in case we need it in the future\n\n if (primary.equalsIgnoreCase(\"P\")) { // Primary\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Primary Female\";\n } else {\n mtype = \"Primary Male\";\n }\n\n } else if (primary.equalsIgnoreCase(\"S\")) { // Spouse\n\n memid = memid + \"1\";\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Spouse Female\";\n } else {\n mtype = \"Spouse Male\";\n }\n\n } else if (primary.equals(\"2\") || primary.equals(\"3\") || primary.equals(\"4\") ||\n primary.equals(\"5\") || primary.equals(\"6\") || primary.equals(\"7\") ||\n primary.equals(\"8\")) { // Dependent\n\n if (birth > 0) { // if birth date provided\n\n mtype = checkTPCkids(birth, gender); // get mtype based on age\n\n if (mtype.equals(\"\")) { // if too old now (26)\n\n skip = true; // force them to go inactive\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: DEPENDENT OVER 25!\";\n }\n\n } else {\n\n if (gender.equalsIgnoreCase(\"F\")) { // defaults\n mtype = \"Dependent Female\";\n } else {\n mtype = \"Dependent Male\";\n }\n }\n\n memid = memid + primary;\n primary = \"D\";\n\n } else { // Authorized Caller\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Authorized Caller Female\";\n } else {\n mtype = \"Authorized Caller Male\";\n }\n memid = memid + primary;\n primary = \"AC\";\n }\n }\n\n } // end if tpcsummerlin\n\n\n //******************************************************************\n // TPC Twin Cities\n //******************************************************************\n //\n if (club.equals(\"tpctc\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n mship = checkTPCmship(mship, club); // check for non-golf and trim the mships\n\n if (mship.equals( \"\" )) { // if mship to be skipped\n\n skip = true; // skip these\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE!\";\n }\n }\n\n if (skip == false) {\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n memid = mNum;\n\n posid = mNum; // set posid in case we need it in the future\n\n if (primary.equalsIgnoreCase(\"P\")) { // Primary\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Primary Female\";\n } else {\n mtype = \"Primary Male\";\n }\n\n } else if (primary.equalsIgnoreCase(\"S\")) { // Spouse\n\n memid = memid + \"1\";\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Spouse Female\";\n } else {\n mtype = \"Spouse Male\";\n }\n\n } else if (primary.equals(\"2\") || primary.equals(\"3\") || primary.equals(\"4\") ||\n primary.equals(\"5\") || primary.equals(\"6\")) { // Dependent\n\n if (birth > 0) { // if birth date provided\n\n mtype = checkTPCkids(birth, gender); // get mtype based on age\n\n if (mtype.equals(\"\")) { // if too old now (26)\n\n skip = true; // force them to go inactive\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: DEPENDENT OVER 25!\";\n }\n\n } else {\n\n if (gender.equalsIgnoreCase(\"F\")) { // defaults\n mtype = \"Dependent Female\";\n } else {\n mtype = \"Dependent Male\";\n }\n }\n\n memid = memid + primary;\n primary = \"D\";\n\n } else { // Authorized Caller\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Authorized Caller Female\";\n } else {\n mtype = \"Authorized Caller Male\";\n }\n memid = memid + primary;\n primary = \"AC\";\n }\n }\n /*\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else if ((primary.equals(\"1\") || primary.equals(\"2\") || primary.equals(\"3\") || primary.equals(\"4\") ||\n primary.equals(\"5\") || primary.equals(\"6\") || primary.equals(\"7\") || primary.equals(\"8\")) &&\n birth == 0) {\n skip = true;\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -BIRTH DATE missing for DEPENDENT!\";\n } else {\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n memid = mNum;\n\n posid = mNum; // set posid in case we need it in the future\n\n\n mship = toTitleCase(mship); // make sure mship is titlecased\n\n\n if (mship.equalsIgnoreCase(\"Social\") || mship.equalsIgnoreCase(\"Member\")) {\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE!\";\n }\n\n if (primary.equals(\"1\") || primary.equals(\"2\") || primary.equals(\"3\") || primary.equals(\"4\") ||\n primary.equals(\"5\") || primary.equals(\"6\") || primary.equals(\"7\") || primary.equals(\"8\")) {\n\n //\n // Determine the age in years\n //\n\n Calendar cal = new GregorianCalendar(); // get todays date\n\n int year = cal.get(Calendar.YEAR);\n int month = cal.get(Calendar.MONTH) +1;\n int day = cal.get(Calendar.DAY_OF_MONTH);\n\n year = year - 18; // backup 16 years\n\n int oldDate = (year * 10000) + (month * 100) + day; // get date\n\n if (birth > oldDate) { // if member is < 18 yrs old\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Certified Dependent Female\";\n } else {\n mtype = \"Certified Dependent Male\";\n }\n } else {\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Dependent Female\";\n } else {\n mtype = \"Dependent Male\";\n }\n }\n\n if (primary.equals(\"1\")) {\n memid = memid + \"B\";\n } else if (primary.equals(\"2\")) {\n memid = memid + \"C\";\n } else if (primary.equals(\"3\")) {\n memid = memid + \"D\";\n } else if (primary.equals(\"4\")) {\n memid = memid + \"E\";\n } else if (primary.equals(\"5\")) {\n memid = memid + \"F\";\n } else if (primary.equals(\"6\")) {\n memid = memid + \"G\";\n } else if (primary.equals(\"7\")) {\n memid = memid + \"H\";\n } else if (primary.equals(\"8\")) {\n memid = memid + \"I\";\n }\n\n primary = \"D\";\n\n } else if (primary.equals(\"9\") || primary.equals(\"10\")) {\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Authorized Caller Female\";\n } else {\n mtype = \"Authorized Caller Male\";\n }\n\n if (primary.equals(\"9\")) {\n memid = memid + \"J\";\n } else if (primary.equals(\"10\")) {\n memid = memid + \"K\";\n }\n\n } else if (primary.equalsIgnoreCase(\"P\")) { // Primary\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Primary Female\";\n } else {\n mtype = \"Primary Male\";\n }\n } else if (primary.equalsIgnoreCase(\"S\")) { // Spouse\n memid = memid + \"A\";\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Spouse Female\";\n } else {\n mtype = \"Spouse Male\";\n }\n } else {\n skip = true;\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -UNKNOWN RELATIONSHIP TYPE!\";\n }\n }\n */\n } // end if tpctc\n\n/*\n //******************************************************************\n // Royal Oaks CC - Houston\n //******************************************************************\n //\n if (club.equals(\"royaloakscc\")) {\n\n int mshipInt = 0;\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n memid = mNum;\n\n posid = mNum; // set posid in case we need it in the future\n\n if (primary.equalsIgnoreCase(\"S\")) {\n memid = memid + \"A\";\n } else if (primary.equals(\"2\")) {\n mtype = \"Dependent\";\n memid = memid + \"B\";\n } else if (primary.equals(\"3\")) {\n mtype = \"Dependent\";\n memid = memid + \"C\";\n } else if (primary.equals(\"4\")) {\n mtype = \"Dependent\";\n memid = memid + \"D\";\n } else if (primary.equals(\"5\")) {\n mtype = \"Dependent\";\n memid = memid + \"E\";\n } else if (primary.equals(\"6\")) {\n mtype = \"Dependent\";\n memid = memid + \"F\";\n } else if (primary.equals(\"7\")) {\n mtype = \"Dependent\";\n memid = memid + \"G\";\n }\n\n if (gender.equalsIgnoreCase(\"F\") && !mtype.equals(\"Dependent\")) {\n mtype = \"Adult Female\";\n } else if (!mtype.equals(\"Dependent\")) {\n mtype = \"Adult Male\";\n }\n\n try {\n mshipInt = Integer.parseInt(mNum);\n } catch (Exception exc) {\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Invalid Member Number!\";\n }\n\n if (!skip) {\n if (mshipInt >= 0 && mshipInt < 200) {\n mship = \"Honorary\";\n } else if (mshipInt >= 500 && mshipInt < 600) {\n mship = \"Executive Honorary\";\n } else if (mshipInt >= 1000 && mshipInt < 2000) {\n mship = \"Golf\";\n } else if (mshipInt >= 2000 && mshipInt < 3000) {\n mship = \"Executive\";\n } else if (mshipInt >= 3000 && mshipInt < 3400) {\n mship = \"Sports Club w/Golf\";\n } else if (mshipInt >= 5000 && mshipInt < 5400) {\n mship = \"Preview Golf\";\n } else if (mshipInt >= 5400 && mshipInt < 5700) {\n mship = \"Preview Executive\";\n } else if (mshipInt >= 7000 && mshipInt < 7500) {\n mship = \"Sampler Golf\";\n } else if (mshipInt >= 7500 && mshipInt < 8000) {\n mship = \"Sampler Executive\";\n } else {\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE!\";\n }\n }\n }\n } // end if royaloakscc\n*/\n\n //******************************************************************\n // TPC San Francisco Bay\n //******************************************************************\n //\n if (club.equals(\"tpcsfbay\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n memid = mNum;\n\n posid = mNum; // set posid in case we need it in the future\n\n if (mship.equalsIgnoreCase(\"Social\")) {\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE!\";\n }\n\n if (primary.equalsIgnoreCase(\"P\")) { // Primary\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Primary Female\";\n } else {\n mtype = \"Primary Male\";\n }\n } else if (primary.equalsIgnoreCase(\"S\")) { // Spouse\n memid = memid + \"1\";\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Spouse Female\";\n } else {\n mtype = \"Spouse Male\";\n }\n } else { // Dependent\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Dependent Female\";\n } else {\n mtype = \"Dependent Male\";\n }\n memid = memid + primary;\n primary = \"D\";\n }\n }\n } // end if tpcsfbay\n\n/*\n //******************************************************************\n // Mission Viejo - missionviejo\n //******************************************************************\n //\n if (club.equals(\"missionviejo\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n memid = mNum;\n\n posid = mNum; // set posid in case we need it in the future\n\n if (gender.equalsIgnoreCase(\"F\")) {\n gender = \"F\";\n memid += \"B\";\n mtype = \"Green\";\n } else {\n gender = \"M\";\n memid += \"A\";\n mtype = \"Gold\";\n }\n\n if (mship.equalsIgnoreCase(\"Employee\")) {\n mship = \"Staff\";\n } else if (mship.equalsIgnoreCase(\"Equity\") || mship.equalsIgnoreCase(\"Honorary\") || mship.equalsIgnoreCase(\"Member\")) {\n mship = \"Equity\";\n } else if (mship.equalsIgnoreCase(\"Non-Res\") || mship.equalsIgnoreCase(\"Non-Resident\")) {\n mship = \"Non-Res\";\n } else if (mship.equalsIgnoreCase(\"Senior\")) {\n mship = \"Senior\";\n } else {\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE!\";\n }\n }\n } // end if missionviejo\n\n*/\n\n //******************************************************************\n // Cherry Hills CC - cherryhills\n //******************************************************************\n //\n if (club.equals(\"cherryhills\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n memid = mNum;\n\n posid = mNum + \"-000\"; // set posid in case we need it in the future\n\n if (primary.equalsIgnoreCase(\"S\")) {\n memid += \"A\";\n mtype = \"Spouse\";\n } else {\n mtype = \"Member\";\n }\n \n if (mship.equalsIgnoreCase(\"CLG\")) {\n mship = \"Clergy\";\n } else if (mship.equalsIgnoreCase(\"RES\")) {\n mship = \"Resident\";\n } else if (mship.equalsIgnoreCase(\"SRA\")) {\n mship = \"Special Resident A\";\n } else if (mship.equalsIgnoreCase(\"SRB\")) {\n mship = \"Special Resident B\";\n } else if (mship.equalsIgnoreCase(\"SRC\")) {\n mship = \"Special Resident C\";\n } else if (mship.equalsIgnoreCase(\"NRE\")) {\n mship = \"Non-Resident\";\n } else if (mship.equalsIgnoreCase(\"SSP\")) {\n mship = \"Surviving Spouse\";\n } else if (mship.equalsIgnoreCase(\"FSP\")) {\n mship = \"Former Spouse\";\n } else if (mship.equalsIgnoreCase(\"LFE\")) {\n mship = \"Life Member\";\n } else if (mship.equalsIgnoreCase(\"HLF\")) {\n mship = \"Honorary Life\";\n } else if (mship.equalsIgnoreCase(\"SEN\")) {\n mship = \"Senior\";\n } else if (mship.equalsIgnoreCase(\"RE\")) {\n mship = \"Resident Emeritus\";\n } else {\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE!\";\n }\n }\n } // end if cherryhills\n\n //\n // Mission Viejo CC\n //\n /*\n if (club.equals( \"missionviejo\" )) {\n\n found = true; // club found\n\n //\n // Determine if we should process this record\n //\n if (memid.equals( \"\" )) {\n\n skip = true; // skip it\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMID missing!\";\n\n } else if (mship.equalsIgnoreCase( \"Social\" ) || mship.equalsIgnoreCase( \"Social SS\" ) || mship.equalsIgnoreCase( \"Spouse\" ) ||\n mship.equalsIgnoreCase( \"Spouse S\" ) || mship.equalsIgnoreCase( \"Child\" )) {\n\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF MEMBERSHIP TYPE!\";\n\n } else if (!mship.equals( \"\" )) {\n\n }\n\n } // end of IF missionviejo club\n*/\n\n //******************************************************************\n // Philadelphia Cricket Club\n //******************************************************************\n //\n if (club.equals( \"philcricket\" )) {\n\n found = true; // club found\n\n //\n // Make sure this is not an admin record or missing mship/mtype\n //\n if (mship.equals( \"\" )) {\n\n skip = true; // skip it\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (lname.equalsIgnoreCase( \"admin\" )) {\n\n skip = true; // skip it\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: 'Admin' MEMBERSHIP TYPE!\";\n } else {\n\n if (mship.equalsIgnoreCase(\"Leave of Absence\") || mship.equalsIgnoreCase(\"Loa\") || mship.equalsIgnoreCase(\"Member\")) {\n\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE!\";\n }\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n memid = mNum;\n\n //\n // Set POS Id in case they ever need it\n //\n posid = mNum;\n\n if (primary.equalsIgnoreCase(\"S\")) {\n memid += \"A\";\n } else if (primary.equals(\"2\")) {\n memid += \"B\";\n } else if (primary.equals(\"3\")) {\n memid += \"C\";\n } else if (primary.equals(\"4\")) {\n memid += \"D\";\n } else if (primary.equals(\"5\")) {\n memid += \"E\";\n } else if (primary.equals(\"6\")) {\n memid += \"F\";\n } else if (primary.equals(\"7\")) {\n memid += \"G\";\n } else if (primary.equals(\"8\")) {\n memid += \"H\";\n } else if (primary.equals(\"9\")) {\n memid += \"I\";\n }\n\n //\n // determine member type\n //\n if (mship.equalsIgnoreCase( \"golf stm family\" ) || mship.equalsIgnoreCase( \"golf stm ind.\" )) {\n\n lname = lname + \"*\"; // add an astericks\n }\n\n // if mtype = no golf, add ^ to their last name\n if (mship.equalsIgnoreCase( \"no golf\" )) {\n\n lname += \"^\";\n }\n\n mship = toTitleCase(mship); // mship = mtype\n\n }\n } // end of IF club = philcricket\n \n/*\n //******************************************************************\n // Sea Pines CC - seapines\n //******************************************************************\n //\n if (club.equals(\"seapines\")) {\n\n found = true; // club found\n\n if (mship.equals( \"\" )) {\n\n skip = true; // skip this one\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBERSHIP TYPE missing!\";\n\n } else if (mNum.equals( \"\" )) {\n\n skip = true; // skip this one\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: Member Number Missing!\";\n\n } else {\n\n useWebid = true; // use webid for this club\n webid = memid; // use memid for webid\n memid = mNum;\n\n posid = mNum; // set posid in case we need it in the future\n\n if (primary.equalsIgnoreCase(\"S\")) {\n memid += \"A\";\n }\n\n if (gender.equalsIgnoreCase(\"F\")) {\n mtype = \"Adult Female\";\n } else {\n mtype = \"Adult Male\";\n }\n\n if (mship.equalsIgnoreCase(\"EQUITY-NP\") || mship.equalsIgnoreCase(\"RESIGN A\") || mship.equalsIgnoreCase(\"ASSOC\") || mship.equalsIgnoreCase(\"NON-EQ-NP\")) {\n mship = \"Social\";\n } else if (mship.equalsIgnoreCase(\"SELECT\") || mship.equalsIgnoreCase(\"TENNIS\")) {\n mship = \"Tennis\";\n } else if (mship.equalsIgnoreCase(\"GOLF\") || mship.equalsIgnoreCase(\"GOLF-CART\")) {\n mship = \"Golf\";\n } else {\n skip = true;\n warnCount++;\n warnMsg = warnMsg + \"\\n\" +\n \" -SKIPPED: NON-GOLF or UNKNOWN MEMBERSHIP TYPE!\";\n }\n }\n } // end if seapines\n*/\n\n //\n //******************************************************************\n // Common processing - add or update the member record\n //******************************************************************\n //\n if (skip == false && found == true && !fname.equals(\"\") && !lname.equals(\"\") && !memid.equals(\"\")) {\n\n //\n // now determine if we should update an existing record or add the new one\n //\n memid_old = \"\";\n fname_old = \"\";\n lname_old = \"\";\n mi_old = \"\";\n mship_old = \"\";\n mtype_old = \"\";\n email_old = \"\";\n mNum_old = \"\";\n ghin_old = \"\";\n bag_old = \"\";\n posid_old = \"\";\n email2_old = \"\";\n phone_old = \"\";\n phone2_old = \"\";\n suffix_old = \"\";\n u_hcap_old = 0;\n c_hcap_old = 0;\n birth_old = 0;\n email_bounce1 = 0;\n email_bounce2 = 0;\n\n\n //\n // Truncate the string values to avoid sql error\n //\n if (!mi.equals( \"\" )) { // if mi specified\n\n mi = truncate(mi, 1); // make sure it is only 1 char\n }\n if (!memid.equals( \"\" )) {\n\n memid = truncate(memid, 15);\n }\n if (!password.equals( \"\" )) {\n\n password = truncate(password, 15);\n }\n if (!lname.equals( \"\" )) {\n\n lname = truncate(lname, 20);\n }\n if (!fname.equals( \"\" )) {\n\n fname = truncate(fname, 20);\n }\n if (!mship.equals( \"\" )) {\n\n mship = truncate(mship, 30);\n }\n if (!mtype.equals( \"\" )) {\n\n mtype = truncate(mtype, 30);\n }\n if (!email.equals( \"\" )) {\n\n email = truncate(email, 50);\n }\n if (!email2.equals( \"\" )) {\n\n email2 = truncate(email2, 50);\n }\n if (!mNum.equals( \"\" )) {\n\n mNum = truncate(mNum, 10);\n }\n if (!ghin.equals( \"\" )) {\n\n ghin = truncate(ghin, 16);\n }\n if (!bag.equals( \"\" )) {\n\n bag = truncate(bag, 12);\n }\n if (!posid.equals( \"\" )) {\n\n posid = truncate(posid, 15);\n }\n if (!phone.equals( \"\" )) {\n\n phone = truncate(phone, 24);\n }\n if (!phone2.equals( \"\" )) {\n\n phone2 = truncate(phone2, 24);\n }\n if (!suffix.equals( \"\" )) {\n\n suffix = truncate(suffix, 4);\n }\n if (!webid.equals( \"\" )) {\n\n webid = truncate(webid, 15);\n }\n\n //\n // Use try/catch here so processing will continue on rest of file if it fails\n //\n try {\n\n if (useWebid == false) { // use webid to locate member?\n\n pstmt2 = con.prepareStatement (\n \"SELECT * FROM member2b WHERE username = ?\");\n\n pstmt2.clearParameters();\n pstmt2.setString(1, memid);\n\n } else { // use webid\n\n pstmt2 = con.prepareStatement (\n \"SELECT * FROM member2b WHERE webid = ?\");\n\n pstmt2.clearParameters();\n pstmt2.setString(1, webid);\n }\n\n rs = pstmt2.executeQuery(); // execute the prepared stmt\n\n if(rs.next()) {\n\n memid_old = rs.getString(\"username\"); // get username in case we used webid\n lname_old = rs.getString(\"name_last\");\n fname_old = rs.getString(\"name_first\");\n mi_old = rs.getString(\"name_mi\");\n mship_old = rs.getString(\"m_ship\");\n mtype_old = rs.getString(\"m_type\");\n email_old = rs.getString(\"email\");\n mNum_old = rs.getString(\"memNum\");\n ghin_old = rs.getString(\"ghin\");\n bag_old = rs.getString(\"bag\");\n birth_old = rs.getInt(\"birth\");\n posid_old = rs.getString(\"posid\");\n email2_old = rs.getString(\"email2\");\n phone_old = rs.getString(\"phone1\");\n phone2_old = rs.getString(\"phone2\");\n suffix_old = rs.getString(\"name_suf\");\n inact_old = rs.getInt(\"inact\");\n email_bounce1 = rs.getInt(\"email_bounced\");\n email_bounce2 = rs.getInt(\"email2_bounced\");\n\n }\n pstmt2.close(); // close the stmt\n\n\n boolean memFound = false;\n boolean dup = false;\n boolean userChanged = false;\n boolean nameChanged = false;\n String dupuser = \"\";\n String dupmnum = \"\";\n String dupwebid = \"\";\n\n webid_new = webid; // default\n\n if ((club.equals(\"tpcsouthwind\") || club.equals(\"tpcpotomac\") || club.equals(\"tpcsugarloaf\")) && !memid.equals(memid_old)) { // Look into making this change for ALL tpc clubs!\n\n // memid has changed! Update the username\n memid_new = memid;\n userChanged = true;\n\n } else {\n memid_new = memid_old; // Don't change for old clubs\n }\n\n //\n // If member NOT found, then check if new member OR id has changed\n //\n if (fname_old.equals( \"\" )) { // if member NOT found\n\n //\n // New member - first check if name already exists\n //\n pstmt2 = con.prepareStatement (\n \"SELECT username, memNum, webid FROM member2b WHERE name_last = ? AND name_first = ? AND name_mi = ?\");\n\n pstmt2.clearParameters();\n pstmt2.setString(1, lname);\n pstmt2.setString(2, fname);\n pstmt2.setString(3, mi);\n rs = pstmt2.executeQuery(); // execute the prepared stmt\n\n if (rs.next()) {\n\n dupuser = rs.getString(\"username\"); // get this username\n dupmnum = rs.getString(\"memNum\");\n dupwebid = rs.getString(\"webid\"); // get this webid\n\n if (club.equals( \"virginiacc\" ) || club.equals( \"algonquin\" ) || club.equals( \"congressional\" )) {\n\n dup = true; // do not change members for these clubs\n\n } else {\n\n //\n // name already exists - see if this is the same member\n //\n if (!dupmnum.equals( \"\" ) && dupmnum.equals( mNum )) { // if name and mNum match, then memid or webid must have changed\n\n if (useWebid == true) { // use webid to locate member?\n\n webid_new = webid; // set new ids\n memid_new = dupuser;\n memid_old = dupuser; // update this record\n\n } else {\n\n webid_new = dupwebid; // set new ids\n memid_new = memid;\n memid_old = dupuser; // update this record\n userChanged = true; // indicate the username has changed\n }\n\n memFound = true; // update the member\n\n } else {\n\n dup = true; // dup member - do not add\n }\n }\n\n }\n pstmt2.close(); // close the stmt\n\n } else { // member found\n\n memFound = true;\n }\n\n //\n // Now, update the member record if existing member\n //\n if (memFound == true) { // if member exists\n\n changed = false; // init change indicator\n\n lname_new = lname_old;\n\n if (!lname.equals( \"\" ) && !lname_old.equals( lname )) {\n\n lname_new = lname; // set value from CE record\n changed = true;\n nameChanged = true;\n }\n\n fname_new = fname_old;\n\n if (club.equals( \"virginiacc\" ) || club.equals( \"algonquin\" ) || club.equals( \"congressional\" )) {\n\n fname = fname_old; // DO NOT change first names\n }\n\n if (!fname.equals( \"\" ) && !fname_old.equals( fname )) {\n\n fname_new = fname; // set value from CE record\n changed = true;\n nameChanged = true;\n }\n\n mi_new = mi_old;\n\n if (!mi.equals( \"\" ) && !mi_old.equals( mi )) {\n\n mi_new = mi; // set value from CE record\n changed = true;\n nameChanged = true;\n }\n\n mship_new = mship_old;\n\n if (!mship.equals( \"\" ) && !mship_old.equals( mship )) {\n\n mship_new = mship; // set value from CE record\n changed = true;\n }\n\n mtype_new = mtype_old;\n birth_new = birth_old;\n\n if (club.equals( \"meridiangc\" )) { // TEMP until they fix gender !!!!!!!!!!!!!!!!!!!!!\n\n mtype = mtype_old; // DO NOT change mtype\n }\n\n if (!mtype.equals( \"\" ) && (club.equalsIgnoreCase(\"brantford\") || club.equalsIgnoreCase(\"oakhillcc\") || !mtype.equals( \"Dependent\" )) && !mtype_old.equals( mtype )) {\n\n mtype_new = mtype; // set value from CE record\n changed = true;\n }\n\n if (birth > 0 && birth != birth_old) {\n\n birth_new = birth; // set value from CE record\n changed = true;\n }\n\n ghin_new = ghin_old;\n\n if (!ghin.equals( \"\" ) && !ghin_old.equals( ghin )) {\n\n ghin_new = ghin; // set value from CE record\n changed = true;\n }\n\n bag_new = bag_old;\n\n if (!bag.equals( \"\" ) && !bag_old.equals( bag )) {\n\n bag_new = bag; // set value from CE record\n changed = true;\n }\n\n posid_new = posid_old;\n\n if (!posid.equals( \"\" ) && !posid_old.equals( posid )) {\n\n posid_new = posid; // set value from CE record\n changed = true;\n }\n\n phone_new = phone_old;\n\n if (!phone.equals( \"\" ) && !phone_old.equals( phone )) {\n\n phone_new = phone; // set value from CE record\n changed = true;\n }\n\n phone2_new = phone2_old;\n\n if (!phone2.equals( \"\" ) && !phone2_old.equals( phone2 )) {\n\n phone2_new = phone2; // set value from CE record\n changed = true;\n }\n\n suffix_new = suffix_old;\n\n if (!suffix.equals( \"\" ) && !suffix_old.equals( suffix )) {\n\n suffix_new = suffix; // set value from CE record\n changed = true;\n }\n\n email_new = email_old; // start with old emails\n email2_new = email2_old;\n\n //\n // Update email addresses if specified and different than current\n //\n if ((!email.equals( \"\" ) || club.startsWith(\"tpc\")) && !email_old.equals( email )) {\n\n email_new = email; // set value from CE record\n changed = true;\n email_bounce1 = 0; // reset bounce flag\n }\n\n if (club.equals(\"colletonriverclub\")) { // don't update email2 for these clubs\n email2 = email2_old;\n }\n\n if ((!email2.equals( \"\" ) || club.startsWith(\"tpc\")) && !email2_old.equals( email2 )) {\n\n email2_new = email2; // set value from CE record\n changed = true;\n email_bounce2 = 0; // reset bounce flag\n }\n\n // don't allow both emails to be the same\n if (email_new.equalsIgnoreCase(email2_new)) email2_new = \"\";\n\n\n mNum_new = mNum_old; // do not change mNums (?? not sure why we do this for CE clubs ??)\n\n if (club.equals( \"weeburn\" ) || club.equals( \"benttreecc\" ) || club.equals( \"algonquin\" ) ||\n club.equals( \"berkeleyhall\" ) || club.equals( \"cherrycreek\" ) || club.equals(\"internationalcc\") ||\n club.startsWith( \"tpc\" ) || club.equals( \"missionviejo\" ) || club.equals(\"virginiacc\") ||\n club.equals(\"oakhillcc\") || club.equals( \"orchidisland\" )) { // change mNums for some clubs\n\n if (!mNum.equals( \"\" ) && !mNum_old.equals( mNum )) {\n\n mNum_new = mNum; // set value from CE record\n changed = true;\n }\n }\n\n inact_new = 0; // do not change inact status for most clubs\n\n if (club.equals( \"congressional\" )) { // change status for Congressional\n\n if (inact_new != inact) { // if status has changed\n\n inact_new = inact; // set value from CE record\n changed = true;\n }\n }\n\n\n if (club.equals( \"benttreecc\" )) { // special processing for Bent Tree\n\n String tempM = remZeroS(mNum_old); // strip alpha from our old mNum\n\n if ((tempM.startsWith(\"5\") || tempM.startsWith(\"7\")) && inact_old == 1) {\n\n // If our mNum contains an old inactive value and the member is inactive\n // then set him active and let mNum change (above).\n\n inact_new = inact; // set value from CE record (must be active to get this far)\n }\n }\n\n\n //\n // Update our record if something has changed\n //\n pstmt2 = con.prepareStatement (\n \"UPDATE member2b SET username = ?, name_last = ?, name_first = ?, \" +\n \"name_mi = ?, m_ship = ?, m_type = ?, email = ?, \" +\n \"memNum = ?, ghin = ?, bag = ?, birth = ?, posid = ?, email2 = ?, phone1 = ?, \" +\n \"phone2 = ?, name_suf = ?, webid = ?, inact = ?, last_sync_date = now(), gender = ?, \" +\n \"email_bounced = ?, email2_bounced = ? \" +\n \"WHERE username = ?\");\n\n pstmt2.clearParameters(); // clear the parms\n pstmt2.setString(1, memid_new);\n pstmt2.setString(2, lname_new);\n pstmt2.setString(3, fname_new);\n pstmt2.setString(4, mi_new);\n pstmt2.setString(5, mship_new);\n pstmt2.setString(6, mtype_new);\n pstmt2.setString(7, email_new);\n pstmt2.setString(8, mNum_new);\n pstmt2.setString(9, ghin_new);\n pstmt2.setString(10, bag_new);\n pstmt2.setInt(11, birth_new);\n pstmt2.setString(12, posid_new);\n pstmt2.setString(13, email2_new);\n pstmt2.setString(14, phone_new);\n pstmt2.setString(15, phone2_new);\n pstmt2.setString(16, suffix_new);\n pstmt2.setString(17, webid_new);\n pstmt2.setInt(18, inact_new);\n pstmt2.setString(19, gender);\n pstmt2.setInt(20, email_bounce1);\n pstmt2.setInt(21, email_bounce2);\n\n pstmt2.setString(22, memid_old);\n pstmt2.executeUpdate();\n\n pstmt2.close(); // close the stmt\n\n ucount++; // count records updated\n\n //\n // Member updated - now see if the username or name changed\n //\n if (userChanged == true || nameChanged == true) { // if username or name changed\n\n //\n // username or name changed - we must update other tables now\n //\n StringBuffer mem_name = new StringBuffer( fname_new ); // get the new first name\n\n if (!mi_new.equals( \"\" )) {\n mem_name.append(\" \" +mi_new); // new mi\n }\n mem_name.append(\" \" +lname_new); // new last name\n\n String newName = mem_name.toString(); // convert to one string\n\n Admin_editmem.updTeecurr(newName, memid_new, memid_old, con); // update teecurr with new values\n\n Admin_editmem.updTeepast(newName, memid_new, memid_old, con); // update teepast with new values\n\n Admin_editmem.updLreqs(newName, memid_new, memid_old, con); // update lreqs with new values\n\n Admin_editmem.updPartner(memid_new, memid_old, con); // update partner with new values\n\n Admin_editmem.updEvents(newName, memid_new, memid_old, con); // update evntSignUp with new values\n\n Admin_editmem.updLessons(newName, memid_new, memid_old, con); // update the lesson books with new values\n }\n\n\n } else { // member NOT found\n\n\n if (dup == false && !fname.equals(\"\") && !lname.equals(\"\")) { // if name does not already exist\n\n //\n // New member - add it\n //\n pstmt2 = con.prepareStatement (\n \"INSERT INTO member2b (username, password, name_last, name_first, name_mi, \" +\n \"m_ship, m_type, email, count, c_hancap, g_hancap, wc, message, emailOpt, memNum, \" +\n \"ghin, locker, bag, birth, posid, msub_type, email2, phone1, phone2, name_pre, name_suf, \" +\n \"webid, last_sync_date, gender) \" +\n \"VALUES (?,?,?,?,?,?,?,?,0,?,?,'','',1,?,?,'',?,?,?,'',?,?,?,'',?,?,now(),?)\");\n\n pstmt2.clearParameters(); // clear the parms\n pstmt2.setString(1, memid); // put the parm in stmt\n pstmt2.setString(2, password);\n pstmt2.setString(3, lname);\n pstmt2.setString(4, fname);\n pstmt2.setString(5, mi);\n pstmt2.setString(6, mship);\n pstmt2.setString(7, mtype);\n pstmt2.setString(8, email);\n pstmt2.setFloat(9, c_hcap);\n pstmt2.setFloat(10, u_hcap);\n pstmt2.setString(11, mNum);\n pstmt2.setString(12, ghin);\n pstmt2.setString(13, bag);\n pstmt2.setInt(14, birth);\n pstmt2.setString(15, posid);\n pstmt2.setString(16, email2);\n pstmt2.setString(17, phone);\n pstmt2.setString(18, phone2);\n pstmt2.setString(19, suffix);\n pstmt2.setString(20, webid);\n pstmt2.setString(21, gender);\n pstmt2.executeUpdate(); // execute the prepared stmt\n\n pstmt2.close(); // close the stmt\n\n ncount++; // count records added (new)\n\n } else if (dup) {\n errCount++;\n errMsg = errMsg + \"\\n -Dup user found:\\n\" +\n \" new: memid = \" + memid + \" : cur: \" + dupuser + \"\\n\" +\n \" webid = \" + webid + \" : \" + dupwebid + \"\\n\" +\n \" mNum = \" + mNum + \" : \" + dupmnum;\n }\n }\n\n pcount++; // count records processed (not skipped)\n\n\n }\n catch (Exception e3b) {\n errCount++;\n errMsg = errMsg + \"\\n -Error2 processing roster (record #\" +rcount+ \") for \" +club+ \"\\n\" +\n \" line = \" +line+ \": \" + e3b.getMessage(); // build msg\n }\n\n } else {\n\n // Only report errors that AREN'T due to skip == true, since those were handled earlier!\n if (!found) {\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -MEMBER NOT FOUND!\";\n }\n if (fname.equals(\"\")) {\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -FIRST NAME missing!\";\n }\n if (lname.equals(\"\")) {\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -LAST NAME missing!\";\n }\n if (memid.equals(\"\")) {\n errCount++;\n errMsg = errMsg + \"\\n\" +\n \" -USERNAME missing!\";\n }\n\n } // end of IF skip\n\n } // end of IF inactive\n\n } // end of IF minimum requirements\n\n } // end of IF tokens\n\n } // end of IF header row\n\n // log any errors and warnings that occurred\n if (errCount > 0) {\n totalErrCount += errCount;\n errList.add(errMemInfo + \"\\n *\" + errCount + \" error(s) found*\" + errMsg + \"\\n\");\n }\n if (warnCount > 0) {\n totalWarnCount += warnCount;\n warnList.add(errMemInfo + \"\\n *\" + warnCount + \" warning(s) found*\" + warnMsg + \"\\n\");\n }\n } // end of while\n\n //\n // Done with this file for this club - now set any members that were excluded from this file inactive\n //\n if (found == true) { // if we processed this club\n\n pstmt2 = con.prepareStatement (\n \"UPDATE member2b SET inact = 1 \" +\n \"WHERE last_sync_date != now() AND last_sync_date != '0000-00-00'\");\n\n pstmt2.clearParameters(); // clear the parms\n pstmt2.executeUpdate();\n\n pstmt2.close(); // close the stmt\n \n \n //\n // Roster File Found for this club - make sure the roster sync indicator is set in the club table\n //\n setRSind(con, club);\n\n }\n }\n catch (Exception e3) {\n\n errorMsg = errorMsg + \" Error processing roster (record #\" +rcount+ \") for \" +club+ \", line = \" +line+ \": \" + e3.getMessage() + \"\\n\"; // build msg\n SystemUtils.logError(errorMsg); // log it\n errorMsg = \"Error in Common_sync.ceSync: \"; // reset msg\n }\n\n // Print error and warning count totals to error log\n SystemUtils.logErrorToFile(\"\" +\n \"Total Errors Found: \" + totalErrCount + \"\\n\" +\n \"Total Warnings Found: \" + totalWarnCount + \"\\n\", club, true);\n\n // Print errors and warnings to error log\n if (totalErrCount > 0) {\n SystemUtils.logErrorToFile(\"\" +\n \"********************************************************************\\n\" +\n \"****ERRORS FOR \" + club + \" (Member WAS NOT synced!)\\n\" +\n \"********************************************************************\\n\", club, true);\n while (errList.size() > 0) {\n SystemUtils.logErrorToFile(errList.remove(0), club, true);\n }\n }\n if (totalWarnCount > 0) {\n SystemUtils.logErrorToFile(\"\" +\n \"********************************************************************\\n\" +\n \"****WARNINGS FOR \" + club + \" (Member MAY NOT have synced!)\\n\" +\n \"********************************************************************\\n\", club, true);\n while (warnList.size() > 0) {\n SystemUtils.logErrorToFile(warnList.remove(0), club, true);\n }\n }\n\n // TEMP!!!!\n if (club.equals(\"berkeleyhall\")) {\n\n errorMsg = \" CE sync complete. Records = \" +rcount+ \" for \" +club+ \", records processed = \" +pcount+ \", records added = \" +ncount+ \", records updated = \" +ucount + \"\\n\"; // build msg\n SystemUtils.logErrorToFile(errorMsg, club, true); // log it\n }\n\n // Print end time to error log\n SystemUtils.logErrorToFile(\"End time: \" + new java.util.Date().toString() + \"\\n\", club, true);\n }", "public RespuestaDTO registrarUsuario(Connection conexion, UsuarioDTO usuario) throws SQLException {\n PreparedStatement ps = null;\n ResultSet rs = null;\n int nRows = 0;\n StringBuilder cadSQL = null; //para crear el ddl \n RespuestaDTO registro = null;\n \n try {\n registro = new RespuestaDTO();\n System.out.println(\"usuario----\" + usuario.toStringJson());\n cadSQL = new StringBuilder();\n cadSQL.append(\" INSERT INTO usuario(usua_correo, usua_usuario,tius_id, usua_clave)\");\n cadSQL.append(\" VALUES (?, ?, ?, SHA2(?,256)) \");\n \n ps = conexion.prepareStatement(cadSQL.toString(), Statement.RETURN_GENERATED_KEYS);\n \n AsignaAtributoStatement.setString(1, usuario.getCorreo(), ps);// se envian los datos a los ?, el orden importa mucho\n AsignaAtributoStatement.setString(2, usuario.getUsuario(), ps);\n AsignaAtributoStatement.setString(3, usuario.getIdTipoUsuario(), ps);\n AsignaAtributoStatement.setString(4, usuario.getClave(), ps);\n \n nRows = ps.executeUpdate(); // ejecuta el proceso\n if (nRows > 0) { //nRows es el numero de filas que hubo de movimiento, es decir si hizo el registro, con este if se sabe\n rs = ps.getGeneratedKeys(); // esto se usa para capturar el id recien ingresado en caso de necesitarlo despues\n if (rs.next()) {\n registro.setRegistro(true);\n registro.setIdResgistrado(rs.getString(1)); // guardo el id en en este atributo del objeto\n\n }\n // cerramos los rs y ps\n ps.close();\n ps = null;\n rs.close();\n rs = null;\n }\n } catch (SQLException se) {\n LoggerMessage.getInstancia().loggerMessageException(se);\n return null;\n }\n return registro;\n }", "abstract T setObjectParams(@NotNull ResultSet rs) throws SQLException;", "public static int update(User u){ \n int status=0; \n try{ \n //membuka koneksi\n Connection con=Koneksi.openConnection();\n //melakukan query database untuk merubah data berdasarkan id atau primary key\n PreparedStatement ps=con.prepareStatement( \n \"update t_user set user_name=?,nama_lengkap=?,password=?,hak_akses=? where id=?\"); \n ps.setString(1,u.getUserName()); \n ps.setString(2,u.getNamaLengkap()); \n ps.setString(3,u.getPassword()); \n ps.setString(4,u.getHakAkses()); \n ps.setInt(5,u.getId()); \n status=ps.executeUpdate(); \n }catch(Exception e){System.out.println(e);} \n return status; \n }", "public void getSetVersionRowPresuTipoProyectoWithConnection()throws Exception {\n\t\tif(presutipoproyecto.getIsChangedAuxiliar() && Constantes.ISSETVERSIONROWUPDATE) {\r\n\t\t \t//TEMPORAL\r\n\t\t\t//if((presutipoproyecto.getIsDeleted() || (presutipoproyecto.getIsChanged()&&!presutipoproyecto.getIsNew()))&& Constantes.ISSETVERSIONROWUPDATE) {\r\n\t\t\tTimestamp timestamp=null;\r\n\t\t\t\r\n\t\t\ttry {\t\r\n\t\t\t\tconnexion=connexion.getNewConnexion(this.connexionType,this.parameterDbType,this.entityManagerFactory);connexion.begin();\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\ttimestamp=presutipoproyectoDataAccess.getSetVersionRowPresuTipoProyecto(connexion,presutipoproyecto.getId());\r\n\t\t\t\t\r\n\t\t\t\tif(!presutipoproyecto.getVersionRow().equals(timestamp)) {\t\r\n\t\t\t\t\tpresutipoproyecto.setVersionRow(timestamp);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tconnexion.commit();\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tpresutipoproyecto.setIsChangedAuxiliar(false);\r\n\t\t\t\t\r\n\t\t\t} catch(Exception e) {\r\n\t\t\t\tconnexion.rollback();\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tthrow e;\r\n\t\t\t\t\r\n\t \t} finally {\r\n\t\t\t\tconnexion.close();\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void prepareUpdateObject() {\n // Require modify row to prepare.\n if (getModifyRow() == null) {\n return;\n }\n\n if (hasMultipleStatements()) {\n for (Enumeration statementEnum = getSQLStatements().elements();\n statementEnum.hasMoreElements();) {\n ((SQLModifyStatement)statementEnum.nextElement()).setModifyRow(getModifyRow());\n }\n } else if (getSQLStatement() != null) {\n ((SQLModifyStatement)getSQLStatement()).setModifyRow(getModifyRow());\n }\n setCallFromStatement();\n // The statement is no longer require so can be released.\n clearStatement();\n\n super.prepareUpdateObject();\n }", "int updateByPrimaryKeyWithBLOBs(TbSerdeParams record);", "@Override\n public CerereDePrietenie save(CerereDePrietenie entity) {\n\n String SQL = \"INSERT INTO cereredeprietenie(id, id_1,id_2,status,datac) VALUES(?,?,?,?,?)\";\n\n long id = 0;\n\n\n try (Connection conn = connect();\n PreparedStatement pstmt = conn.prepareStatement(SQL,\n Statement.RETURN_GENERATED_KEYS)) {\n\n\n pstmt.setInt(1, Math.toIntExact(entity.getId()));\n pstmt.setInt(2, Math.toIntExact(entity.getTrimite().getId()));\n pstmt.setInt(3, Math.toIntExact(entity.getPrimeste().getId()));\n pstmt.setString(4, entity.getStatus());\n pstmt.setObject(5, entity.getData());\n\n\n int affectedRows = pstmt.executeUpdate();\n // check the affected rows\n if (affectedRows > 0) {\n // get the ID back\n try (ResultSet rs = pstmt.getGeneratedKeys()) {\n if (rs.next()) {\n id = rs.getLong(1);\n }\n } catch (SQLException ex) {\n System.out.println(ex.getMessage());\n }\n }\n } catch (SQLException ex) {\n System.out.println(ex.getMessage());\n }\n\n\n return entity;\n\n }", "public static int update(Periode p){ \n int status=0; \n try{ \n //membuka koneksi\n Connection con=Koneksi.openConnection();\n //melakukan query database untuk merubah data berdasarkan id atau primary key\n PreparedStatement ps=con.prepareStatement( \n \"update periode set tahun=?, awal=?, akhir=?, status=? where id=?\"); \n ps.setString(1,p.getTahun()); \n ps.setString(2,p.getAwal()); \n ps.setString(3,p.getAkhir()); \n ps.setString(4,p.getStatus()); \n ps.setInt(5,p.getId()); \n status=ps.executeUpdate(); \n }catch(Exception e){System.out.println(e);} \n return status; \n }", "@Override\n\tpublic void update(BatimentoCardiaco t, String[] params) {\n\t\t\n\t}", "@Override\r\n\tpublic void update(Connection con, Object obj) throws Exception {\n\t}", "public void alteraDadosMySQL() throws SQLException, IOException {\n byte[] logo = null;\n byte[] brasao = null;\n if (imagemRedimensionada != null) {\n ByteArrayOutputStream bytesImg = new ByteArrayOutputStream();\n ImageIO.write((BufferedImage) imagemRedimensionada, extensao, bytesImg);\n bytesImg.flush();\n logo = bytesImg.toByteArray();\n bytesImg.close();\n }\n\n if (imagemRedimensionada2 != null) {\n ByteArrayOutputStream bytesImg2 = new ByteArrayOutputStream();\n ImageIO.write((BufferedImage) imagemRedimensionada2, extensao2, bytesImg2);\n bytesImg2.flush();\n brasao = bytesImg2.toByteArray();\n bytesImg2.close();\n }\n\n if (dados.equals(prova.getText())) {\n if (dados2.equals(individualUnico.getText())) {\n // System.out.println(\"1\");\n PreparedStatement p = conexao.prepareStatement(\"UPDATE dados SET titulo='\" + titulo.getText() + \"'\"\n + \", tipo='\" + dados + \"'\"\n + \", modalidade='\" + dados2 + \"'\"\n + \", escola='\" + dados3 + \"'\"\n + \", matricula='\" + matricula.getText() + \"'\"\n + \", dataProva=?\"\n + \", dataRecebimento=?\"\n + \", dataEntrega=?\"\n + \" WHERE titulo='\" + aux + \"'\"\n );\n p.clearParameters();\n p.setDate(1, new java.sql.Date(dataProva.getDate().getTime()));\n p.setDate(2, null);\n p.setDate(3, null);\n p.executeUpdate();\n } else {\n if (dados2.equals(individualTurma.getText()) || dados2.equals(grupo.getText())) {\n System.out.println(\"OK\");\n // System.out.println(\"2\");\n PreparedStatement p = conexao.prepareStatement(\"UPDATE dados SET titulo='\" + titulo.getText() + \"'\"\n + \", tipo='\" + dados + \"'\"\n + \", modalidade='\" + dados2 + \"'\"\n + \", escola='\" + dados3 + \"'\"\n + \", matricula=?\"\n + \", dataProva=?\"\n + \", dataRecebimento=?\"\n + \", dataEntrega=?\"\n + \" WHERE titulo='\" + aux + \"'\"\n );\n p.clearParameters();\n p.setString(1, null);\n p.setDate(2, new java.sql.Date(dataProva.getDate().getTime()));\n p.setDate(3, null);\n p.setDate(4, null);\n p.executeUpdate();\n }\n }\n } else {\n if (dados.equals(trabalho.getText())) {\n if (dados2.equals(individualUnico.getText())) {\n\n PreparedStatement p = conexao.prepareStatement(\"UPDATE dados SET titulo='\" + titulo.getText() + \"'\"\n + \", tipo='\" + dados + \"'\"\n + \", modalidade='\" + dados2 + \"'\"\n + \", escola='\" + dados3 + \"'\"\n + \", matricula='\" + matricula.getText() + \"'\"\n + \", dataProva=?\"\n + \", dataRecebimento=?\"\n + \", dataEntrega=?\"\n + \" WHERE titulo='\" + aux + \"'\"\n );\n p.clearParameters();\n\n p.setDate(1, null);\n p.setDate(2, new java.sql.Date(dataRecebimento.getDate().getTime()));\n p.setDate(3, new java.sql.Date(dataEntrega.getDate().getTime()));\n p.executeUpdate();\n } else {\n if (dados2.equals(individualTurma.getText()) || dados2.equals(grupo.getText())) {\n // System.out.println(\"4\");\n PreparedStatement p = conexao.prepareStatement(\"UPDATE dados SET titulo='\" + titulo.getText() + \"'\"\n + \", tipo='\" + dados + \"'\"\n + \", modalidade='\" + dados2 + \"'\"\n + \", escola='\" + dados3 + \"'\"\n + \", matricula=?\"\n + \", dataProva=?\"\n + \", dataRecebimento=?\"\n + \", dataEntrega=?\"\n + \" WHERE titulo='\" + aux + \"'\"\n );\n p.clearParameters();\n p.setString(1, null);\n p.setDate(2, null);\n p.setDate(3, new java.sql.Date(dataRecebimento.getDate().getTime()));\n p.setDate(4, new java.sql.Date(dataEntrega.getDate().getTime()));\n p.executeUpdate();\n }\n }\n }\n }\n if (envio[0]) {\n if (envio[1]) {\n System.out.println(envio[1]);\n PreparedStatement s = conexao.prepareStatement(\"UPDATE dados SET logotipo= ? , brasao= ?, nomeLogotipo=?, nomeBrasao=? WHERE titulo='\" + titulo.getText() + \"'\");//conexao.createStatement();\n s.clearParameters();\n s.setBytes(1, logo);\n s.setBytes(2, brasao);\n s.setString(3, arquivo.getName());\n s.setString(4, arquivo2.getName());\n s.executeUpdate();\n } else {\n PreparedStatement s = conexao.prepareStatement(\"UPDATE dados SET logotipo= ?, brasao=? , nomeLogotipo=?, nomeBrasao=? WHERE titulo='\" + titulo.getText() + \"'\");\n s.clearParameters();\n s.setBytes(1, logo);\n s.setBytes(2, null);\n s.setString(3, arquivo.getName());\n s.setString(4, null);\n s.executeUpdate();\n }\n }\n if (dados3.equals(privada.getText())) {\n PreparedStatement s = conexao.prepareStatement(\"UPDATE dados SET brasao=?, nomeBrasao=? WHERE titulo='\" + dadosTitulo + \"'\");\n s.setBytes(1, null);\n s.setString(2, null);\n s.executeUpdate();\n }\n dispose();\n framePrincipal.setVisible(true);\n }", "@Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<String, String>();\n // Adding All values to Params.\n // The firs argument should be same sa your MySQL database table columns.\n params.put(\"claim_intimationid\", cino);\n return params;\n }", "@Override\n public void update(Curso entity) {\n Connection c = null;\n PreparedStatement pstmt = null;\n\n try {\n c = DBUtils.getConnection();\n pstmt = c.prepareStatement(\"UPDATE curso SET idprofesor = ?, nombrecurso = ?, claveprofesor = ?, clavealumno = ? WHERE idcurso = ?\");\n\n pstmt.setInt(1, entity.getIdProfesor());\n pstmt.setString(2, entity.getNombre());\n pstmt.setString(3, entity.getClaveProfesor());\n pstmt.setString(4, entity.getClaveAlumno());\n pstmt.setInt(5, entity.getIdCurso());\n \n pstmt.executeUpdate();\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n try {\n if (pstmt != null) {\n pstmt.close();\n }\n DBUtils.closeConnection(c);\n } catch (SQLException ex) {\n Logger.getLogger(JdbcCursoRepository.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }", "@Override\n\tpublic DatosEnc obtenerDatos(DatosEnc datos) {\n\t\tConnection con = null;\n\t\tCallableStatement stmt = null;\n//\t\tPreparedStatement ps = null;\n\t\tResultSet rs = null;\n\t\ttry{\n//\t\t\tcon = new ConectarDB().getConnection();\n//\t\t\tString query = \"select * from pv_cotizaciones_det where no_cotizacion = ?\";\n//\t\t\tps = con.prepareStatement(query);\n//\t\t\tps.setString(1, datos.getNoDocumento());\n//\t\t\trs = ps.executeQuery();\n//\t\t\texiste=0;\n//\t\t\twhile(rs.next()){\n//\t\t\t\tif(rs.getString(\"no_cotizacion\") == null){\n//\t\t\t\t\texiste=0;\n//\t\t\t\t}else if(rs.getString(\"no_cotizacion\").equals(datos.getNoDocumento())){\n//\t\t\t\t\texiste=1;\n//\t\t\t\t}\n//\t\t\t}\n//\t\t\tcon.close();\n//\t\t\tps.close();\n//\t\t\trs.close();\n//\t\t\tif(existe==0){\n\t\t\t\tcon = new ConectarDB().getConnection();\n\t\t\t\tstmt = con.prepareCall(\"{call stp_UDPV_InUp_Mov_Enc(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}\");\n\t\t\t\tstmt.setString(1, datos.getCodigoCliente());\n\t\t\t\tstmt.setString(2, datos.getNit());\n\t\t\t\tstmt.setString(3, datos.getNombreCliente());\n\t\t\t\tstmt.setString(4, datos.getDirecFactura());\n\t\t\t\tstmt.setString(5, datos.getTel());\n\t\t\t\tstmt.setString(6, datos.getTarjeta());\n\t\t\t\tstmt.setString(7, datos.getDirecEnvio());\n\t\t\t\tstmt.setString(8, datos.getCodigoVendedor());\n\t\t\t\tstmt.setString(9, datos.getUsername());\n\t\t\t\tstmt.setString(10, datos.getTipoDocumento());\n\t\t\t\tstmt.setString(11, datos.getNoDocumento());\n\t\t\t\tstmt.setString(12, datos.getFechaVence());\n\t\t\t\tstmt.setString(13, datos.getTipoPago());\n\t\t\t\tstmt.setString(14, datos.getTipoCredito());\n\t\t\t\tstmt.setString(15, datos.getAutoriza());\n\t\t\t\tstmt.setString(16, datos.getFechaDocumento());\n\t\t\t\tstmt.setString(17, datos.getCargosEnvio());\n\t\t\t\tstmt.setString(18, datos.getOtrosCargos());\n\t\t\t\tstmt.setString(19, datos.getMontoVenta());\n\t\t\t\tstmt.setString(20, datos.getMontoTotal());\n\t\t\t\tstmt.setString(21, datos.getSerieDev());\n\t\t\t\tstmt.setString(22, datos.getNoDocDev());\n\t\t\t\tstmt.setString(23, datos.getObservaciones());\n\t\t\t\tstmt.setString(24, datos.getTipoNota());\n\t\t\t\tstmt.setString(25, datos.getCaja());\n\t\t\t\tstmt.setString(26, datos.getFechaEntrega());\n\t\t\t\tstmt.setString(27, datos.getCodigoDept());\n\t\t\t\tstmt.setString(28, datos.getCodGen());\n\t\t\t\tstmt.setString(29, datos.getNoConsigna());\n\t\t\t\tstmt.setString(30, datos.getCodMovDev());\n\t\t\t\tstmt.setString(31, datos.getGeneraSolicitud());\n\t\t\t\tstmt.setString(32, datos.getTipoPagoNC());\n\t\t\t\tstmt.setString(33, datos.getTipoCliente());\n\t\t\t\tstmt.setString(34, datos.getCodigoNegocio());\n\t\t\t\tstmt.setString(35, datos.getCantidadDevolver());\n\t\t\t\tstmt.setString(36, datos.getAutorizoDespacho());\n\t\t\t\tstmt.setString(37, datos.getSaldo());\n\t\t\t\trs = stmt.executeQuery();\n\t\t\t\t\n\t\t\t\twhile(rs.next()){\n\t\t\t\t\tif(rs.getString(1)!=null){\n\t\t\t\t\t\tdatos.setSerieEnc(rs.getString(1));\n\t\t\t\t\t}else{\n\t\t\t\t\t\tdatos.setSerieEnc(\"NA\");\n\t\t\t\t\t}\n\t\t\t\t\tdatos.setNoEnc(rs.getString(2));\n//\t\t\t\t\tif(rs.getString(1)!=null){\n//\t\t\t\t\t\tdatos.setSerieEnc(rs.getString(1));\n//\t\t\t\t\t}else{\n//\t\t\t\t\t\tdatos.setSerieEnc(\"NA\");\n//\t\t\t\t\t}\n//\t\t\t\t\tdatos.setNoEnc(rs.getString(2));\n//\t\t\t\t\tdocumento = rs.getInt(2);\n\t\t\t\t}\n\t\t\t\tcon.close();\n\t\t\t\tstmt.close();\n\t\t\t\trs.close();\n//\t\t\t}\n\t\t\t\n\t\t\t\n//\t\t\tcon = new ConectarDB().getConnection();\n//\t\t\tstmt = con.prepareCall(\"{call stp_UDPV_Del_Mov_Det(?,?,?)}\");\n//\t\t\tstmt.setInt(1, Integer.parseInt(datos.getTipoDocumento()));\n//\t\t\tstmt.setString(2, \"\");\n//\t\t\tstmt.setInt(3, documento);\n//\t\t\trs = stmt.executeQuery();\n//\t\t\t\n//\t\t\twhile(rs.next()){\n//\t\t\t\tSystem.out.println(rs.getString(\"limpiado\"));\n//\t\t\t}\n//\t\t\tcon.close();\n//\t\t\tstmt.close();\n//\t\t\trs.close();\n\t\t\t\n//\t\t\tcon = new ConectarDB().getConnection();\n//\t\t\tstmt = con.prepareCall(\"{call stp_udpv_VerificaCotiza(?,?)}\");\n//\t\t\tstmt.setString(1, \"\");\n//\t\t\tstmt.setInt(2, documento);\n//\t\t\trs = stmt.executeQuery();\n//\t\t\t\n//\t\t\twhile(rs.next()){\n//\t\t\t\tSystem.out.println(rs.getString(\"error\"));\n//\t\t\t}\n//\t\t\tcon.close();\n//\t\t\tstmt.close();\n//\t\t\trs.close();\n\t\t\t\n\t\t}catch(SQLException e ){\n\t\t\tSystem.out.println(\"Error Enc: \" + e.getMessage());\n\t\t}\n\t\treturn datos;\n\t}", "public void actualizarUsuario(String cedula,String name ,String lastname , String city ,String phone ,String email,String password) throws BLException;", "public void crudOperationStudent(){\n //Retrieve Student\n Student student=entityManager.find(Student.class,2L);\n // persistence Context have Student\n //Retrieve Passport\n Passport passport=student.getPassport();\n // persistence Context have Student,passport\n //Update passport number for student\n passport.setPassportNo(\"ZX132322\");\n // persistence Context have Student, updated-passport\n //update Student details\n student.setAge(25);\n // persistence Context have updated-Student, updated-passport\n entityManager.persist(student);\n\n }", "public ResultSet Editbroker(Long broker_id) throws SQLException {\n\t\r\nSystem.out.println(\"edit broker\");\r\n\trs=DbConnect.getStatement().executeQuery(\"select * from broker where broker_id=\"+broker_id+\" \");\r\n\treturn rs;\r\n}", "@Override\n public void actualizarPropiedad(Propiedad nuevaPropiedad) {\n int numFinca = nuevaPropiedad.getNumFinca();\n String modalidad = nuevaPropiedad.getModalidad();\n double area = nuevaPropiedad.getAreaTerreno();\n double metro = nuevaPropiedad.getValorMetroCuadrado();\n double fiscal = nuevaPropiedad.getValorFiscal();\n String provincia = nuevaPropiedad.getProvincia();\n String canton = nuevaPropiedad.getCanton();\n String distrito = nuevaPropiedad.getDistrito();\n String dirExacta = nuevaPropiedad.getDirExacta();\n String estado = nuevaPropiedad.getEstado();\n String tipo = nuevaPropiedad.getTipo();\n System.out.println(nuevaPropiedad.getFotografias().size());\n double precio = nuevaPropiedad.getPrecio();\n try {\n bdPropiedad.manipulationQuery(\"UPDATE PROPIEDAD SET MODALIDAD = '\" + modalidad + \"', AREA_TERRENO \"\n + \"= \" + area + \", VALOR_METRO = \" + metro + \", VALOR_FISCAL = \"+ fiscal + \", PROVINCIA = '\" \n + provincia + \"', CANTON = '\" + canton + \"' , DISTRITO = '\" + distrito + \"', DIREXACTA = '\" \n + dirExacta + \"', ESTADO = '\" + estado + \"', PRECIO = \" + precio + \" WHERE ID_PROPIEDAD = \" \n + numFinca);\n bdPropiedad.manipulationQuery(\"DELETE FROM FOTOGRAFIA_PROPIEDAD WHERE ID_PROPIEDAD = \" + numFinca);\n bdPropiedad.insertarFotografias(nuevaPropiedad);\n } catch (SQLException ex) {\n Logger.getLogger(Propiedad.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public FlujoDetalleDTO leerRegistro() {\n/* */ try {\n/* 82 */ FlujoDetalleDTO reg = new FlujoDetalleDTO();\n/* */ \n/* 84 */ reg.setCodigoFlujo(this.rs.getInt(\"codigo_flujo\"));\n/* 85 */ reg.setSecuencia(this.rs.getInt(\"secuencia\"));\n/* 86 */ reg.setServicioInicio(this.rs.getInt(\"servicio_inicio\"));\n/* 87 */ reg.setCodigoEstado(this.rs.getInt(\"codigo_estado\"));\n/* 88 */ reg.setServicioDestino(this.rs.getInt(\"servicio_destino\"));\n/* 89 */ reg.setNombreProcedimiento(this.rs.getString(\"nombre_procedimiento\"));\n/* 90 */ reg.setCorreoDestino(this.rs.getString(\"correo_destino\"));\n/* 91 */ reg.setEnviarSolicitud(this.rs.getString(\"enviar_solicitud\"));\n/* 92 */ reg.setMismoProveedor(this.rs.getString(\"ind_mismo_proveedor\"));\n/* 93 */ reg.setMismoCliente(this.rs.getString(\"ind_mismo_cliente\"));\n/* 94 */ reg.setEstado(this.rs.getString(\"estado\"));\n/* 95 */ reg.setUsuarioInsercion(this.rs.getString(\"usuario_insercion\"));\n/* 96 */ reg.setFechaInsercion(this.rs.getString(\"fecha_insercion\"));\n/* 97 */ reg.setUsuarioModificacion(this.rs.getString(\"usuario_modificacion\"));\n/* 98 */ reg.setFechaModificacion(this.rs.getString(\"fecha_modificacion\"));\n/* 99 */ reg.setNombreServicioInicio(this.rs.getString(\"nombre_servicio_inicio\"));\n/* 100 */ reg.setNombreCodigoEstado(this.rs.getString(\"nombre_codigo_estado\"));\n/* 101 */ reg.setNombreServicioDestino(this.rs.getString(\"nombre_servicio_destino\"));\n/* 102 */ reg.setNombreEstado(this.rs.getString(\"nombre_estado\"));\n/* 103 */ reg.setCaracteristica(this.rs.getInt(\"caracteristica\"));\n/* 104 */ reg.setCaracteristicaValor(this.rs.getInt(\"valor_caracteristica\"));\n/* 105 */ reg.setCaracteristicaCorreo(this.rs.getInt(\"caracteristica_correo\"));\n/* 106 */ reg.setNombreCaracteristica(this.rs.getString(\"nombre_caracteristica\"));\n/* 107 */ reg.setDescripcionValor(this.rs.getString(\"descripcion_valor\"));\n/* 108 */ reg.setMetodoSeleccionProveedor(this.rs.getString(\"metodo_seleccion_proveedor\"));\n/* 109 */ reg.setIndCorreoCliente(this.rs.getString(\"ind_correo_clientes\"));\n/* */ \n/* */ try {\n/* 112 */ reg.setEnviar_hermana(this.rs.getString(\"enviar_hermana\"));\n/* 113 */ reg.setEnviar_si_hermana_cerrada(this.rs.getString(\"enviar_si_hermana_cerrada\"));\n/* 114 */ reg.setInd_cliente_inicial(this.rs.getString(\"ind_cliente_inicial\"));\n/* */ \n/* */ \n/* */ }\n/* 118 */ catch (Exception e) {}\n/* */ \n/* */ \n/* */ \n/* 122 */ return reg;\n/* */ }\n/* 124 */ catch (Exception e) {\n/* 125 */ e.printStackTrace();\n/* 126 */ Utilidades.writeError(\"FlujoDetalleDAO:leerRegistro \", e);\n/* */ \n/* 128 */ return null;\n/* */ } \n/* */ }", "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}", "public void ActaulizarTabla() {\n int id = Integer.parseInt(txtId.getText());\n int unidad = Integer.parseInt(txtUsuario.getText());\n String placa = txtCorreo.getText();\n\n try {\n PreparedStatement ps = null;\n ResultSet rs = null;\n Conexion obj_con = new Conexion();\n Connection con = obj_con.getConexion();\n String SQL = \"UPDATE `carros` SET `nro_unidad`=?,`placa`=?,`color`=?,`id_marca`=?,`id_modelo`=?,`cant_puestos`=?,`ano_unidad`=?,`estatus_table`=?,`id_estado_actual`=? WHERE `id_unidad`=?\";\n ps = con.prepareStatement(SQL);\n\n ps.setInt(1, unidad);////////////////////////////YA///////////////////////\n ps.setString(2, placa);\n ps.setInt(10, id);\n System.out.println(ps);\n ps.execute();\n JOptionPane.showMessageDialog(null, \"Registro Modificado Exitosamente\");\n //limpiar();\n this.dispose();\n tabla.setVisible(true);\n //tabla.cargarDatos(); \n \n int Fila = tabla.jTableVehiculos.getSelectedRow();\n /*obtener el nro de fila sellecioando*/\n System.out.println(Fila);\n Object[] filas = new Object[7]; //OBJETO PARA CREAR FILA NUEVA GUARDADA EN LA TABLA\n filas[0] = txtUsuario.getText();\n filas[1] = txtCorreo.getText();\n \n modelTable.addRow(filas);\n tabla.jTableVehiculos.setModel(modelTable);\n \n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"Error al guardar registro\");\n System.err.println(e.toString());\n } \n }", "public void afterUpdate(DevicelabtestBean pObject) throws SQLException;", "@Override\r\n\tpublic void createReimbursement(RebsObj reb) {\n\t\tPreparedStatement ps = null;\r\n\t\tPreparedStatement ps2 = null;\r\n\t\tResultSet rs = null; // creating a resultSet which will save any queries\r\n\t\t\r\n\t\t// looks in util/ConnectionUtil.java and saves the url, username and password to \"conn\"\r\n\t\ttry(Connection conn = ConnectionUtil.getConnection();){ \r\n\t\t\t\r\n\t\t\t//int rebs_id = reb.getRebsId(); // REBS_ID IS AUTO INCREMENTING\r\n\t\t\tint user_id = reb.getUserId();\r\n\t\t\t//int man_id = reb.getManagerId(); // not needed\r\n\t\t\tint rebs_type = reb.getRebsType();\r\n\t\t\tint rebs_status = reb.getRebsStatus();\r\n\t\t\tdouble rebs_amount = reb.getRebsAmount();\r\n\t\t\tString rebs_description = reb.getRebsDescription();\r\n\t\t\t// Blob rebs_attachments\r\n\t\t\tTimestamp time_submitted = new Timestamp(System.currentTimeMillis());\t\t\r\n\t\t\t// Timestamp time_resolved\r\n\t\t\t\r\n\t\t\tPart rebs_photo = reb.getRebsPhoto();\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tDateFormat dateFormat = new SimpleDateFormat(\"dd-MMM-YY hh:mm:ss.SSSSSSSSS\");\r\n\t\t\tdateFormat.format(time_submitted);\r\n\t\t\treb.setTimeSubmitted(time_submitted);\r\n\t\t\tSystem.out.println(\"TIME STAMP IN DAO: \" + time_submitted);\r\n\t\t\t\r\n\t\t\tString sql2 = \"SELECT REBS_SEQ.nextval FROM DUAL\"; // trying to get the next table value (for id #)\r\n\t\t\tps2 = conn.prepareStatement(sql2); // uses connection to send string as a prepared statement\r\n\t\t\trs = ps2.executeQuery();\r\n\t\t\t\r\n\t\t\twhile (rs.next()) // goes through all query results (in this case, we should only have 1)\r\n\t\t\t{\r\n\t\t\t\t// get first column of rs, then set it ==\r\n\t\t\t\treb.setRebsId(rs.getInt(1)); \r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tint rebs_id = reb.getRebsId(); // setting rebs_id to the the rebs_seq value\r\n\t\t\t\r\n\t\t\t// you can put this string 'sql' into multiple lines by adding +, and having everything within \"\"\r\n\t\t\t// this sql line will be ran on SQL\r\n\t\t\tString sql = \"INSERT INTO ERS_REIMBURSEMENTS(rebs_id, user_id_author, user_id_resolver, \"\r\n\t\t\t\t\t+ \"rebs_type, rebs_status, rebs_amount, rebs_description, rebs_receipt, \"\r\n\t\t\t\t\t+ \"rebs_submitted, rebs_resolved) \" \r\n\t\t\t\t\t+ \"VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)\";\r\n\t\t\t\t\t//+ \"RETURNING rebs_id INTO ?\";\r\n\t\t\t\r\n\t\t\t// creating prepared statement\r\n\t\t\tps = conn.prepareStatement(sql); // uses connection to send string as a prepared statement\r\n\t\t\tps.setInt(1, rebs_id); // REBS_ID IS AUTO INCREMENTING\r\n\t\t\tps.setInt(2, user_id);\r\n\t\t\tps.setString(3, null);\r\n\t\t\tps.setInt(4, rebs_type);\r\n\t\t\tps.setInt(5, rebs_status);\r\n\t\t\tps.setDouble(6, rebs_amount);\r\n\t\t\tps.setString(7, rebs_description);\r\n\t\t\t//ps.setString(8, null); this is the attachment\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\t// size must be converted to int otherwise it results in error\r\n\t\t\t\tps.setBinaryStream(8, rebs_photo.getInputStream(), (int) rebs_photo.getSize());\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tps.setTimestamp(9, time_submitted);\r\n\t\t\tps.setString(10, null);\r\n\t\t\t//ps.setInt(11, rebs_id);\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"in DAO, rebs_id: \" + rebs_id);\r\n\t\t\t// rows affected\r\n\t\t\tint affected = ps.executeUpdate();\r\n\t\t\tSystem.out.println(\"Rows inserted: \" + affected);\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}finally{\r\n\t\t\tclose(ps);\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(\"Created new reimbursement request!\");\r\n\r\n\t}", "public void actualizar(Especialiadad espe,JTextField txtcodigo){\r\n\t\r\n\t\t\tConnection con = null;\r\n\t\t\tStatement stmt=null;\r\n\t\t\tint result=0;\r\n\t\t\t//stmt=con.prepareStatement(\"UPDATE Especialiadad \"\r\n\t\t\t//\t\t+ \"SET Nombre =? )\"\r\n\t\t\t\t//\t+ \"WHERE Codigo = \r\n\t\t\t\r\n try\r\n {\r\n \tcon = ConexionBD.getConnection();\r\n \t stmt = con.createStatement();\r\n \t\t // result = stmt.executeUpdate();\r\n\r\n } catch (Exception e) {\r\n \t\t e.printStackTrace();\r\n \t\t} finally {\r\n \t\t\tConexionBD.close(con);\r\n \t\t}\r\n\t\r\n\t}", "@Update({\n \"update A_SUIT_MEASUREMENT\",\n \"set contract_id = #{contractId,jdbcType=INTEGER},\",\n \"consultant_uid = #{consultantUid,jdbcType=INTEGER},\",\n \"collar = #{collar,jdbcType=DOUBLE},\",\n \"wrist = #{wrist,jdbcType=DOUBLE},\",\n \"bust = #{bust,jdbcType=DOUBLE},\",\n \"shoulder_width = #{shoulderWidth,jdbcType=DOUBLE},\",\n \"mid_waist = #{midWaist,jdbcType=DOUBLE},\",\n \"waist_line = #{waistLine,jdbcType=DOUBLE},\",\n \"sleeve = #{sleeve,jdbcType=DOUBLE},\",\n \"hem = #{hem,jdbcType=DOUBLE},\",\n \"back_length = #{backLength,jdbcType=DOUBLE},\",\n \"front_length = #{frontLength,jdbcType=DOUBLE},\",\n \"arm = #{arm,jdbcType=DOUBLE},\",\n \"forearm = #{forearm,jdbcType=DOUBLE},\",\n \"front_breast_width = #{frontBreastWidth,jdbcType=DOUBLE},\",\n \"back_width = #{backWidth,jdbcType=DOUBLE},\",\n \"pants_length = #{pantsLength,jdbcType=DOUBLE},\",\n \"crotch_depth = #{crotchDepth,jdbcType=DOUBLE},\",\n \"leg_width = #{legWidth,jdbcType=DOUBLE},\",\n \"thigh = #{thigh,jdbcType=DOUBLE},\",\n \"lower_leg = #{lowerLeg,jdbcType=DOUBLE},\",\n \"height = #{height,jdbcType=DOUBLE},\",\n \"weight = #{weight,jdbcType=DOUBLE},\",\n \"body_shape = #{bodyShape,jdbcType=INTEGER},\",\n \"stance = #{stance,jdbcType=INTEGER},\",\n \"shoulder_shape = #{shoulderShape,jdbcType=INTEGER},\",\n \"abdomen_shape = #{abdomenShape,jdbcType=INTEGER},\",\n \"payment = #{payment,jdbcType=INTEGER},\",\n \"invoice = #{invoice,jdbcType=VARCHAR}\",\n \"where user_id = #{userId,jdbcType=INTEGER}\",\n \"and measure_date = #{measureDate,jdbcType=TIMESTAMP}\"\n })\n int updateByPrimaryKey(ASuitMeasurement record);", "final public static PreparedStatement createPstmtUpdate(Connection conn, DotProjectObject obj)\n\t{\n\t\tClass<? extends DotProjectObject> clazz = obj.getClass();\n\t\tStringBuffer sb = new StringBuffer();\n\t\tString table = null;\n\t\tField[] beanFields = null;\n\t\tString[] dbFields = null;\n\t\tObject[] dbValuesData = null;\n\t\tObject[] dbValuesRestriction = null;\n\t\tPreparedStatement stmt = null;\n\t\t\n\t\ttable = AnnotationUtil.getAnnotationValue(clazz, DbAnnotations.TABLE_ANNOTATION);\n\t\tsb.append(\"UPDATE \");\n\t\tsb.append(table);\n\t\t\n\t\tbeanFields = AnnotationUtil.getAnnotatedFields(clazz, DbAnnotations.PROPERTY_ANNOTATION);\n\t\tdbFields = new String[beanFields.length];\n\t\tdbValuesData = new Object[beanFields.length];\n\t\tfor (int i = 0; i < beanFields.length; i++) {\n\t\t\t// Identificator fields cannot be changed when updating.\n\t\t\tif (beanFields[i].isAnnotationPresent(DbAnnotations.IDENTIFICATOR_ANNOTATION)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tdbFields[i] = AnnotationUtil.getAnnotationValue(beanFields[i], DbAnnotations.PROPERTY_ANNOTATION);\n\t\t\ttry {\n\t\t\t\tdbValuesData[i] = beanFields[i].get(obj);\n\t\t\t\tif (dbValuesData[i] == null) {\n\t\t\t\t\tdbFields[i] = null;\n\t\t\t\t}\n\t\t\t} catch (IllegalAccessException iae) {\n\t\t\t\tdbFields[i] = null;\n\t\t\t\tdbValuesData[i] = null;\n\t\t\t}\n\t\t}\n\t\tdbFields = ArrayUtil.clean(dbFields);\n\t\tdbValuesData = ArrayUtil.clean(dbValuesData);\n\t\t\t\n\t\tsb.append(\" SET \");\n\t\tfor (int i = 0; i < dbFields.length; i++) {\n\t\t\tif (i > 0) {\n\t\t\t\tsb.append(\", \");\n\t\t\t}\n\t\t\tsb.append(dbFields[i]);\n\t\t\tsb.append(\"=?\");\n\t\t}\n\t\t\n\n\t\t// Update restriction on identificator\n\t\tsb.append(\" WHERE \");\n\t\tbeanFields = AnnotationUtil.getAnnotatedFields(clazz, DbAnnotations.IDENTIFICATOR_ANNOTATION);\n\t\tdbFields = new String[beanFields.length];\n\t\tdbValuesRestriction = new Object[beanFields.length];\n\t\tfor (int i = 0; i < beanFields.length; i++) {\n\t\t\tdbFields[i] = AnnotationUtil.getAnnotationValue(beanFields[i], DbAnnotations.PROPERTY_ANNOTATION);\n\t\t\ttry {\n\t\t\t\tdbValuesRestriction[i] = beanFields[i].get(obj);\n\t\t\t} catch (Exception iae) {\n\t\t\t\tdbFields[i] = null;\n\t\t\t\tdbValuesRestriction[i] = null;\n\t\t\t}\n\t\t}\n\t\tdbFields = ArrayUtil.clean(dbFields);\n\t\tdbValuesRestriction = ArrayUtil.clean(dbValuesRestriction);\n\n\t\tfor (int i = 0; i < dbFields.length; i++) {\n\t\t\tif (i != 0) {\n\t\t\t\tsb.append(\" AND \");\n\t\t\t}\n\t\t\tsb.append(dbFields[i]);\n\t\t\tsb.append(\"=?\");\n\t\t}\t\t\t\n\t\t\t\t\t\t\n\t\tint stmtCount = 1;\n\t\ttry {\n\t\t\tstmt = conn.prepareStatement(sb.toString());\n\t\t\tfor (Object o : dbValuesData) {\n\t\t\t\tstmt.setObject(stmtCount, o);\n\t\t\t\tstmtCount++;\n\t\t\t}\n\t\t\tfor (Object o : dbValuesRestriction) {\n\t\t\t\tstmt.setObject(stmtCount, o);\n\t\t\t\tstmtCount++;\n\t\t\t}\n\t\t} catch (SQLException se) {\n\t\t\tstmt = null;\n\t\t}\n\t\t\n\t\treturn stmt;\n\t}", "int updateByPrimaryKey(Tipologia record);", "@Test\n public void updateTest8() throws SQLException {\n manager = new TableServizioManager(mockDb);\n Servizio servizio = manager.retriveById(2);\n servizio.setCanoa(true);\n manager.update(servizio);\n servizio = manager.retriveById(2);\n assertEquals(true, servizio.isCanoa() ,\"Should return true if update Servizio\");\n }", "@Override\r\n\tpublic void atualizar(Tipo tipo) {\n String sql = \"update tipos_servicos set nome = ? \"\r\n + \"where id = ?\";\r\n try {\r\n stmt = conn.prepareStatement(sql);\r\n \r\n stmt.setString(1, tipo.getNome());\r\n \r\n \r\n stmt.setInt(3, tipo.getId());\r\n \r\n stmt.executeUpdate();\r\n \r\n } catch (SQLException ex) {\r\n ex.printStackTrace();\r\n }\r\n\t}", "public boolean ModificarUsuario(String user, UsuarioDTO u) {\n Conexion c = new Conexion();\n PreparedStatement ps = null;\n String sql = \"UPDATE usuario SET nombre = ?, apellido = ?, descripcion = ?,\"\n + \"telefono = ?, direccion = ? , usuario = ?, email = ?, \"\n + \"fecha_nacimiento = ?, sexo=? WHERE id =\" + conocerID(user);\n try {\n ps = c.getConexion().prepareStatement(sql);\n UsuarioDTO tmp = conocerUsuario(user);\n ps.setString(1, (u.getNombre() != null) ? u.getNombre() : tmp.getNombre());\n ps.setString(2, (u.getApellido() != null) ? u.getApellido() : tmp.getApellido());\n ps.setString(3, (u.getDescripcion() != null) ? u.getDescripcion() : tmp.getDescripcion());\n ps.setString(4, (u.getTelefono() != null) ? u.getTelefono() : tmp.getTelefono());\n ps.setString(5, (u.getDireccion() != null) ? u.getDireccion() : tmp.getDireccion());\n ps.setString(6, (u.getUsuario() != null) ? u.getUsuario() : tmp.getUsuario());\n ps.setString(7, (u.getEmail() != null) ? u.getEmail() : tmp.getEmail());\n ps.setDate(8, (u.getFecha_Nacimiento().length()>0) ? Date.valueOf(u.getFecha_Nacimiento()) : Date.valueOf(tmp.getFecha_Nacimiento()));\n ps.setString(9, (u.getSexo() != null) ? u.getSexo() : tmp.getSexo());\n ps.executeUpdate();\n return true;\n } catch (SQLException ex) {\n System.out.println(ex.getMessage());\n } catch (Exception ex) {\n System.out.println(ex.getMessage());\n } finally {\n try {\n ps.close();\n c.cerrarConexion();\n } catch (Exception ex) {\n }\n }\n return false;\n }", "@Override\r\n\tpublic Borne update(Borne obj) {\n\t\tStatement st =null;\r\n\t\t\r\n\t\ttry {\r\n\t\t\tst = this.connect.createStatement();\r\n\t\t\tString sql = \"UPDATE Borne SET idZone = '\"+obj.getZone().getId()+\"' WHERE id =\"+obj.getId();\r\n\t\t\tSystem.out.println(sql);\r\n\t\t\tst.executeUpdate(sql);\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\treturn obj;\r\n\t}", "private void saveObject(Object object) {\n Connection connection = ConnectionPoll.getConnection();\n CRUDService crudService = new CRUDService(connection, object.getClass());\n try {\n Field[] fields = object.getClass().getDeclaredFields();\n Field id = null;\n for (Field f : fields) {\n if (f.isAnnotationPresent(Id.class)) {\n id = f;\n }\n }\n id.setAccessible(true);\n\n if (Integer.parseInt(id.get(object).toString()) != 0 && !id.get(object).equals(null)) {\n crudService.update((SimpleORMInterface) object);\n } else {\n crudService.insert((SimpleORMInterface) object);\n }\n id.setAccessible(false);\n ConnectionPoll.releaseConnection(connection);\n\n } catch (IllegalAccessException | NoSuchFieldException e) {\n e.printStackTrace();\n }\n }", "Lancamento persistir(Lancamento lancamento);", "public int ModificarDonante(Integer num_donante, String nombre, String apellido1, String apellido2, String DNI, String aptitud,\r\n\t\t\t\tString fecha_nacimiento,Integer telefono, Integer movil,String tipo_sanguineo, String pais_nacimiento, String email, Integer cp, String provincia, String poblacion, String direccion,\r\n\t\t\t\t char sexo, String ciclo) throws SQLException{\n\t\t\tString updatesql = \"UPDATE \" + usr+\".DONANTES SET NOMBRE=?,APELLIDO1=?,APELLIDO2=?,DNI=?,FECHA_NACIMIENTO=?,PAIS_NACIMIENTO=?,DIRECCION=?,POBLACION=?,CODIGO_POSTAL=?,TELEFONO=?,TELEFONO2=?,CORREO_ELECTRONICO=?,SEXO=?,TIPO_SANGUINEO=?,FOTO=? WHERE NUM_DONANTE=?\";\r\n\r\n\t\t\t//Seguridad en las Aplicaciones: SQL Injection\r\n\r\n\t\t\t\t\tPreparedStatement pstmt = conexion.prepareStatement (updatesql);\r\n\t\t\t\t\tpstmt.setInt(1, num_donante);\r\n\t\t\t\t\tpstmt.setString(2, nombre);\r\n\t\t\t\t\tpstmt.setString(3, apellido1);\r\n\t\t\t\t\tpstmt.setString(4,apellido2);\r\n\t\t\t\t\tpstmt.setString(5,DNI);\r\n\t\t\t\t\tpstmt.setString(6,aptitud);\r\n\t\t\t\t\tpstmt.setString(7,fecha_nacimiento);\r\n\t\t\t\t\tpstmt.setInt(8,telefono);\r\n\t\t\t\t\tpstmt.setInt(9,movil);\r\n\t\t\t\t\tpstmt.setString(10,tipo_sanguineo);\r\n\t\t\t\t\tpstmt.setString(11,pais_nacimiento);\r\n\t\t\t\t\tpstmt.setString(12,email);\r\n\t\t\t\t\tpstmt.setInt(13,cp);\r\n\t\t\t\t\tpstmt.setString(14,provincia);\r\n\t\t\t\t\tpstmt.setString(15,poblacion);\r\n\t\t\t\t\tpstmt.setString(16,direccion);\r\n\t\t\t\t\tpstmt.setString(17, Character.toString(sexo));\r\n\t\t\t\t\tpstmt.setString(18,ciclo);\r\n\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t//ejecuto la sentencia\r\n\t\t\ttry{\r\n\t\t\t\tint resultado = pstmt.executeUpdate(); //pstmt y tiene que estar vacio\r\n\r\n\t\t\t\tif(resultado != 1)\r\n\t\t\t\t\tSystem.out.println(\"Error en la actualización \" + resultado);\r\n\t\t\t\telse\r\n\t\t\t\t\tSystem.out.println(\"Persona actualizada con éxito!!!\");\r\n\r\n\t\t\t\treturn 0;\r\n\t\t\t}catch(SQLException sqle){\r\n\r\n\t\t\t\tint pos = sqle.getMessage().indexOf(\":\");\r\n\t\t\t\tString codeErrorSQL = sqle.getMessage().substring(0,pos);\r\n\r\n\t\t\t\tif(codeErrorSQL.equals(\"ORA-00001\") ){\r\n\t\t\t\t\tSystem.out.println(\"Ya existe una persona con ese email!!\");\r\n\t\t\t\t\treturn 1;\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tSystem.out.println(\"Ha habido algún problema con Oracle al hacer la insercion\");\r\n\t\t\t\t\treturn 2;\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t\r\n\r\n\t}", "public void ModificarPrestamo(PrestamoFila pf) {\n this.conexion.ConectarBD();\n String consulta = \"update prestamos set IdSocio = ?, IdLibro = ?, FechaInicio = ?, FechaFin = ? where IdPrestamo = ?\";\n try {\n this.pstm = this.conexion.getConexion().prepareStatement(consulta);\n //Indicamos los parametros del update\n this.pstm.setInt(1, pf.getIdSocio());\n this.pstm.setInt(2, pf.getIdLibro());\n this.pstm.setDate(3, new java.sql.Date(pf.getFechaInicio().getTime()));\n this.pstm.setDate(4, new java.sql.Date(pf.getFechaFin().getTime()));\n this.pstm.setInt(5, pf.getIdPrestamo());\n //Ejecutamos la consulta\n int res = pstm.executeUpdate();\n } catch (SQLException e) { \n throw new MisException(\"Error al modificar un Prestamo.\\n\"+e.toString());\n \n } catch (Exception e) {\n throw new MisException(\"Error.\\n\"+e.toString());\n \n }\n \n //Desconectamos de la BD\n this.conexion.DesconectarBD(); \n }", "@POST\r\n @Path(\"editwifi\")\r\n public void editWifi(@FormParam(\"ssid\")String ssid,@FormParam(\"potencia\")int potencia) throws ClassNotFoundException, SQLException{\r\n Class.forName(\"org.postgresql.Driver\");\r\n \r\n Connection connection = null;\r\n try{\r\n Class.forName(\"org.postgresql.Driver\");\r\n\r\n String url =\"jdbc:postgresql://localhost:5432/postgres\";\r\n String usuario=\"postgres\";\r\n String contraseña=\"123\";\r\n connection = DriverManager.getConnection(url, usuario, contraseña);\r\n \r\n if(!connection.isClosed()){\r\n String query = \"Update wifis Set potencia=? Where ssid=?\";\r\n\r\n // create the mysql insert preparedstatement\r\n PreparedStatement preparedStmt = connection.prepareStatement(query);\r\n preparedStmt.setInt (1, potencia);\r\n preparedStmt.setString (2, ssid);\r\n\r\n preparedStmt.execute();\r\n preparedStmt.close();\r\n connection.close();\r\n }\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n System.err.println(e.getClass().getName()+\": \"+e.getMessage());\r\n System.exit(0);\r\n \r\n }\r\n \r\n }", "public boolean insertarNuevoClienteCA(Cliente cliente, List<Cuenta> listaCuentas) {\n String queryDividido1 = \"INSERT INTO Usuario(Codigo, Nombre, DPI, Direccion, Sexo, Password, Tipo_Usuario) \"\n + \"VALUES(?,?,?,?,?,aes_encrypt(?,'AES'),?)\";\n\n String queryDividido2 = \"INSERT INTO Cliente(Usuario_Codigo, Nombre, Nacimiento, DPI_Escaneado, Estado) \"\n + \"VALUES(?,?,?,?,?)\";\n \n String queryDividido3 = \"INSERT INTO Cuenta(No_Cuenta, Fecha_Creacion, Saldo_Cuenta, Cliente_Usuario_Codigo) \"\n + \"VALUES(?,?,?,?)\";\n int codigoCliente = cliente.getCodigo();\n try {\n\n PreparedStatement enviarDividido1 = Conexion.conexion.prepareStatement(queryDividido1);\n\n //Envio de los Datos Principales del cliente a la Tabla Usuario\n enviarDividido1.setInt(1, cliente.getCodigo());\n enviarDividido1.setString(2, cliente.getNombre());\n enviarDividido1.setString(3, cliente.getDPI());\n enviarDividido1.setString(4, cliente.getDireccion());\n enviarDividido1.setString(5, cliente.getSexo());\n enviarDividido1.setString(6, cliente.getPassword());\n enviarDividido1.setInt(7, 3);\n enviarDividido1.executeUpdate();\n\n //Envia los Datos Complementarios del Usuario a la tabla cliente\n PreparedStatement enviarDividido2 = Conexion.conexion.prepareStatement(queryDividido2);\n enviarDividido2.setInt(1, cliente.getCodigo());\n enviarDividido2.setString(2, cliente.getNombre());\n enviarDividido2.setString(3, cliente.getNacimiento());\n enviarDividido2.setBlob(4, cliente.getDPIEscaneado());\n enviarDividido2.setBoolean(5, cliente.isEstado());\n enviarDividido2.executeUpdate();\n \n //Envia los Datos de la Cuenta Adjudicada al Cliente\n PreparedStatement enviarDividido3 = Conexion.conexion.prepareStatement(queryDividido3);\n\n //Envio de los Datos Principales de una Cuenta a la Tabla Cuenta, perteneciente a un cliente en Especifico\n //Considerando que el cliente puede tener mas de una cuenta\n for (Cuenta cuenta : listaCuentas) {\n \n enviarDividido3.setInt(1, cuenta.getNoCuenta());\n enviarDividido3.setString(2, cuenta.getFechaCreacion());\n enviarDividido3.setDouble(3, cuenta.getSaldo());\n enviarDividido3.setInt(4, codigoCliente);\n enviarDividido3.executeUpdate();\n }\n \n return true;\n\n } catch (SQLException ex) {\n ex.printStackTrace(System.out);\n return false;\n }\n\n }", "int updateByPrimaryKey(Movimiento record);", "public void getSetVersionRowValorPorUnidadWithConnection()throws Exception {\n\t\tif(valorporunidad.getIsChangedAuxiliar() && Constantes.ISSETVERSIONROWUPDATE) {\r\n\t\t \t//TEMPORAL\r\n\t\t\t//if((valorporunidad.getIsDeleted() || (valorporunidad.getIsChanged()&&!valorporunidad.getIsNew()))&& Constantes.ISSETVERSIONROWUPDATE) {\r\n\t\t\tTimestamp timestamp=null;\r\n\t\t\t\r\n\t\t\ttry {\t\r\n\t\t\t\tconnexion=connexion.getNewConnexion(this.connexionType,this.parameterDbType,this.entityManagerFactory);connexion.begin();\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\ttimestamp=valorporunidadDataAccess.getSetVersionRowValorPorUnidad(connexion,valorporunidad.getId());\r\n\t\t\t\t\r\n\t\t\t\tif(!valorporunidad.getVersionRow().equals(timestamp)) {\t\r\n\t\t\t\t\tvalorporunidad.setVersionRow(timestamp);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tconnexion.commit();\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tvalorporunidad.setIsChangedAuxiliar(false);\r\n\t\t\t\t\r\n\t\t\t} catch(Exception e) {\r\n\t\t\t\tconnexion.rollback();\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tthrow e;\r\n\t\t\t\t\r\n\t \t} finally {\r\n\t\t\t\tconnexion.close();\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\r\n public boolean ActualizarDatosCliente() {\r\n try {\r\n puente.executeUpdate(\"UPDATE `cliente` SET `Nombre` = '\"+Nombre+\"', `Apellido` = '\"+Apellido+\"', `Telefono` = '\"+Telefono+\"', `Fecha_Nacimiento` = '\"+Fecha_Nacimiento+\"', `Email` = '\"+Email+\"', `Direccion` = '\"+Direccion+\"', `Ciudad` = '\"+Ciudad+\"' WHERE `cliente`.`Cedula` = '\"+Cedula+\"';\");\r\n listo = true;\r\n } catch (Exception e) {\r\n Logger.getLogger(DaoCliente.class.getName()).log(Level.SEVERE, null, e);\r\n }\r\n return listo;\r\n }", "@Override\n public void setPrimaryKey(long primaryKey) {\n _partido.setPrimaryKey(primaryKey);\n }", "private void initValues() {\n this.closeConnection();\n this.agregarRol = false;\n rutRoles = null; rutRoles = new Vector(); rutRoles.clear();\n deudasContribuyente = null; deudasContribuyente = new Vector(); deudasContribuyente.clear();\n rutRolesConsultados = null; rutRolesConsultados = new HashMap(); rutRolesConsultados.clear();\n param = null; param = new HashMap(); param.clear();\n\n demandasContribuyente = null; demandasContribuyente = new Vector(); demandasContribuyente.clear();\n demandaSeleccionada=null; demandaSeleccionada= new Long(-1);\n\n\n this.conveniosMasivo = null;\n\n porcentajeCuotaContado = null; porcentajeCuotaContado = new Long(0);\n porcentajeCondonacion = null; porcentajeCondonacion = new Long(0);\n pagoContado = null; pagoContado = new Long(0);\n numeroCuotas = null; numeroCuotas = new Long(0);\n totalPagar = null; totalPagar = new Long(0);\n totalPagarConCondonacion = null; totalPagarConCondonacion = new Long(0);\n arregloDeudas=\"\";\n tipoPago=1;\n estadoCobranza=\"T\";\n codigoPropuesta = new Long(0);\n codigoFuncionario = new Long(0);\n idTesoreria = new Long(0);\n liquidada = false;\n }", "private void updateObject(Object object) {\n Connection connection = ConnectionPoll.getConnection();\n CRUDService crudService = new CRUDService(connection, object.getClass());\n\n try {\n crudService.update((SimpleORMInterface) object);\n } catch (IllegalAccessException e) {\n e.printStackTrace();\n }\n\n ConnectionPoll.releaseConnection(connection);\n\n try {\n connection.close();\n } catch (SQLException throwables) {\n throwables.printStackTrace();\n }\n }", "public void actualizarEmpleado(CLEmpleado cl) {\r\n String sql = \"{CALL sp_actualizarEmpleado(?,?,?,?,?,?,?,?,?)}\";\r\n try{\r\n ps = cn.prepareCall(sql); \r\n ps.setInt(1, cl.getIdEmpleado());\r\n ps.setString(2, cl.getPrimerNombre());\r\n ps.setString(3, cl.getSegundoNombre());\r\n ps.setString(4, cl.getPrimerApellido());\r\n ps.setString(5, cl.getSegundoApellido());\r\n ps.setString(6, cl.getDireccion());\r\n ps.setString(7, cl.getTelefonoCelular());\r\n ps.setInt(8, cl.getIdCargo());\r\n ps.setInt(9, cl.getIdEstado());\r\n ps.execute();\r\n \r\n }catch(SQLException e){\r\n JOptionPane.showMessageDialog(null, \"error: \"+ e.getMessage());\r\n \r\n }\r\n \r\n }", "@Update({\n \"update tb_user\",\n \"set password = #{password,jdbcType=VARCHAR}\",\n \"where username = #{username,jdbcType=VARCHAR}\"\n })\n int updateByPrimaryKey(User record);", "public int nuevaVenta(InterfazVenta venta, String vendedor) throws java.rmi.RemoteException{\n\t\tString driver = \"org.apache.derby.jdbc.EmbeddedDriver\";\n\t\t// the database name \n\t\tString dbName=\"VentasDB\";\n\t\t// define the Derby connection URL to use \n\t\tString connectionURL = \"jdbc:derby:\" + dbName + \";create=true\";\n\n\t\tConnection conn = null;\n ResultSet rs = null;\n\t\tPreparedStatement pst = null;\n\t\tPreparedStatement pst2 = null;\n\t\tPreparedStatement pst3 = null;\n\t\tResultSet rs4 = null;\n\t\tPreparedStatement pst4 = null;\n\t\t\n\t\tSystem.out.println(\"Retornando monto de la venta...\");\n\t\t\t\t\t\n\t\ttry{\n\t\t\tClass.forName(driver).newInstance();\n\t\t\tconn = DriverManager.getConnection(connectionURL);\n\t\t\t// Buscamos el proximo identificador de venta\n\t\t\tString sql = \"SELECT MAX(IdentificadorVenta) FROM VentasArticulos\";\n pst = conn.prepareStatement(sql);\n \n rs = pst.executeQuery();\n\t\t\t\n\t\t\tint identificadorVenta;\n \n if (rs.next()){\n identificadorVenta = rs.getInt(1) + 1; //Obtengo el valor de identificador de venta mas alto y lo incremento para obtener el nuevo identificador de venta\n }\n else{\n identificadorVenta = 0;\n\t\t\t}\n\t\t\t\n\t\t\t// Insertamos la venta\n\t\t\tString sql2 = \"INSERT INTO VentasArticulos VALUES (?,?,?,?,?,?,?,?)\";\n\t\t\t\n\t\t\tpst2 = conn.prepareStatement(sql2);\n\t\t\t\n\t\t\tpst2.setString(1, vendedor);\n\t\t\tpst2.setString(2, venta.getNombreComprador());\n\t\t\tpst2.setString(3, venta.getApellidoComprador());\n\t\t\tpst2.setString(4, venta.getNumeroDocumentoComprador());\n\t\t\tpst2.setInt(5, venta.getAnioVenta());\n\t\t\tpst2.setInt(6, venta.getMesVenta());\n\t\t\tpst2.setInt(7, venta.getDiaVenta());\n\t\t\tpst2.setInt(8, identificadorVenta);\n \n pst2.execute();\n\t\t\t\n\t\t\t// Ingresamos los articulos de la venta\n\t\t\tint montoTotalVenta = 0;\n\t\t\tArticuloVenta[] listaArticulosVenta;\n\t\t\t\n\t\t\tlistaArticulosVenta = venta.getListaArticulosVenta();\n\t\t\t\t\t\n\t\t\tfor (int k=0; k<listaArticulosVenta.length; k++){\n\t\t\t\tString sql3 = \"INSERT INTO ArticuloDeVenta VALUES (?,?,?)\";\n\t\t\t\n\t\t\t\tpst3 = conn.prepareStatement(sql3);\n\t\t\t\t\n\t\t\t\tpst3.setInt(1, identificadorVenta);\n\t\t\t\tpst3.setString(2, listaArticulosVenta[k].getNombreArticuloVenta());\n\t\t\t\tpst3.setInt(3, listaArticulosVenta[k].getCantArticuloVenta());\n\t\t\t\t\n\t\t\t\tpst3.execute();\n\t\t\t\t\n\t\t\t\tString sql4 = \"SELECT PrecioArticulo FROM Articulos WHERE NombreArticulo=?\";\n\t\t\t\t\n\t\t\t\tpst4 = conn.prepareStatement(sql4);\n\t\t\t\tpst4.setString(1, listaArticulosVenta[k].getNombreArticuloVenta());\n\t\t\t\t\n\t\t\t\trs4 = pst4.executeQuery();\n\t\t\t\t\t\t\n\t\t\t\tif (rs4.next()){\n\t\t\t\t\tmontoTotalVenta += rs4.getInt(1) * listaArticulosVenta[k].getCantArticuloVenta();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn montoTotalVenta;\n\t\t\t\n }catch(Exception e){\n\t\t\tSystem.out.println(\"Error al insertar nueva venta en la base de datos.\");\n\t\t\tSystem.out.println(\"Informacion del error: \" + e.toString());\n\t\t\te.printStackTrace();\n\t\t\treturn 0;\n }\n }", "int updateByPrimaryKey(CTipoPersona record) throws SQLException;", "int updateByPrimaryKeySelective(Prueba record);", "public void getSetVersionRowTarjetaCreditoWithConnection()throws Exception {\n\t\tif(tarjetacredito.getIsChangedAuxiliar() && Constantes.ISSETVERSIONROWUPDATE) {\r\n\t\t \t//TEMPORAL\r\n\t\t\t//if((tarjetacredito.getIsDeleted() || (tarjetacredito.getIsChanged()&&!tarjetacredito.getIsNew()))&& Constantes.ISSETVERSIONROWUPDATE) {\r\n\t\t\tTimestamp timestamp=null;\r\n\t\t\t\r\n\t\t\ttry {\t\r\n\t\t\t\tconnexion=connexion.getNewConnexion(this.connexionType,this.parameterDbType,this.entityManagerFactory);connexion.begin();\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\ttimestamp=tarjetacreditoDataAccess.getSetVersionRowTarjetaCredito(connexion,tarjetacredito.getId());\r\n\t\t\t\t\r\n\t\t\t\tif(!tarjetacredito.getVersionRow().equals(timestamp)) {\t\r\n\t\t\t\t\ttarjetacredito.setVersionRow(timestamp);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tconnexion.commit();\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\ttarjetacredito.setIsChangedAuxiliar(false);\r\n\t\t\t\t\r\n\t\t\t} catch(Exception e) {\r\n\t\t\t\tconnexion.rollback();\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tthrow e;\r\n\t\t\t\t\r\n\t \t} finally {\r\n\t\t\t\tconnexion.close();\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public ParametroPorParametroPK() {\r\n\t}", "@Override\r\n\tpublic void update() throws SQLException {\n\r\n\t}", "@Override\n public Long getClave() {\n return clave;\n }", "public static void main(String[] args) {\n //System.out.println(CompradorDBOld.searchByNamePreparedStatement(\"son\"));\n //CompradorDBOld.updatePreparedStatement(new Comprador(1, \"147.852.336-78\", \"Maria Jesus de Lima Menezes\"));\n //System.out.println(CompradorDBOld.searchByNomeCallableStatement(\"son\"));\n //System.out.println(CompradorDBOld.searchByNameRowSet(\"welson\"));\n //CompradorDBOld.updateRowSet(new Comprador(1, \"147.852.336-78\", \"Maria Jesus de Lima Menezes\"));\n // CompradorDBOld.updateRowSetCached(new Comprador(1, \"147.852.336-78\", \"Maria Jesus de Lima Menezes\".toUpperCase()));\n //selecionarTudo();\n try {\n CompradorDBOld.saveTransaction();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "@Override\r\n\tpublic void solicitarClave(String clave) {\n\t\tSystem.out.println(\"Comprobar clave\");\r\n\t\tSystem.out.println(\"Analizar base de datos\");\r\n\t\tSystem.out.println(\"Clave correcta\");\r\n\t}", "private void saveData() {\n // Actualiza la información\n client.setName(nameTextField.getText());\n client.setLastName(lastNameTextField.getText());\n client.setDni(dniTextField.getText());\n client.setAddress(addressTextField.getText());\n client.setTelephone(telephoneTextField.getText());\n\n // Guarda la información\n DBManager.getInstance().saveData(client);\n }", "protected abstract void prepareStatementForUpdate(PreparedStatement statement, T object) throws PersistException;", "public static int save(Periode p){ \n int status=0; \n try{ \n //membuka koneksi\n Connection con=Koneksi.openConnection();\n //melakukan query database\n PreparedStatement ps=con.prepareStatement( \n \"insert into periode(tahun, awal, akhir) values(?,?,?)\"); \n ps.setString(1,p.getTahun()); \n ps.setString(2,p.getAwal()); \n ps.setString(3,p.getAkhir()); \n status=ps.executeUpdate(); \n }catch(Exception e){\n System.out.println(e);\n } \n return status; \n }", "int updateByPrimaryKey(ParUsuarios record);", "public int Edituser(Long userid, Long brokerId, String firstname,\r\n\t\tString lastname, String address, String city, String eMail, Long phone,\r\n\t\tLong pincode) throws SQLException {\n\tLong useridd=null;\r\n\trs=DbConnect.getStatement().executeQuery(\"select user_id from customer where login_id=\"+userid+\"\");\r\n\tif(rs.next())\r\n\t{\r\n\t\tuseridd=rs.getLong(1);\r\n\t}\r\n\tint i=DbConnect.getStatement().executeUpdate(\"update customer set address='\"+address+\"',city='\"+city+\"',e_mail='\"+eMail+\"',phone=\"+phone+\",pincode=\"+pincode+\" where user_id=\"+useridd+\"\");\r\n\treturn i;\r\n}" ]
[ "0.6462359", "0.62291074", "0.5720851", "0.5679863", "0.5641551", "0.56190354", "0.56078666", "0.5589841", "0.55891985", "0.5579275", "0.5577087", "0.55767316", "0.55068237", "0.54993826", "0.5498415", "0.5440386", "0.5420917", "0.54194623", "0.5418597", "0.54180443", "0.5412148", "0.5381071", "0.5381026", "0.53775793", "0.53644085", "0.53627324", "0.5353823", "0.5337943", "0.53317314", "0.5331051", "0.531114", "0.5297646", "0.528549", "0.5284254", "0.5277873", "0.5277372", "0.5275598", "0.52673113", "0.52602375", "0.5258848", "0.5257338", "0.5257061", "0.52503264", "0.5242838", "0.52395606", "0.5232875", "0.5232846", "0.52316135", "0.5227831", "0.52261925", "0.52261895", "0.5225208", "0.52171546", "0.5215499", "0.52130413", "0.5207191", "0.52069277", "0.5206658", "0.5206385", "0.52057457", "0.5201858", "0.5200563", "0.51940244", "0.51916534", "0.5191337", "0.51912034", "0.5191166", "0.5188631", "0.5182273", "0.5179207", "0.5177702", "0.5176136", "0.51716876", "0.51713055", "0.51704603", "0.51636374", "0.5163403", "0.5161265", "0.5160047", "0.51511335", "0.5148475", "0.51468366", "0.5144169", "0.5143027", "0.51417106", "0.5136656", "0.5135347", "0.5130231", "0.5126339", "0.5120455", "0.51142323", "0.5112429", "0.5109178", "0.5103199", "0.5102779", "0.5101714", "0.5101573", "0.5101157", "0.5099681", "0.50982", "0.50943995" ]
0.0
-1
Metodos Utilizados para eliminar informacion de la BD Reciben la llave primaria del objeto que se desea eliminar
public int DeleteEstado(int estadoID){ SQLiteDatabase sqLiteDatabase = conn.getWritableDatabase(); return sqLiteDatabase.delete("estados","estodoID LIKE ?",new String[]{String.valueOf(estadoID)}); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic boolean eliminar(Connection connection, Object DetalleSolicitud) {\n\t\tString query = \"DELETE FROM detallesolicitudes WHERE sysPK = ?\";\n\t\ttry {\t\n\t\t\tDetalleSolicitud detalleSolicitud = (DetalleSolicitud)DetalleSolicitud;\n\t\t\tPreparedStatement preparedStatement = (PreparedStatement) connection.prepareStatement(query);\n\t\t\tpreparedStatement.setInt(1, detalleSolicitud.getSysPk());\n\t\t\tpreparedStatement.execute();\n\t\t\treturn true;\n\t\t} catch (SQLException e) {\n\t\t\tNotificacion.dialogoException(e);\n\t\t\treturn false;\n\t\t}//FIN TRY/CATCH\t\n\t}", "public void eliminarBodegaActual(){\n Nodo_bodega_actual.obtenerAnterior().definirSiguiente(Nodo_bodega_actual.obtenerSiguiente());\n if(Nodo_bodega_actual.obtenerSiguiente() != null){\n Nodo_bodega_actual.obtenerSiguiente().definirAnterior(Nodo_bodega_actual.obtenerAnterior());\n } \n }", "public void eliminar(String sentencia){\n try {\n Statement stmt = Conexion.getInstancia().createStatement();\n stmt.executeUpdate(sentencia);\n }\n catch (Exception ex){\n ex.printStackTrace();\n }\n }", "public void eliminarcola(){\n Cola_banco actual=new Cola_banco();// se crea un metodo actual para indicar los datos ingresado\r\n actual=primero;//se indica que nuestro dato ingresado va a ser actual\r\n if(primero != null){// se usa una condiccion si nuestro es ingresado es diferente de null\r\n while(actual != null){//se usa el while que recorra la cola indicando que actual es diferente de null\r\n System.out.println(\"\"+actual.nombre);// se imprime un mensaje con los datos ingresado con los datos ingresado desde el teclado\r\n actual=actual.siguiente;// se indica que el dato actual pase a ser igual con el apuntador siguente\r\n }\r\n }else{// se usa la condicion sino se cumple la condicion\r\n System.out.println(\"\\n la cola se encuentra vacia\");// se indica al usuario que la cola esta vacia\r\n }\r\n }", "@Override\n\tpublic void eliminar() {\n\t\tLOG.info(\"Se elimino el usuario de la bd\");\n\t}", "public void eliminar() {\n try {\n Dr_siseg_usuarioBean usuario = new Dr_siseg_usuarioBean();\n FacesContext facesContext = FacesContext.getCurrentInstance();\n usuario = (Dr_siseg_usuarioBean) facesContext.getExternalContext().getSessionMap().get(\"usuario\");\n\n ApelacionesDao apelacionesDao = new ApelacionesDao();\n apelacionesDao.IME_APELACIONES(3, this.Selected);\n\n BitacoraSolicitudDao bitacoraSolicitudDao = new BitacoraSolicitudDao();//INSERTA EL MOVIMIENTO EN LA BITACORA\n BitacoraSolicitudBean bitacoraSolicitudBean = new BitacoraSolicitudBean();\n bitacoraSolicitudBean.setBit_sol_id(this.Selected.getApel_sol_numero());\n bitacoraSolicitudBean.setUsuarioBean(usuario);\n bitacoraSolicitudBean.setBit_tipo_movimiento(\"2\");\n bitacoraSolicitudBean.setBit_detalle(\"Fue eliminada la apelacion\");\n bitacoraSolicitudDao.dmlDr_regt_bitacora_solicitud(bitacoraSolicitudBean);\n\n this.Listar();\n addMessage(\"Eliminado Exitosamente\", 1);\n } catch (ExceptionConnection ex) {\n Logger.getLogger(ApelacionController.class.getName()).log(Level.SEVERE, null, ex);\n addMessage(\"Se produjo un error al eliminar el registro, contacte al administrador del sistema\", 2);\n }\n }", "Curso eliminaCurso(String clave);", "public RespuestaBD eliminarRegistro(int codigoFlujo, int secuencia) {\n/* 296 */ RespuestaBD rta = new RespuestaBD();\n/* */ \n/* */ try {\n/* 299 */ String s = \"delete from wkf_detalle where codigo_flujo=\" + codigoFlujo + \" and secuencia=\" + secuencia + \"\";\n/* */ \n/* */ \n/* */ \n/* */ \n/* 304 */ rta = this.dat.executeUpdate2(s);\n/* */ }\n/* 306 */ catch (Exception e) {\n/* 307 */ e.printStackTrace();\n/* 308 */ Utilidades.writeError(\"FlujoDetalleDAO:eliminarRegistro \", e);\n/* 309 */ rta.setMensaje(e.getMessage());\n/* */ } \n/* 311 */ return rta;\n/* */ }", "public void eliminarMensaje(InfoMensaje m) throws Exception;", "public String eliminarDetalle()\r\n/* 340: */ {\r\n/* 341:400 */ this.cuentaContableDimensionContable = ((CuentaContableDimensionContable)this.dtCuentaContable.getRowData());\r\n/* 342:401 */ this.cuentaContableDimensionContable.setEliminado(true);\r\n/* 343:402 */ return \"\";\r\n/* 344: */ }", "@Override\r\n\tpublic void eliminar() {\n\t\tLOG.info(\"Se elimino los datos del equipo\");\r\n\t}", "public void eliminar(){\n conexion = base.GetConnection();\n try{\n PreparedStatement borrar = conexion.prepareStatement(\"DELETE from usuarios where Cedula='\"+this.Cedula+\"'\" );\n \n borrar.executeUpdate();\n // JOptionPane.showMessageDialog(null,\"borrado\");\n }catch(SQLException ex){\n System.err.println(\"Ocurrió un error al borrar: \"+ex.getMessage());\n \n }\n }", "protected void cmdRemove() throws Exception{\n\t\t//Determinamos los elementos a eliminar. De cada uno sacamos el id y el timestamp\n\t\tVector entities = new Vector();\n\t\tStringTokenizer claves = new StringTokenizer(conectorParametro(\"idSelection\"), \"|\");\n\t\tStringTokenizer timestamps = new StringTokenizer(conectorParametro(\"timestamp\"), \"|\");\n\t\ttraza(\"MMG::Se van a borrar \" + claves.countTokens() + \" y son \" + conectorParametro(\"idSelection\"));\n\t\twhile(claves.hasMoreTokens() && timestamps.hasMoreTokens()){\n\t\t\tCobGrupoUsuarCobraData cobGrupoUsuarCobra = new CobGrupoUsuarCobraData();\n\t\t\tcobGrupoUsuarCobra.setId(new Long(claves.nextToken()));\n\t\t\t//cobGrupoUsuarCobra.jdoSetTimeStamp(Long.parseLong(timestamps.nextToken()));\n\t\t\tentities.addElement(cobGrupoUsuarCobra);\n\t\t}\n\t\t\n\t\t//Construimos el DTO para realizar la llamada\n\t\tVector datos = new Vector();\n\t\tMareDTO dto = new MareDTO();\n\t\tdto.addProperty(\"entities\", entities);\n\t\tdatos.add(dto);\n\t\tdatos.add(new MareBusinessID(BUSINESSID_REMOVE));\n\t\t\n\t\t\n\t\t\n\t\t//Invocamos la lógica de negocio\n\t\ttraza(\"MMG:: Iniciada ejecución Remove de entidad CobGrupoUsuarCobra\");\n\t\tDruidaConector conectorCreate = conectar(CONECTOR_REMOVE, datos);\n\t\ttraza(\"MMG:: Finalizada ejecución Remove de entidad CobGrupoUsuarCobra\");\n\t\t\n\t\t\n\n\t\t//metemos en la sesión las query para realizar la requery\n\t\tconectorParametroSesion(SESSION_ATTRIBUTE_LAST_QUERY, conectorParametro(VAR_LAST_QUERY_TO_SESSION));\n\t\t\n\t\t//Redirigimos a la LP de StartUp con la acción de StartUp y requery\n\t\tconectorAction(\"CobGrupoUsuarCobraLPStartUp\");\n\t\tconectorActionParametro(PARAMETRO_GENERICO_ORIGEN, \"menu\");\n\t\tconectorActionParametro(PARAMETRO_GENERICO_ACCION, ACCION_REMOVE);\n\t\tconectorActionParametro(VAR_PERFORM_REQUERY, \"true\");\n\t}", "@Override\r\n\tpublic void eliminar(Long idRegistro) {\n\t\t\r\n\t}", "protected void cmdRemove() throws Exception{\n\t\t//Determinamos los elementos a eliminar. De cada uno sacamos el id y el timestamp\n\t\tVector entities = new Vector();\n\t\tStringTokenizer claves = new StringTokenizer(conectorParametro(\"idSelection\"), \"|\");\n\t\tStringTokenizer timestamps = new StringTokenizer(conectorParametro(\"timestamp\"), \"|\");\n\t\ttraza(\"MMG::Se van a borrar \" + claves.countTokens() + \" y son \" + conectorParametro(\"idSelection\"));\n\t\twhile(claves.hasMoreTokens() && timestamps.hasMoreTokens()){\n\t\t\tZonSecciData zonSecci = new ZonSecciData();\n\t\t\tzonSecci.setId(new Integer(claves.nextToken()));\n\t\t\t//zonSecci.jdoSetTimeStamp(Long.parseLong(timestamps.nextToken()));\n\t\t\tentities.addElement(zonSecci);\n\t\t}\n\t\t\n\t\t//Construimos el DTO para realizar la llamada\n\t\tVector datos = new Vector();\n\t\tMareDTO dto = new MareDTO();\n\t\tdto.addProperty(\"entities\", entities);\n\t\tdatos.add(dto);\n\t\tdatos.add(new MareBusinessID(BUSINESSID_REMOVE));\n\t\t\n\t\t\n\t\t\n\t\t//Invocamos la lógica de negocio\n\t\ttraza(\"MMG:: Iniciada ejecución Remove de entidad ZonSecci\");\n\t\tDruidaConector conectorCreate = conectar(CONECTOR_REMOVE, datos);\n\t\ttraza(\"MMG:: Finalizada ejecución Remove de entidad ZonSecci\");\n\t\t\n\t\t\n\n\t\t//metemos en la sesión las query para realizar la requery\n\t\tconectorParametroSesion(SESSION_ATTRIBUTE_LAST_QUERY, conectorParametro(VAR_LAST_QUERY_TO_SESSION));\n\t\t\n\t\t//Redirigimos a la LP de StartUp con la acción de StartUp y requery\n\t\tconectorAction(\"ZonSecciLPStartUp\");\n\t\tconectorActionParametro(PARAMETRO_GENERICO_ORIGEN, \"menu\");\n\t\tconectorActionParametro(PARAMETRO_GENERICO_ACCION, ACCION_REMOVE);\n\t\tconectorActionParametro(VAR_PERFORM_REQUERY, \"true\");\n\t}", "public void vaciarCarrito() {\r\n String sentSQL = \"DELETE from carrito\";\r\n try {\r\n Statement st = conexion.createStatement();\r\n st.executeUpdate(sentSQL);\r\n st.close();\r\n LOG.log(Level.INFO,\"Carrito vaciado\");\r\n } catch (SQLException e) {\r\n // TODO Auto-generated catch block\r\n \tLOG.log(Level.WARNING,e.getMessage());\r\n e.printStackTrace();\r\n }\r\n }", "@Override\n\tpublic MensajeBean elimina(Tramite_informesem nuevo) {\n\t\treturn tramite_informesemDao.elimina(nuevo);\n\t}", "public void eliminarDatos(EstructuraContratosDatDTO estructuraNominaSelect) {\n\t\t\n\t}", "@Override\n\tpublic void eliminar(Object T) {\n\t\tSeccion seccionE= (Seccion)T;\n\t\tif(seccionE!=null){\n\t\t\ttry{\n\t\t\tString insertTableSQL = \"update seccion set estatus=?\" +\"where codigo=? and estatus='A'\";\n\t\t\tPreparedStatement preparedStatement = conexion.prepareStatement(insertTableSQL);\n\t\t\tpreparedStatement.setString(1, \"I\");\n\t\t\tpreparedStatement.setString(2, seccionE.getCodigo());\n\t\t\tpreparedStatement.executeUpdate();\n\t\t}catch(SQLException e){\n\t\t\te.printStackTrace();\n\t\t\tSystem.out.println(\"No se elimino el registro\");\n\t\t}\n\t\tSystem.out.println(\"Eliminacion exitosa\");\n\t}\n\n\t}", "public void elimina(Long id) {\n\n final EntityManager em = getEntityManager();\n\n try {\n\n final EntityTransaction tx = em.getTransaction();\n\n tx.begin();\n\n // Busca un conocido usando su llave primaria.\n\n final Conocido modelo = em.find(Conocido.class, id);\n\n if (modelo != null) {\n\n /* Si la referencia no es nula, significa que el modelo se encontró la\n\n * referencia no es nula y se elimina. */\n\n em.remove(modelo);\n\n }\n\n tx.commit();\n\n } finally {\n\n em.close();\n\n }\n\n }", "public boolean removeInformation(String type,String removeKey){\n System.out.println(\"start remove\");\n if(type == null || removeKey == null)\n return false;\n Connection con = GetDBConnection.connectDB(\"booklibrarymanager\",\"root\",\"HanDong85\");\n userId = removeKey;\n String[][] res = queryUser();\n if(res == null)\n return false;\n String sql = \"delete from \" + type + \"information where \" + type +\"Id = ?;\";\n PreparedStatement preSQL;\n try{\n preSQL = con.prepareStatement(sql);\n preSQL.setString(1,removeKey);\n //System.out.println(\"delete from \" + type + \"information where \" + type + \"Id = \" + removeKey);\n int ok = preSQL.executeUpdate();\n GetDBConnection.closeCon(con);\n if(ok == 1)\n return true;\n return false;\n }\n catch (SQLException e){\n GetDBConnection.closeCon(con);\n return false;\n }\n }", "public boolean eliminarRegistro(int codigoCiclo, int codigoPlan, int codigoMeta) {\n/* */ try {\n/* 484 */ String s = \"delete from cal_plan_metas\";\n/* 485 */ s = s + \" where codigo_ciclo=\" + codigoCiclo;\n/* 486 */ s = s + \" and codigo_plan=\" + codigoPlan;\n/* 487 */ s = s + \" codigo_meta=\" + codigoMeta;\n/* 488 */ return this.dat.executeUpdate(s);\n/* */ \n/* */ }\n/* 491 */ catch (Exception e) {\n/* 492 */ e.printStackTrace();\n/* 493 */ Utilidades.writeError(\"CalPlanMetasFactory:eliminarRegistro\", e);\n/* */ \n/* 495 */ return false;\n/* */ } \n/* */ }", "@Override\r\n public void eliminar(final Empleat entitat) throws UtilitatPersistenciaException {\r\n JdbcPreparedDao jdbcDao = new JdbcPreparedDao() {\r\n\r\n @Override\r\n public void setParameter(PreparedStatement pstm) throws SQLException {\r\n int field=0;\r\n pstm.setInt(++field, entitat.getCodi());\r\n }\r\n\r\n @Override\r\n public String getStatement() {\r\n return \"delete from Empleat where codi = ?\";\r\n }\r\n };\r\n UtilitatJdbcPlus.executar(con, jdbcDao);\r\n }", "@Override\r\n\tpublic void eliminar() {\n\t\tLOG.info(\"Eliminar los datos del equipo\");\r\n\t}", "@Override\n\tpublic boolean eliminarPorId(Integer llave) {\n\t\treturn false;\n\t}", "public boolean eliminarLoteria(int codigo) {\n\n String instruccion = \"delete from loteria where codigo =\" + codigo;\n boolean val = false;\n PreparedStatement pre;\n Connection con = null;\n try {\n con = Recurso.Conexion.getPool().getDataSource().getConnection();\n pre = con.prepareStatement(instruccion);\n pre.execute();\n val = true;\n } catch (SQLException ex) {\n ex.printStackTrace();\n\n } finally {\n if (con != null) {\n try {\n con.close();\n } catch (SQLException ex) {\n Logger.getLogger(GestorLoteria.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n return val;\n }\n\n }", "void eliminar(PK id);", "public void eliminaBD() {\r\n CBD.openConexion();\r\n //------Reune los datos de producto con id--------------//\r\n String A = CBD.getInveID(II.lblid.getText());\r\n String B[] = A.split(\",\");\r\n //------Reune los datos de producto con id--------------//\r\n //------Verifica si la cantidad es 0--------------//\r\n if (Integer.parseInt(B[5]) == 0) {\r\n //------Elimina--------------//\r\n if(CBD.deleteDBProd(\"[ID PRODUCTO]\", B[7])){\r\n JOptionPane.showMessageDialog(II, \"Producto eliminado\");\r\n }else{\r\n JOptionPane.showMessageDialog(II, \"Error producto no pudo ser eliminado\");\r\n }\r\n //------Elimina--------------//\r\n } else {\r\n JOptionPane.showMessageDialog(II, \"No puedes eliminar un producto si su existencia es mayor a 0\");\r\n }\r\n CBD.closeConexion();\r\n }", "public void eliminar(DetalleArmado detallearmado);", "public void eliminarUsuario(Long idUsuario);", "public String eliminar()\r\n/* 88: */ {\r\n/* 89: */ try\r\n/* 90: */ {\r\n/* 91:101 */ this.servicioMotivoLlamadoAtencion.eliminar(this.motivoLlamadoAtencion);\r\n/* 92:102 */ addInfoMessage(getLanguageController().getMensaje(\"msg_info_eliminar\"));\r\n/* 93: */ }\r\n/* 94: */ catch (Exception e)\r\n/* 95: */ {\r\n/* 96:104 */ addErrorMessage(getLanguageController().getMensaje(\"msg_error_eliminar\"));\r\n/* 97:105 */ LOG.error(\"ERROR AL ELIMINAR DATOS\", e);\r\n/* 98: */ }\r\n/* 99:107 */ return \"\";\r\n/* 100: */ }", "public void eliminaEdificio() {\n this.edificio = null;\n // Fijo el tipo después de eliminar el personaje\n this.setTipo();\n }", "public void eliminar(){\n inicio = null;\r\n // Reinicia el contador de tamaño de la lista a 0.\r\n tamanio = 0;\r\n }", "public void eliminarPaciente(String codigo)\n {\n try\n {\n int rows_update=0;\n PreparedStatement pstm=con.conexion.prepareStatement(\"DELETE paciente.* FROM paciente WHERE IdPaciente='\"+codigo+\"'\");\n rows_update=pstm.executeUpdate();\n \n if (rows_update==1)\n {\n JOptionPane.showMessageDialog(null,\"Registro eliminado exitosamente\");\n }\n else\n {\n JOptionPane.showMessageDialog(null,\"No se pudo eliminar el registro, verifique datos\");\n con.desconectar();\n }\n }\n catch (SQLException e)\n {\n JOptionPane.showMessageDialog(null,\"Error \"+e.getMessage()); \n }\n }", "@Override\n public void eliminarElemento(Object elemento) {\n database.delete(elemento);\n }", "@Override\r\n\tpublic void eliminar() {\n\t\ttab_cuenta.eliminar();\r\n\t}", "@Override\n public void deletar(Object pacienteParametro) {\n Paciente paciente;\n paciente = (Paciente) pacienteParametro;\n EntityManagerFactory factory = Persistence.createEntityManagerFactory(\"vesaliusPU\"); \n EntityManager em = factory.createEntityManager();\n em.getTransaction().begin();\n em.remove(em.merge(paciente));\n em.getTransaction().commit();\n em.close();\n factory.close();\n }", "@Override\r\n\tpublic MensajeBean elimina(Tramite_presentan_info_impacto nuevo) {\n\t\treturn tramite.elimina(nuevo);\r\n\t}", "private void clearData() {\n em.createQuery(\"delete from ViajeroEntity\").executeUpdate();\n }", "void eliminar(Long id);", "public void eliminar(AplicacionOferta aplicacionOferta){\n try{\n aplicacionOfertaDao.remove(aplicacionOferta);\n }catch(Exception e){\n Logger.getLogger(AplicacionOfertaServicio.class.getName()).log(Level.SEVERE, null, e);\n }\n }", "@Override\r\n\tpublic void remover(Tipo tipo) {\n String sql = \"delete from tipos_servicos where id = ?\";\r\n try {\r\n stmt = conn.prepareStatement(sql);\r\n stmt.setInt(1, tipo.getId());\r\n \r\n stmt.execute();\r\n } catch (SQLException ex) {\r\n ex.printStackTrace();\r\n }\r\n\t}", "@Override\r\n public void elminarVehiculo(String placa) {\n Connection conn = null;\r\n try{\r\n conn = Conexion.getConnection();\r\n String sql = \"delete from vehiculo where veh_placa=?\";\r\n PreparedStatement statement = conn.prepareStatement(sql);\r\n statement.setString(1, placa);\r\n int rowsDelete = statement.executeUpdate();\r\n if(rowsDelete > 0){\r\n JOptionPane.showMessageDialog(null, \"Registro eliminado de manera correcta\");\r\n }\r\n } catch (SQLException ex) {\r\n Logger.getLogger(VehiculoDAOJDBCImpl.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }", "public int eliminardelInicio(){\n int elemento = inicio.dato;\n if(inicio == fin){\n inicio=fin=null;\n }else{\n inicio = inicio.sig;\n inicio.ant = null;\n }\n return elemento;\n \n \n }", "public boolean eliminarClave(String id) {\n\t\tConnection conexion;\n\t\ttry {\n\t\t\tconexion = DriverManager.getConnection(\"jdbc:mysql://localhost/keyring\", \"root\" ,\"\");\n\t\t\tStatement sql = conexion.createStatement();\n\t\t\tint resultado = sql.executeUpdate(\"DELETE FROM entrada WHERE Id=\"+id);\n\n\t\t\tif (resultado > 0) {\n\t\t\t\treturn true;\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 false;\n\t}", "@Override\n public Pacote remove(Object key) {\n Pacote pt = this.get(key);\n try {\n conn = Connect.connect();\n \n PreparedStatement stm = conn.prepareStatement(\"UPDATE Pacote SET visivel=FALSE WHERE nomePacote=?;\");\n \n stm.setString(1, (String)key); //parse da key para a querie\n stm.executeUpdate();\n \n } catch (SQLException | ClassNotFoundException e) {\n throw new NullPointerException(e.getMessage());\n } finally {\n Connect.close(conn);\n }\n return pt;\n }", "public void anularPer(String cedula){\r\n String sql = \"UPDATE \\\"HIP_PERSONAS\\\" SET \\\"PER_ESTADO\\\" = 'I' WHERE \\\"PER_CEDULA\\\" = '\" + cedula + \"'\";\r\n System.out.println(\"Persona Eliminada eliminada \" + sql);\r\n db.conectar();\r\n try {\r\n\r\n Statement sta = db.getConexionBD().createStatement();\r\n sta.execute(sql);\r\n db.desconectar();\r\n\r\n } catch (SQLException error) {\r\n\r\n error.printStackTrace();\r\n\r\n }\r\n }", "public static int delete(Periode p){ \n int status=0; \n try{ \n //membuka koneksi\n Connection con=Koneksi.openConnection(); \n //melakukan query database untuk menghapus data berdasarkan id atau primary key\n PreparedStatement ps=con.prepareStatement(\"delete from periode where id=?\"); \n ps.setInt(1,p.getId()); \n status=ps.executeUpdate(); \n }catch(Exception e){System.out.println(e);} \n\n return status; \n }", "public int Delbroker(Long broker_id, String firstname, String lastname,\r\n\t\tString address, String gender, String eMail, Long phone,\r\n\t\tString experience) throws SQLException {\n\tint i=DbConnect.getStatement().executeUpdate(\"delete from broker where broker_id=\"+broker_id+\"\");\r\n\treturn i;\r\n}", "@Override\n\tpublic void delete(Unidade obj) {\n\n\t}", "public void eliminar(){\n SQLiteDatabase db = conn.getWritableDatabase();\n String[] parametros = {cajaId.getText().toString()};\n db.delete(\"personal\", \"id = ?\", parametros);\n Toast.makeText(getApplicationContext(), \"Se eliminó el personal\", Toast.LENGTH_SHORT).show();\n db.close();\n }", "public static void eliminarEstudiante(String Nro_de_ID) {\r\n try {\r\n Class.forName(\"com.mysql.jdbc.Driver\");\r\n Connection conexion = DriverManager.getConnection(\"jdbc:mysql://localhost/registrolaboratorios\", \"root\", \"admin\");\r\n System.out.print(\"Conexion Establecida\");\r\n Statement sentencia = conexion.createStatement();\r\n int insert = sentencia.executeUpdate(\"delete from estudiante where Nro_de_ID = '\" + Nro_de_ID + \"'\");\r\n\r\n sentencia.close();\r\n conexion.close();\r\n } catch (Exception ex) {\r\n System.out.print(\"Error en la conexion\" + ex);\r\n }\r\n }", "public int eliminardelFinal(){\n int elemento = fin.dato;\n if(inicio == fin){\n inicio=fin=null;\n }else{\n fin = fin.ant;\n fin.sig = null;\n }\n return elemento;\n \n \n }", "public void elimina(DTOAcreditacionGafetes acreGafete) throws Exception;", "@Override\n\tpublic void RemoverCarrinho(EntidadeDominio entidade) throws SQLException {\n\t\t\n\t}", "public boolean remover(Veterinario obj) throws ClassNotFoundException, SQLException{\n VeterinarioDAO dao = new VeterinarioDAO();\n return dao.remover(obj);\n }", "public void eliminar() throws SQLException {\r\n\t\tConexion conexion = new Conexion();\r\n\t\tConnection cn = conexion.conectar();\r\n\t\tStatement stm = cn.createStatement();\r\n\t\t//Delete en users del usuariop con el que iniciaste sesion para borrar el usuario\r\n\t\tString query=\"delete from users where USR=\"+InicioUsuario.correo;\r\n\t\tstm.executeUpdate(query);\r\n\t\t\r\n\t}", "public void eliminar(Provincia provincia) throws BusinessErrorHelper;", "public synchronized static void borrarProduccion(String usuario){\n if(!produccion.isEmpty())\n for(Construcciones construccion : produccion){\n if(construccion.usuario.equalsIgnoreCase(usuario))\n produccion.remove(construccion);\n }\n}", "@Override\n\tpublic void remover(Parcela entidade) {\n\n\t}", "@Override\n\tpublic void delete() {\n\t\tSystem.out.println(\"Mysql DB 서버에 접속해서 삭제를 하다.\");\n\t}", "public void eliminar(Long id) throws AppException;", "@Override\r\n public void removeAll() {\r\n EntityManager em = PersistenceUtil.getEntityManager();\r\n em.getTransaction().begin();\r\n Query query = em.createQuery(\"DELETE FROM Assunto \");\r\n query.executeUpdate();\r\n em.getTransaction().commit();\r\n }", "public void eliminarMateria() {\n ejbFacade.remove(materia);\n items = ejbFacade.findAll();\n RequestContext requestContext = RequestContext.getCurrentInstance();\n requestContext.update(\"MateriaListForm:datalist\");\n requestContext.execute(\"PF('Confirmacion').hide()\");\n departamento = new Departamento();\n materia = new Materia();\n FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_INFO, \"Información\", \"La materia se eliminó con éxito\");\n FacesContext.getCurrentInstance().addMessage(null, msg);\n\n requestContext.update(\"msg\");//Actualiza la etiqueta growl para que el mensaje pueda ser mostrado\n requestContext.update(\"MateriaListForm\");\n }", "public Integer DeletarTodos(){\n\n //REMOVENDO OS REGISTROS CADASTRADOS\n return databaseUtil.GetConexaoDataBase().delete(\"tb_log\",\"log_ID = log_ID\",null);\n\n }", "@Override\n public void removeFromDb() {\n }", "void eliminarPedidosUsuario(String idUsuario);", "public void eliminarIntemediaPersonaMovilidad(Movilidad mov){\n try{\n String query = \"DELETE FROM PERSONA_MOVILIDAD WHERE ID_MOVILIDAD = \"+ mov.getIdMovilidad();\n Query q = getSessionFactory().getCurrentSession().createSQLQuery(query);\n q.executeUpdate();\n }catch(Exception e){\n e.printStackTrace();\n }\n \n }", "public void eliminarValor(String tabla, String columnaID, String datoABorrar){\n try {\n Statement stmt = Conexion.getInstancia().createStatement();\n stmt.executeUpdate(\"DELETE From \"+tabla+\" Where \"+columnaID+\" = \"+datoABorrar+\";\");\n }\n catch (Exception ex){\n ex.printStackTrace();\n }\n }", "private void eliminar(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n Connection con = null;//Objeto para la conexion\r\n Statement sentencia = null;//Objeto para definir y ejecutar las consultas sql\r\n int resultado = 0;//resultado de las filas borradas sql\r\n String sql = \"\";\r\n try {\r\n\r\n //ESTABLECER CONEXION\r\n con = conBD.getCConexion();\r\n System.out.println(\"Conectado a BD...\");\r\n\r\n //OBTENER EL DATO A ELIMINAR\r\n String emailUsuario = request.getParameter(\"ID\");\r\n\r\n //Definición de Sentencia SQL\r\n sql = \"DELETE FROM USUARIOS WHERE semail='\" + emailUsuario + \"'\";\r\n\r\n //Ejecutar sentencia\r\n sentencia = con.createStatement();\r\n resultado = sentencia.executeUpdate(sql);\r\n System.out.println(\"Borrado exitoso !\");\r\n request.setAttribute(\"mensaje\", \"Registro borrado exitosamente !\");\r\n //cerrar la conexion\r\n //con.close();\r\n\r\n //listar de nuevo los datos\r\n todos(request, response);\r\n\r\n } catch (SQLException ex) {\r\n System.out.println(\"No se ha podido establecer la conexión, o el SQL esta mal formado \" + sql);\r\n request.getRequestDispatcher(\"/Error.jsp\").forward(request, response);\r\n }\r\n }", "@Override\r\n\t\t\tpublic void eliminar() {\n\r\n\t\t\t}", "public void removeMotorista() {\n\t\tConector con = new Conector();\r\n\t\tString params[] = new String[2];\r\n\r\n\t\tparams[0] = \"op=8\";\r\n\t\tparams[1] = \"email=\" + usuario;\r\n\r\n\t\tcon.sendHTTP(params);\r\n\t}", "public void eliminarLote(Lote lote) {\n //Utilizamos el TRY por si hay algun problema\n try {\n //Insertamos dentro de la BD el UPDATE\n jpaLote.edit(lote);\n } catch (Exception ex) {\n java.util.logging.Logger.getLogger(LoteControladoraPersistencia.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n }\n }", "@Override\n\tpublic void clearDBDomande() {\n\t\tDB db = getDB();\n\t\tMap<Long, Domanda> domande = db.getTreeMap(\"domande\");\n\t\tdomande.clear();\n\t\tdb.commit();\n\t}", "private void btnDeleteActionPerformed(java.awt.event.ActionEvent evt) {\n String delete = TabelSiswa.getValueAt(baris, 1).toString();\n try{\n Statement stmt = koneksi.createStatement();\n String query = \"DELETE FROM pasien WHERE nis = '\" + delete + \"'\";\n int berhasil = stmt.executeUpdate(query);\n if(berhasil == 1){\n JOptionPane.showMessageDialog(null, \"Data berhasil dihapus\");\n dtm.getDataVector().removeAllElements();\n showData();\n showStok();\n }else{\n JOptionPane.showMessageDialog(null, \"Data gagal dihapus\");\n }\n }catch(SQLException ex){\n ex.printStackTrace();\n JOptionPane.showMessageDialog(null, \"Terjadi kesalahan\", \"ERROR\", JOptionPane.ERROR_MESSAGE);\n }\n }", "public void deleteBeneficioDeuda(Map parametros);", "@Override\n\tpublic void remover(int idServico) throws SQLException {\n\t\t\n\t}", "@Override\n\tpublic void eliminar(Seccion seccion) {\n\t\tentity.getTransaction().begin();\n\t\tentity.remove(seccion);\n\t\tentity.getTransaction().commit();\n\t}", "@Override\n public void eliminarPropiedad(String pIdPropiedad) {\n try {\n bdPropiedad.manipulationQuery(\"DELETE FROM PROPIEDAD WHERE ID_PROPIEDAD = '\" + pIdPropiedad + \"'\");\n } catch (SQLException ex) {\n Logger.getLogger(Propiedad.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public void eliminar() throws RollbackException, SystemException, HeuristicRollbackException, HeuristicMixedException {\n Session session = HibernateUtil.getSessionFactory().openSession();\n Transaction tx = null;\n String id = FacesUtil.getRequestParameter(\"idObj\");\n Tblobjeto o = (Tblobjeto) session.load(Tblobjeto.class, Short.parseShort(id));\n try {\n tx = (Transaction) session.beginTransaction();\n session.delete(o);\n tx.commit();\n FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, \"Informacion:\", \"Registro eliminado satisfactoriamente\"));\n } catch (HibernateException e) {\n tx.rollback();\n\n FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR, \"Un error ha ocurrido:\", e.getCause().getMessage()));\n } finally {\n session.close();\n populateTreeTable();\n UsuarioBean u = (UsuarioBean) FacesUtil.getBean(\"usuarioBean\");\n u.populateSubMenu();\n }\n }", "private void clearData() {\r\n em.createQuery(\"delete from MonitoriaEntity\").executeUpdate();\r\n }", "public CensoCCVnoREMExcluidos() {\n this.nombre = \"\";\n this.apellidom = \"\";\n this.apellidop = \"\";\n this.rut = \"\";\n this.edad = 0;\n this.razon_exclusion = \"\";\n }", "public void eliminar (String idSalida) {\r\n String query = \"UPDATE actividad SET eliminar = true WHERE id_salida = \\\"\" + idSalida + \"\\\"\";\r\n try {\r\n Statement st = con.createStatement();\r\n st.executeUpdate(query);\r\n st.close();\r\n JOptionPane.showMessageDialog(null, \"Actividad eliminada\", \"Operación exitosa\", JOptionPane.INFORMATION_MESSAGE);\r\n } catch (SQLException ex) {\r\n Logger.getLogger(PActividad.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }", "public String eliminar()\r\n/* 121: */ {\r\n/* 122: */ try\r\n/* 123: */ {\r\n/* 124:149 */ this.servicioDimensionContable.eliminar(this.dimensionContable);\r\n/* 125:150 */ addInfoMessage(getLanguageController().getMensaje(\"msg_info_eliminar\"));\r\n/* 126:151 */ cargarDatos();\r\n/* 127: */ }\r\n/* 128: */ catch (Exception e)\r\n/* 129: */ {\r\n/* 130:153 */ addErrorMessage(getLanguageController().getMensaje(\"msg_error_eliminar\"));\r\n/* 131:154 */ LOG.error(\"ERROR AL ELIMINAR DATOS\", e);\r\n/* 132: */ }\r\n/* 133:156 */ return \"\";\r\n/* 134: */ }", "@Override\n public void excluir(Pessoa pessoa) {\n String sql = \"DELETE FROM pessoa WHERE uuid=?\";\n try {\n this.conexao = Conexao.abrirConexao();\n PreparedStatement statement = conexao.prepareStatement(sql);\n statement.setLong(1, pessoa.getId());\n statement.executeUpdate();\n } catch (SQLException ex) {\n Logger.getLogger(PessoasJDBC.class.getName()).log(Level.SEVERE, null, ex);\n } finally {\n Conexao.fecharConexao(conexao);\n }\n\n }", "@Override\n public boolean eliminar(ModelCliente cliente) {\n strSql = \"DELETE CLIENTE WHERE ID_CLIENTE = \" + cliente.getIdCliente();\n \n \n try {\n //se abre una conexión hacia la BD\n conexion.open();\n //Se ejecuta la instrucción y retorna si la ejecución fue satisfactoria\n respuesta = conexion.executeSql(strSql);\n //Se cierra la conexión hacia la BD\n conexion.close();\n \n } catch (ClassNotFoundException ex) {\n Logger.getLogger(DaoCliente.class.getName()).log(Level.SEVERE, null, ex); \n return false;\n } catch(Exception ex){\n Logger.getLogger(DaoCliente.class.getName()).log(Level.SEVERE, null, ex); \n }\n return respuesta;\n }", "private void excluir(String text) { \n try{\n //Variaveis de sessao\n Session s = HibernateUtil.getSessionFactory().openSession();\n s.beginTransaction();\n //sql \n Query q = s.createSQLQuery(\"delete from estacionamento where placa = \"+text);\n //execulta e grava\n q.executeUpdate();\n s.getTransaction().commit();\n \n //exeção //nao conectou // erro\n }catch(HibernateException e){\n JOptionPane.showConfirmDialog(null, \"erro :\"+e );\n }\n \n \n \n \n }", "@Transactional\n void remove(DataRistorante risto);", "public void borrarZonaObjetivoAtaque() {\n\t\t\n\t}", "public abstract void borrarEstadosPropuestas();", "private void remover() {\n int confirma = JOptionPane.showConfirmDialog(null, \"Tem certeza que deseja remover este cliente\", \"Atenção\", JOptionPane.YES_NO_OPTION);\n if (confirma == JOptionPane.YES_OPTION) {\n String sql = \"delete from empresa where id=?\";\n try {\n pst = conexao.prepareStatement(sql);\n pst.setString(1, txtEmpId.getText());\n int apagado = pst.executeUpdate();\n if (apagado > 0) {\n JOptionPane.showMessageDialog(null, \"Empresa removida com sucesso!\");\n txtEmpId.setText(null);\n txtEmpNome.setText(null);\n txtEmpTel.setText(null);\n txtEmpEmail.setText(null);\n txtEmpCNPJ.setText(null);\n }\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, e);\n }\n }\n }", "@Override\n\tpublic void eliminar() {\n\t\t\n\t}", "public void eliminarDatosEnEntidad(String entidad, ArrayList entidadencontrada)\r\n\t{\r\n\t\tif(entidad.equalsIgnoreCase(\"Rol\"))\r\n\t\t{\r\n\t\t\tRol encontrado = (Rol)entidadencontrada.get(0);\r\n\t\t\tint respuesta = JOptionPane.showConfirmDialog(this,\"Los datos seleccionados seran eliminados de forma permanente\"+\"\\n\"+\" ¿Desea eliminarlos definitivamente?\",\"Confirmacion para eliminar\",JOptionPane.YES_NO_OPTION,JOptionPane.INFORMATION_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/informacion.PNG\"));\r\n\t if (respuesta == JOptionPane.YES_OPTION){\r\n\t \ttry\r\n\t\t {\r\n\t\t Conector conector = new Conector();\r\n\t\t conector.iniciarConexionBaseDatos();\r\n\t\t RolBD.eliminar(encontrado.getIdrol(), conector);\r\n\t\t conector.terminarConexionBaseDatos();\r\n\t\t JOptionPane.showMessageDialog(this,\"Los datos seleccionados han sido eliminados.\",\"Elininar Datos\",JOptionPane.INFORMATION_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/informacion.PNG\"));\r\n\t\t }\r\n\t\t catch (Exception e)\r\n\t\t\t\t{\r\n\t\t \tJOptionPane.showMessageDialog(this,\"Error al conectar con la Base de Datos.\",\"Error\", JOptionPane.ERROR_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/error.PNG\"));\r\n\t\t\t\t}\r\n\t }\r\n\t\t}\r\n\t\tif(entidad.equalsIgnoreCase(\"Prueba\"))\r\n\t\t{\r\n\t\t\tPrueba encontrado = (Prueba)entidadencontrada.get(0);\r\n\t\t\tint respuesta = JOptionPane.showConfirmDialog(this,\"Los datos seleccionados seran eliminados de forma permanente\"+\"\\n\"+\" ¿Desea eliminarlos definitivamente?\",\"Confirmacion para eliminar\",JOptionPane.YES_NO_OPTION,JOptionPane.INFORMATION_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/informacion.PNG\"));\r\n\t if (respuesta == JOptionPane.YES_OPTION){\r\n\t \tString nombrepru = encontrado.getNombre();\r\n\t \tif(nombrepru.equalsIgnoreCase(\"Vacante Exclusivo\") || nombrepru.equalsIgnoreCase(\"Vacante Multiple\") || nombrepru.equalsIgnoreCase(\"Prueba Libre\"))\r\n\t \t{\r\n\t \t\tJOptionPane.showMessageDialog(this,\"La prueba \"+nombrepru+\" no puede ser eliminada por ser parte importante de la base del conocimiento.\",\"Elininar Datos\",JOptionPane.INFORMATION_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/informacion.PNG\"));\r\n\t \t}\r\n\t \telse\r\n\t \t{\r\n\t \t\ttry\r\n\t\t\t {\r\n\t\t\t Conector conector = new Conector();\r\n\t\t\t conector.iniciarConexionBaseDatos();\r\n\t\t\t PruebaBD.eliminar(encontrado.getIdprueba(), conector);\r\n\t\t\t conector.terminarConexionBaseDatos();\r\n\t\t\t JOptionPane.showMessageDialog(this,\"Los datos seleccionados han sido eliminados.\",\"Elininar Datos\",JOptionPane.INFORMATION_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/informacion.PNG\"));\r\n\t\t\t }\r\n\t\t\t catch (Exception e)\r\n\t\t\t\t\t{\r\n\t\t\t \tJOptionPane.showMessageDialog(this,\"Error al conectar con la Base de Datos.\",\"Error\", JOptionPane.ERROR_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/error.PNG\"));\r\n\t\t\t\t\t}\r\n\t \t}\r\n\t }\r\n\t\t}\r\n\t\tif(entidad.equalsIgnoreCase(\"Pregunta\"))\r\n\t\t{\r\n\t\t\tPregunta encontrado = (Pregunta)entidadencontrada.get(0);\r\n\t\t\tint respuesta = JOptionPane.showConfirmDialog(this,\"Los datos seleccionados seran eliminados de forma permanente\"+\"\\n\"+\" ¿Desea eliminarlos definitivamente?\",\"Confirmacion para eliminar\",JOptionPane.YES_NO_OPTION,JOptionPane.INFORMATION_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/informacion.PNG\"));\r\n\t if (respuesta == JOptionPane.YES_OPTION){\r\n\t \ttry\r\n\t\t {\r\n\t\t Conector conector = new Conector();\r\n\t\t conector.iniciarConexionBaseDatos();\r\n\t\t PreguntaBD.eliminar(encontrado.getIdpregunta(), conector);\r\n\t\t conector.terminarConexionBaseDatos();\r\n\t\t JOptionPane.showMessageDialog(this,\"Los datos seleccionados han sido eliminados.\",\"Elininar Datos\",JOptionPane.INFORMATION_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/informacion.PNG\"));\r\n\t\t }\r\n\t\t catch (Exception e)\r\n\t\t\t\t{\r\n\t\t \tJOptionPane.showMessageDialog(this,\"Error al conectar con la Base de Datos.\",\"Error\", JOptionPane.ERROR_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/error.PNG\"));\r\n\t\t\t\t}\r\n\t }\r\n\t\t}\r\n\t\tif(entidad.equalsIgnoreCase(\"Escala\"))\r\n\t\t{\r\n\t\t\tEscala encontrado = (Escala)entidadencontrada.get(0);\r\n\t\t\tint respuesta = JOptionPane.showConfirmDialog(this,\"Los datos seleccionados seran eliminados de forma permanente\"+\"\\n\"+\" ¿Desea eliminarlos definitivamente?\",\"Confirmacion para eliminar\",JOptionPane.YES_NO_OPTION,JOptionPane.INFORMATION_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/informacion.PNG\"));\r\n\t if (respuesta == JOptionPane.YES_OPTION){\r\n\t \ttry\r\n\t\t {\r\n\t\t Conector conector = new Conector();\r\n\t\t conector.iniciarConexionBaseDatos();\r\n\t\t EscalaBD.eliminar(encontrado.getIdescala(), conector);\r\n\t\t conector.terminarConexionBaseDatos();\r\n\t\t JOptionPane.showMessageDialog(this,\"Los datos seleccionados han sido eliminados.\",\"Elininar Datos\",JOptionPane.INFORMATION_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/informacion.PNG\"));\r\n\t\t }\r\n\t\t catch (Exception e)\r\n\t\t\t\t{\r\n\t\t \tJOptionPane.showMessageDialog(this,\"Error al conectar con la Base de Datos.\",\"Error\", JOptionPane.ERROR_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/error.PNG\"));\r\n\t\t\t\t}\r\n\t }\r\n\t\t}\r\n\t\tif(entidad.equalsIgnoreCase(\"Competencia\"))\r\n\t\t{\r\n\t\t\tCompetencia encontrado = (Competencia)entidadencontrada.get(0);\r\n\t\t\tint respuesta = JOptionPane.showConfirmDialog(this,\"Los datos seleccionados seran eliminados de forma permanente\"+\"\\n\"+\" ¿Desea eliminarlos definitivamente?\",\"Confirmacion para eliminar\",JOptionPane.YES_NO_OPTION,JOptionPane.INFORMATION_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/informacion.PNG\"));\r\n\t if (respuesta == JOptionPane.YES_OPTION){\r\n\t \ttry\r\n\t\t {\r\n\t\t Conector conector = new Conector();\r\n\t\t conector.iniciarConexionBaseDatos();\r\n\t\t CompetenciaBD.eliminar(encontrado.getIdcompetencia(), conector);\r\n\t\t conector.terminarConexionBaseDatos();\r\n\t\t JOptionPane.showMessageDialog(this,\"Los datos seleccionados han sido eliminados.\",\"Elininar Datos\",JOptionPane.INFORMATION_MESSAGE,new ImageIcon(\"./images/informacion.PNG\"));\r\n\t\t }\r\n\t\t catch (Exception e)\r\n\t\t\t\t{\r\n\t\t \tJOptionPane.showMessageDialog(this,\"Error al conectar con la Base de Datos.\",\"Error\", JOptionPane.ERROR_MESSAGE,new ImageIcon(\"./images/error.PNG\"));\r\n\t\t\t\t}\r\n\t }\r\n\t\t}\r\n\t\tif(entidad.equalsIgnoreCase(\"Caracteristica\"))\r\n\t\t{\r\n\t\t\tCaracteristica encontrado = (Caracteristica)entidadencontrada.get(0);\r\n\t\t\tint respuesta = JOptionPane.showConfirmDialog(this,\"Los datos seleccionados seran eliminados de forma permanente\"+\"\\n\"+\" ¿Desea eliminarlos definitivamente?\",\"Confirmacion para eliminar\",JOptionPane.YES_NO_OPTION,JOptionPane.INFORMATION_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/informacion.PNG\"));\r\n\t if (respuesta == JOptionPane.YES_OPTION){\r\n\t \ttry\r\n\t\t {\r\n\t\t Conector conector = new Conector();\r\n\t\t conector.iniciarConexionBaseDatos();\r\n\t\t CaracteristicaBD.eliminar(encontrado.getIdcaracteristica(), conector);\r\n\t\t conector.terminarConexionBaseDatos();\r\n\t\t JOptionPane.showMessageDialog(this,\"Los datos seleccionados han sido eliminados.\",\"Elininar Datos\",JOptionPane.INFORMATION_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/informacion.PNG\"));\r\n\t\t }\r\n\t\t catch (Exception e)\r\n\t\t\t\t{\r\n\t\t \tJOptionPane.showMessageDialog(this,\"Error al conectar con la Base de Datos.\",\"Error\", JOptionPane.ERROR_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/error.PNG\"));\r\n\t\t\t\t}\r\n\t }\r\n\t\t}\r\n\t}", "public void eliminar(Maquina maquina)\r\n/* 24: */ {\r\n/* 25: 52 */ this.maquinaDao.eliminar(maquina);\r\n/* 26: */ }", "@Override\n\tpublic void eliminar() {\n\n\t}", "@Override\n\tpublic void checkBotonEliminar() {\n\n\t}", "public void EliminarPrestamo(Integer idPrestamo) {\n this.conexion.ConectarBD();\n String consulta = \"delete from prestamos where IdPrestamo = ?\";\n try {\n this.pstm = this.conexion.getConexion().prepareStatement(consulta);\n //Indicamos los parametros del delete\n this.pstm.setInt(1, idPrestamo);\n //Ejecutamos la consulta\n int res = pstm.executeUpdate();\n } catch (SQLException e) { \n throw new MisException(\"Error al eliminar un Prestamo.\\n\"+e.toString());\n //System.out.println(\"Error al eliminar un Libro.\");\n } catch (Exception e) {\n throw new MisException(\"Error.\\n\"+e.toString());\n //e.printStackTrace();\n }\n \n //Desconectamos de la BD\n this.conexion.DesconectarBD();\n }", "public void eliminar(Dia dia) {\n Session session = sessionFactory.openSession();\n //la transaccion a relizar\n Transaction tx = null;\n try {\n tx = session.beginTransaction();\n //eliminamos el Dia\n session.delete(dia);\n \n tx.commit();\n }\n catch (Exception e) {\n //Se regresa a un estado consistente \n if (tx!=null){ \n tx.rollback();\n }\n e.printStackTrace(); \n }\n finally {\n //cerramos siempre la sesion\n session.close();\n }\n }", "public void eliminarPrograma() {\r\n // Abro y obtengo la conexion\r\n this.conection.abrirConexion();\r\n Connection con = this.conection.getConexion();\r\n\r\n // Preparo la consulta\r\n String sql = \"UPDATE programa SET \\n\"\r\n + \"estado = '0'\\n\"\r\n + \"WHERE programa.codigo = ?\";\r\n System.out.println(sql);\r\n\r\n try {\r\n // La ejecuto\r\n PreparedStatement ps = con.prepareStatement(sql);\r\n ps.setInt(1, this.codigo);\r\n int rows = ps.executeUpdate();\r\n System.out.println(rows);\r\n // Cierro la conexion\r\n this.conection.cerrarConexion();\r\n } catch (SQLException ex) {\r\n System.out.println(ex.getMessage());\r\n }\r\n }", "public void removerCarro() {\n\n if (carrosCadastrados.size() > 0) {//verifica se existem carros cadastrados\n listarCarros();\n System.out.println(\"Digite o id do carro que deseja excluir\");\n int idCarro = verifica();\n for (int i = 0; i < carrosCadastrados.size(); i++) {\n if (carrosCadastrados.get(i).getId() == idCarro) {\n if (carrosCadastrados.get(i).getEstado()) {//para verificar se o querto está sendo ocupado\n System.err.println(\"O carrp está sendo utilizado por um hospede nesse momento\");\n } else {\n carrosCadastrados.remove(i);\n System.err.println(\"cadastro removido\");\n }\n }\n\n }\n } else {\n System.err.println(\"Não existem carros cadastrados\");\n }\n }", "public void deletar() {\n\t\tClienteDAO Clientedao = new ClienteDAO();\t\r\n\t\tClientedao.delete(this);\r\n\t\t\r\n\t\tnovoRegistro();\r\n\t\tnotifyObservers();\r\n\t}" ]
[ "0.6688904", "0.66344196", "0.6634264", "0.65652055", "0.6534405", "0.65097386", "0.6482333", "0.6464003", "0.64617985", "0.6454946", "0.64077455", "0.6398838", "0.63747597", "0.6367739", "0.6364108", "0.6351493", "0.632504", "0.6324321", "0.62984633", "0.6283566", "0.6282885", "0.6253007", "0.62424105", "0.6240894", "0.6206567", "0.6175129", "0.61709255", "0.6170038", "0.6157749", "0.61540145", "0.6153513", "0.6152854", "0.61474866", "0.6140823", "0.6137825", "0.6131572", "0.6114405", "0.61130565", "0.6110907", "0.6102499", "0.60966134", "0.609503", "0.6086492", "0.60739183", "0.6073023", "0.6071935", "0.6070987", "0.60701466", "0.6055109", "0.60529494", "0.6042195", "0.60421693", "0.6039641", "0.6029514", "0.60259324", "0.60206807", "0.60173553", "0.6016934", "0.6001617", "0.5996064", "0.59953576", "0.5995178", "0.5987941", "0.5986617", "0.59849286", "0.5981737", "0.5976825", "0.5965625", "0.59620863", "0.5957844", "0.59555256", "0.5951888", "0.5937883", "0.59341294", "0.5933363", "0.59253234", "0.5920327", "0.5912726", "0.5901803", "0.59013397", "0.59007794", "0.5897976", "0.5896882", "0.5896856", "0.5878623", "0.58690166", "0.5867233", "0.5864886", "0.5863669", "0.58565325", "0.58557427", "0.58539706", "0.5853498", "0.58495456", "0.5849122", "0.58477706", "0.5845515", "0.58442456", "0.584335", "0.58423066", "0.58375984" ]
0.0
-1
Query data from MySQL
public String query(String key) { Connection conn = null; PreparedStatement stmt = null; try { conn = cpds.getConnection(); String sql = "SELECT text FROM q2 WHERE `idtag` = '" + key + "'"; stmt = conn.prepareStatement(sql); ResultSet rs = stmt.executeQuery(); String result = null; if (rs.next()) { result = rs.getString("text"); } return result; } catch (SQLException e) { e.printStackTrace(); } finally { if (stmt != null) { try { stmt.close(); } catch (SQLException e) { e.printStackTrace(); } } if (conn != null) { try { conn.close(); } catch (SQLException e) { e.printStackTrace(); } } } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Query query();", "private ResultSet GetData(String query){\n\t\ttry{\n\t\t\tstat = connection.createStatement();\n\t\t\treturn stat.executeQuery(query);\n\t\t}catch (Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t\treturn null;\n\t\t}\n\t}", "public interface MySQLDBQuery {\n\n\tString QUERY_ADD_SLOT = \"insert into slot (s_size) values (?)\";\n\tString QUERY_FIND_SLOT = \"select s_id, s_size, s_covered from slot where s_size = ? and s_covered = ? and s_id not in (select s_id from slot_has_vehicle) limit 1\";\n\tString QUERY_GET_SLOT_STATISTICS = \"select count(1) as all_slot, (select count(1) from slot where s_covered > 0) as reserve_slot from slot\";\n\tString QUERY_GET_FIND_A_SLOT = \"select s_id, s_size, s_covered from slot where s_id = ?\";\n\tString QUERY_FREE_SLOT_RESERVATION = \"update slot_has_vehicle set sl_end = now() where sl_id = ?\";\n\tString QUERY_OCCUPY_A_SLOT = \"insert into slot_has_vehicle (s_id, v_id) values (?,?)\";\n\tString QUERY_GET_SLOT_RESERVATION_BY_ID = \"select sl_id, s_id, v_id, sl_start, sl_end from slot_has_vehicle where sl_id = ?\";\n\tString QUERY_FIND_SLOT_OCCUPIED_BY_VEHICLE = \"select sl_id, s_id, v_id, sl_start, sl_end from slot_has_vehicle where v_id = (select v_id from vehicle where v_reg_num = ?) and sl_end IS NULL\";\n\tString QUERY_GET_VEHICLE_BY_REG_NUMBER = \"select v_id, v_reg_num, v_type from vehicle where v_reg_num=?\";\n\tString QUERY_CREATE_A_VEHICLE = \"insert into vehicle (v_reg_num, v_type) values (?,?)\";\n\tString QUERY_DELETE_SLOT_RESERVATION = \"delete from slot_has_vehicle where sl_id=?\";\n}", "public void query(String sql) throws SQLException {\r\n Statement st = con.createStatement();\r\n ResultSet rs = st.executeQuery(sql);\r\n\r\n while (rs.next()){\r\n System.out.println(rs.getInt(\"id\")+\" \"+rs.getString(\"name\")+\" \"+rs.getString(\"surname\")+\" \"+rs.getFloat(\"grade\"));\r\n }\r\n\r\n }", "public void queryData() throws SolrServerException {\n\t\tfinal SolrQuery query = new SolrQuery(\"*:*\");\r\n\t\tquery.setRows(2000);\r\n\t\t// 5. Executes the query\r\n\t\tfinal QueryResponse response = client.query(query);\r\n\r\n\t\t/*\t\tassertEquals(1, response.getResults().getNumFound());*/\r\n\r\n\t\t// 6. Gets the (output) Data Transfer Object.\r\n\t\t\r\n\t\t\r\n\t\r\n\t\tif (response.getResults().iterator().hasNext())\r\n\t\t{\r\n\t\t\tfinal SolrDocument output = response.getResults().iterator().next();\r\n\t\t\tfinal String from = (String) output.getFieldValue(\"from\");\r\n\t\t\tfinal String to = (String) output.getFieldValue(\"to\");\r\n\t\t\tfinal String body = (String) output.getFieldValue(\"body\");\r\n\t\t\t// 7.1 In case we are running as a Java application print out the query results.\r\n\t\t\tSystem.out.println(\"It works! I found the following book: \");\r\n\t\t\tSystem.out.println(\"--------------------------------------\");\r\n\t\t\tSystem.out.println(\"ID: \" + from);\r\n\t\t\tSystem.out.println(\"Title: \" + to);\r\n\t\t\tSystem.out.println(\"Author: \" + body);\r\n\t\t}\r\n\t\t\r\n\t\tSolrDocumentList list = response.getResults();\r\n\t\tSystem.out.println(\"list size is: \" + list.size());\r\n\r\n\r\n\r\n\t\t/*\t\t// 7. Otherwise asserts the query results using standard JUnit procedures.\r\n\t\tassertEquals(\"1\", id);\r\n\t\tassertEquals(\"Apache SOLR Essentials\", title);\r\n\t\tassertEquals(\"Andrea Gazzarini\", author);\r\n\t\tassertEquals(\"972-2-5A619-12A-X\", isbn);*/\r\n\t}", "public ResultSet consulta(String sql) {\n ResultSet res = null;\n\n try {\n PreparedStatement pstm = this.getConnection().prepareStatement(\"SELECT * FROM Clubs\");\n res = pstm.executeQuery();;\n } catch (SQLException e) {\n System.err.println(e.getMessage());\n }\n return res;\n }", "public abstract Statement queryToRetrieveData();", "static ResultSet dataOphalen(String querry) {\n //declaratie anders kan er niks worden gereturnt\n ResultSet rs = null;\n try {\n Statement stmt = connectieMaken().createStatement(); //\n rs = stmt.executeQuery(querry);\n } catch (SQLException se) {\n se.printStackTrace();\n }\n return rs;\n }", "@Override\r\n public void read() {\r\n Connection conexao = mysql.getConnection();\r\n try {\r\n PreparedStatement stm = conexao.prepareStatement(readSQL);\r\n ResultSet rs = stm.executeQuery();\r\n\r\n while (rs.next()) {\r\n int idcodigo = rs.getInt(\"idcodigo\");\r\n String data = rs.getString(\"data\");\r\n int p_rodada = rs.getInt(\"p_rodada\");\r\n int s_rodada = rs.getInt(\"s_rodada\");\r\n int t_rodada = rs.getInt(\"t_rodada\");\r\n int total = rs.getInt(\"total\");\r\n System.out.println(\"\\nCódigo: \" + idcodigo + \"\\nData: \" + data + \"\\nPrimeira Rodada: \" + p_rodada+ \"\\nSegunda Rodada: \" + s_rodada + \"\\nTerceira Rodada: \" + t_rodada + \"\\nTotal: \" + total);\r\n }\r\n rs.close();\r\n conexao.close();\r\n\r\n } catch (final SQLException ex) {\r\n System.out.println(\"Falha de conexão com a base de dados!\");\r\n ex.printStackTrace();\r\n } catch (final Exception ex) {\r\n ex.printStackTrace();\r\n } finally {\r\n try {\r\n conexao.close();\r\n } catch (final Exception ex) {\r\n ex.printStackTrace();\r\n }\r\n }\r\n }", "void runQueries();", "private static void selectRecordsFromDbUserTable() throws SQLException {\n\n\t\tConnection dbConnection = null;\n\t\tStatement statement = null;\n\n\t\tString selectTableSQL = \"SELECT * from spelers\";\n\n\t\ttry {\n\t\t\tdbConnection = getDBConnection();\n\t\t\tstatement = dbConnection.createStatement();\n\n\t\t\tSystem.out.println(selectTableSQL);\n\n\t\t\t// execute select SQL stetement\n\t\t\tResultSet rs = statement.executeQuery(selectTableSQL);\n\n\t\t\twhile (rs.next()) {\n \n String naam = rs.getString(\"naam\");\n\t\t\t\tint punten = rs.getInt(\"punten\");\n \n System.out.println(\"naam : \" + naam);\n\t\t\t\tSystem.out.println(\"punten : \" + punten);\n\t\t\t\t\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\n\t\t\tSystem.out.println(e.getMessage());\n\n\t\t} finally {\n\n\t\t\tif (statement != null) {\n\t\t\t\tstatement.close();\n\t\t\t}\n\n\t\t\tif (dbConnection != null) {\n\t\t\t\tdbConnection.close();\n\t\t\t}\n\n\t\t}\n\n\t}", "Data<List<Boards>> getSearchBoards(String query);", "@Override\n\tpublic void queryData() {\n\t\t\n\t}", "private String queryDatabase() {\n\t\t\t\n\t\t\tString result = \"\";\t\t\t\t\t\t\t\t\t\t// will hold the json string to be returned\n\t \tInputStream isr = null;\t\t\t\t\t\t\t\t\t// used when converting the response to a string\n\t \t\n\t \ttry{\t// set up the http POST\n\t HttpClient httpclient = new DefaultHttpClient();\n\t HttpPost httppost = new HttpPost(\"http://www.christmasgiftideas.eu/widgetQuery.php\"); //YOUR PHP SCRIPT ADDRESS \n\n\t HttpResponse response = httpclient.execute(httppost);\t\t\t\t\t// execute the request and store response\n\t HttpEntity entity = response.getEntity();\n\t isr = entity.getContent();\n\t }\n\t catch(Exception e){\n\t Log.e(\"log_tag\", \"Error in http connection \"+e.toString());\n\t }\n\t \t\n\t // convert response to string\n\t try{\n\t \tBufferedReader reader = new BufferedReader(new InputStreamReader(isr,\"iso-8859-1\"),8);\n\t \tStringBuilder sb = new StringBuilder();\n\t \tString line = null;\n\t \twhile ((line = reader.readLine()) != null) {\n\t \t\tsb.append(line + \"\\n\");\n\t }\n\t \tisr.close();\n\t result=sb.toString();\n\t \t}\n\t \tcatch(Exception e){\n\t \t\tLog.e(\"log_tag\", \"Error converting result \"+e.toString());\n\t \t}\n\t \n\t \treturn result;\t\t// return the json string\n\t}", "@Override\n\tpublic JSONArray searchData(String queryString)throws Exception { CALL DAO get database data\n\t\t//\n\t\ttry {\n\t\t\tJSONArray result=new JSONArray();\n\t\t\t//return null;\n result=testDB.getDataFromDB(queryString);\n\t\t\t//System.out.print(result.toString());\n\t\t\treturn result;\n\t\t\t//throw new Exception(\"Test Exception\");\n\t\t}catch(Exception e) {\n\t\t\tthrow e;\n\t\t}\n\t}", "public static ArrayList<Object[]> getData(String query){\n ArrayList<Object[]> resultList = new ArrayList<Object[]>();\n ResultSet result;\n ResultSetMetaData rsmd;\n connect();\n try{\n Statement stm = conn.createStatement();\n result = stm.executeQuery(query);\n rsmd = result.getMetaData();\n Object[] obj = new Object[rsmd.getColumnCount()];\n while(result.next()){\n for(int col = 1; col < rsmd.getColumnCount(); col++){\n obj[col-1] = result.getObject(col);\n }\n resultList.add(obj);\n }\n }catch(Exception e) {\n System.out.println(e.getMessage());\n }\n disconnect();\n return resultList;\n }", "String queryInformation(String tableName,String queryname){\n Connection con = GetDBConnection.connectDB(\"booklibrarymanager\",\"root\",\"HanDong85\");\n String tar;\n if(tableName.equals(\"authorinformation\"))\n tar = \"author\";\n else if(tableName.equals(\"classificationinformation\"))\n tar = \"classification\";\n else tar = \"press\";\n String sql = \"select \" + tar + \"Id\" + \" from \" + tableName + \" where \";\n if(tableName.equals(\"authorinformation\"))\n sql += \"authorName = ?;\";\n else if(tableName.equals(\"classificationinformation\"))\n sql += \"classifcationName = ?;\";\n else sql += \"pressName = ?;\";\n System.out.println(sql);\n PreparedStatement preSQL;\n try{\n preSQL = con.prepareStatement(sql);\n preSQL.setString(1,queryname);\n ResultSet rs = preSQL.executeQuery();\n rs.beforeFirst();\n if(rs.next()){\n String ans = rs.getString(1);\n GetDBConnection.closeCon(con);\n return ans;\n }\n else{\n GetDBConnection.closeCon(con);\n return ERROR_TIP;\n }\n }\n catch (SQLException e){\n GetDBConnection.closeCon(con);\n return ERROR_TIP;\n }\n }", "public interface MysqldataQueryDao {\n public List<Map<String, Object>> Querydata(String sql);\n public List<Map<String, Object>> Querymaindata(String sql);\n\n}", "public ResultSet runQuery(String sql){\n\n try {\n\n Statement stmt = conn.createStatement();\n\n return stmt.executeQuery(sql);\n\n } catch (SQLException e) {\n e.printStackTrace(System.out);\n return null;\n }\n\n }", "public void consultaTest() throws Exception{\n\t\t\n\t ResultSet rs = statement.executeQuery(\"select * from statistics\");\n\t \n\t \n\t while(rs.next())\n\t {\n\t\t \n\t\t DateFormat df = new SimpleDateFormat(\"yyyy-MM-dd hh:mm:ss.SSS\");\n\t\t Date date = df.parse(rs.getString(\"timeActual\"));\n\t\t Calendar cal = Calendar.getInstance();\n\t\t cal.setTime(date);\n\t\t \n\t\t String completoDay = cal.get(Calendar.YEAR)+\"-\"+(cal.get(Calendar.MONTH) + 1)+\"-\"+ cal.get(Calendar.DAY_OF_MONTH);\n\t\t \n\t System.out.println(\"id= \" + rs.getInt(\"id\") + \" memory= \" + rs.getInt(\"memory\") + \" cpu= \" \n\t \t+ rs.getInt(\"cpu\") + \" timeActual= \" + completoDay);\n\t }\n\t \n\t if(rs != null)\n\t\t rs.close();\n\t \n\t if(connection != null)\n\t connection.close();\n\t \n\t}", "Query queryOn(Connection connection);", "public static void main(String args[]) throws Exception\n {\n Class.forName(\"com.mysql.jdbc.Driver\");\n Connection con = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/sql\",\"root\",\"\");\n Statement stmt = con.createStatement(); //Default method for ResultSet.TYPE_FORWARD_ONLY\n \n // send a SQL query to retrieve records\n ResultSet res = stmt.executeQuery(\"select *from CM\");\n // process the data\n \n int idIndex = res.findColumn(\"id\");\n int nameIndex = res.findColumn(\"name\");\nint ageIndex = res.findColumn(\"age\");\nint addressIndex = res.findColumn(\"address\");\nint salaryIndex=res.findColumn(\"salary\");\n\nwhile(res.next()) {\n int id =res.getInt(idIndex);\n String name = res.getString (nameIndex);\n int age = res.getInt (ageIndex);\n String address = res.getString (addressIndex);\n String salary =res.getString(salaryIndex);\n \n System.out.println(res.getInt(idIndex) \n + \"\\t\" + res.getString(nameIndex) + \n \"\\t\" +res.getInt(ageIndex) + \n \"\\t\" + res.getString(addressIndex) + \n \"\\t\"+ res.getDouble(salaryIndex));\n}\n // close the database connection\n res.close();\n stmt.close();\n con.close();\n }", "public void query()\n\t{\n\t\tJSONObject queryInfo = new JSONObject();\n\t\t\n\t\ttry\n\t\t{\n\t\t\tqueryInfo.put(\"type\", \"query\");\n\t\t\t\n\t\t\tos.println(queryInfo.toString());\n\t\t\tos.flush();\n\t\t\t\n\t\t\tSystem.out.println(\"send query request : \" + queryInfo.toString());\n\t\t}\n\t\tcatch (JSONException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private String getUserQuery() {\n return \"select UserName,Password, Enabled from users where UserName=?\";\n //return \"select username,password, enabled from users_temp where username=?\";\n }", "public void search() throws SQLException;", "@Test\r\n\tpublic void testSQL() throws Exception {\n\t\ttry {\r\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\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}// Mysql 的驱动\r\n\t\t// 2. 获取数据库的连接\r\n\t\tjava.sql.Connection conn = java.sql.DriverManager\r\n\t\t\t\t.getConnection(\r\n\t\t\t\t\t\t\"jdbc:mysql://223.203.192.248/ccindex?useUnicode=true&characterEncoding=utf8\",\r\n\t\t\t\t\t\t\"dba\", \"dba\");\r\n\r\n\t\tRowLoad<Connection,List<Map<String, Object>>> c = new RowLoadDB();\r\n\t\tc.setColums(\"hostname\",\"business\",\"log_type\");\r\n\t\tc.setSplit(\"select hostname , business , log_type from node_list where demand='ALLBU' \");\r\n\t\tc.setSource(conn);\r\n\t\tc.load();\r\n\t\t\r\n\t\tList<Map<String, Object>> ll = c.getData();\r\n\t\tSystem.out.println(ll.get(1).get(\"hostname\"));\r\n\t\tconn.close();\r\n\t}", "public static ResultSet selectAll(){\n String sql = \"SELECT Codigo, Nombre, PrecioC, PrecioV, Stock FROM articulo\";\n ResultSet rs = null;\n try{\n Connection conn = connect();\n Statement stmt = conn.createStatement();\n rs = stmt.executeQuery(sql);\n }\n catch(SQLException e) {\n System.out.println(\"Error. No se han podido sacar los productos de la base de datos.\");\n //Descomentar la siguiente linea para mostrar el mensaje de error.\n //System.out.println(e.getMessage());\n }\n return rs;\n }", "public ResultSet hacerConsulta(String query) throws SQLException{\n Statement st = conexion.createStatement();//para poder hacer la consulta a la base necesitamos un objeto de la clase Statement \n ResultSet rs = st.executeQuery(query); //el objeto st realiza la consulta y retorna el resultado en un objeto de la clase ResultSet\n return rs; // devolvemos la consulta al main\n }", "ResultSet runSQL(String query) {\n try {\n return connection.prepareStatement(query).executeQuery();\n }\n catch (SQLException e) {\n System.err.println(e.getMessage());\n return null;\n }\n }", "public Object[] read_DB(String query) {\n\n Object[] result = new Object[2];\n java.sql.Connection con = null;\n boolean connected;\n try{\n con = DriverManager.getConnection(db_type + host + port + db_name,\n user + \"\",\n password + \"\");\n connected = true;\n }\n catch(SQLException e){\n connected = false;\n System.out.println(\"Error al conectar en la Base de datos: \" + e);\n result[0] = \"Error\";\n result[1] = \"Connecting BD\";\n close_connection(con);\n }\n\n if(connected){\n ResultSet rs;\n try{\n Statement st = con.createStatement();\n rs = st.executeQuery(query);\n\n Vector<String[]> table = makeTable(rs);\n if((table.size() == 1) && (table.get(0)[0] == \"Error\")) {\n result[0] = \"Error\";\n result[1] = table.get(0)[1];\n }\n else{\n result[0] = \"QueryResult\";\n result[1] = table;\n }\n\n close_connection(con);\n }\n catch(SQLException e){\n System.out.println(\"Error al ejecutar la consulta : \" + e);\n result[0] = \"Error\";\n result[1] = \"Executing Query\";\n close_connection(con);\n }\n }\n return result;\n\n }", "@Override\n\tpublic Object query(String sql) {\n\t\tSystem.out.println(\"HotelDAO.query sql:\" + sql);\n\t\tLinkedList<HotelBean> hotelBeans = new LinkedList<>();\n\t\ttry {\n\t\t\t//建立数据库链接\n\t\t\tConnection c = openDBConnection();\n\t\t\tStatement st = c.createStatement();\n\t\t\tResultSet rs = st.executeQuery(sql);\n\t\t\twhile(rs.next()) {\n\t\t\t\tHotelBean hotelBean = new HotelBean();\n\t\t\t\tResultSetMetaData rsmd = rs.getMetaData();\n\t\t\t\tint columns = rsmd.getColumnCount();\n\t\t\t\tfor(int i = 0; i < columns; i++) {\n\t\t\t\t\tswitch (rsmd.getColumnName(i + 1)) {\n\t\t\t\t\tcase \"hotel_number\":\n\t\t\t\t\t\thotelBean.setHotelNumber(rs.getString(i + 1));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"hotel_name\":\n\t\t\t\t\t\thotelBean.setHotelName(rs.getString(i + 1));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"address\":\n\t\t\t\t\t\thotelBean.setAddress(rs.getString(i + 1));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"location_city\":\n\t\t\t\t\t\thotelBean.setLocationCity(rs.getString(i + 1));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\thotelBeans.add(hotelBean);\n\t\t\t}\n\t\t\trs.close();\n\t\t\tst.close();\n\t\t\t//关闭数据库链接\n\t\t\tcloseDBConnection(c);\n\t\t\treturn hotelBeans;\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tSystem.out.println(\"Error executing sql.\");\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}", "ResultSet getResultSet(String query) {\n try {\n Statement statement = connection.createStatement();\n return statement.executeQuery(query);\n } catch (Exception e) {\n logger.info(\"getResultSet \" + e.getStackTrace().toString());\n return null;\n }\n }", "public void queryTransactionDetail(){\n System.out.println(\"-----find transaction detail by condition-----\");\n System.out.println(\"--press enter to skip the input--\");\n String sql = \"select * from TransactionContains join Merchandise on TransactionContains.ProductID = Merchandise.ProductID where TransactionID=\";\n System.out.print(\"TransactionID: \");\n String unuse=scanner.nextLine();\n String id=scanner.nextLine();\n sql+=id;\n try {\n //System.out.println(sql);\n result = statement.executeQuery(sql);\n int cnt=0;\n while (result.next()) {\n cnt++;\n System.out.println(\"\\n=== No.\"+cnt+\" ===\");\n System.out.println(\"transaction id: \"+result.getInt(\"TransactionID\"));\n System.out.println(\"product id: \"+result.getInt(\"ProductID\"));\n System.out.println(\"product name: \"+result.getString(\"ProductName\"));\n System.out.println(\"actual price: \"+result.getDouble(\"ActualPrice\"));\n }\n System.out.println(\"Total rows: \"+cnt);\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n }", "@Override\n public boolean SearchSQL() {\n\n /*\n appunto su query.next()\n inizialmente query.next è posto prima della prima riga\n alla prima chiaata si posiziona sulla prima row\n alla seconda chiamata si posiziona sulla seconda row e cosi via\n */\n\n boolean controllo = false;\n\n openConnection();\n\n String sql =\"select user,pass,vol_o_cand from pass where user='\"+userInserito+\"'\";\n ResultSet query = selectQuery(sql);\n\n try {\n\n if(query.next()){\n\n String pass = query.getString(\"pass\");\n\n if(pass.equals(passInserita)) {\n controllo = true;\n volocand = query.getString(\"vol_o_cand\");\n }\n\n }\n\n\n }catch(SQLException se){\n se.printStackTrace();\n }finally{\n closeConnection();\n }\n\n\n return controllo;\n\n }", "public List<Result> loadResults() {\n List<Result> results = null;\n try {\n DataBaseBroker dbb = new DataBaseBroker();\n dbb.loadDriver();\n dbb.establishConnection();\n results = dbb.loadResults();\n dbb.commit();\n dbb.closeConnection();\n } catch (Exception ex) {\n Logger.getLogger(GameDBLogic.class.getName()).log(Level.SEVERE, null, ex);\n }\n return results;\n }", "public static List<SqlRow> findAll() {\n\n try{\n List<SqlRow> queryFindAll = Ebean.createSqlQuery(\"SELECT * FROM pub_infoapi;\")\n .findList();\n return queryFindAll;\n }catch(Exception e){\n e.printStackTrace();\n return null;\n }\n }", "public void consultarDatos() throws SQLException {\n String instruccion = \"SELECT * FROM juegos.juegos\";\n try {\n comando = conexion.createStatement();\n resultados = comando.executeQuery(instruccion);\n } catch (SQLException e) {\n e.printStackTrace();\n throw e;\n }\n }", "public ResultSet querySelect(String query) throws SQLException {\n\t \t\t// Création de l'objet gérant les requêtes\n\t \t\tstatement = cnx.createStatement();\n\t \t\t\n\t \t\t// Exécution d'une requête de lecture\n\t \t\tResultSet result = statement.executeQuery(query);\n\t \t\t\n\t \t\treturn result;\n\t \t}", "Object executeSelectQuery(String sql) { return null;}", "public abstract ResultList executeSQL(RawQuery rawQuery);", "private void getScholsFromDatabase() {\n schols = new Select().all().from(Scholarship.class).execute();\n }", "public ResultSet getDataTestUser() throws SQLException{ \r\n String query= (\"select * from \"+Database.Table.TABLE_PRETEST_RESULT);\r\n ResultSet rs = q.querySelect(query);\r\n return rs;\r\n }", "String getBarcharDataQuery();", "public void Query() {\n }", "public boolean querySql(String sql){\r\n boolean result = true;\r\n try{\r\n stm = con.createStatement();\r\n rss = stm.executeQuery(sql);\r\n }catch(SQLException e){\r\n report = e.toString();\r\n result = false;\r\n }\r\n return result;\r\n }", "List selectByExample(BnesBrowsingHisExample example) throws SQLException;", "Data<List<Boards>> getSearchBoardsCursor(String query, String cursor);", "public List<IEntity> query(IQuery query) throws SQLException;", "HumidityQuery createHumidityQuery();", "public void getSelect(String query, ArrayList<Object> params) {\r\n\t\tif (null != connection) {\r\n\t\t\tSystem.out.println(QueryProcessor.exec(connection, query, params));\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"Hubo algún error con la conexión...\");\r\n\t\t}\r\n\t}", "private void getInfo() throws SQLException {\n printAllWebsites();\n\n System.out.println(\"What website do you want to look up?\");\n String website = input.next();\n System.out.println(\"What is the username?\");\n String username = input.next();\n\n try (PreparedStatement stmt = connection.prepareStatement(\"SELECT password FROM website_data\\n\" +\n \"LEFT JOIN passwords p on website_data.website_data_id = p.website_data_id\\n\" +\n \"LEFT JOIN users u on p.user_id = u.id\\n\" +\n \"WHERE website like (?) AND u.id like (?) AND website_data.username like (?)\")) {\n stmt.setString(1, website);\n stmt.setInt(2, this.user.getId());\n stmt.setString(3, username);\n ResultSet rs = stmt.executeQuery();\n String password;\n if (rs.next()) {\n SecretKey key = User.getKey(user.getDecryptedKey());\n try {\n Cipher cipher = Cipher.getInstance(\"AES/ECB/PKCS5PADDING\");\n cipher.init(Cipher.DECRYPT_MODE, key);\n password = new String(cipher.doFinal(Base64.getDecoder().decode(rs.getString(\"password\"))));\n System.out.println(\"password: \" + password);\n } catch (Exception e) {\n System.out.println(\"Error while decrypting: \" + e.toString());\n }\n } else System.out.println(\"No passwords found.\");\n } catch (SQLException e) {\n System.out.println(\"Error while retrieving password.\");\n throw e;\n }\n }", "public ResultSet retrieve(Connection con, String query) {\n ResultSet result = null;\n try {\n Statement state = con.createStatement();\n result = state.executeQuery(query); \n } catch (SQLException e) {\n System.err.println(e);\n }\n return result;\n\n }", "private List<FollowItem> query(String sql)\r\n {\r\n DbManager db=new DbManager();\r\n ResultSet rs=null;\r\n List<FollowItem> list=new ArrayList<FollowItem>();\r\n rs = db.getRs(sql);\r\n try {\r\n while(rs.next())\r\n {\r\n FollowItem followItem = new FollowItem();\r\n followItem.setUserId(rs.getInt(\"UserID\"));\r\n followItem.setListingId(rs.getInt(\"ListingID\"));\r\n \r\n list.add(followItem);\r\n }\r\n } catch (SQLException e) {\r\n // TODO Auto-generated catch block\r\n e.printStackTrace();\r\n } finally{\r\n db.destory();\r\n }\r\n return list;\r\n }", "public ResultSet ejecutarQuery(String query) throws Exception {\n ResultSet rs = null;\n rs = stmt.executeQuery(query);\n return rs;\n }", "private String stageDetailsFromDB(String queryString){\n\t\tString RET=\"\";\n\t\ttry\n\t\t{\n\t\t\tcon = Globals.getDatasource().getConnection();\n\t\t\tps = con.prepareStatement(queryString); \n\t\t\tresult = ps.executeQuery();\n\t\t\tif (result.first()) {\n\t\t\t\tRET = result.getString(1);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\tcatch(SQLException sqle){sqle.printStackTrace();}\n\t\tfinally {\n\t\t Globals.closeQuietly(con, ps, result);\n\t\t}\n\t\treturn RET;\n\t}", "private static void executeQueryUsingPreparedStatement() {\n\t\t\n\t\tSystem.out.println(\"\\nFetching data using PreparedStatement ....\");\n\t\t//Connection object use to create connection.\n\t\tConnection con = null;\n\t\t//Prepared statement object to run query.\n\t\tPreparedStatement ps = null;\n\t\t//Result set object to get the result of the query.\n\t\tResultSet rs = null;\n\t\tConnectionUtil conUtil = new ConnectionUtil();\n\t\tcon = conUtil.getConnection();\n\t\t//Query to be run.\n\t\tString query = \"select T.title_id, T.title_name, T.publisher_id, T.subject_id FROM titles T, \"\n\t\t\t\t+ \"title_author TA inner join authors A on A.author_id = TA.author_id where\"\n\t\t\t\t+ \" T.title_id = TA.title_id && concat(A.author_fname,' ', A.author_lname) = ?\";\n\t\tString author_name = \"salim khan\";\n\n\t\ttry {\n\t\t\tps = con.prepareStatement(query);\n\t\t\t/* set variable in prepared statement */\n\t\t\tps.setString(1, author_name);\n\t\t\trs = ps.executeQuery();\n\t\t\tList<Titles> titleList = new ArrayList<Titles>();\n\t\t\twhile (rs.next()) {\n\t\t\t\tTitles titles = new Titles();\n\t\t\t\ttitles.setTitleId(Integer.parseInt(rs.getString(1)));\n\t\t\t\ttitles.setTitleName(rs.getString(2));\n\t\t\t\ttitles.setPublishreId(Integer.parseInt(rs.getString(3)));\n\t\t\t\ttitles.setSubjectId(Integer.parseInt(rs.getString(4)));\n\t\t\t\ttitleList.add(titles);\n\t\t\t}\n\t\t\tSystem.out.println(\"List of books are\");\n\t\t\tSystem.out.println(titleList);\n\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\t/* close connection */\n\t\t\ttry {\n\t\t\t\tif (con != null) {\n\t\t\t\t\tcon.close();\n\t\t\t\t}\n\t\t\t\tif (ps != null) {\n\t\t\t\t\tps.close();\n\t\t\t\t}\n\n\t\t\t} catch (SQLException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t}\n\t\t\n\t}", "public void queryTransactions(){\n System.out.println(\"-----find transaction by condition-----\");\n System.out.println(\"--press enter to skip the input--\");\n //for every query input, do not format it into sql if it is null\n String sql = \"select * from transactionrecords join ClubMembers on transactionrecords.CustomerID = ClubMembers.CustomerID where 1=1\";\n System.out.print(\"TransactionID: \");\n String unuse=scanner.nextLine();\n String id=scanner.nextLine();\n\n //if id is given, no need for other information\n if(!StringUtils.isNullOrEmpty(id)){\n sql+=(\" and TransactionID=\"+id);\n }else{\n System.out.print(\"cashier id: \");\n String cashierid=scanner.nextLine();\n if(!StringUtils.isNullOrEmpty(cashierid)){\n sql+=(\" and CashierID=\"+cashierid);\n }\n System.out.print(\"store id: \");\n String storeid=scanner.nextLine();\n if(!StringUtils.isNullOrEmpty(storeid)){\n sql+=(\" and StoreID=\"+storeid);\n }\n System.out.print(\"customer id: \");\n String customerid=scanner.nextLine();\n if(!StringUtils.isNullOrEmpty(customerid)){\n sql+=(\" and CustomerID=\"+customerid);\n }\n }\n try {\n //System.out.println(sql);\n result = statement.executeQuery(sql);\n int cnt=0;\n\n //print all qualified result one by one\n while (result.next()) {\n cnt++;\n System.out.println(\"\\n=== No.\"+cnt+\" ===\");\n System.out.println(\"transaction id: \"+result.getInt(\"TransactionID\"));\n System.out.println(\"cashier id: \"+result.getInt(\"CashierID\"));\n System.out.println(\"store id: \"+result.getInt(\"StoreID\"));\n System.out.println(\"customer id: \"+result.getInt(\"CustomerID\"));\n System.out.println(\"customer first name: \"+result.getString(\"FirstName\"));\n System.out.println(\"customer last name: \"+result.getString(\"LastName\"));\n System.out.println(\"total price: \"+result.getDouble(\"TotalPrice\"));\n }\n System.out.println(\"Total rows: \"+cnt);\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n }", "public ResultSet getAll(String tableName)\n {\n\n String selectStr;\n ResultSet rs=null;\n\n try{\n\n selectStr=\"SELECT * FROM \"+tableName;\n rs = stmt.executeQuery(selectStr);\n\n\n\n\n\n }catch(Exception e){\n System.out.println(\"Error occurred in searchLogin\");\n }\n\n return rs;\n }", "@Override\r\n public List<LinkedHashMap<String, String>> runQuery(String sql)\r\n throws DatabaseException {\r\n try {\r\n Class.forName(driverClassName);\r\n conn = DriverManager.getConnection(url, userName, password);\r\n \r\n } catch (ClassNotFoundException ex) {\r\n throw new DatabaseException(\"Could not load JDBC driver\");\r\n }\r\n catch(SQLException sq){\r\n throw new DatabaseException(\"Connection Failed\");\r\n }\r\n \r\n try {\r\n stmt = conn.createStatement();\r\n ResultSet rs = stmt.executeQuery(sql);\r\n link = resultSetToArrayList(rs);\r\n \r\n } catch (SQLException sqle) {\r\n throw new DatabaseException(\"Execution of SQL failed\");\r\n } catch (Exception e) {\r\n } finally {\r\n try {\r\n stmt.close();\r\n conn.close();\r\n } catch (Exception e) {\r\n throw new DatabaseException(\"Unknown error\");\r\n }\r\n }\r\n return link;\r\n }", "private void executeQuery() {\n }", "public ResultSet Brus(Long broker_id) throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select * from broker where broker_id=\"+broker_id+\" \");\r\n\treturn rs;\r\n\t\r\n}", "@Override\n public void query(Connection c, SQLEngine engine, Record val, ImmutableList.Builder<Record> result) throws DataException {\n \n Variant varcat = val.get(\"TABLE_CAT\");\n String cat = Variants.isNull(varcat) ? null : varcat.asString();\n \n Variant varschem = val.get(\"TABLE_SCHEM\");\n String schem = Variants.isNull(varschem) ? null : varschem.asString();\n \n Variant varname = val.get(\"TABLE_NAME\");\n String name = Variants.isNull(varname) ? null : varname.asString();\n \n Variant vartype = val.get(\"TABLE_TYPE\");\n String[] tabletypes = Variants.isNull(vartype) ? TABLE_TYPES : new String[]{ vartype.asString() };\n\n try (ResultSet resultset = c.getMetaData().getTables(cat, schem, name, tabletypes)) {\n while (resultset.next()) {\n result.add(read(resultset, val));\n } \n } catch (SQLException ex) {\n throw new DataException(ex);\n }\n }", "String query();", "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}", "private void executeSelect(String query){\n try {\n statement = connection.createStatement();\n rs = statement.executeQuery(query);\n } catch (SQLException e) {\n throw new RuntimeException(e);\n } \n }", "@Test\n public void queryTest() throws Exception {\n List<Map<String, Object>> mapList = mysqlQLSDao.queryList();\n for(Map<String, Object> map : mapList) {\n System.out.print(\"[\");\n for (Map.Entry<String, Object> entry : map.entrySet()) {\n// System.out.print(entry.getKey() + \":\" + entry.getValue() + \",\");\n System.out.print(entry.getKey() + \":\" + \",\");\n }\n System.out.println(\"]\");\n }\n }", "public ResultSet query (String query) throws java.sql.SQLException {\n /*\n if (query.indexOf('(') != -1)\n Logger.write(\"VERBOSE\", \"DB\", \"query(\\\"\" + query.substring(0,query.indexOf('(')) + \"...\\\")\");\n else\n Logger.write(\"VERBOSE\", \"DB\", \"query(\\\"\" + query.substring(0,20) + \"...\\\")\");\n */\n Logger.write(\"VERBOSE\", \"DB\", \"query(\\\"\" + query + \"\\\")\");\n \n try {\n Statement statement = dbConnection.createStatement();\n statement.setQueryTimeout(30);\n ResultSet r = statement.executeQuery(query);\n return r;\n } catch (java.sql.SQLException e) {\n Logger.write(\"RED\", \"DB\", \"Failed to query database: \" + e);\n throw e;\n }\n }", "public ArrayList<byte[]> queryData(String tablename, String schema){\n ArrayList<byte[]> res = new ArrayList<byte[]>();\n\n ResultSet resultSet = session.execute(\"SELECT * FROM \" + tablename);\n for (Row row : resultSet) {\n ByteBuffer data = row.getBytes(schema);\n res.add(data.array());\n }\n return res;\n }", "public Institucion buscarInstitucionDeSolicitud(String cod_solicitud){\n\tString sql=\"select * from institucion where cod_institucion='\"+cod_solicitud+\"';\";\n\t\n\treturn db.queryForObject(sql, new InstitucionRowMapper());\n}", "public java.sql.ResultSet consultapormedicofecha2(String CodigoMedico,String fecha){\r\n java.sql.ResultSet rs=null;\r\n Statement st = null;\r\n try{\r\n \tConexion con=new Conexion();\r\n \tst = con.conn.createStatement();\r\n \trs=st.executeQuery(\"SELECT phm.codigo,phm.horas,phm.fechas,phm.NombrePaciente,pes.nombre_especialidad,pmd.nombre,pmd.apellidos,phm.estado,pes.codigo,pmd.codigo,su.usu_codigo,SUBSTRING(phm.horas,7,3) AS jornada FROM pyp_horariomedico phm,pyp_medico pmd,pyp_especialidad pes,seg_datos_personales sdp,seg_usuario su WHERE pmd.codigo=\"+CodigoMedico+\" AND phm.fechas='\"+fecha+\"' AND phm.codMedico_fk = pmd.codigo AND pmd.codEspe_fk = pes.codigo AND sdp.numeroDocumento=pmd.numeroDocumento AND su.dat_codigo_fk=sdp.dat_codigo AND phm.fechas >= CURDATE() ORDER BY jornada,phm.horas \");\r\n \tSystem.out.println(\"SELECT phm.codigo,phm.horas,phm.fechas,phm.NombrePaciente,pes.nombre_especialidad,pmd.nombre,pmd.apellidos,phm.estado,pes.codigo,pmd.codigo,su.usu_codigo,SUBSTRING(phm.horas,7,3) AS jornada FROM pyp_horariomedico phm,pyp_medico pmd,pyp_especialidad pes,seg_datos_personales sdp,seg_usuario su WHERE pmd.codigo=\"+CodigoMedico+\" AND phm.fechas='\"+fecha+\"' AND phm.codMedico_fk = pmd.codigo AND pmd.codEspe_fk = pes.codigo AND sdp.numeroDocumento=pmd.numeroDocumento AND su.dat_codigo_fk=sdp.dat_codigo AND phm.fechas >= CURDATE() ORDER BY jornada,phm.horas \");\r\n \t\r\n }\r\n catch(Exception ex){\r\n \tSystem.out.println(\"Error en PYP_MetodoConsultasAsignacion>>consultapormedicofecha \"+ex);\r\n }\t\r\n return rs;\r\n }", "public ResultSet executeQuery(String request) {\n try {\r\n return st.executeQuery(request);\r\n } catch (SQLException ex) {\r\n Logger.getLogger(Database.class.getName()).log(Level.SEVERE, null, ex);\r\n return null;\r\n }\r\n }", "private ResultSet executeQuery(String query) {\r\n Statement stmt;\r\n ResultSet result = null;\r\n try {\r\n// System.out.print(\"Connect DB .... \");\r\n conn = openConnect();\r\n// System.out.println(\"successfully \");\r\n stmt = conn.createStatement();\r\n result = stmt.executeQuery(query);\r\n } catch (SQLException | ClassNotFoundException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n return result;\r\n }", "Data<List<Boards>> getSearchBoardsCursor(String query, String cursor, String fields);", "private void sampleQuery(final SQLManager sqlManager, final HttpServletResponse resp)\n throws IOException {\n try (Connection sql = sqlManager.getConnection()) {\n\n // Execute the query.\n final String query = \"SELECT 'Hello, world'\";\n try (PreparedStatement statement = sql.prepareStatement(query)) {\n \n // Gather results.\n try (ResultSet result = statement.executeQuery()) {\n if (result.next()) {\n resp.getWriter().println(result.getString(1));\n }\n }\n }\n \n } catch (SQLException e) {\n LOG.log(Level.SEVERE, \"SQLException\", e);\n resp.getWriter().println(\"Failed to execute database query.\");\n }\n }", "private static void selectEx() throws SQLException {\n ResultSet rs = stmt.executeQuery(\"SELECT name,score FROM students \\n\" +\n \"WHERE score >50;\");\n\n while (rs.next()) {\n System.out.println(rs.getString(\"name\") + \" \" + rs.getInt(\"score\"));\n }\n rs.close();\n }", "public static ResultSet query(String command) {\r\n\t\tif (isConnected()) try {\r\n\t\t\tConsole.sql(command);\r\n\t\t\treturn con.createStatement().executeQuery(command);\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public ResultSet executeQuery(String query) {\n ResultSet rs = null;\n \ttry {\n rs = st.executeQuery(query);\n } catch(Exception e) {\n \te.printStackTrace();\n }\n return rs;\n }", "public static void getProduto(){\r\n try {\r\n PreparedStatement stmn = connection.prepareStatement(\"select id_produto, codigo, produto.descricao pd,preco, grupo.descricao gd from produto inner join grupo on grupo.id_grupo = produto.idgrupo order by codigo\");\r\n ResultSet result = stmn.executeQuery();\r\n\r\n System.out.println(\"id|codigo|descricao|preco|grupo\");\r\n while (result.next()){\r\n long id_produto = result.getLong(\"id_produto\");\r\n String codigo = result.getString(\"codigo\");\r\n String pd = result.getString(\"pd\");\r\n String preco = result.getString(\"preco\");\r\n String gd = result.getString(\"gd\");\r\n\r\n\r\n\r\n System.out.println(id_produto+\"\\t\"+codigo+\"\\t\"+pd+\"\\t\"+preco+\"\\t\"+gd);\r\n }\r\n\r\n }catch (Exception throwables){\r\n throwables.printStackTrace();\r\n }\r\n\r\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}", "private void Searchdata() {\r\n Connection con;\r\n String searchby;\r\n String sortby;\r\n String keyword;\r\n \r\n searchby = (String)cboSearchby.getSelectedItem();\r\n sortby = (String)cboSortby.getSelectedItem();\r\n keyword = txfSearch.getText();\r\n try {\r\n con = ClassSQL.getConnect();\r\n Statement stmt = con.createStatement();\r\n String sql = Searchstmt(searchby,sortby,keyword);\r\n // System.out.println(sql); //for testing purposes\r\n stmt.executeQuery(sql);\r\n con.close();\r\n } catch (SQLException ex) {\r\n ex.printStackTrace();\r\n } finally {\r\n // Place code in here that will always be run.\r\n }\r\n }", "public String getDBData(String Env,String sqlQuery,int column)\n\t\t{\n\t\t\tString queryresult=\"\";\n\t\t\tString dbUrl=\"\";\n\t\t\tString\tdb_username=\"\";\n\t\t\tString\tdb_password=\"\";\n\t\t\tif(Env.equalsIgnoreCase(\"PROD\"))\n\t\t\t{\n\t\t\t\tdbUrl=\"jdbc:mysql://investordbinstance.cfgncecsykm0.us-west-2.rds.amazonaws.com:3306/\";\n\t\t\t\tdb_username=\"hudbreaduser\";\n\t\t\t\tdb_password=\"hudbreadpwd\";\n\t\t\t}\t\n\t\t\telse if(Env.equalsIgnoreCase(\"STG\"))\n\t\t\t{\n\t\t\t\tdbUrl=\"jdbc:mysql://staginghomeunion.cfgncecsykm0.us-west-2.rds.amazonaws.com:3306/\";\n\t\t\t\tdb_username=\"report_admin\";\n\t\t\t\tdb_password=\"report_pwd\";\n\t\t\t}\n\t\t\telse if(Env.equalsIgnoreCase(\"INTEG\"))\n\t\t\t{\n\t\t\t\tdbUrl=\"jdbc:mysql://192.168.10.12:3306\";\n\t\t\t\tdb_username=\"invappuser\";\n\t\t\t\tdb_password=\"invapppwd\";\n\t\t\t}\n\t\t\t\n\t\t\t Connection con; \t\n\t\t\ttry{\n\t\t \t Class.forName(\"com.mysql.jdbc.Driver\"); \n\t\t \t //Create Connection to DB \n\t\t \t\t con = DriverManager.getConnection(dbUrl,db_username,db_password);\n\t\t //Create Statement Object \n\t\t Statement stmt = con.createStatement(); \n\t\t \t try{ \n\t\t \t \t ResultSet rs= stmt.executeQuery(sqlQuery); \n\t\t \t\t rs.next();\n\t\t \t\t queryresult=rs.getString(column);\n\t\t \t rs.close();\n\t\t \t }\n\t catch (NullPointerException | NumberFormatException e) {} \n\t // closing DB Connection \n\t con.close();\n\t stmt.close();\n\t } catch (ClassNotFoundException | SQLException e) {} \n\t\t\t\n\t\t\treturn queryresult;\n\t\t}", "public Cursor getData(String sql){\n SQLiteDatabase database = getReadableDatabase();\n return database.rawQuery(sql,null);\n }", "public static ResultSet getSensor(String sensorName) {\n ResultSet rs = null;\n\n try (\n PreparedStatement stmt = conn.prepareStatement(SENSORSQL, ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);) {\n stmt.setString(1, sensorName);\n\n rs = stmt.executeQuery();\n\n } catch (SQLException e) {\n System.err.println(e);\n System.out.println(\"Query 2 Issue!!\");\n }\n return rs;\n\n }", "public void getQuery() {\n\n\t\tString[] columnNames = { \"Customer ID\", \"Product ID\", \"Product Quantity\", \"Date Issued\", \"Time Issued\" };\n\n\t\tConnection connection = null;\n\t\tStatement statement = null;\n\n\t\ttry {\n\t\t\tconnection = DriverManager.getConnection(DATABASE_URL, UserName_SQL, Password_SQL);\n\t\t\tstatement = connection.createStatement();\n\t\t\t\n\t\t\tResultSet resultSet = statement\n\t\t\t\t\t.executeQuery(\"SELECT customerID, productId, qtyProduct, invoiceDate, invoiceTime FROM invoice\");\n\n\t\t\tResultSetMetaData metaData = resultSet.getMetaData();\n\n\t\t\tint numberOfColumns = metaData.getColumnCount();\n\t\t\tint numberOfRows = getJTableNumberOfRows();\n\t\t\tObject[][] data = new Object[numberOfRows][numberOfColumns];\n\n\t\t\tint j = 0, k = 0;\n\t\t\twhile (resultSet.next()) {\n\t\t\t\tfor (int i = 1; i <= numberOfColumns; i++) {\n\t\t\t\t\tdata[j][k] = resultSet.getObject(i);\n\t\t\t\t\tk++;\n\t\t\t\t}\n\t\t\t\tk = 0;\n\t\t\t\tj++;\n\t\t\t} // end while\n\n\t\t\tmodel = new DefaultTableModel(data, columnNames);\n\n\t\t\t/* create non-editable JTable */\n\t\t\tjtable = new JTable(model) {\n\t\t\t\tpublic boolean isCellEditable(int row, int column) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t};\n\t\t\t;\n\t\t\tjtable.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);\n\t\t\tjtable.setPreferredScrollableViewportSize(new Dimension(1230, 450));\n\t\t\tJScrollPane scrollPane = new JScrollPane(jtable);\n\n\t\t\tjtablePanel.add(scrollPane);\n\t\t\tjtable.getColumnModel().getColumn(0).setPreferredWidth(250);\n\t\t\tjtable.getColumnModel().getColumn(1).setPreferredWidth(250);\n\t\t\tjtable.getColumnModel().getColumn(2).setPreferredWidth(250);\n\t\t\tjtable.getColumnModel().getColumn(3).setPreferredWidth(400);\n\t\t\tjtable.getColumnModel().getColumn(4).setPreferredWidth(400);\n\t\t\tjtable.setAutoResizeMode(jtable.AUTO_RESIZE_LAST_COLUMN);\n\t\t\tjtable.setBackground(Color.white);\n\t\t\tjtable.setForeground(Color.black);\n\t\t\tjtable.setRowHeight(30);\n\t\t\tjtable.getTableHeader().setFont(new Font(\"Calibri\", Font.BOLD, 15));\n\t\t\tjtable.setFont(new Font(\"Calibri\", Font.PLAIN, 13));\n\n\t\t} // end try\n\t\t\n\t\tcatch (SQLException sqlException) {\n\t\t\tsqlException.printStackTrace();\n\t\t\tSystem.exit(1);\n\t\t} // end catch\n\t\t\n\t\tfinally // ensure statement and connection are closed properly\n\t\t{\n\t\t\ttry {\n\t\t\t\tstatement.close();\n\t\t\t\tconnection.close();\n\t\t\t} // end try\n\t\t\tcatch (Exception exception) {\n\t\t\t\texception.printStackTrace();\n\t\t\t\tSystem.exit(1);\n\t\t\t} // end catch\n\t\t} // end finally\n\t\t\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 ResultSet getDataRaw(String TableName, String idKey, Object idValue) throws SQLException{\n return mysql.query(\"SELECT * FROM `\" + TableName + \"` WHERE `\" + idKey + \"` LIKE '\" + idValue +\"'\");\n }", "public ResultSet queryRawSQL(String sql) throws SQLException{\n return mysql.query(sql);\n }", "public static void query() {\n\n GPS = \"24.9684297,121.1959266\";\n\n SimpleDateFormat sdFormat = new SimpleDateFormat(\"yyyy-MM-dd\");\n Date nowDate = new Date();\n\n String startDayStr = \"2017-01-09\";\n Calendar cal = Calendar.getInstance();\n cal.setTime(nowDate);\n // cal.add(Calendar.MONTH, 3);\n cal.add(Calendar.MONTH, 1);\n String endDayStr = sdFormat.format(cal.getTime());\n\n String query = String.format(\"▽活動搜尋▼▽start_day▼%s▽end_day▼%s\", startDayStr, endDayStr);\n\n System.out.println(\"伺服器狀態測試查詢... \" + query + \" \" + GPS + \" \" + radius);\n Socket client = new Socket();\n InetSocketAddress isa = new InetSocketAddress(address, port);\n try {\n client.connect(isa, 10000);\n\n DataOutputStream out = new DataOutputStream(client.getOutputStream());\n out.writeUTF(query + \" \" + GPS + \" \" + radius + \" \" + whichFucntion + \" \" + \"test \" + quantity);\n client.shutdownOutput();\n ObjectInputStream in = new ObjectInputStream(client.getInputStream());\n Object obj = in.readObject();\n\n//\t\t\tSystem.out.println(obj.toString());\n SearchResultShopData searchResultShopData = (SearchResultShopData) obj;\n ArrayList<ShopData> a = (ArrayList<ShopData>) searchResultShopData.getShopDataList();\n//\t\t\tSystem.out.println(\"searchResultShopData.getStaut() : \" + searchResultShopData.getStaut());\n if (searchResultShopData.getStaut() == 1) {\n for (int i = 0; i < a.size(); i++) {\n if (a.get(i).getSearchEngine().equals(ShopData.SEARCH_ENGINE_ATTRIBUTE_FB_ACTIVITY_SOLR)) {\n FBShopActivityDescription fbShopActivityDescription = (FBShopActivityDescription) a.get(i);\n System.out.println(\"/////////////////////////start////////////////////////\");\n System.out.println(\"活動名稱:\" + fbShopActivityDescription.getTitle());\n System.out.println(\"活動發文連結:\" + fbShopActivityDescription.getHttp());\n System.out.println(\"GPS:\" + fbShopActivityDescription.getLatitude() + \",\" + fbShopActivityDescription.getLongitude());\n System.out.println();\n System.out.println(\"*******************活動摘要資訊********************\");\n System.out.println(\"活動開始時間:\" + fbShopActivityDescription.getStartDate());\n System.out.println(\"活動結束時間:\" + fbShopActivityDescription.getEndDate());\n System.out.println(\"活動地點:\" + fbShopActivityDescription.getAddress());\n System.out.println(\"~~~~~~~~~~~~~~~~~~HighlightFBPost~~~~~~~~~~~~~~~~~~~~\");\n System.out.println(fbShopActivityDescription.getDescription());\n System.out.println(\"////////////////////////end/////////////////////////\");\n System.out.println();\n }\n }\n }\n out.flush();\n out.close();\n out = null;\n in.close();\n in = null;\n client.close();\n client = null;\n } catch (java.io.IOException e) {\n System.err.println(\"SocketClient 連線有問題 !\");\n System.err.println(\"IOException :\" + e.toString());\n } catch (ClassNotFoundException e) {\n System.err.println(\"ClassNotFoundException :\" + e.toString());\n } catch (Exception e) {\n System.err.println(\"Exception :\" + e.toString());\n }\n\n }", "public void testQuery() {\n mActivity.runOnUiThread(\n new Runnable() {\n public void run() {\n //TODO: Should compare this against the db results directly.\n assertEquals(sendQuery(\"SFO\"), 7);\n assertEquals(sendQuery(\"RHV\"), 1);\n assertEquals(sendQuery(\"xyzzy\"), 0);\n }\n }\n );\n }", "public ArrayList < Dataclass > getData() {\n ArrayList < Dataclass > dataList = new ArrayList < Dataclass > ();\n Connection connection = getConnection();\n String query = \"SELECT * FROM `przychodnia` \";\n if (option == 1) query = \"SELECT * FROM `lekarz` \";\n if (option == 2) query = \"SELECT * FROM `wizyta` \";\n if (option == 3) query = \"SELECT * FROM `badanie` \";\n Statement st;\n ResultSet rs;\n\n try {\n st = connection.createStatement();\n rs = st.executeQuery(query);\n Dataclass dc;\n while (rs.next()) {\n if (option == 1) dc = new Dataclass(rs.getInt(\"ID\"), rs.getString(\"Imię\"), rs.getString(\"Nazwisko\"), rs.getString(\"Specjalizacja\"), rs.getInt(\"ID_Przychodni\"));\n else if (option == 2) dc = new Dataclass(rs.getInt(\"ID\"), rs.getString(\"Data\"), rs.getString(\"Opis Badania\"), rs.getString(\"Imię i nazwisko pacjenta\"), rs.getInt(\"ID_Lekarza\"));\n else if (option == 3) dc = new Dataclass(rs.getInt(\"ID\"), rs.getString(\"Data\"), rs.getBlob(\"Załącznik\"));\n else dc = new Dataclass(rs.getInt(\"ID\"), rs.getString(\"Nazwa\"), rs.getString(\"Adres\"), rs.getString(\"Miasto\"));\n dataList.add(dc);\n }\n } catch (Exception e) {\n System.err.print(e);\n }\n return dataList;\n }", "public static String SelectQuery_String(String query)\r\n {\n Connection conn = null;\r\n Statement stat = null;\r\n ResultSet rs = null;\r\n String resp = \"\";\r\n try\r\n {\r\n LoadDriver();\r\n conn = DriverManager.getConnection(DB_URL,userName,password);\r\n stat = conn.createStatement();\r\n rs = stat.executeQuery(query);\r\n if(rs.next())\r\n resp = rs.getString(1);\r\n }\r\n catch(SQLException ex)\r\n {\r\n ex.printStackTrace();\r\n }\r\n finally\r\n {\r\n try\r\n {\r\n if(conn != null)\r\n conn.close();\r\n if(stat != null)\r\n stat.close();\r\n if(rs != null)\r\n rs.close();\r\n }\r\n catch(Exception e)\r\n {\r\n e.printStackTrace();\r\n }\r\n }\r\n return resp;\r\n }", "@Test\n public void testQuery() {\n DataSetArgument lArgs = new DataSetArgument();\n lArgs.add( \"aMsgId\", \"100\" );\n\n QuerySet lQs = QuerySetFactory.getInstance()\n .executeQuery( \"com.mxi.mx.integration.query.process.LookupQueueId\", lArgs );\n\n Assert.assertEquals( \"Row Count\", 1, lQs.getRowCount() );\n\n lQs.next();\n\n Assert.assertEquals( \"Queue Id\", 1000, lQs.getInt( \"queue_id\" ) );\n }", "public ResultSet query(String sQLQuery) throws SQLException {\n\t Statement stmt = c.createStatement();\n\t ResultSet ret = stmt.executeQuery(sQLQuery);\n\t stmt.close();\n\t return ret;\n\t}", "public static List<JSONObject> getJSONObject(String SQL){\r\n\r\n //final String SQL = \"select * from articles\";\r\n Connection con = null;\r\n PreparedStatement pst = null;\r\n ResultSet rs = null;\r\n \r\n try{\r\n\r\n con = getConnection();\r\n pst = con.prepareStatement(SQL);\r\n rs = pst.executeQuery();\r\n\r\n }catch(SQLException ex){\r\n\r\n System.out.println(\"Error:\" + ex.getMessage());\r\n\r\n }\r\n\r\n List<JSONObject> resList = JsonService.getFormattedResultSet(rs);\r\n return resList;\r\n\r\n }", "public <E extends Writeable> ResultSet read(CharSequence sql);", "public static void main(String[] args) {\n Connection cnn = null;//coneccion\n ResultSet datos = null;\n ResultSetMetaData metaData= null;\n PreparedStatement statement = null;\n \n //El usuario con el que nos conectamos al mySQL\n String user = \"root\";\n //El password del usuario\n String pass = \"admin\";\n //Apuntamos a la base de datos con la que queremos trabajar\n String url = \"jdbc:mysql://127.0.0.1/world\";\n String driver = \"com.mysql.jdbc.Driver\";\n //Variable para cargar las querys\n String consultaSql= \"\";\n try {\n Class.forName(driver);\n cnn = DriverManager.getConnection(url, user, pass);\n consultaSql = \"SELECT country.name AS 'Pais',\"\n +\"country.population AS 'Habitantes' \"\n +\"FROM world.country ORDER BY country.name ASC;\";\n statement = cnn.prepareStatement(consultaSql);\n \n datos = statement.executeQuery();\n metaData = datos.getMetaData();\n \n int cantRegistros = 0;\n \n //Opcion 1:\n System.out.println(\"***Pais -- Habitantes ***\");\n \n while(datos.next()){\n System.out.println(datos.getString(\"Pais\") + \" -- \"\n + datos.getString(\"Habitantes\"));\n cantRegistros ++;\n }\n System.out.println(\"\");\n System.out.println(\"Cantidad de registros: \"+cantRegistros);\n cnn.close();\n } catch (Exception e) {\n System.out.println(\"Hubo un error!!\");\n System.out.println(e.getMessage());\n }\n \n }", "public List<Tutores> readAllJPQL() throws SecurityException{ \n String sql=\"Select tu from Tutores tu\";\n \n Query q=em.createQuery(sql); \n return q.getResultList();\n }", "public static Object[][] getDataFromDb(String sql){\n\t\tfinal String JDBC_DRIVER = PreAndPost.config.getProperty(\"DB_Pkg\"); \r\n\t\tfinal String DB_URL = PreAndPost.config.getProperty(\"DB_Url\");\r\n\r\n\t\t// Database credentials\r\n\t\tfinal String USER = PreAndPost.config.getProperty(\"DB_User\");\r\n\t\tfinal String PASS = PreAndPost.config.getProperty(\"DB_Pwd\");\r\n\r\n\t\tConnection conn = null;\r\n\t\tStatement stmt = null;\r\n\r\n\t\tObject[][] data = null;\r\n\r\n\t\ttry{\r\n\r\n\t\t\t//STEP 2: Register JDBC driver\r\n\t\t\tClass.forName(JDBC_DRIVER);\r\n\r\n\t\t\t//STEP 3: Open a connection\r\n\t\t\tconn = DriverManager.getConnection(DB_URL,USER,PASS);\r\n\r\n\t\t\t//STEP 4: Execute a query\r\n\t\t\tstmt = conn.createStatement();\r\n\r\n\t\t\tString count = \"Select count(*) from (\"+sql+\") AS T\";\r\n\t\t\tResultSet rs = stmt.executeQuery(count);\r\n\t\t\trs.next();\r\n\t\t\tint rowCount = rs.getInt(1);\r\n\r\n\t\t\t// Now run the query\r\n\t\t\trs = stmt.executeQuery(sql);\r\n\t\t\tResultSetMetaData rsmd=rs.getMetaData();\r\n\r\n\t\t\t// get the column count\r\n\t\t\tint columnCount = rsmd.getColumnCount();\r\n\t\t\t\r\n\t\t\tdata = new Object[rowCount][columnCount]; // assign to the data provider array\r\n\t\t\tint i = 0;\r\n\t\t\t\r\n\t\t\t//STEP 5: Extract data from result set\r\n\t\t\twhile(rs.next()){\r\n\r\n\t\t\t\tfor (int j = 1; j <= columnCount; j++) {\r\n\t\t\t\t\tswitch (rsmd.getColumnType(j)) {\r\n\t\t\t\t\tcase Types.VARCHAR:\r\n\t\t\t\t\t\tdata[i][j-1] = rs.getString(j);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase Types.NULL:\r\n\t\t\t\t\t\tdata[i][j-1] = \"\";\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase Types.CHAR:\r\n\t\t\t\t\t\tdata[i][j-1] = rs.getString(j);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase Types.TIMESTAMP:\r\n\t\t\t\t\t\tdata[i][j-1] = rs.getDate(j);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase Types.DOUBLE:\r\n\t\t\t\t\t\tdata[i][j-1] = rs.getDouble(j);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase Types.INTEGER:\r\n\t\t\t\t\t\tdata[i][j-1] = rs.getInt(j);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase Types.SMALLINT:\r\n\t\t\t\t\t\tdata[i][j-1] = rs.getInt(j);\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\t\t\t//STEP 6: Clean-up environment\r\n\t\t\trs.close();\r\n\t\t\tstmt.close();\r\n\t\t\tconn.close();\r\n\r\n\t\t}catch(SQLException se){\r\n\r\n\t\t\t//Handle errors for JDBC\r\n\t\t\tse.printStackTrace();\r\n\r\n\t\t}catch(Exception e){\r\n\r\n\t\t\t//Handle errors for Class.forName\r\n\t\t\te.printStackTrace();\r\n\r\n\t\t}finally{\r\n\r\n\t\t\ttry{\r\n\t\t\t\tif(stmt!=null)\r\n\t\t\t\t\tstmt.close();\r\n\t\t\t}catch(SQLException se){\r\n\t\t\t\tse.printStackTrace();\r\n\t\t\t}\r\n\r\n\t\t\ttry{\r\n\t\t\t\tif(conn!=null)\r\n\t\t\t\t\tconn.close();\r\n\t\t\t}catch(SQLException se){\r\n\t\t\t\tse.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn data;\r\n\r\n\r\n\t}", "public List sqlQuery(String sql,Object... params);", "@Override\r\n\tpublic List<Food> queryFoods() {\n\t\tString sql=\"select * from food\";\r\n\t\tList<Food> list=(List<Food>) BaseDao.select(sql, Food.class);\r\n\t\treturn list;\r\n\t}" ]
[ "0.68144995", "0.64632994", "0.61922455", "0.6177322", "0.61145556", "0.61048514", "0.60969985", "0.6067207", "0.6054325", "0.6010599", "0.5961111", "0.59004855", "0.58632284", "0.58486", "0.58434415", "0.577774", "0.5748068", "0.57215893", "0.57202977", "0.57047516", "0.570206", "0.57008415", "0.56947744", "0.56754017", "0.5666631", "0.56652606", "0.56548035", "0.56196916", "0.56131274", "0.56129164", "0.5604515", "0.55616105", "0.55512434", "0.5550797", "0.55491966", "0.55487674", "0.5539771", "0.553025", "0.5528301", "0.55250597", "0.55236185", "0.55149984", "0.5496098", "0.54941195", "0.54924214", "0.54906803", "0.5486047", "0.5481584", "0.5476057", "0.5468436", "0.54665345", "0.5464131", "0.5462217", "0.54578745", "0.5449656", "0.5447882", "0.5447784", "0.5445575", "0.5441297", "0.5437564", "0.5426269", "0.54252857", "0.5421989", "0.5421352", "0.54196763", "0.5418941", "0.5416852", "0.54120237", "0.5410924", "0.5385191", "0.5382165", "0.5378874", "0.5377264", "0.5364424", "0.53562534", "0.53548074", "0.5348214", "0.53443843", "0.53389895", "0.5338684", "0.5330288", "0.5316704", "0.53161824", "0.5310585", "0.5308194", "0.5298101", "0.52946055", "0.5294254", "0.5293575", "0.52898043", "0.5289374", "0.5286519", "0.52840847", "0.52759683", "0.5273292", "0.5272298", "0.52721345", "0.5271917", "0.52709764", "0.526944" ]
0.52877
91
Created by user on 01.08.16.
public interface YandexArtistApi { String URL = "http://download.cdn.yandex.net/"; @GET("mobilization-2016/artists.json") Call<List<YandexArtistResponse>> getListArtist(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "protected boolean func_70814_o() { return true; }", "@Override\n public void func_104112_b() {\n \n }", "private void poetries() {\n\n\t}", "@Override\n\tpublic void entrenar() {\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\tpublic void init() {\n\t\t\n\t}", "public void mo38117a() {\n }", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "public void gored() {\n\t\t\n\t}", "@Override\n public int describeContents() { return 0; }", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "private void init() {\n\n\t}", "@Override\n public void init() {\n }", "@Override\r\n\tpublic void init() {}", "@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 protected void init() {\n }", "@Override\n protected void initialize() {\n\n \n }", "@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 ligar() {\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 public void init() {}", "@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 }", "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 }", "private void m50366E() {\n }", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "private void kk12() {\n\n\t}", "public void mo4359a() {\n }", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n void init() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "public void method_4270() {}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@Override\n\tpublic void init() {\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n\tpublic void init()\n\t{\n\n\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "public void mo21877s() {\n }", "@Override public int describeContents() { return 0; }", "protected void mo6255a() {\n }", "@Override\n\tprotected void initialize() {\n\t}", "@Override\n\tprotected void initialize() {\n\t}", "@Override\n\t\tpublic void init() {\n\t\t}", "@Override\n\tpublic void afterInit() {\n\t\t\n\t}", "@Override\n\tpublic void afterInit() {\n\t\t\n\t}", "@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}", "public void mo55254a() {\n }", "@Override\n public int getSize() {\n return 1;\n }", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "private void init() {\n\n\n\n }" ]
[ "0.57326156", "0.5727071", "0.5629875", "0.56236124", "0.5575975", "0.5575975", "0.55601376", "0.5526954", "0.5509042", "0.5500754", "0.5494295", "0.5472373", "0.54676", "0.54404557", "0.54404557", "0.54404557", "0.54404557", "0.54404557", "0.5436941", "0.54243743", "0.54185706", "0.5416289", "0.54153806", "0.5411161", "0.54046714", "0.53998995", "0.539646", "0.5389158", "0.5382121", "0.53759843", "0.53759843", "0.5371203", "0.53380233", "0.5337516", "0.53309166", "0.53194463", "0.5315613", "0.5308178", "0.53079045", "0.52936786", "0.52936786", "0.52936786", "0.5292561", "0.5285684", "0.52850026", "0.52850026", "0.52850026", "0.52805597", "0.52785695", "0.52785695", "0.52785695", "0.5277968", "0.5275785", "0.5275785", "0.5275785", "0.5275785", "0.5275785", "0.5275785", "0.5273413", "0.5273413", "0.5273413", "0.5273413", "0.5273413", "0.5273413", "0.5273413", "0.5266772", "0.526599", "0.52657956", "0.526373", "0.52591497", "0.5254474", "0.5254474", "0.5251811", "0.52404064", "0.52290475", "0.5228487", "0.5228487", "0.5221748", "0.5213298", "0.51905334", "0.5185973", "0.51839423", "0.51821536", "0.5180331", "0.51751137", "0.5173853", "0.51728576", "0.5166538", "0.51583046", "0.51582736", "0.5156715", "0.5156715", "0.51562494", "0.5142362", "0.5142362", "0.5128659", "0.5124458", "0.5110155", "0.5107698", "0.5106928", "0.5102438" ]
0.0
-1
TODO Autogenerated method stub
@Override public boolean isBusy() throws DeviceException { return false; }
{ "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
int INVITE_AUIDO = 1;//only audio int INVITE_VIDEO = 2;//only video int INVITE_MUTI = 3;//both audio and video
@Override public void onInvite(final int type, final boolean isOpen) { runOnUiThread(new Runnable() { @Override public void run() { postInvite(type, isOpen); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface ReceiveAdvertisementType\n {\n /**\n * sms\n */\n String BY_SMS = \"0\";\n\n /**\n * email\n */\n String BY_EMAIL = \"1\";\n }", "interface Player {\n /**\n * player playing as hare\n */\n int PLAYER_TYPE_HARE = 100;\n\n /**\n * player playing as hound\n */\n int PLAYER_TYPE_HOUND = 101;\n }", "boolean isPlayable();", "public interface Actions {\n String ACTION_MEDIA_PLAY_PAUSE = \"com.tatait.tatamusic.ACTION_MEDIA_PLAY_PAUSE\";\n String ACTION_MEDIA_NEXT = \"com.tatait.tatamusic.ACTION_MEDIA_NEXT\";\n String ACTION_MEDIA_PREVIOUS = \"com.tatait.tatamusic.ACTION_MEDIA_PREVIOUS\";\n String VOLUME_CHANGED_ACTION = \"android.media.VOLUME_CHANGED_ACTION\";\n String LIST_TYPE_COLLECT = \"collect\";\n String LIST_TYPE_LOCAL = \"local\";\n String LIST_TYPE_ONLINE = \"online\";\n int DB_PLAY_LIST_LOCAL = 0;\n int DB_PLAY_LIST_COLLECT = 1;\n int DB_PLAY_LIST_ONLINE = 2;\n}", "boolean isLocalVideoAllowed(Call call);", "public boolean isAudio()\n {return false ;\n }", "public final void mo6069c(int i, int i2, Intent intent) {\n AppMethodBeat.m2504i(6291);\n if (i == (C22846h.this.hashCode() & CdnLogic.kBizGeneric)) {\n switch (i2) {\n case -1:\n if (intent == null) {\n C4990ab.m7412e(\"MicroMsg.JsApiChooseMedia\", \"mmOnActivityResult REQUEST_CHOOSE_MEDIA bundle is null,\");\n C22846h.m34667a(C22846h.this, \"fail\");\n AppMethodBeat.m2505o(6291);\n return;\n }\n int intExtra = intent.getIntExtra(\"key_pick_local_media_callback_type\", 0);\n String stringExtra;\n HashMap hashMap;\n if (intExtra == 1) {\n stringExtra = intent.getStringExtra(\"key_pick_local_media_local_id\");\n String stringExtra2 = intent.getStringExtra(\"key_pick_local_media_thumb_local_id\");\n C4990ab.m7417i(\"MicroMsg.JsApiChooseMedia\", \"video localId:%s\", stringExtra);\n C4990ab.m7417i(\"MicroMsg.JsApiChooseMedia\", \"video thumbLocalId:%s\", stringExtra2);\n if (C5046bo.isNullOrNil(stringExtra)) {\n C4990ab.m7412e(\"MicroMsg.JsApiChooseMedia\", \"mmOnActivityResult REQUEST_CHOOSE_MEDIA video localId is null\");\n C22846h.m34667a(C22846h.this, \"fail\");\n AppMethodBeat.m2505o(6291);\n return;\n }\n WebViewJSSDKFileItem aeo = C29782c.aeo(stringExtra);\n if (aeo == null || !(aeo instanceof WebViewJSSDKVideoItem)) {\n C4990ab.m7412e(\"MicroMsg.JsApiChooseMedia\", \"mmOnActivityResult REQUEST_CHOOSE_MEDIA nor the videoitem\");\n break;\n }\n WebViewJSSDKVideoItem webViewJSSDKVideoItem = (WebViewJSSDKVideoItem) aeo;\n C4990ab.m7417i(\"MicroMsg.JsApiChooseMedia\", \"after parse to json data : %s\", C43914ap.m78770c(stringExtra, stringExtra2, webViewJSSDKVideoItem.duration, webViewJSSDKVideoItem.height, webViewJSSDKVideoItem.width, webViewJSSDKVideoItem.size));\n hashMap = new HashMap();\n hashMap.put(\"type\", Integer.valueOf(1));\n hashMap.put(\"localIds\", stringExtra);\n C22846h.m34669a(C22846h.this, hashMap);\n AppMethodBeat.m2505o(6291);\n return;\n } else if (intExtra == 2) {\n stringExtra = intent.getStringExtra(\"key_pick_local_media_local_ids\");\n C4990ab.m7417i(\"MicroMsg.JsApiChooseMedia\", \"chooseMedia localIds:%s\", stringExtra);\n if (C5046bo.isNullOrNil(stringExtra)) {\n C4990ab.m7412e(\"MicroMsg.JsApiChooseMedia\", \"mmOnActivityResult REQUEST_CHOOSE_MEDIA image localIds is null\");\n C22846h.m34667a(C22846h.this, \"fail\");\n AppMethodBeat.m2505o(6291);\n return;\n }\n hashMap = new HashMap();\n hashMap.put(\"type\", Integer.valueOf(2));\n hashMap.put(\"localIds\", stringExtra);\n C22846h.m34669a(C22846h.this, hashMap);\n AppMethodBeat.m2505o(6291);\n return;\n } else {\n C4990ab.m7413e(\"MicroMsg.JsApiChooseMedia\", \"type:%d is error\", Integer.valueOf(intExtra));\n C22846h.m34667a(C22846h.this, \"fail\");\n AppMethodBeat.m2505o(6291);\n return;\n }\n break;\n case 0:\n C22846h.m34667a(C22846h.this, \"cancel\");\n AppMethodBeat.m2505o(6291);\n return;\n }\n C22846h.m34667a(C22846h.this, \"fail\");\n }\n AppMethodBeat.m2505o(6291);\n }", "void mo80555a(MediaChooseResult mediaChooseResult);", "private void switchPlayPause(){\n Intent mSwitchPlayStatus = new Intent(BROADCAST_switchPlayStatus);\n if (mIsPlaying==1) {\n mSwitchPlayStatus.putExtra(\"switchPlayStatus\", 1);\n sBtn_PlayResume.setImageResource(R.drawable.select_btn_play);\n } else if (mIsPlaying==2){\n mSwitchPlayStatus.putExtra(\"switchPlayStatus\",2);\n sBtn_PlayResume.setImageResource(R.drawable.select_btn_pause);\n }\n LocalBroadcastManager.getInstance(this).sendBroadcast(mSwitchPlayStatus);\n }", "public interface VoiceActivityDetectorListener {\n void onVoiceActivityDetected();\n void onNoVoiceActivityDetected();\n}", "void play(boolean fromUser);", "public interface IsReceiveSMS\n {\n /**\n * receive message\n */\n String RECEIVE = \"1\";\n\n /**\n * do not receive message\n */\n String UN_RECEIVE = \"0\";\n }", "public void onLocalAudioMuteClicked(View view) {\n // Change the value of muted\n mMuted = !mMuted;\n // Update the agora engine with the mute\n mRtcEngine.muteLocalAudioStream(mMuted);\n // Get the correct mute button\n int res = mMuted ? R.drawable.btn_mute : R.drawable.btn_unmute;\n // Apply the correct img\n mMuteBtn.setImageResource(res);\n }", "void speechToTextFuncVoiceForPurchase(Context context, EditText editText, int dataType, ImageView micImage, int valueforValidate) {\n if (Utility.getInstance().isOnline(mContext)) {\n int value = checkPermission(mContext, Manifest.permission.RECORD_AUDIO, RECORD_AUDIO_PERMISSION_REQUEST_CODE);\n if (value == 1) {\n mSpeechRecognizer = SpeechRecognizer.createSpeechRecognizer(mContext);\n mSpeechRecognizerIntent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);\n mSpeechRecognizerIntent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL, RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);\n String languageCode = Utility.getInstance().getLanguage(mContext);\n // Locale current = getResources().getConfiguration().locale;\n if (languageCode.matches(langaugeCodeEnglish)) {\n mSpeechRecognizerIntent.putExtra(RecognizerIntent.EXTRA_LANGUAGE, \"en_US\");\n } else if (languageCode.matches(languageCodeMarathi)) {\n mSpeechRecognizerIntent.putExtra(RecognizerIntent.EXTRA_LANGUAGE, \"mr_IN\");\n } else {\n mSpeechRecognizerIntent.putExtra(RecognizerIntent.EXTRA_LANGUAGE, \"en_US\");\n setError(\"BaseFragmnet : speechToTextFunc Has problem\");\n }\n mSpeechRecognizer.setRecognitionListener(new RecognitionListener() {\n @Override\n public void onReadyForSpeech(Bundle params) {\n if (isVisible()) {\n micImage.setColorFilter(getResources().getColor(android.R.color.holo_green_light), PorterDuff.Mode.SRC_IN);\n if (editText != null) {\n editText.getBackground().setColorFilter(getResources().getColor(android.R.color.holo_green_light),\n PorterDuff.Mode.SRC_ATOP);\n }\n }\n }\n\n @Override\n public void onBeginningOfSpeech() {\n\n }\n\n @Override\n public void onRmsChanged(float rmsdB) {\n\n }\n\n @Override\n public void onBufferReceived(byte[] buffer) {\n\n }\n\n @Override\n public void onEndOfSpeech() {\n if (isVisible()) {\n micImage.setColorFilter(getResources().getColor(android.R.color.black), PorterDuff.Mode.SRC_IN);\n if (editText != null) {\n editText.getBackground().setColorFilter(getResources().getColor(android.R.color.black),\n PorterDuff.Mode.SRC_ATOP);\n }\n }\n }\n\n @Override\n public void onError(int error) {\n\n }\n\n @Override\n public void onResults(Bundle results) {\n if (isVisible()) {\n ArrayList<String> matches = results.getStringArrayList(SpeechRecognizer.RESULTS_RECOGNITION);\n if (matches.get(0).toString().toLowerCase().contains(getString(R.string.save).toString().toLowerCase())) {\n boolean valueStatus = validatePuchase();\n if (valueStatus) {\n createPurchaseRequest(flowpurchaseReceivedOrPaid);\n }\n } else if (matches.get(0).toString().toLowerCase().contains(getString(R.string.cancel_two).toString().toLowerCase())) {\n dialog.dismiss();\n dialog.dismiss();\n dialog.dismiss();\n if (textToSpeech != null) {\n textToSpeech.stop();\n }\n Toast.makeText(mContext, getString(R.string.transaction_cancelled), Toast.LENGTH_SHORT).show();\n speak(getString(R.string.transaction_cancelled), \"\");\n }\n if (editText != null) {\n if (dataType == 1) {\n editText.setText(matches.get(0));\n } else {\n for (int i = 0; i < matches.size(); i++) {\n if (matches.get(i).matches(\"^[0-9]*$\")) {\n editText.setText(matches.get(i));\n }\n }\n }\n\n\n //Ankur\n boolean valueValidate = validatePuchase();\n if (valueValidate) {\n speak(getString(R.string.please_say_save_or_cancel), \"\");\n new Handler().postDelayed(() -> {\n speechToTextFuncVoiceForPurchase(mContext, null, 3, imageviewMicSaveCancel, 2);\n }, 3000);\n }\n\n }\n }\n }\n\n @Override\n public void onPartialResults(Bundle partialResults) {\n\n }\n\n @Override\n public void onEvent(int eventType, Bundle params) {\n\n }\n });\n\n if (dialog.isShowing()) {\n mSpeechRecognizer.startListening(mSpeechRecognizerIntent);\n }\n } else if (value == 2) {\n displayNeverAskAgainDialog(mContext, getString(R.string.We_need_permission_Audio));\n }\n } else {\n Toast.makeText(context, getString(R.string.please_check_internet), Toast.LENGTH_SHORT).show();\n }\n }", "public interface IsSendSMSForReminder\n {\n /**\n * not show\n */\n String SUPPORT = \"1\";\n\n /**\n * show\n */\n String UN_SUPPORT = \"0\";\n }", "private static void handleVideoSharingInvitation(Context context,\n Intent invitation) {\n }", "public interface IMojingAppCallback {\n\n public void changeVideoType(String path,int video3dType,int videoModeType);\n\n}", "void onVideoInputSelected(int type);", "@Override\r\n public void onItemClick(AdapterView<?> arg0, View arg1, int nSelectIndex, long arg3) {\n\r\n LocalDefines.B_INTENT_ACTIVITY = true; // add by mai 2015-5-15\r\n if (arg0.getId() == R.id.lvPlayer_back) {\r\n\r\n if (nSelectIndex >= 0 && nSelectIndex < LocalDefines._severInfoListData.size()) {\r\n\r\n LocalDefines._PlaybackListviewSelectedPosition = nSelectIndex;\r\n DeviceInfo info = LocalDefines._severInfoListData.get(LocalDefines._PlaybackListviewSelectedPosition);\r\n if (info != null && textViewDevice != null) {\r\n boolean isZh = LocalDefines.isZh(getActivity());\r\n if (isZh) {\r\n// if (HomePageActivity.AppMode == 1) {\r\n//\r\n// if (info.getnProductId() > 0) {\r\n// } else if (info.getnProductId() == 0) {\r\n// isSearchCloudRec = false;\r\n// tvTFVideo.setTextColor(getResources().getColor(R.color.font_color_sky_blue2));\r\n// tvCloudVideo.setTextColor(getResources().getColor(R.color.font_color_gray));\r\n// } else {\r\n// isSearchCloudRec = false;\r\n// tvTFVideo.setTextColor(getResources().getColor(R.color.font_color_sky_blue2));\r\n// tvCloudVideo.setTextColor(getResources().getColor(R.color.font_color_gray));\r\n// }\r\n//\r\n// } else {\r\n// }\r\n }\r\n if (Functions.isNVRDevice(\"\" + info.getnDevID())) {\r\n llChannel.setVisibility(View.VISIBLE);\r\n } else {\r\n llChannel.setVisibility(View.GONE);\r\n }\r\n deviceInfo = info;\r\n if (info.getStrName() != null && info.getStrName().length() > 0) {\r\n textViewDevice.setText(info.getStrName());\r\n } else {\r\n textViewDevice.setText(\"\" + info.getnDevID());\r\n }\r\n bSearchType = true;\r\n ivPlayerBackType.setImageResource(R.drawable.play_back_video_back_2);\r\n\r\n btnListVisible.setVisibility(View.VISIBLE);\r\n\r\n popupListView.dismiss();\r\n }\r\n\r\n }\r\n\r\n } else if (arg0.getId() == R.id.recfile_list) {\r\n if (nSelectIndex >= 0 && nSelectIndex < fileList.size()) {\r\n\r\n if (mRecFileDownloader != null && mRecFileDownloader.isDownloading()) {\r\n // 锟斤拷锟斤拷锟斤拷锟斤拷锟截碉拷录锟斤拷锟侥硷拷\r\n Toast.makeText(getActivity(), getString(R.string.str_rec_file_cancle2), Toast.LENGTH_SHORT).show();\r\n return;\r\n }\r\n\r\n if (!isCloudFileList) {\r\n // Log.i(\"TAG\", \"本地录像\");\r\n if (fileList != null && fileList.size() > 0) {\r\n SaveRecFileListToDatabase();\r\n }\r\n LocalDefines.listMapPlayerBackFile = fileList;\r\n StartPlayFile(nSelectIndex);\r\n\r\n } else {\r\n // Log.i(\"TAG\", \"云录像\");\r\n if (fileList != null && fileList.size() > 0) {\r\n SaveRecFileListToDatabase();\r\n }\r\n LocalDefines.cloudRecordFileList = fileList;\r\n if (mRecFileDownloader != null && mRecFileDownloader.isDownloading()) {\r\n // 锟斤拷锟斤拷锟斤拷锟斤拷锟截碉拷录锟斤拷锟侥硷拷\r\n Toast.makeText(getActivity(), getString(R.string.str_rec_file_cancle2), Toast.LENGTH_SHORT).show();\r\n return;\r\n }\r\n startPlayCloudRecordFile(nSelectIndex);\r\n }\r\n\r\n }\r\n }\r\n\r\n }", "public boolean isVideo()\n {return false;\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 }", "private void matikanAlarm() {\n\t\t\n\t\tif (mediaplayer.isPlaying() == true) {\n\t\t\t//matikan media player\n\t\t\tmediaplayer.pause();\n\t\t}\n\t\telse {\n\t\t\t//tidak melakukan apa apa\n\t\t}\t\t\t\t\n\t}", "@Override\r\n\tpublic boolean canPlay() {\n\t\treturn false;\r\n\t}", "boolean isLocalVideoStreaming(Call call);", "@Override\npublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\tIntent intent;\n\tswitch (arg2) {\n\tcase 0://查看所有的短信\n\t\t//所有短信\n\t\t intent = new Intent(this,SMSListActivity.class);\n\t\tintent.putExtra(\"filter\", 0); \n\t\tstartActivity(intent);\n\t\tbreak;\n\t\tcase 1:\n\t\t\t//查看手机短信\n\t\t\tintent = new Intent(this,SMSListActivity.class);\n\t\t\tintent.putExtra(\"filter\", 1); \n\t\t\tstartActivity(intent);\n\t\t\tbreak;\n \tcase 2:\n\t\t//查看隐秘短信\n\t\tintent = new Intent(this,SMSListActivity.class);\n\t\tintent.putExtra(\"filter\", 2); \n\t\tstartActivity(intent);\n\t\tbreak;\n\t case 3:\n\t\t//查看拦截短信记录\n\t\tintent = new Intent(this,SMSListActivity.class);\n\t\tintent.putExtra(\"filter\", 3); \n\t\tstartActivity(intent);\n\t\tbreak;\n\t case 4:\n\t\t//查看转发短信记录\n\t\tintent = new Intent(this,SMSListActivity.class);\n\t\tintent.putExtra(\"filter\", 4); \n\t\tstartActivity(intent);\n\t\tbreak;\n\t case 5:\n\t\t//查看拦截号码和转发号码,黑名单\n\t\tintent = new Intent(this,SMSNOListActivity.class);\n\t\tstartActivity(intent);\n\t\tbreak;\n\t case 6:\n\t\t//设置拦截号码\"\n\t\tLayoutInflater factory = LayoutInflater.from(this);\n\t\tfinal View DialogView = factory.inflate(R.layout.layout_dialog_pho, null);\n\t\tfinal EditText dialE = (EditText)DialogView.findViewById(R.id.dialog_pho_edit);\n\t\tTextView dd=(TextView) DialogView.findViewById(R.id.dialog_pho_name);\n\t\t dd.setText(\"拦截的号码\");\n\t\tAlertDialog dig = new AlertDialog.Builder(this)\n\t\t\t .setTitle(\"设置拦截号码\")\n\t\t\t .setView(DialogView)\n\t\t\t .setPositiveButton(\"确定\", new DialogInterface.OnClickListener() {\n\t\t\t\t@Override\n\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\tString dialNuberm = dialE.getText().toString();\n\t\t\t\t\tSMSBlack blackList = new SMSBlack();\n\t\t\t\t\tblackList.OpenCreat(context);\n\t\t\t\t\tblackList.CreatTable();\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif(!dialNuberm.trim().equals(\"\")){\n\t\t\t\t\t\tblackList.AddData(dialNuberm,\"0\", \"0\",\"0\");\n Toast.makeText(context, \"添加成功\", 1).show();}\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t e.printStackTrace();\n\t\t\t\t\t\tToast.makeText(context, \"添加失败\", 1).show();\n\t\t\t\t\t }\n\t\t\t\t\tfinally{\n\t\t blackList.Close();\n\t\t\t\t\tdialog.cancel();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} )\n\t\t\t.setNegativeButton(\"取消\", new DialogInterface.OnClickListener() {\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\tdialog.cancel();\n\t\t\t\t\t\t}\n\t\t\t\t\t} )\n\t\t\t\t\t.create();\n\t dig.show();\n\t\tbreak;\n\tcase 7:\n\t\t//\"设置转发号码\"\n\t\tLayoutInflater factory1 = LayoutInflater.from(this);\n\t\tfinal View DialogView1 = factory1.inflate(R.layout.zhuanfaedit, null);\n\t\tfinal EditText dialE1 = (EditText)DialogView1.findViewById(R.id.zhuanfa_t1);\n\t\tfinal EditText dialE2 = (EditText)DialogView1.findViewById(R.id.zhuanfa_t2);\n\t\tAlertDialog dig1 = new AlertDialog.Builder(this)\n\t\t\t.setTitle(\"设置转发号码\")\n\t\t\t.setView(DialogView1)\n\t\t\t.setPositiveButton(\"确定\", new DialogInterface.OnClickListener() {\n\t\t\t\t@Override\n\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\tString dialNuberm = dialE1.getText().toString();\n\t\t\t\t\tSMSBlack blackList = new SMSBlack();\n\t\t\t\t\tblackList.OpenCreat(context);\n\t\t\t\t\tblackList.CreatTable();\n\t\t\t\t\ttry {\n\t\t\t\t\t\tString num1=dialE1.getText().toString();\n\t\t\t\t\t\tString num2=dialE2.getText().toString();\n\t\t\t\t\t\tif(!num1.trim().equals(\"\")&&!num2.trim().equals(\"\")){\n\t\t\t\t\t\tblackList.AddData(num1,num2,\"1\",\"0\");\n\t\t\t\t\t\tToast.makeText(context, \"添加成功\", 1).show();}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tToast.makeText(context, \"添加失败\",1).show(); \n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\te.printStackTrace();\n Toast.makeText(context, \"添加失败\",1).show(); \n\t\t\t\t\t}\n\t\t\t\t\tfinally{\n\t\t\t\t\t\tblackList.Close();\n\t\t\t\t\t\tdialog.cancel();\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} )\n\t\t\t.setNegativeButton(\"取消\", new DialogInterface.OnClickListener() {\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\tdialog.cancel();\n\t\t\t\t\t\t}\n\t\t\t\t\t} )\n\t\t\t\t\t.create();\n\t dig1.show();\n\t\tbreak;\n\t\tcase 8:\n\t\t\t//设置监听短信\"\n\t\t\tLayoutInflater factory2 = LayoutInflater.from(this);\n\t\t\tfinal View DialogView2 = factory2.inflate(R.layout.layout_dialog_pho, null);\n\t\t\tfinal EditText yinmino = (EditText)DialogView2.findViewById(R.id.dialog_pho_edit);\n\t\t\tAlertDialog yinmi = new AlertDialog.Builder(this)\n\t\t\t\t .setTitle(\"设置拦截号码\")\n\t\t\t\t .setView(DialogView2)\n\t\t\t\t .setPositiveButton(\"确定\", new DialogInterface.OnClickListener() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\tString dialNuberm = yinmino.getText().toString();\n\t\t\t\t\t\tSMSBlack blackList = new SMSBlack();\n\t\t\t\t\t\tblackList.OpenCreat(context);\n\t\t\t\t\t\tblackList.CreatTable();\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tif(!dialNuberm.trim().equals(\"\")){\n\t\t\t\t\t\t\tblackList.AddData(\"0\",\"0\",\"2\",dialNuberm);\n\t\t\t\t\t\t\tToast.makeText(context, \"添加成功\", 1).show();\n\t\t\t\t\t\t\t} \n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t e.printStackTrace();\n\t\t\t\t\t\t\tToast.makeText(context, \"添加失败\", 1).show();\n\t\t\t\t\t\t }\n\t\t\t\t\t\tfinally{\n\t\t\t blackList.Close();\n\t\t\t\t\t\tdialog.cancel();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} )\n\t\t\t\t.setNegativeButton(\"取消\", new DialogInterface.OnClickListener() {\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\t\tdialog.cancel();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} )\n\t\t\t\t\t\t.create();\n\t\t yinmi.show();\n\t\t break;\n\tcase 9:\n\t\tToast.makeText(context, \"用户需要什么功能\", 1000).show();\n\tdefault:\n\t\tbreak;\n\t}\n}", "@Override\n\tpublic void canSpeak() {\n\t\t\n\t}", "boolean hasSendPlayerId();", "public interface MultiScreenEnable\n {\n /**\n * allow\n */\n String ALLOW = \"0\";\n\n /**\n * not allow\n */\n String NOT_ALLOW = \"1\";\n }", "public void onClick(View v) {\n if(DataHolder.theSoundSetting == 1){\n DataHolder.theSoundSetting = 2;\n modeButton.setText(\"Vibrate Only Mode\");\n }\n else if(DataHolder.theSoundSetting == 2){\n DataHolder.theSoundSetting = 3;\n modeButton.setText(\"Normal Mode\");\n }\n else if(DataHolder.theSoundSetting == 3){\n DataHolder.theSoundSetting = 4;\n modeButton.setText(\"Silent Mode\");\n }\n else if(DataHolder.theSoundSetting == 4){\n DataHolder.theSoundSetting = 1;\n modeButton.setText(\"Sound Only Mode\");\n }\n\n }", "protected void startVideoCall() {\n if (!EMClient.getInstance().isConnected())\n Toast.makeText(ChatDetailsActivity.this, R.string.not_connect_to_server, Toast.LENGTH_SHORT).show();\n else {\n startActivity(new Intent(ChatDetailsActivity.this, VideoCallActivity.class).putExtra(\"username\", mBean.getMobile())\n .putExtra(\"isComingCall\", false).putExtra(\"nickname\", mBean.getUser_nickname()));\n // videoCallBtn.setEnabled(false);\n// inputMenu.hideExtendMenuContainer();\n }\n }", "private void shareFlipzu() {\n\t\t\n\t\t//create the intent \n\t\tIntent shareIntent = \n\t\t new Intent(android.content.Intent.ACTION_SEND); \n\t\t \n\t\t//set the type \n\t\tshareIntent.setType(\"text/plain\"); \n\t\t \n\t\t//add a subject \n\t\tshareIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, \n\t\t \"Check out this cool App\");\t\t\n\t\t \n\t\t//build the body of the message to be shared \n\t\tString shareMessage = \"Flipzu, live audio broadcast from your Android phone: https://market.android.com/details?id=\" + APP_PNAME; \n\t\t \n\t\t//add the message \n\t\tshareIntent.putExtra(android.content.Intent.EXTRA_TEXT, \n\t\t shareMessage); \n\t\t \n\t\t//start the chooser for sharing \n\t\tstartActivity(Intent.createChooser(shareIntent, \n\t\t getText(R.string.share_app))); \n\n\t}", "@Override\n public void onItemClick(AdapterView parent, View view, int position, long id) {\n String nombre = listadoArchivos.get(position).getTitulo();\n\n //extraigo del nombre la parte de la extension (3gp o mp4)\n int inicio = nombre.indexOf(\".\");\n int fin = nombre.indexOf(\"\", inicio);\n String extension = (nombre.substring(inicio + 1));\n\n if (extension.equals(\"3gp\")) {\n Intent intent = new Intent(getContext(), AudioPlayerActivity.class);\n intent.putExtra(\"titulo\", nombre);\n startActivity(intent);\n } else {\n Intent intent = new Intent(getContext(), VideoPlayerActivity.class);\n intent.putExtra(\"titulo\", nombre);\n startActivity(intent);\n }\n\n\n }", "public void process(View view){\n if (GlaDOS_me.CURRENT_AUDIO == GlaDOS_me.RECORDED_AUDIO){\n\n }\n else if (GlaDOS_me.CURRENT_AUDIO == GlaDOS_me.LOADED_AUDIO){\n\n\n }\n }", "private void createOffer() {\n// showToast(\"createOffer\");\n Log.d(TAG, \"createOffer: \");\n sdpConstraints = new MediaConstraints();\n sdpConstraints.mandatory.add(\n new MediaConstraints.KeyValuePair(\"OfferToReceiveAudio\", \"true\"));\n sdpConstraints.mandatory.add(\n new MediaConstraints.KeyValuePair(\"OfferToReceiveVideo\", \"true\"));\n localPeer.createOffer(new CustomSdpObserver(\"localCreateOffer\") {\n @Override\n public void onCreateSuccess(SessionDescription sessionDescription) {\n super.onCreateSuccess(sessionDescription);\n localPeer.setLocalDescription(new CustomSdpObserver(\"localSetLocalDesc\"), sessionDescription);\n Log.d(TAG, \"send offer sdp emit \");\n SignallingClient.getInstance().sendOfferSdp(sessionDescription);\n }\n }, sdpConstraints);\n }", "public void enableVideoMulticast(boolean yesno);", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif(isSpeaker) {\n\t\t\t\t\t//当前是扬声器模式,需切换为听筒模式\n\t\t\t\t\talert.dismiss();\n\t\t\t\t\taudioManager.setMode(AudioManager.MODE_IN_CALL);\n\t\t\t\t\tisSpeaker = false;\n\t\t\t\t\teditor.putInt(\"mode\", AudioManager.MODE_IN_CALL);\n\t\t\t\t\teditor.commit();\n\n\t\t\t\t}else {\n\t\t\t\t\talert.dismiss();\n\t\t\t\t\taudioManager.setMode(AudioManager.MODE_NORMAL);\n\t\t\t\t\tisSpeaker = true;\n\t\t\t\t\teditor.putInt(\"mode\", AudioManager.MODE_NORMAL);\n\t\t\t\t\teditor.commit();\n\n\t\t\t\t}\n\t\t\t\thandler.sendEmptyMessage(0x777);\n\n\t\t\t}", "@Override\r\n //TODO add button for location control \r\n public void onCreate(Bundle savedInstanceState) {\r\n super.onCreate(savedInstanceState); \r\n \r\n //TODO still hav action VIEW instead of get_rtsp\r\n Log.i(TAG, getIntent().getAction());\r\n if (this.getIntent().getAction().equalsIgnoreCase(ACTION_GET_RTSP) ){\r\n \tLog.i(TAG, \"hav sku : d : ex \" +this.getIntent().getData() +\" \" +this.getIntent().getStringExtra(\"sku\"));\r\n }\r\n //TODO start the player 'audioTrack' to accept bytesBuffr on predicted codec\r\n \r\n RTSPDialog _dial = new RTSPDialog();\r\n\t\tRTSPClient client = new RTSPClient();\r\n\t\tclient.setTransport(new PlainTCP());\r\n\t\tclient.setClientListener(_dial);\r\n\t\ttry {\r\n\t\t\tclient.describe(new URI(_dial.TARGET_URI));\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (URISyntaxException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\t_dial.resourceList = Collections.synchronizedList(new LinkedList<String>());\r\n\t\t// port is advertised in reply from setup?? why demand 2000\r\n\t\t//port = 2000;\r\n\t\t_dial.port = 49060;\r\n \r\n\r\n \r\n }", "private void toggleScreenShare(View v) {\n\n if(((ToggleButton)v).isChecked()){\n initRecorder();\n recordScreen();\n }\n else\n {\n mediaRecorder.stop();\n mediaRecorder.reset();\n stopRecordScreen();\n\n //play in videoView\n //videoView.setVisibility(View.VISIBLE);\n //videoView.setVideoURI(Uri.parse(videoUri));\n //videoView.start();\n\n\n\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(\" Location of video : \");\n builder.setMessage(videoUri);\n builder.show();\n\n Handler handler = new Handler();\n handler.postDelayed(new Runnable() {\n @Override\n public void run() {\n Intent i = new Intent(MainActivity.this, PlayVideo.class);\n i.putExtra(\"KEY\", videoUri);\n //Toast.makeText(this, videoUri, Toast.LENGTH_SHORT).show();\n startActivity(i);\n }\n }, 2000);\n Toast.makeText(this, \"Loading video...\", Toast.LENGTH_SHORT).show();\n\n\n\n }\n }", "@Override\n public void onClick(View v) {\n\n\n switch (v.getId()) {\n\n\n case R.id.can:\n //mp = MediaPlayer.create(this, R.raw.have_another_go);\n can.setVisibility(View.VISIBLE);\n mp = MediaPlayer.create(nur_cylinder_3.this, R.raw.success);\n mp.setAudioStreamType(AudioManager.STREAM_MUSIC);\n iscanTapped=true;\n mp.setLooping(false);\n mp.start();\n this.i++;\n nextScreen(this.i);\n break;\n\n case R.id.juice:\n //mp = MediaPlayer.create(this, R.raw.have_another_go);\n juice.setVisibility(View.VISIBLE);\n mp = MediaPlayer.create(nur_cylinder_3.this, R.raw.success);\n mp.setAudioStreamType(AudioManager.STREAM_MUSIC);\n isjuiceTapped=true;\n mp.setLooping(false);\n mp.start();\n this.i++;\n nextScreen(this.i);\n break;\n\n case R.id.vlc:\n //mp = MediaPlayer.create(this, R.raw.have_another_go);\n vlc.setVisibility(View.GONE);\n mp = MediaPlayer.create(nur_cylinder_3.this, R.raw.failure);\n mp.setAudioStreamType(AudioManager.STREAM_MUSIC);\n mp.setLooping(false);\n mp.start();\n break;\n\n case R.id.melon:\n //mp = MediaPlayer.create(this, R.raw.have_another_go);\n melon.setVisibility(View.GONE);\n mp = MediaPlayer.create(nur_cylinder_3.this, R.raw.failure);\n mp.setAudioStreamType(AudioManager.STREAM_MUSIC);\n mp.setLooping(false);\n mp.start();\n break;\n\n case R.id.casee:\n //mp = MediaPlayer.create(this, R.raw.have_another_go);\n casee.setVisibility(View.GONE);\n mp = MediaPlayer.create(nur_cylinder_3.this, R.raw.failure);\n mp.setAudioStreamType(AudioManager.STREAM_MUSIC);\n mp.setLooping(false);\n mp.start();\n break;\n }\n\n mp.seekTo(0);\n mp.start();\n\n\n }", "private void startPopup(Context context, Long id) {\n\n //Intent emaIntent = new Intent(context, VoiceRecognitionActivity.class); //The activity you want to start.\n //Intent emaIntent = new Intent(context, PopupActivity.class); //The activity you want to start.\n //Log.d(\"Alarm receiver\", \"received intent\");\n Random random = new Random();\n int value = random.nextInt(1);\n Intent emaIntent = new Intent(context, PopupActivity.class);\n emaIntent.putExtra(\"pos\", id);\n\n\n\n// if (value == 1) {\n// emaIntent = new Intent(context, PopupActivity.class); //The activity you want to start.\n// } else {\n// emaIntent = new Intent(context, VoiceRecognitionActivity.class);\n// }\n\n\n\n emaIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n context.startActivity(emaIntent);\n }", "@Override\n public void onClick(View v) {\n Intent intent_upload = new Intent();\n intent_upload.setType(\"audio/*\");\n intent_upload.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(intent_upload, 1);\n }", "public String getSound();", "@Override\n public void handleMessage(Message msg) {\n super.handleMessage(msg);\n switch (msg.what) {\n case PLAY_VIDEO:\n JCVideoPlayer.releaseAllVideos();\n /* if (topVideoList.size() == 1) {\n videoplayer.setUp(topVideoList.get(videotype).getPath()\n , JCVideoPlayerStandard.SCREEN_LAYOUT_NORMAL, \"视频播放\");\n } else {\n videoplayer.setUp(topVideoList.get(videotype).getPath()\n , JCVideoPlayerStandard.SCREEN_LAYOUT_NORMAL, \"视频播放\");\n if (videotype == topVideoList.size() - 1) {\n videotype = 0;\n } else {\n videotype++;\n }\n }*/\n if (videotype == 0) {\n videoplayer.setUp(Constant.fileSavePath + \"lx2.mp4\"\n , JCVideoPlayerStandard.SCREEN_LAYOUT_NORMAL, \"视频播放\");\n videotype = 1;\n } else {\n videoplayer.setUp(Constant.fileSavePath + \"lx1.mp4\"\n , JCVideoPlayerStandard.SCREEN_LAYOUT_NORMAL, \"视频播放\");\n videotype = 0;\n }\n videoplayer.startVideo();\n break;\n case PLAY_BANNER:\n loadTestDatas();\n break;\n case PLAY_BANNERAPAWAIT:\n loadTestApawaitDatas();\n break;\n case PLAY_VIDEOHEIGHT:\n ViewGroup.LayoutParams params = rel_top.getLayoutParams();\n if (msg.arg1 == 1) {\n params.height = 506;\n } else if (msg.arg1 == 2) {\n params.height = 607;\n }\n rel_top.setLayoutParams(params);\n break;\n case PY_START:\n cabinetTransaction.start(Constant.pypwd, Constant.dev, Constant.pytype, 1, Constant.guiBean.getNumber(), cabinetTransactionEventListener);\n break;\n case 12345:\n tvloginfo.setText(msg.obj.toString());\n break;\n case MSG_CLOSE_CHECK_PENDING:\n Log.i(\"TCP\", \"开始添加\");\n synchronized (boxesPendingList) {\n for (int i = 0; i < boxesPendingList.length; i++) {\n if (boxesPendingList[i].boxId == 0) {//无效的格子编号,当前位置 可以存储格子数据\n try {\n Thread.sleep(500);\n CloseCheckBox closeCheckBox = (CloseCheckBox) msg.obj;\n boxesPendingList[i] = closeCheckBox;\n } catch (InterruptedException e) {\n e.printStackTrace();\n Log.i(\"TCP\", \">锁boxesPendingList2<\" + e.toString());\n }\n break;\n }\n }\n }\n Log.i(\"TCP\", \"结束添加\");\n break;\n default:\n break;\n }\n }", "@Override\n public void onClick(View v) {\n\n switch (item.getId()) {\n\n case 1:\n\n /*mp = MediaPlayer.create(context, R.raw.cameraflash);\n mp.setVolume(100, 100);\n mp.start();\n\n Intent myIntent1 = new Intent(context, NameActivity.class);\n myIntent1.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n context.startActivity(myIntent1);*/\n\n break;\n\n case 2:\n\n /* mp = MediaPlayer.create(context, R.raw.cameraflash);\n mp.setVolume(100, 100);\n mp.start();\n\n Intent myIntent2 = new Intent(context, StartMenuV1.class);\n myIntent2.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n context.startActivity(myIntent2);*/\n\n break;\n case 3:\n\n /* mp = MediaPlayer.create(context, R.raw.cameraflash);\n mp.setVolume(100, 100);\n mp.start();\n\n Intent myIntent3 = new Intent(context, StartMenuV2.class);\n myIntent3.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n context.startActivity(myIntent3);*/\n\n break;\n }\n\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.main);\n ml = getSharedPreferences(\"musicList\", Context.MODE_PRIVATE);\n Intent receivem = getIntent();\n\n received = receivem.getIntExtra(\"MUS\",0);\n\n if(received==1)\n {\n MusKey=\"MUSICONE\";\n\n }\n\n if(received==2)\n {\n MusKey=\"MUSICTWO\";\n Toast.makeText(getApplicationContext(), \"Its shit\",\n Toast.LENGTH_SHORT).show();\n\n }\n if(received==3)\n {\n MusKey=\"MUSICTHREE\";\n }\n if(received==4)\n {\n MusKey=\"MUSICFOUR\";\n }\n\n if(received==9)\n {\n MusKey=\"EASYMUSIC\";\n }\n init_phone_music_grid();\n }", "String sound();", "public void onUaMediaSessionStopped(UserAgent ua, String type)\n { //printLog(type+\" stopped\");\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 }", "@Override\r\n public void handleMediaEvent(MediaEvent event) {\r\n if(running){\r\n try {\r\n Media media = event.getSource();\r\n String pluginName = media.getPluginName();\r\n Map<String,Object> location = SharedLocationService.getLocation(media.getPluginLocationId());\r\n switch(event.getEventType()){\r\n case PLAYER_PLAY:\r\n Map<String,Object> playerData = media.getNowPlayingData();\r\n publishMediaItem((String)location.get(\"floorname\"),(String)location.get(\"name\"),pluginName,\"action\",event.getEventType().toString().toLowerCase());\r\n publishMediaItem((String)location.get(\"floorname\"),(String)location.get(\"name\"),pluginName,\"type\",((MediaPlugin.ItemType)playerData.get(\"ItemType\")).toString().toLowerCase());\r\n if ((MediaPlugin.ItemType)playerData.get(\"ItemType\") == MediaPlugin.ItemType.AUDIO) {\r\n publishMediaItem((String)location.get(\"floorname\"),(String)location.get(\"name\"),pluginName,\"title\",(String)playerData.get(MediaPlugin.ItemDetails.TITLE.toString()));\r\n publishMediaItem((String)location.get(\"floorname\"),(String)location.get(\"name\"),pluginName,\"title artist\",(String)playerData.get(MediaPlugin.ItemDetails.TITLE_ARTIST.toString()));\r\n publishMediaItem((String)location.get(\"floorname\"),(String)location.get(\"name\"),pluginName,\"album\",(String)playerData.get(MediaPlugin.ItemDetails.ALBUM.toString()));\r\n publishMediaItem((String)location.get(\"floorname\"),(String)location.get(\"name\"),pluginName,\"album artist\",(String)playerData.get(MediaPlugin.ItemDetails.ALBUM_ARTIST.toString()));\r\n publishMediaItem((String)location.get(\"floorname\"),(String)location.get(\"name\"),pluginName,\"duration\",playerData.get(MediaPlugin.ItemDetails.DURATION.toString()).toString());\r\n } else {\r\n publishMediaItem((String)location.get(\"floorname\"),(String)location.get(\"name\"),pluginName,\"title\",(String)playerData.get(MediaPlugin.ItemDetails.TITLE.toString()));\r\n publishMediaItem((String)location.get(\"floorname\"),(String)location.get(\"name\"),pluginName,\"duration\",playerData.get(MediaPlugin.ItemDetails.DURATION.toString()).toString());\r\n }\r\n break;\r\n case PLAYER_PAUSE:\r\n publishMediaItem((String)location.get(\"floorname\"),(String)location.get(\"name\"),pluginName,\"action\",event.getEventType().toString().toLowerCase());\r\n break;\r\n case PLAYER_STOP:\r\n publishMediaItem((String)location.get(\"floorname\"),(String)location.get(\"name\"),pluginName,\"action\",event.getEventType().toString().toLowerCase());\r\n break;\r\n }\r\n } catch (Exception ex) {\r\n LOG.error(\"Could not publish to broker: {}\", ex.getMessage(), ex);\r\n }\r\n }\r\n }", "public final void mo9618b(C32183a c32183a) {\n AppMethodBeat.m2504i(6293);\n C4990ab.m7416i(\"MicroMsg.JsApiChooseMedia\", \"invoke\");\n this.hwd = (MMActivity) ((C24905d) c32183a.bOZ).mContext;\n this.ujY = c32183a;\n if (this.hwd == null) {\n m34672b(\"fail\", null);\n AppMethodBeat.m2505o(6293);\n return;\n }\n JSONObject jSONObject = c32183a.bPa.bOf;\n C4990ab.m7417i(\"MicroMsg.JsApiChooseMedia\", \" checkPermission checkcamera[%b]\", Boolean.valueOf(C35805b.m58707a(this.hwd, \"android.permission.CAMERA\", C31128d.MIC_AVROUND_BLUR, \"\", \"\")));\n C4990ab.m7417i(\"MicroMsg.JsApiChooseMedia\", \" checkPermission checkMicroPhone[%b]\", Boolean.valueOf(C35805b.m58707a(this.hwd, \"android.permission.RECORD_AUDIO\", 120, \"\", \"\")));\n if (C35805b.m58707a(this.hwd, \"android.permission.RECORD_AUDIO\", 120, \"\", \"\") && r0) {\n String str;\n String nullAsNil = C5046bo.nullAsNil(jSONObject.optString(\"sourceType\"));\n String optString = jSONObject.optString(\"mediaType\", \"\");\n int min = Math.min(jSONObject.optInt(\"maxDuration\", 10), 10);\n final String optString2 = jSONObject.optString(\"camera\", \"\");\n int optInt = jSONObject.optInt(\"count\", 1);\n String optString3 = jSONObject.optString(\"sizeType\", \"\");\n C4990ab.m7417i(\"MicroMsg.JsApiChooseMedia\", \"doChooseMedia sourceType:%s, mediaType:%s, maxDuration:%d, camera:%s, count:%d, sizeType:%s\", nullAsNil, optString, Integer.valueOf(min), optString2, Integer.valueOf(optInt), optString3);\n final Intent intent = new Intent();\n intent.putExtra(\"key_pick_local_pic_count\", optInt);\n if (min <= 0) {\n min = 10;\n }\n intent.putExtra(\"key_pick_local_media_duration\", min);\n intent.putExtra(\"query_media_type\", 3);\n intent.putExtra(\"key_pick_local_media_video_type\", 2);\n intent.putExtra(\"key_pick_local_media_sight_type\", optString);\n intent.putExtra(\"key_pick_local_pic_query_source_type\", (optString3.contains(\"original\") ^ optString3.contains(\"compressed\")) != 0 ? 7 : 8);\n intent.putExtra(\"key_pick_local_pic_send_raw\", Boolean.valueOf(optString3.contains(\"compressed\")));\n if (C5046bo.isNullOrNil(nullAsNil)) {\n str = \"album|camera\";\n } else {\n str = nullAsNil;\n }\n if (str.contains(FFmpegMetadataRetriever.METADATA_KEY_ALBUM) && str.contains(\"camera\")) {\n C46696j c46696j = new C46696j(this.hwd);\n c46696j.mo75009b(null, new C228451(), new C5279d() {\n public final void onMMMenuItemSelected(MenuItem menuItem, int i) {\n AppMethodBeat.m2504i(6289);\n switch (menuItem.getItemId()) {\n case 1:\n C22846h.m34668a(C22846h.this, optString2, intent);\n AppMethodBeat.m2505o(6289);\n return;\n case 2:\n C22846h.m34666a(C22846h.this, intent);\n break;\n }\n AppMethodBeat.m2505o(6289);\n }\n });\n c46696j.mo75012e(new C228483());\n c46696j.cuu();\n AppMethodBeat.m2505o(6293);\n return;\n } else if (str.contains(FFmpegMetadataRetriever.METADATA_KEY_ALBUM)) {\n m34670aA(intent);\n AppMethodBeat.m2505o(6293);\n return;\n } else if (str.contains(\"camera\")) {\n m34671b(optString2, intent);\n AppMethodBeat.m2505o(6293);\n return;\n } else {\n m34672b(\"sourceType_error\", null);\n AppMethodBeat.m2505o(6293);\n return;\n }\n }\n m34672b(\"no_user_permission\", null);\n AppMethodBeat.m2505o(6293);\n }", "public void handleRecButtonOnPressed() {\n ((AudioManager) getActivity().getSystemService(Context.AUDIO_SERVICE)).setStreamMute(AudioManager.STREAM_SYSTEM, true);\n ((AudioManager) getActivity().getSystemService(Context.AUDIO_SERVICE)).setStreamMute(AudioManager.STREAM_MUSIC, true);\n ((AudioManager) AppDelegate.getAppContext().getSystemService(Context.AUDIO_SERVICE)).setStreamMute(AudioManager.STREAM_RING, true);\n AudioManager audioMgr = ((AudioManager) getActivity().getSystemService(Context.AUDIO_SERVICE));\n\n cameraView.setVisibility(View.VISIBLE);\n mapView.getView().setVisibility(View.GONE);\n //updateMessage();\n if (timerCounter != null) {\n timerCounter.cancel();\n timerCounter = null;\n }\n\n if (isCameraRecording) {\n\n isCameraRecording = false;\n mStartRecordingButton.setChecked(false);\n mTextViewInfoAboutVideoStreaming.setVisibility(View.GONE);\n disableAuthorityAlertedText();\n\n cameraView.stopRecording();\n\n // Control view group\n cameraView.setVisibility(View.VISIBLE);\n mapView.getView().setVisibility(View.GONE);\n\n toolBarTitle.setText(dateFormat.format(new Date(userPreferences.recordTime() * 1000)));\n handler.removeCallbacksAndMessages(null);\n handler.removeCallbacks(counterMessage);\n counterMessage = null;\n\n //VIDEO FINISHING ALERT\n CommonAlertDialog dialog = new CommonAlertDialog(getActivity(), mAlertDialogButtonClickListerer); // Setting dialogview\n dialog.show();\n\n } else {\n\n userPreferences.setEventId(UUID.randomUUID().toString());\n isCameraRecording = true;\n\n mStartRecordingButton.setChecked(true);\n mTextViewInfoAboutVideoStreaming.setVisibility(View.VISIBLE);\n cameraView.setVisibility(View.VISIBLE);\n\n if (cacheFolder == null) {\n cacheFolder = new FwiCacheFolder(AppDelegate.getAppContext(), String.format(\"%s/%s\", userPreferences.currentProfileId(), userPreferences.eventId()));\n cameraView.setDelegate(this);\n cameraView.setCacheFolder(cacheFolder);\n }\n\n this.startRecording();\n\n }\n if (userPreferences.enableTorch()) {\n isenableTourch = true;\n cameraView.torchOn();\n }\n\n }", "public interface GetRandomPlaylistInterface {\n void responseReceived(GetRandomPlaylistResponse response);\n void onFailure();\n\n enum GetRandomPlaylistMessageType{\n FAILED,\n SUCCESS\n }\n\n class RandomPlaylistMessage extends MyMessage {\n public RandomPlaylistMessage randomPlaylistMessage;\n public boolean isAuthentic;\n public RandomPlaylistMessage(){\n type= MyMessageType.RANDOM_PLAYLIST;\n }\n }\n}", "boolean isCollected(User user, String video_id);", "public int shareLocalVideo() {\n videoEnabled = !videoEnabled;\n return mRtcEngine.enableLocalVideo(videoEnabled);\n }", "private Intent Shareintent(){\n Intent Shareintent = new Intent(Intent.ACTION_SEND);\n Shareintent.setType(\"text/html\");\n Shareintent.putExtra(Intent.EXTRA_SUBJECT, \"SUBJECT\");\n Shareintent.putExtra(Intent.EXTRA_TEXT, \"http://www.habeshastudent.com/m/video.html\");\n return Shareintent;\n\n\n }", "@Override\n public void onClick(View v) {\n Log.e(\"Mess\", \"onClick: \");\n if (v == btnVoice) {\n isMute = !isMute;\n // Handle clicks for btnVoice\n updataVoice(currentVoice, isMute);\n\n } else if (v == btnSwichPlayer) {\n // Handle clicks for btnSwichPlayer\n showSwichPlayerDialog();\n } else if (v == btnExit) {\n // Handle clicks for btnExit\n finish();\n } else if (v == btnPre) {\n // Handle clicks for btnPre\n playPreVideo();\n } else if (v == btnVideoStartPause) {\n // Handle clicks for btnVideoStartPause\n startAndPause();\n } else if (v == btnVideoNext) {\n // Handle clicks for btnVideoNext\n playNextVideo();\n } else if (v == btnVideoVideoSwitchScree) {\n // Handle clicks for btnVideoVideoSwitchScree\n setFullScreenAndDefault();\n }\n handler.removeMessages(HIDE_MEDIACONTROLLER);\n handler.sendEmptyMessageDelayed(HIDE_MEDIACONTROLLER, 5000);\n }", "private void m34671b(String str, Intent intent) {\n int i;\n AppMethodBeat.m2504i(6294);\n C4990ab.m7416i(\"MicroMsg.JsApiChooseMedia\", \"chooseMediaFromCamera\");\n if (str.equals(\"front\")) {\n i = 16;\n } else {\n i = 256;\n }\n intent.putExtra(\"key_pick_local_pic_capture\", i);\n this.hwd.ifE = this.hvq;\n C25985d.m41453a(this.hwd, \"webview\", \".ui.tools.OpenFileChooserUI\", intent, CdnLogic.kBizGeneric & hashCode(), false);\n AppMethodBeat.m2505o(6294);\n }", "public boolean getMute();", "public boolean convertAudioTypeToDefault();", "@Override\n public void onClick(View v) {\n if (v == btnVoice) {\n isMute = !isMute;\n // Handle clicks for btnVoice\n updataVoice(currenVoice, isMute);\n } else if (v == btnSwitchPlayer) {\n showSwitchPlayerDialog();//调用系统播放器\n // Handle clicks for btnSwitchPlayer\n } else if (v == btnExit) {\n finish();\n // Handle clicks for btnExit\n } else if (v == btnVideoPre) {\n playPreVideo();\n // Handle clicks for btnVideoPre\n } else if (v == btnVideoStartPause) {\n StartAndPause();\n // Handle clicks for btnVideoStartPause\n } else if (v == btnVideoNext) {\n // Handle clicks for btnVideoNext\n playNextVideo();\n } else if (v == btnVideoSwitchSrceen) {\n // Handle clicks for btnVideoSwitchSrceen\n setFullScreenAndDefault();//设置播放屏幕大小\n }\n //先移除旧的消息,再设置新的消息,这样就保证了在点击的是时候,控制面板不会自己动隐藏\n handler.removeMessages(HIDE_MEDIA_CONTORLLER);\n handler.sendEmptyMessageDelayed(HIDE_MEDIA_CONTORLLER, 4000);\n }", "@Override\n public void onAdAvailable(Intent intent) {\n rewardedVideoIntent = intent;\n Log.d(TAG, \"RV: Offers are available\");\n showRV.setEnabled(true);\n Toast.makeText(MainActivity.this, \"RV: Offers are available \", Toast.LENGTH_SHORT).show();\n }", "public boolean videoMulticastEnabled();", "boolean isMultiplayer();", "private void isAudio(MultipartFile file) {\n\t\t\n\t}", "private void playHintAudio() {\n AudioManager audioManager = (AudioManager)getContext().getSystemService(Context.AUDIO_SERVICE);\n int mode = audioManager.getRingerMode();\n Log.d(TAG,\"mode = \" + mode);\n\n if(mode != AudioManager.RINGER_MODE_SILENT && mode != AudioManager.RINGER_MODE_VIBRATE) {\n // prize modify for bug 44603 by zhaojian 20171205 start\n mMediaPlayer = MediaPlayer.create(getContext(),R.raw.hb_sound2);\n Log.d(\"debug\",\"isNotifySound = \" + getConfig().isNotifySound());\n if(getConfig().isNotifySound()) {\n mMediaPlayer.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {\n @Override\n public void onPrepared(MediaPlayer mp) {\n mp.start();\n }\n });\n mMediaPlayer.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {\n @Override\n public void onCompletion(MediaPlayer mp) {\n mp.release();\n }\n });\n mMediaPlayer.start();\n }\n // prize modify for bug 44603 by zhaojian 20171205 end\n }\n }", "public static void m15837a(int i) {\n String str;\n HashMap hashMap = new HashMap();\n String str2 = \"guest_connection_type\";\n if (i == 1) {\n str = \"video\";\n } else {\n str = \"voice\";\n }\n hashMap.put(str2, str);\n C8443c.m25663a().mo21606a(\"guest_connection_apply\", hashMap, new C8438j().mo21598a(\"live_take_detail\"), Room.class);\n }", "public Intent mo34965a(Context context) {\n Intent intent = new Intent(\"android.intent.action.SEND\");\n intent.setDataAndType(Uri.parse(String.format(\"snapchat://%s?link=%s\", new Object[]{this.f30606a.getDeeplinkUrlPath(), this.f30607b})), this.f30606a.getIntentType());\n Uri fileProviderUri = SnapUtils.getFileProviderUri(context, this.f30606a.getMediaFile());\n SnapSticker snapSticker = this.f30606a.getSnapSticker();\n String str = \"android.intent.extra.STREAM\";\n if (snapSticker != null) {\n Uri fileProviderUri2 = SnapUtils.getFileProviderUri(context, snapSticker.getStickerFile());\n intent.putExtra(\"sticker\", snapSticker.getJsonForm(fileProviderUri2).toString());\n ArrayList arrayList = new ArrayList();\n if (fileProviderUri != null) {\n arrayList.add(fileProviderUri);\n }\n arrayList.add(fileProviderUri2);\n if (arrayList.size() > 1) {\n intent.putParcelableArrayListExtra(str, arrayList);\n intent.setAction(\"android.intent.action.SEND_MULTIPLE\");\n } else if (!arrayList.isEmpty()) {\n intent.putExtra(str, (Parcelable) arrayList.get(0));\n }\n } else if (fileProviderUri != null) {\n intent.putExtra(str, fileProviderUri);\n }\n String attachmentUrl = this.f30606a.getAttachmentUrl();\n if (!TextUtils.isEmpty(attachmentUrl)) {\n intent.putExtra(\"attachmentUrl\", attachmentUrl);\n }\n String captionText = this.f30606a.getCaptionText();\n if (!TextUtils.isEmpty(captionText)) {\n intent.putExtra(\"captionText\", captionText);\n }\n return intent;\n }", "public void playMedia(View v)\n {\n // Make a decision based on the id of the view\n switch (v.getId())\n {\n case R.id.ukuleleButton:\n // If it's playing, pause it\n if (ukuleleMediaPlayer.isPlaying())\n {\n ukuleleMediaPlayer.pause();\n // Change the text\n ukuleleButton.setText(R.string.ukulele_button_play_text);\n ukuleleButton.setBackgroundColor(getResources().getColor(R.color.turquoise_water));\n ukuleleButton.setTextColor(Color.WHITE);\n // Hide other two buttons:\n ipuButton.setVisibility(View.VISIBLE);\n hulaButton.setVisibility(View.VISIBLE);\n }\n // else, play it\n else\n {\n ukuleleMediaPlayer.start();\n ukuleleButton.setText(R.string.ukulele_button_pause_text);\n ukuleleButton.setBackgroundColor(Color.TRANSPARENT);\n ukuleleButton.setTextColor(getResources().getColor(R.color.turquoise_water));\n ipuButton.setVisibility(View.INVISIBLE);\n hulaButton.setVisibility(View.INVISIBLE);\n }\n break;\n case R.id.ipuButton:\n if (ipuMediaPlayer.isPlaying())\n {\n ipuMediaPlayer.pause();\n ipuButton.setText(R.string.ipu_button_play_text);\n ipuButton.setBackgroundColor(getResources().getColor(R.color.turquoise_water));\n ipuButton.setTextColor(Color.WHITE);\n ukuleleButton.setVisibility(View.VISIBLE);\n hulaButton.setVisibility(View.VISIBLE);\n } else\n {\n ipuMediaPlayer.start();\n ipuButton.setText(R.string.ipu_button_pause_text);\n ipuButton.setBackgroundColor(Color.TRANSPARENT);\n ipuButton.setTextColor(getResources().getColor(R.color.turquoise_water));\n ukuleleButton.setVisibility(View.INVISIBLE);\n hulaButton.setVisibility(View.INVISIBLE);\n }\n break;\n case R.id.hulaButton:\n if (hulaVideoView.isPlaying())\n {\n hulaVideoView.pause();\n hulaButton.setText(R.string.hula_button_watch_text);\n hulaButton.setBackgroundColor(getResources().getColor(R.color.turquoise_water));\n hulaButton.setTextColor(Color.WHITE);\n ukuleleButton.setVisibility(View.VISIBLE);\n ipuButton.setVisibility(View.VISIBLE);\n } else\n {\n hulaVideoView.start();\n hulaButton.setText(R.string.hula_button_pause_text);\n hulaButton.setBackgroundColor(Color.TRANSPARENT);\n hulaButton.setTextColor(getResources().getColor(R.color.turquoise_water));\n ukuleleButton.setVisibility(View.INVISIBLE);\n ipuButton.setVisibility(View.INVISIBLE);\n }\n break;\n }\n }", "public Action play() {\n\t MobileDevice mobileDevice = MobileDevice.getInstance();\r\n\t\tUiDevice uiDevice = UiDevice.getInstance();\r\n\t\tint i = 0;\r\n\t\twhile (i < 5 && uiDevice.swipe(340, 180, 340, 660, 10)) i++;\r\n\t\ttry {\r\n\t\t\tThread.sleep(1000);\r\n\t\t} catch (InterruptedException e) {\r\n\t\t ApplicationInfor.errorLogging(\"user tweet process: sleep exception, msg=\" + e.getMessage());\r\n\t\t}\r\n\t\t\r\n\t\tQQMessage qqMessage = null;\r\n ArrayList<QQMessage> messageList = new ArrayList<QQMessage>();\r\n\t\t// get the first picture.\r\n\t\tqqMessage = this.getMessageItem();\r\n\t\tint errorTimes = 0;\r\n\t\t\r\n\t\twhile (null != qqMessage.uiItemObj && qqMessage.uiItemObj.exists()) {\r\n\t\t boolean isValidMessage = false;\r\n\t\t\tif (QQMessage.QQMessageType.PICTURE == qqMessage.messageType) {\r\n\t\t\t try {\r\n\t\t // get the image info.\r\n\t\t\t\t qqMessage.uiItemObj.click();\r\n\t\t\t\t\tThread.sleep(1000);\r\n\t\t\t\t\tint retryTime = 0;\r\n\t\t\t\t\tfor (retryTime = 0; retryTime < 3; retryTime++) {\r\n \t\t\t\t\tUiObject imgFullObj = new UiObject(new UiSelector().className(\"android.widget.ImageButton\"));\r\n \t\t\t\t\tif (!imgFullObj.exists()) {\r\n \t\t\t\t\t ApplicationInfor.errorLogging(\"user tweet process: image full object not exist!\");\r\n \t\t\t\t\t} else {\r\n \t\t\t\t\t\timgFullObj.click();\r\n \t\t\t\t\t\tUiObject saveButton = new UiObject(new UiSelector().text(\"保存到手机\"));\r\n \t\t\t\t\t\tif (!saveButton.exists()) {\r\n \t\t\t\t\t\t ApplicationInfor.errorLogging(\"user tweet process: save button not found.\");\r\n \t\t\t\t\t\t} else {\r\n \t\t\t\t\t\t\tsaveButton.click();\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t\tUiObject replaceButton = new UiObject(new UiSelector().text(\"替换\"));\r\n \t\t\t\t\t\tif (replaceButton.exists()) {\r\n \t\t\t\t\t\t\treplaceButton.click();\r\n \t\t\t\t\t\t}\r\n \t\t uiDevice.pressBack();\r\n \t\t isValidMessage = true;\r\n \t\t\t\t\t}\r\n \t\t\t\t\tif (isValidMessage) {\r\n \t\t\t\t\t break;\r\n \t\t\t\t\t}\r\n \t Thread.sleep(1000);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (!isValidMessage) {\r\n\t\t\t\t\t ApplicationInfor.errorLogging(\"user tweet process: get imsage all retry failed!!!\");\r\n\t\t\t\t\t}\r\n\t\t\t } catch (UiObjectNotFoundException | InterruptedException e) {\r\n\t\t\t ApplicationInfor.errorLogging(\"message picture: save the picture exception, msg=\" + e.getMessage());\r\n\t\t\t }\r\n\t\t\t} else if (QQMessage.QQMessageType.VOICE == qqMessage.messageType) {\r\n\t\t\t try {\r\n\t\t\t\t // get the voice info.\r\n\t\t\t\t qqMessage.text = qqMessage.uiItemObj.getText().trim();\r\n\t\t\t\t qqMessage.uiItemObj.dragTo(qqMessage.uiItemObj, 50);\r\n\t\t\t\t UiObject collectionButtonObj = new UiObject(new UiSelector().text(\"收藏\"));\r\n\t\t\t\t if (!collectionButtonObj.exists()) {\r\n\t\t\t\t ApplicationInfor.errorLogging(\"collect audios: collection button not found.\");\r\n\t\t\t\t uiDevice.pressBack();\r\n\t\t\t\t } else {\r\n\t\t\t\t collectionButtonObj.click();\r\n UiObject collectButtonObj = new UiObject(new UiSelector().text(\"收藏\"));\r\n if (!collectionButtonObj.exists()) {\r\n ApplicationInfor.errorLogging(\"collect audios: collectionButton edit not exist.\");\r\n } else {\r\n collectButtonObj.click();\r\n File collectionDir = new File(sCollectionPrefixPath);\r\n if (!collectionDir.isDirectory()) {\r\n ApplicationInfor.errorLogging(\"Collection directory not exist.\");\r\n } else {\r\n File[] audios = collectionDir.listFiles(new FileFilter() {\r\n public boolean accept(File file) {\r\n if (file.getName().startsWith(\"collection_\")) {\r\n return false;\r\n }\r\n if (file.getName().endsWith(\".slk\")) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n });\r\n if (1 != audios.length) {\r\n ApplicationInfor.warningLogging(\"autios length not 1, length = \" + String.valueOf(audios.length));\r\n }\r\n if (0 < audios.length) {\r\n File curAudiosFile = audios[0];\r\n UUID uuid = UUID.randomUUID();\r\n String newFileName = uuid.toString() + \".slk\";\r\n File newFile = new File(curAudiosFile.getParent(), newFileName);\r\n if (!curAudiosFile.renameTo(newFile)) {\r\n ApplicationInfor.errorLogging(\"audios process: rename file failed!\");\r\n } else {\r\n qqMessage.messageFile = newFile;\r\n isValidMessage = true;\r\n }\r\n }\r\n }\r\n }\r\n \r\n\t\t\t\t }\r\n\t\t\t } catch (UiObjectNotFoundException e) {\r\n\t\t\t ApplicationInfor.errorLogging(\"collect audios: exception! msg=\" + e.getMessage());\r\n\t\t\t }\r\n\t\t\t} else if (QQMessage.QQMessageType.TEXT == qqMessage.messageType) {\r\n\t\t\t try {\r\n \t\t\t // get the text info.\r\n \t\t\t qqMessage.text= qqMessage.uiItemObj.getText().trim();\r\n \t\t\t isValidMessage = true;\r\n\t\t\t } catch (UiObjectNotFoundException e) {\r\n\t\t\t ApplicationInfor.errorLogging(\"message text: exception! msg=\" + e.getMessage());\r\n\t\t\t }\r\n\t\t\t}\r\n\t\t\tif (isValidMessage) {\r\n\t\t\t messageList.add(qqMessage);\r\n\t\t\t errorTimes = 0;\r\n\t\t\t} else {\r\n\t errorTimes += 1;\r\n\t\t\t if (errorTimes < 5) {\r\n\t\t\t i = 0;\r\n\t\t\t while (i < 5 && uiDevice.swipe(340, 180, 340, 660, 10)) i++;\r\n\t\t\t try {\r\n\t\t\t Thread.sleep(1000);\r\n\t\t\t } catch (InterruptedException e) {\r\n\t\t\t ApplicationInfor.errorLogging(\"user tweet process: sleep exception, msg=\" + e.getMessage());\r\n\t\t\t }\r\n\t\t\t } else {\r\n\t\t\t errorTimes = 0;\r\n\t\t\t ApplicationInfor.errorLogging(\"Pull up 5 times but not work.\");\r\n\t\t\t }\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\t// delete the user item.\r\n\t\t\tfor (int j = 0; j < 3; j++) {\r\n\t try {\r\n \t\t\t qqMessage.uiItemObj.dragTo(qqMessage.uiItemObj, 50);\r\n \t\t\t UiObject rightButton = new UiObject(new UiSelector().description(\"right\"));\r\n \t\t\t if (rightButton.exists()) {\r\n \t\t\t rightButton.click();\r\n \t\t\t }\r\n \t\t\t\tUiObject delButton = new UiObject(new UiSelector().text(\"删除\"));\r\n \t\t\t\tif (!delButton.exists()) {\r\n \t\t\t\t ApplicationInfor.warningLogging(\"user tweet process: delete button not found.\");\r\n \t\t\t\t} else {\r\n \t\t\t\t\tdelButton.click();\r\n \t\t\t\t\tdelButton = new UiObject(new UiSelector().text(\"删除\"));\r\n \t\t\t\t\tif (delButton.exists()) {\r\n \t\t\t\t\t\tdelButton.click();\r\n \t\t\t\t\t\tbreak;\r\n \t\t\t\t\t} else {\r\n \t\t\t\t\t ApplicationInfor.errorLogging(\"user tweet process: delete button accept not found.\");\r\n \t\t\t\t\t}\r\n \t\t\t\t}\r\n \t\t\t\tif (QQMessage.QQMessageType.PICTURE == qqMessage.messageType) {\r\n \t\t\t\t UiObject imgFullObj = new UiObject(new UiSelector().className(\"android.widget.ImageButton\"));\r\n \t\t\t\t if (imgFullObj.exists()) {\r\n \t\t\t\t uiDevice.pressBack();\r\n \t\t\t\t }\r\n \t\t\t\t}\r\n \t\t\t\tThread.sleep(1000);\r\n\t\t\t\t} catch (UiObjectNotFoundException | InterruptedException e) {\r\n\t ApplicationInfor.errorLogging(\"user tweet process: get the img exception, msg=\" + e.getMessage());\r\n\t } \r\n\t\t\t} \r\n\t\t\tqqMessage = this.getMessageItem();\r\n\t\t}\r\n\t\t\r\n\t\t// get the QQ number\r\n\t\tString qqNum = \"\";\r\n\t\tUiObject qqObj = new UiObject(new UiSelector().resourceId(\"com.tencent.mobileqq:id/title\"));\r\n try {\r\n\t\t if (qqObj.exists()) {\r\n qqNum = qqObj.getText();\r\n uploadFiles(qqNum, messageList);\r\n\t\t } else {\r\n\t\t ApplicationInfor.errorLogging(\"user tweet process: QQ number not found.\");\r\n\t\t }\r\n\t } catch (UiObjectNotFoundException e) {\r\n\t ApplicationInfor.errorLogging(\"user tweet process: post the server exception, msg = \" + e.getMessage());\r\n }\r\n \r\n // clear gray column.\r\n UiObject grayColumnObj = new UiObject(new UiSelector().className(\"android.widget.AbsListView\").childSelector(\r\n new UiSelector().className(\"android.widget.LinearLayout\")));\r\n boolean isGrayColumnExists = grayColumnObj.exists(); \r\n UiObject titleTextObj = new UiObject(new UiSelector().resourceId(\"com.tencent.mobileqq:id/ivTitleName\"));\r\n String title = \"\";\r\n if (titleTextObj.exists()) {\r\n try {\r\n title = titleTextObj.getText();\r\n } catch (UiObjectNotFoundException e) {\r\n ApplicationInfor.errorLogging(\"title text get text exception, msg=\" + e.getMessage());\r\n }\r\n }\r\n\t\t// back to the normal.\r\n\t\tuiDevice.pressBack();\r\n\r\n\t\tif (title.equals(\"新朋友\")) {\r\n\t\t return this._actionMngr.getAddNewFriendsAction();\r\n\t\t} else if (isGrayColumnExists) {\r\n\t\t return this._actionMngr.getClearAllChatAction();\r\n\t\t}\r\n\t\t\r\n\t\treturn this._actionMngr.getMsglistDispatchAction();\r\n\t}", "@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\n\t\tif (20 == resultCode) {\n\t\t\tString msg = data.getExtras().getString(\"msg\");\n\t\t\tString action = data.getExtras().getString(\"action\");\n\n\t\t\tif (action.equals(\"1056\")) {// 姓名\n\t\t\t\t// messageItem.get(0).setContent(msg);\n\t\t\t} else if (action.equals(\"1042\")) {// 球龄\n\t\t\t\t// messageItem.get(4).setContent(msg);\n\n\t\t\t} else if (action.equals(\"1008\")) {// 场上位置\n\t\t\t\tmessageItem.get(3).setContent(msg);\n\t\t\t} else if (action.equals(\"1044\")) {// 个人标签\n\t\t\t\tmessageItem.get(5).setContent(msg);\n\t\t\t} else if (action.equals(\"1057\")) {// 性别\n\t\t\t\t// String sex = \"\";\n\t\t\t\t// if (msg.equals(\"1\"))\n\t\t\t\t// sex = \"男\";\n\t\t\t\t// else if (msg.equals(\"2\"))\n\t\t\t\t// sex = \"女\";\n\t\t\t\t// messageItem.get(7).setContent(sex);\n\t\t\t} else if (action.equals(\"1012\")) {// 生日\n\t\t\t\tmessageItem.get(2).setContent(msg);\n\t\t\t} else if (action.equals(\"1047\")) {// 个人签名\n\t\t\t\tmessageItem.get(6).setContent(msg);\n\n\t\t\t} else if (action.equals(\"1046\")) {// 工作行业\n\t\t\t\tmessageItem.get(4).setContent(msg);\n\n\t\t\t} else if (action.equals(\"1013\")) {// 居住地 籍贯\n\t\t\t\tint type = data.getExtras().getInt(\"type\");\n\t\t\t\tif (type == 0) {// 籍贯\n\t\t\t\t\tmessageItem.get(1).setContent(msg);\n\t\t\t\t} else if (type == 1) {// 居住地\n\t\t\t\t\tmessageItem.get(0).setContent(msg);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// adapter.setItem(messageItem);\n\t\t}\n\n\t\tswitch (requestCode) {\n\t\tcase TAKE_PICTURE:\n\t\t\tif (Bimp.tempSelectBitmap.size() < 9 && resultCode == RESULT_OK) {\n\n\t\t\t\tString fileName = String.valueOf(System.currentTimeMillis());\n\t\t\t\tbm = (Bitmap) data.getExtras().get(\"data\");\n\t\t\t\tFileUtils.saveBitmap(bm, fileName);\n\n\t\t\t\tpicPath = Environment.getExternalStorageDirectory()\n\t\t\t\t\t\t+ \"/Photo_She/\" + fileName + \".JPEG\";\n\t\t\t\t// f = new File(Environment.getExternalStorageDirectory()\n\t\t\t\t// + \"/Photo_She/\", fileName + \".JPEG\");\n\t\t\t\tfName = fileName + \".JPEG\";\n\n\t\t\t\tbmpUpload(fName, picPath);\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase REQUEST_CODE_LOCAL:\n\t\t\tif (data != null) {\n\t\t\t\tUri selectedImage = data.getData();\n\t\t\t\tif (selectedImage != null) {\n\t\t\t\t\tsendPicByUri(selectedImage);\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t\n\t\t\t\tif(player!=null){\n\t\t\t\t\tif(!isVoiceFlags){\n\t\t\t\t\t\tplayer.setVolume(0f, 0f);\n\t\t\t\t\t\tvideoView.start();\n\t\t\t\t\t\tisVoiceFlags=true;\n\t\t\t\t\t\timg_volumvideo.setBackgroundResource(TapfunsResourceUtil.findDrawableIdByName(AlertVideoActivity.this, \"volumvideo\"));\n\t\t\t\t\t}else{\n\t\t\t\t\t\tplayer.setVolume(1f, 1f);\n\t\t\t\t\t\tvideoView.start();\n\t\t\t\t\t\tisVoiceFlags=false;\n\t\t\t\t\t\timg_volumvideo.setBackgroundResource(TapfunsResourceUtil.findDrawableIdByName(AlertVideoActivity.this, \"volumclosevideo\"));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "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 interface RTSPConstants\n{\n // 1xx: Informational - Request received, continuing process\n public static final int RTSP_CONTINUE =100;\n \n // 2xx: Success - The action was successfully received, understood, and accepted\n public static final int RTSP_OK =200;\n public static final int RTSP_CREATED =201;\n public static final int RTSP_LOW_ON_STORAGE_SPACE =250;\n \n // 3xx: Redirection - Further action must be taken in order to complete the request\n public static final int RTSP_MULTIPLE_CHOICES =300;\n public static final int RTSP_MOVED_PERMANENTLY =301;\n public static final int RTSP_MOVED_TEMPORARILY =302;\n public static final int RTSP_SEE_OTHER =303;\n public static final int RTSP_NOT_MODIFIED =304;\n public static final int RTSP_USE_PROXY =305;\n \n // 4xx: Client Error - The request contains bad syntax or cannot be fulfilled\n public static final int RTSP_BAD_REQUEST =400;\n public static final int RTSP_UNAUTHORIZED =401;\n public static final int RTSP_PAYMENT_REQUIRED =402;\n public static final int RTSP_FORBIDDEN =403;\n public static final int RTSP_NOT_FOUND =404;\n public static final int RTSP_METHOD_NOT_ALLOWED =405;\n public static final int RTSP_NOT_ACCEPTABLE =406;\n public static final int RTSP_PROXY_AUTHENTICATION_REQUIRED =407;\n public static final int RTSP_REQUEST_TIME_OUT =408;\n public static final int RTSP_GONE =410;\n public static final int RTSP_LENGTH_REQUIRED =411;\n public static final int RTSP_PRECONDITION_FAILED =412;\n public static final int RTSP_REQUEST_ENTITY_TOO_LARGE =413;\n public static final int RTSP_REQUEST_URI_TOO_LARGE =414;\n public static final int RTSP_UNSUPPORTED_MEDIA_TYPE =415;\n public static final int RTSP_PARAMETER_NOT_UNDERSTOOD =451;\n public static final int RTSP_CONFERENCE_NOT_FOUND =452;\n public static final int RTSP_NOT_ENOUGH_BANDWIDTH =453;\n public static final int RTSP_SESSION_NOT_FOUND =454;\n public static final int RTSP_METHOD_NOT_VALID_IN_THIS_STATE =455;\n public static final int RTSP_HEADER_FIELD_NOT_VALID_FOR_RESOURCE =456;\n public static final int RTSP_INVALID_RANGE =457;\n public static final int RTSP_PARAMETER_IS_READ_ONLY =458;\n public static final int RTSP_AGGREGATE_OPERATION_NOT_ALLOWED =459;\n public static final int RTSP_ONLY_AGGREGATE_OPERATION_ALLOWED =460;\n public static final int RTSP_UNSUPPORTED_TRANSPORT =461;\n public static final int RTSP_DESTINATION_UNREACHABLE =462;\n \n // 5xx: Server Error - The server failed to fulfill an apparently valid request\n public static final int RTSP_INTERNAL_SERVER_ERROR =500;\n public static final int RTSP_NOT_IMPLEMENTED =501;\n public static final int RTSP_BAD_GATEWAY =502;\n public static final int RTSP_SERVICE_UNAVAILABLE =503;\n public static final int RTSP_GATEWAY_TIME_OUT =504;\n public static final int RTSP_RTSP_VERSION_NOT_SUPPORTED =505;\n public static final int RTSP_OPTION_NOT_SUPPORTED =551;\n\n\n\n public static final String tantau_sccsid = \"@(#)$Id: RTSPConstants.java,v 1.1 2009/02/06 14:24:14 rsoder Exp $\";\n}", "public void onUaMediaSessionStarted(UserAgent ua, String type, String codec)\n { //printLog(type+\" started \"+codec);\n }", "protected void muteSounds()\n {\n if(confused.isPlaying())\n confused.stop();\n }", "public interface IsShowMessage\n {\n /**\n * not show\n */\n String UN_SHOW = \"0\";\n\n /**\n * show\n */\n String SHOW = \"1\";\n }", "final int getShareOfOne() { return getPlayerId() == 0 ? 1 : 0; }", "boolean hasVideo();", "public boolean videoEnabled();", "public interface AdvancedMediaPlayer {\n public void playVlc(String fileName);\n public void playMp4(String fileName);\n}", "public abstract void grantVoice(String nickname);", "protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n //Log.v(\"test\", Boolean.toString(data.getStringExtra(EXTRA_NUMBER) != null));\n\n if (requestCode == 1 && resultCode == RESULT_OK && data != null) {\n \tresult = null;\n ArrayList<String> text = data.getStringArrayListExtra(RecognizerIntent.EXTRA_RESULTS);\n result = text.get(0);\n Log.v(\"CASE1\", result);\n \t//String number = data.getExtras().getString(EXTRA_NUMBER);\n \n \tLog.v(\"CASE1\", \"number is \" + num);\n\n \twhile(tts.isSpeaking()) {\n \ttry {\n\t\t\t\t\t\tThread.sleep(500);\n\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n }\n tts.speak(\"Did you say, \" + result + \"?\", TextToSpeech.QUEUE_FLUSH, null);\n while(tts.isSpeaking()) {\n \ttry {\n\t\t\t\t\t\tThread.sleep(500);\n\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n }\n recordMessage2(result, num);\n\n }\n if (requestCode == 2 && resultCode == RESULT_OK && data != null) {\n ArrayList<String> text = data.getStringArrayListExtra(RecognizerIntent.EXTRA_RESULTS);\n String confirmation = text.get(0);\n Log.v(\"CASE2\", \"confirmation in case 2 is \" + confirmation);\n if (confirmation.toLowerCase().equals(\"yes\")) {\n \tLog.v(\"CASE2\", \"message in case 2 is \" + result);\n if (result != null) {\n \tString body = result;\n \n \tString number = num;\n \t\tSmsManager sms = SmsManager.getDefault();\n \t\tsms.sendTextMessage(number, null, body, null, null);\n \t\twhile(tts.isSpeaking()) {\n \ttry {\n \t\t\t\t\t\tThread.sleep(500);\n \t\t\t\t\t} catch (InterruptedException e) {\n \t\t\t\t\t\t// TODO Auto-generated catch block\n \t\t\t\t\t\te.printStackTrace();\n \t\t\t\t\t}\n }\n \t\ttts.speak(\"Message sent\", TextToSpeech.QUEUE_FLUSH, null);\n \t\twhile(tts.isSpeaking()) {\n \ttry {\n \t\t\t\t\t\tThread.sleep(500);\n \t\t\t\t\t} catch (InterruptedException e) {\n \t\t\t\t\t\t// TODO Auto-generated catch block\n \t\t\t\t\t\te.printStackTrace();\n \t\t\t\t\t}\n }\n \t// send message\n }\n } else {\n \twhile(tts.isSpeaking()) {\n \ttry {\n \t\t\t\t\t\tThread.sleep(500);\n \t\t\t\t\t} catch (InterruptedException e) {\n \t\t\t\t\t\t// TODO Auto-generated catch block\n \t\t\t\t\t\te.printStackTrace();\n \t\t\t\t\t}\n }\n tts.speak(\"Please try again.\", TextToSpeech.QUEUE_FLUSH, null);\n while(tts.isSpeaking()) {\n \ttry {\n \t\t\t\t\t\tThread.sleep(500);\n \t\t\t\t\t} catch (InterruptedException e) {\n \t\t\t\t\t\t// TODO Auto-generated catch block\n \t\t\t\t\t\te.printStackTrace();\n \t\t\t\t\t}\n }\n recordMessage(num);\n }\n \n\n \t\n }\n }", "@Override\n public boolean onInfo(MediaPlayer mp, int what, int extra) {\n return false;\n }", "@Override\n public boolean onInfo(MediaPlayer mp, int what, int extra) {\n return false;\n }", "public void OnRtcLiveCancelLine(String strPeerId, String strUserName);", "@Override\n public void onActivityCreated(Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n\n session = new Session(getActivity());\n sessionManager = SessionManager.getInstance(getActivity());\n userInfoSession = new UserInfoSession(getActivity());\n\n mCurrentUserId = sessionManager.getCurrentUserID();\n\n Bundle getBundle = getArguments();\n muteUserList = (ArrayList<MuteUserPojo>) getBundle.getSerializable(\"MuteUserList\");\n\n rg.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {\n @Override\n public void onCheckedChanged(RadioGroup group, int checkedId) {\n if (rb1.isChecked()) {\n muteDuration = \"8 Hours\";\n } else if (rb2.isChecked()) {\n muteDuration = \"1 Week\";\n } else if (rb3.isChecked()) {\n muteDuration = \"1 Year\";\n }\n }\n });\n\n if (muteUserList != null && muteUserList.size() == 1) {\n MuteUserPojo muteUserItem = muteUserList.get(0);\n String toUserId = muteUserItem.getReceiverId();\n ContactDB_Sqlite contactDB_sqlite = CoreController.getContactSqliteDBintstance(getActivity());\n\n MuteStatusPojo muteData = null;\n\n if (muteUserItem.getChatType().equalsIgnoreCase(\"group\")) {\n muteData = contactDB_sqlite.getMuteStatus(mCurrentUserId, null, toUserId, false);\n } else {\n String docId = mCurrentUserId + \"-\" + toUserId;\n String convId = userInfoSession.getChatConvId(docId);\n muteData = contactDB_sqlite.getMuteStatus(mCurrentUserId, toUserId, convId, false);\n Log.e(\"DataBase-->\", muteData + \"\");\n// muteData = contactsDB.getMuteStatus(mCurrentUserId, toUserId, convId, false);\n }\n\n\n if (muteData != null && muteData.getMuteStatus().equals(\"1\")) {\n if (muteData.getDuration().equalsIgnoreCase(\"8 Hours\")) {\n rb1.setChecked(true);\n } else if (muteData.getDuration().equalsIgnoreCase(\"1 Week\")) {\n rb2.setChecked(true);\n } else if (muteData.getDuration().equalsIgnoreCase(\"1 Year\")) {\n rb3.setChecked(true);\n }\n if (muteData.getNotifyStatus().equals(\"1\")) {\n check.setChecked(true);\n }\n }\n } else {\n rb1.setChecked(true);\n }\n\n cancel.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n if (ConnectivityInfo.isInternetConnected(getActivity())) {\n listener.onMuteDialogClosed(false);\n getDialog().dismiss();\n } else {\n Toast.makeText(getActivity(), \"Check Your Network Connection\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n\n ok.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n if (ConnectivityInfo.isInternetConnected(getActivity())) {\n if (muteDuration == null || muteDuration.equals(\"\")) {\n Toast.makeText(getActivity(), \"Please choose duration\", Toast.LENGTH_SHORT).show();\n } else {\n for (MuteUserPojo muteUserItem : muteUserList) {\n String receiverId = muteUserItem.getReceiverId();\n String chatType = muteUserItem.getChatType();\n String secretType = muteUserItem.getSecretType();\n mLastMuteUserId = receiverId;\n\n String locDbDocId = getLocDBDocId(muteUserItem);\n// session.setMuteDuration(locDbDocId, muteDuration);\n\n String convId = null;\n if (chatType.equalsIgnoreCase(MessageFactory.CHAT_TYPE_SINGLE)) {\n if (userInfoSession.hasChatConvId(locDbDocId)) {\n convId = userInfoSession.getChatConvId(locDbDocId);\n }\n } else {\n // For group --- Group id and conversation id are same\n convId = receiverId;\n }\n\n if (!muteDuration.equals(\"\")) {\n int notifyStatus = 0;\n String value = getString(R.string.Default_ringtone);\n session.putTone(value);\n session.putgroupTone(value);\n if (check.isChecked()) {\n notifyStatus = 1;\n session.putTone(\"None\");\n session.putgroupTone(\"None\");\n }\n\n MuteUnmute.muteUnmute(EventBus.getDefault(), mCurrentUserId, receiverId, convId,\n chatType, secretType, 1, muteDuration, notifyStatus);\n\n } else {\n listener.onMuteDialogClosed(false);\n }\n\n /*if (!check.isChecked()) {\n session.setNotificationOnMute(locDbDocId, true);\n\n } else {\n session.setNotificationOnMute(locDbDocId, false);\n }*/\n\n mActivity.showProgressDialog();\n }\n }\n } else {\n Toast.makeText(getActivity(), \"Check Your Network Connection\", Toast.LENGTH_SHORT).show();\n }\n }\n\n });\n }", "public void enableAudioMulticast(boolean yesno);", "void setAudioAllowedToPlayInBackground(boolean allowed);", "public abstract String playMedia ();", "public interface MusicCommand {\n String UTF8 = \"utf-8\";\n String MUSIC_RECORD = \"music_record\";\n String MUSIC_PLAY_MODE = \"music_play_mode\";\n int SYSTEM_ERROR = -99;\n int CLICK_PLAY_PLAY = 0;\n int CLICK_PLAY_NEXT = 1;\n int CLICK_PLAY_LAST = 2;\n int CLICK_MODE_LOOP = 3;\n int CLICK_MODE_RANDOM = 4;\n int CLICK_MODE_SINGLE = 5;\n int TOUCH_SEEKBAR_SET_MUSIC_PLAY_POSTION = 6;\n int REGISTER_MUSIC_PLAY_BAR_LISTENER = 7;\n int REGISTER_PLAYING_INFO = 8;\n int REGISTER_SEEKBAR_STATUS = 9;\n int REGISTER_MUSIC_ARRAY_READY_LISTENER = 10;\n int MUSIC_MAIN_ACTIVITY_DESTROY = 11;\n}", "public void buttonListener(){\n soundButton.setOnClickListener(new OnClickListener() {\n public void onClick(View v) {\n sound = !sound;\n bluetoothIn.obtainMessage(handlerState1, Boolean.toString(sound)).sendToTarget();\n if (sound == true) {\n soundButton.setImageResource(R.drawable.normal_volume);\n soundButton.setScaleType(ImageView.ScaleType.FIT_CENTER);\n Toast.makeText(getBaseContext(), \"Sound Activated\", Toast.LENGTH_SHORT).show();\n } else {\n soundButton.setScaleType(ImageView.ScaleType.FIT_CENTER);\n soundButton.setImageResource(R.drawable.mute_volume);\n Toast.makeText(getBaseContext(), \"Mute\", Toast.LENGTH_SHORT).show();\n } } });\n }", "abstract String getSound();", "@Override\n protected void onListItemClick(ListView l, View v, int position, long id) {\n Toast.makeText(this,\"Kneel before the great Chandan!\",Toast.LENGTH_LONG);\n //Handle the click\n switch (position)\n {\n case 0:\n final Dialog dialog = new Dialog(Setting.this);\n dialog.setContentView(R.layout.dialog_set_preferences);\n final RadioButton setDefault,setCustom;\n final EditText editText;\n Button button;\n setDefault = (RadioButton)dialog.findViewById(R.id.radioButtonVoiceMessageDefualt);\n setCustom = (RadioButton)dialog.findViewById(R.id.radioButtonVoiceMessageCustom);\n editText = (EditText)dialog.findViewById(R.id.editTextVoiceMessage);\n button = (Button)dialog.findViewById(R.id.buttonSetVoiceMessage);\n setCustom.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {\n @Override\n public void onCheckedChanged(CompoundButton compoundButton, boolean b) {\n if(setCustom.isChecked())\n editText.setVisibility(View.VISIBLE);\n else\n editText.setVisibility(View.INVISIBLE);\n }\n });\n setDefault.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {\n @Override\n public void onCheckedChanged(CompoundButton compoundButton, boolean b) {\n if(setDefault.isChecked())\n editText.setVisibility(View.INVISIBLE);\n else\n\n editText.setVisibility(View.VISIBLE);\n }\n });\n\n button.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n editor = sharedPreferences.edit();\n if(setDefault.isChecked()) {\n\n editor.putString(\"VoiceMessage\",defaultVoiceMessage);\n editor.apply();\n }\n else\n {\n if (editText.getText().toString() != null) {\n editor.putString(\"VoiceMessage\",editText.getText().toString());\n editor.apply();\n } else {\n Toast.makeText(Setting.this,\"Please enter a valid message\",Toast.LENGTH_SHORT).show();\n }\n }\n Toast.makeText(Setting.this,\"Message set\",Toast.LENGTH_SHORT).show();\n voiceMessage = sharedPreferences.getString(\"VoiceMessage\",defaultVoiceMessage);\n description[0]= \"Current : \" + voiceMessage;\n MyAdapter myAdapter=new MyAdapter(Setting.this,titleArray,description,imageArray);\n\n listView=getListView();\n listView.setAdapter(myAdapter);\n dialog.dismiss();\n }\n });\n if(sharedPreferences.getString(\"VoiceMessage\",defaultVoiceMessage) != defaultVoiceMessage)\n {\n setCustom.setChecked(true);\n editText.setVisibility(View.VISIBLE);\n editText.setText(sharedPreferences.getString(\"VoiceMessage\",defaultVoiceMessage));\n }\n dialog.show();\n break;\n }\n super.onListItemClick(l, v, position, id);\n }", "private void changeAudioMode(Context context, String senderNumber, String message, AudioManager audioManager) {\n // Retrieves a map of extended data from the intent.\n switch (audioManager.getRingerMode()) {\n case AudioManager.RINGER_MODE_SILENT:\n //audioManager.setRingerMode(AudioManager.RINGER_MODE_NORMAL);\n //raiseVolume(audioManager);\n audioManager.setStreamVolume(AudioManager.STREAM_RING, audioManager.getStreamMaxVolume(AudioManager.STREAM_RING), 0);\n break;\n case AudioManager.RINGER_MODE_NORMAL:\n //audioManager.setStreamVolume(AudioManager.STREAM_VOICE_CALL, audioManager.getStreamMaxVolume(AudioManager.STREAM_VOICE_CALL),0);\n audioManager.setStreamVolume(AudioManager.STREAM_RING, audioManager.getStreamMaxVolume(AudioManager.STREAM_RING), 0);\n break;\n case AudioManager.RINGER_MODE_VIBRATE:\n audioManager.setStreamVolume(AudioManager.STREAM_RING, audioManager.getStreamMaxVolume(AudioManager.STREAM_RING), 0);\n break;\n }\n }", "public interface PurchaseEnable\n {\n /**\n * allow\n */\n String UN_SUPPORT = \"0\";\n\n /**\n * not allow\n */\n String SUPPORT = \"1\";\n }", "public boolean isIncomingInvitePending();", "public interface AnyRTCMeetEvents {\n /**Join meet OK\n * @param strAnyrtcId\n */\n public void OnRtcJoinMeetOK(String strAnyrtcId);\n\n /** Join meet Failed\n * @param strAnyrtcId\n * @param code\n * @param strReason\n */\n public void OnRtcJoinMeetFailed(String strAnyrtcId, AnyRTC.AnyRTCErrorCode code, String strReason);\n\n /** Leave meet\n * @param code\n */\n public void OnRtcLeaveMeet(int code);\n\n\n}", "public boolean isaccept(File dir, String filename) {\n\t\treturn (filename.endsWith(\".mp3\")\r\n\t\t\t\t||filename.endsWith(\".mpga\")\r\n\t\t\t\t||filename.endsWith(\".ogg\")\r\n\t\t\t\t||filename.endsWith(\".wav\")\r\n\t\t\t\t||filename.endsWith(\".wma\")\r\n\t\t\t\t||filename.endsWith(\".wmv\"));\r\n\t}", "public interface AdvancedMediaPlayer {\r\n void playMp4(String fileName);\r\n\r\n void playVlc(String fileName);\r\n}", "private void checkVoiceCommandPermission()\n {\n // Android 6 er uporer version gula te voice neoar capability ache, and they require permissions.\n // that's why we check first the SDK version is above 6 or not\n if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.M)\n {\n // jodi persmission pai voice er then\n if(!(ContextCompat.checkSelfPermission(SmartPlayerActivity.this, Manifest.permission.RECORD_AUDIO) == PackageManager.PERMISSION_GRANTED))\n {\n // we can start the activity\n Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS, Uri.parse(\"package:\" + getPackageName()));\n startActivity(intent);\n finish();\n }\n }\n }", "@Override\n public void videoStarted() {\n super.videoStarted();\n img_playback.setImageResource(R.drawable.ic_pause);\n if (isMuted) {\n muteVideo();\n img_vol.setImageResource(R.drawable.ic_mute);\n } else {\n unmuteVideo();\n img_vol.setImageResource(R.drawable.ic_unmute);\n }\n }" ]
[ "0.57542336", "0.5592919", "0.55905986", "0.55620146", "0.54989856", "0.5471836", "0.5394735", "0.53533536", "0.53280485", "0.5312774", "0.5288948", "0.5288027", "0.527282", "0.5271873", "0.5265699", "0.525569", "0.52547634", "0.52061343", "0.5192172", "0.5150595", "0.5113335", "0.51123893", "0.5106589", "0.5097383", "0.5096844", "0.5091905", "0.5090907", "0.5090345", "0.5090309", "0.50831205", "0.5071058", "0.5069447", "0.506359", "0.5058508", "0.50533783", "0.50386924", "0.50252914", "0.5023915", "0.5018707", "0.50059366", "0.50027084", "0.5002649", "0.49959055", "0.49923307", "0.49919322", "0.49887362", "0.49846372", "0.49818224", "0.49782053", "0.4975095", "0.49727502", "0.49622914", "0.49620044", "0.49614805", "0.4959571", "0.4952154", "0.49459192", "0.4942951", "0.49334797", "0.49310082", "0.4927435", "0.49272287", "0.49271333", "0.49256456", "0.49151793", "0.49095404", "0.49058563", "0.48941314", "0.48840478", "0.48753065", "0.487514", "0.4874312", "0.48735052", "0.4869096", "0.4866589", "0.48659334", "0.48568925", "0.48537308", "0.4849078", "0.48489162", "0.48483923", "0.4843924", "0.4842238", "0.4842238", "0.48412773", "0.4838449", "0.48295212", "0.48292986", "0.48286325", "0.48178723", "0.481748", "0.48105472", "0.4807881", "0.48060107", "0.4804639", "0.47983277", "0.47977677", "0.47958574", "0.47957855", "0.4787301", "0.47858554" ]
0.0
-1
cmd 1:start, 2: stop, 3: abort
@Override public void onLottery(int cmd, String info) { toastMsg("抽奖\n指令:" + (cmd == 1 ? "开始" : (cmd == 2 ? "结束" : "取消")) + "\n结果:" + info); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void stopped();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "public abstract void stopped();", "abstract public void stop();", "public void halt();", "public void stop() {}", "void beforeStop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public abstract void stop();", "public abstract void stop();", "public abstract void stop();", "public abstract void stop();", "public abstract void stop();", "void stopAll();", "void doManualStart();", "public void stopping();", "public void stop() {\n\t\texec.stop();\n\t}", "static void stop(){\n stop=true;\n firstPass=true;\n }", "public void terminate();", "@Override\r\n public int stop(int exitCode) {\r\n IS.stopAll();\r\n return exitCode;\r\n }", "long start();", "public void stop() {\n\t\tSystem.out.println(\"结束系统1\");\r\n\t}", "public abstract void interrupt();", "public void kill();", "public void kill();", "void terminate();", "void terminate();", "void terminate();", "void terminate();", "void terminate();", "public void stop(){\n\t\t\n\t}", "void stop() {\n }", "void stop() throws IOException;", "public void interrupt();", "public interface ExitListener\n{\n void stop();\n}", "public void halt ( )\n\t{\n\t\tthis.running = false;\n\t}", "public abstract void terminate();", "protected abstract void doStart();", "private void execStartAction(String action){\n\n if (action.length() == 0) { return; }\n\n if (startTask != null ){\n startTask.interrupt();\n startTask = null;\n }\n\n RunningTask rt = new RunningTask(this,action.split(\" \"),true);\n startTask = new Thread(rt);\n startTask.start();\n }", "void start(String option);", "public void start2();", "public void stop(){\n }", "public void doStop( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException {\n executable.getParent().checkAbortPermission();\n interrupt();\n rsp.forwardToPreviousPage(req);\n }", "public void stop() {\n System.out.println(\"stop\");\n }", "void start() throws Exception;", "void start() throws Exception;", "void start ();", "public void terminateAllCalls();", "public void stop() { \n System.out.println(\"Inside the stop() method.\"); \n }", "abstract protected void cancelCommands();", "public void stop (String message);", "@PostMapping(value = \"/stop\")\n public ResponseEntity stop(){\n try {\n CommandExecutor.execute(Commands.shutdown);\n return ResponseEntity.ok().build();\n } catch (IOException e) {\n e.printStackTrace();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n return ResponseEntity.status(500).build();\n }", "public void stop()\n {\n }", "public abstract void exit (int status);", "public void stop() {\n\t}", "@Override\n public void abort(RuntimeStep exe) {\n }", "private void startStop()\n\t\t{\n\t\tif(currentAlgo!=null)\n\t\t\t{\n\t\t\tif(isRunning())\n\t\t\t\t{\n\t\t\t\tbStartStop.setText(\"Stopping\");\n\t\t\t\tthread.toStop=true;\n\t\t\t\tcurrentAlgo.setStopping(true);\n\t\t\t\t}\n\t\t\telse\n\t\t\t\t{\n\t\t\t\tthread=new SteppingThread();\n\t\t\t\tbStartStop.setText(\"Stop\");\n\t\t\t\tthread.toStop=false;\n\t\t\t\tcurrentAlgo.setStopping(false);\n\t\t\t\tthread.start();\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public void stop() {\n\t\t\n\t}", "public void stop() {\n }", "public void stop() {\n }", "public void\n stop() throws IOException;", "@Override\r\n public void executeCommand() {\r\n shell.stopRunning();\r\n }", "boolean shouldStop();", "public void start() {}", "public void start() {}", "void abortProcess(Long processInstanceId);", "@Override\r\n\tprotected void doStop() throws Exception {\n\r\n\t}", "void stop(long timeout);", "public void stop(){\n quit = true;\n }", "public void beginControl() {\n\t\tCommandInfo curCommand;\n\t\tCommandExecutor curCommandExecuter;\n\t\twhile (true) {\n\t\t\ttry {\n\t\t\t\t//take command from the queue\n\t\t\t\tcurCommand = commandsQueue.take();\n\t\t\t} catch(Exception e) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\t//execute the command\n\t\t\t\tcurCommandExecuter = this.nameCommandMap.get(curCommand.name);\n\t\t\t\tcurCommandExecuter.execute(curCommand.additionalInfo);\n\t\t\t} catch(NewGameException e) {\n\t\t\t\tSystem.out.println(\"Starting new Game!\");\n\t\t\t\tthis.startCountTime();\n\t\t\t} catch(EndGameException e) {\n\t\t\t\tbreak;\n\t\t\t} catch(Exception ignored) {\n\t\t\t}\n\t\t}\n\t\t//stop time counter thread and stop controller's action .\n\t\tthis.stopCountTime();\n\t\tSystem.exit(0);\n\t}", "public void endCommand();" ]
[ "0.6049024", "0.60237074", "0.60237074", "0.60237074", "0.60237074", "0.60237074", "0.60237074", "0.60237074", "0.60237074", "0.60237074", "0.60237074", "0.60237074", "0.60237074", "0.60237074", "0.60237074", "0.60237074", "0.60237074", "0.60237074", "0.60125613", "0.59908056", "0.59886706", "0.5980864", "0.5978882", "0.5964439", "0.5964439", "0.5964439", "0.5964439", "0.5964439", "0.5964439", "0.5964439", "0.5964439", "0.5964439", "0.5964439", "0.5964439", "0.5964439", "0.5964439", "0.5964439", "0.5964439", "0.59643066", "0.59643066", "0.59643066", "0.59643066", "0.59643066", "0.5931462", "0.59236497", "0.58883756", "0.5805254", "0.5789838", "0.5784525", "0.5761276", "0.5737203", "0.56795955", "0.5672689", "0.5654596", "0.5654596", "0.5649761", "0.5649761", "0.5649761", "0.5649761", "0.5649761", "0.5648305", "0.56334007", "0.5632285", "0.56244725", "0.5619544", "0.56161904", "0.5609243", "0.56085837", "0.560027", "0.5586163", "0.5551396", "0.5550129", "0.5537747", "0.55351675", "0.5533889", "0.5533889", "0.5531554", "0.5526186", "0.5522208", "0.5521478", "0.55204755", "0.5500589", "0.5498374", "0.5480886", "0.54518056", "0.5445731", "0.5441862", "0.54417443", "0.54386026", "0.54386026", "0.54361707", "0.5426389", "0.5424515", "0.54054374", "0.54054374", "0.5403531", "0.5397382", "0.53878826", "0.5378888", "0.53755766", "0.53665084" ]
0.0
-1
toastMsg("onScreenStatus isAs = " + isAs);
@Override public void onScreenStatus(boolean isAs) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void showToast(String value);", "public boolean isShowToast()\r\n {\r\n return myShowToast;\r\n }", "void showToast(String message);", "void showToast(String message);", "void toast(int resId);", "public void alertUser(int status){\r\n\r\n }", "void onMessageToast(String string);", "private void msg(String s)\n {\n Toast.makeText(getApplicationContext(),s,Toast.LENGTH_LONG).show();\n }", "private void msg(String s)\n {\n Toast.makeText(getApplicationContext(),s,Toast.LENGTH_LONG).show();\n }", "public String showStatus();", "private void showSnack(boolean isConnected) {\n String message;\n int color;\n if (isConnected) {\n message =getString(R.string.back_online);\n TastyToast.makeText(getApplicationContext(), message, TastyToast.LENGTH_SHORT, TastyToast.SUCCESS);\n } else {\n message =getString(R.string.you_are_offline);\n TastyToast.makeText(getApplicationContext(), message, TastyToast.LENGTH_LONG, TastyToast.ERROR);\n }\n }", "private void showErrorToast() {\n }", "private void toastmessage(String message){\n Toast.makeText(Accountinfo.this,message,Toast.LENGTH_SHORT).show();\n }", "private void msg(String s) {\n Toast.makeText(getApplicationContext(), s, Toast.LENGTH_LONG).show();\n }", "private void msg(String s) {\n Toast.makeText(getApplicationContext(), s, Toast.LENGTH_LONG).show();\n }", "private void msg(String s) {\n Toast.makeText(getApplicationContext(), s, Toast.LENGTH_LONG).show();\n }", "public String getScreenMessage();", "private void showSnack(boolean isConnected) {\n String message;\n int color;\n if (isConnected) {\n message =getString(R.string.back_online);\n TastyToast.makeText(getActivity(), message, TastyToast.LENGTH_SHORT, TastyToast.SUCCESS);\n } else {\n message =getString(R.string.you_are_offline);\n TastyToast.makeText(getActivity(), message, TastyToast.LENGTH_LONG, TastyToast.ERROR);\n }\n }", "public void successfulReservation()\n {\n showToastMessage(getResources().getString(R.string.successfulReservation));\n }", "void displayMessage(){\r\n Toast toast = Toast.makeText(this, getString(R.string.congratz_message, String.valueOf(playerScore)), Toast.LENGTH_SHORT);\r\n toast.show();\r\n }", "private void toast(String aToast) {\n Toast.makeText(getApplicationContext(), aToast, Toast.LENGTH_LONG).show();\n }", "private void exibe_mensagem(String msg){\n Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_LONG).show();\n }", "private static void checkToast() {\n\t\tif (mToast == null) {\n\t\t\tmToast = Toast.makeText(GlobalApp.getApp(), null,\n\t\t\t\t\tToast.LENGTH_SHORT);\n\t\t}\n\t}", "@Test\n public void checkStartupToast() {\n //run with airplane mode so no internet connectivity\n onView(withText(\"Ensure data connectivity\")).inRoot(new ToastMatcher())\n .check(matches(isDisplayed()));\n }", "public void showMessage(String msg){\n Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_SHORT).show();\n }", "protected void showStatus(int type, String message) {\n showToast(type, message);\n }", "protected void showStatus(int type, String message) {\n showToast(type, message);\n }", "@Override\n public void toastText(String s){\n Toast.makeText(getApplicationContext(), s, Toast.LENGTH_SHORT).show();\n }", "protected void toast() {\n }", "@Override\n public void onEnterAmbient(Bundle ambientDetails) {\n Toast.makeText(getApplicationContext(), \"Enter\", Toast.LENGTH_LONG).show();\n }", "public void showToast(String msg){\n Toast.makeText(this, msg, Toast.LENGTH_SHORT).show();\n }", "String getStatusMessage( );", "private void showToast(String msg) {\r\n Toast.makeText(Imprimir.this, msg, Toast.LENGTH_LONG).show();\r\n }", "@Override\n public void onClick(View v) {\n\n\n Toast.makeText(MainSOSActivity.this, \"Stay Safe and Confirm the Message!\", Toast.LENGTH_SHORT).show();\n\n }", "public void showToast(Boolean usernameTaken) {\n String action = \"\";\n if (usernameTaken) {\n action = \"Username is already taken\";\n } else {\n action = \"An error has occurred. Please try again.\";\n }\n Toast t = Toast.makeText(this, action,\n Toast.LENGTH_SHORT);\n t.setGravity(Gravity.TOP, Gravity.CENTER, 150);\n t.show();\n }", "boolean isStatusSuspensao();", "private void showNotification() {\n\n }", "private void showDetectedPresence(){\n AlertDialog.Builder box = new AlertDialog.Builder(SecurityActivity.this);\n box.setTitle(\"Attention!\")\n .setMessage(\"Le robot a détecté une présence\");\n\n box.setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\n\n public void onClick(DialogInterface dialog, int which) {\n presenceDetectee.setValue(false);\n Intent intent = new Intent(SecurityActivity.this, JeuActivity.class);\n intent.putExtra(\"ROBOT\", robotControle);\n startActivity(intent);\n }\n }\n );\n box.show();\n //J'ai un problème de permissions, je la demande mais Android ne la demande pas...\n //Vibrator vib=(Vibrator)getSystemService(Context.VIBRATOR_SERVICE);\n //vib.vibrate(10000);\n }", "private void toastMessage(String message){\n Toast.makeText(this,message, Toast.LENGTH_SHORT).show();\n }", "private void toastMessage(String message){\n Toast.makeText(this,message, Toast.LENGTH_SHORT).show();\n }", "public void showComingSoonMessage() {\n showToastMessage(\"Coming soon!\");\n }", "@Override\n public void onClick(View v) {\n\n\n Toast.makeText(MainSOSActivity.this, \"Stay Safe and Confirm the Message! Your emergnecy conctacts will be notified!\", Toast.LENGTH_SHORT).show();\n\n }", "void toast(CharSequence sequence);", "void showSuccess();", "private void showToastAfterActivation(Profile profile)\n {\n\n try {\n String profileName = DataWrapperStatic.getProfileNameWithManualIndicatorAsString(profile, true, \"\", false, false, false, this);\n PPApplication.showToast(context.getApplicationContext(),\n context.getString(R.string.toast_profile_activated_0) + \": \" + profileName + \" \" +\n context.getString(R.string.toast_profile_activated_1),\n Toast.LENGTH_SHORT);\n }\n catch (Exception e) {\n PPApplicationStatic.recordException(e);\n }\n //Log.d(\"DataWrapper.showToastAfterActivation\", \"-- end\");\n }", "boolean displayScheduleMessage();", "private void toastMessage (String message){\n Toast.makeText(this, message, Toast.LENGTH_SHORT).show();\n }", "private void sendToCatTheater()\n {\n Toast.makeText(getApplicationContext(), \"No Results Found For 'Theater'\", Toast.LENGTH_SHORT).show();\n }", "public void tingOnUI(final String msg) {\r\n\r\n\t\trunOnUiThread(new Runnable() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void run() {\r\n\t\t\t\tToast.makeText(SmartActivity.this, msg, Toast.LENGTH_SHORT).show();\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t}", "private void sendToCatVA()\n {\n Toast.makeText(getApplicationContext(), \"No Results Found For 'Visual Art'\", Toast.LENGTH_SHORT).show();\n }", "void showAlert(String message);", "String getStatusMessage();", "public void showStatus(String paramString) {\n/* 258 */ getAppletContext().showStatus(paramString);\n/* */ }", "public void notificacionToast(String mensaje){\n Toast toast = Toast.makeText(getApplicationContext(),mensaje,Toast.LENGTH_LONG);\n toast.setGravity(Gravity.CENTER_HORIZONTAL, 0, 0);\n toast.show();\n }", "private void showToast(String msg) {\n Toast.makeText(getBaseContext(), msg, Toast.LENGTH_LONG).show();\n }", "public void checkForAlerts() {\n }", "private void makeToast(String msg)\n {\n FinanceApp.serviceFactory.getUtil().makeAToast(this, msg);\n }", "@Override\n public void onSuccess(Void aVoid) {\n Toast.makeText(getContext(), \"המוצר נמחק בהצלחה!\", Toast.LENGTH_SHORT).show();\n }", "private void sendToCatEd()\n {\n Toast.makeText(getApplicationContext(), \"No Results Found For 'Education'\", Toast.LENGTH_SHORT).show();\n }", "boolean isSetStatus();", "@Override\n public void onError(Status status) {\n createToast(\"Error occurred, please wait\");\n }", "private void makeToast(String message){\n Toast.makeText(SettingsActivity.this, message, Toast.LENGTH_LONG).show();\n }", "int displayNotification(Message message);", "private void showMessage(String msg) {\n Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_LONG).show();\n }", "private void showToast(final int resid) {\n\t\tm_toastHandler.post(new Runnable() {\n\t\t\tpublic void run() {\n\t\t\t\tToast.makeText(InstrumentService.this, resid, Toast.LENGTH_SHORT).show();\n\t\t\t}\n\t\t});\n\t}", "public void showSnack(boolean isConnected) {\n String message;\n int color;\n if (isConnected) {\n message = \"Good! Connected to Internet\";\n color = Color.WHITE;\n getUserLocation();\n } else {\n message = \"Sorry! Not connected to internet\";\n color = Color.RED;\n }\n\n Snackbar snackbar = Snackbar.make(activity.findViewById(android.R.id.content), message, Snackbar.LENGTH_LONG);\n\n View sbView = snackbar.getView();\n// TextView textView = (TextView) sbView.findViewById(a);\n// textView.setTextColor(color);\n snackbar.show();\n }", "private void showNotification() {\n }", "public void onActive() {\n Methods.showMessage(\"Warning\", \"Welcome Back!\", \"Please Continue Filling Out Your Questionanire!\");\n }", "private void showInternal(final String message, final boolean isLongDuration) {\n getCurrentActivity().runOnUiThread(new Runnable() {\n @Override\n public void run() {\n Toast.makeText(getCurrentActivity().getApplicationContext(), message, isLongDuration ? Toast.LENGTH_LONG : Toast.LENGTH_SHORT).show();\n }\n });\n }", "public void tongOnUI(final String msg) {\r\n\t\trunOnUiThread(new Runnable() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void run() {\r\n\t\t\t\tToast.makeText(SmartActivity.this, msg, Toast.LENGTH_LONG).show();\r\n\t\t\t}\r\n\t\t});\r\n\t}", "public static String _activity_pause(boolean _userclosed) throws Exception{\nreturn \"\";\n}", "public static String _activity_pause(boolean _userclosed) throws Exception{\nreturn \"\";\n}", "public static String _activity_pause(boolean _userclosed) throws Exception{\nreturn \"\";\n}", "@Override\n public void onClick(View v) {\n Toast.makeText(getContext(), \"Not Ready Yet :(\", Toast.LENGTH_SHORT).show();\n }", "public void toastSuccess(String mensagem){\n\n Context context = getApplicationContext();\n CharSequence text = mensagem;\n int duration = Toast.LENGTH_LONG;\n\n Toast toast = Toast.makeText(context, text, duration);\n\n View view = toast.getView();\n\n //Obtém o plano de fundo oval real do Toast e, em seguida, define o filtro de cores\n view.getBackground().setColorFilter(getResources().getColor(R.color.colorSuccess), PorterDuff.Mode.SRC_IN);\n\n //Obtém o TextView do Toast para que ele possa ser editado\n TextView newText = view.findViewById(android.R.id.message);\n newText.setShadowLayer(0, 0, 0, Color.TRANSPARENT);\n newText.setTextColor(getResources().getColor(R.color.colorWhite));\n\n toast.show();\n\n }", "public void success() {\n Toast.makeText(ui.getApplicationContext(),\"Account successfully created!\",Toast.LENGTH_SHORT).show();\n }", "@SuppressWarnings(\"unused\")\n public String getStatusString() {\n\n switch (this.status) {\n case SCREEN_OFF:\n return \"screen off\";\n\n case SCREEN_ON:\n return \"screen on\";\n\n default:\n return \"unknown\";\n }\n }", "public void DisplayToast(String msg) {\n Toast.makeText(getBaseContext(), msg, Toast.LENGTH_SHORT).show();\n }", "public void makeToast(String name,int time){\n toast = new Toast(context);\n// toast.setGravity(Gravity.BOTTOM|Gravity.CENTER_HORIZONTAL , 0, SecretMessageApplication.get720WScale(240));\n toast.setDuration(time);\n// toast.setView(layout);\n toast.show();\n\n }", "@Override\n\tpublic void createToast(String slogan, float duration) {\n\t\tif (Gdx.app.getType() == ApplicationType.Android) {\n\t\t\tgGame.iFunctions.createToast(slogan, duration);\n\t\t} else\n\t\tsuper.createToast(slogan, duration);\n\t}", "private String getTstatStatusMessage() {\n\n String thStatusMsg = null;\n WebElement modeDialog = getElement(getDriver(), By.cssSelector(MODEL_DIALOG), TINY_TIMEOUT);\n if (modeDialog.isDisplayed()) {\n WebElement modeMessage = getElementBySubElement(getDriver(), modeDialog,\n By.className(ERROR_MODEBOX), TINY_TIMEOUT);\n thStatusMsg = getElementBySubElement(getDriver(), modeMessage,\n By.className(MODEL_LABEL), TINY_TIMEOUT).getText();\n setLogString(\"Location status message:\" + thStatusMsg, true, CustomLogLevel.HIGH);\n }\n return thStatusMsg;\n }", "public void onClick(DialogInterface dialog, int which) {\n Toast.makeText(getApplicationContext(), \"Internet Is Inactive\", Toast.LENGTH_SHORT).show();\n\n }", "void showSuccess(String message);", "void showSyncFailMessage();", "public void ToastMessage() {\n\n // create toast message object\n final Toast toast = Toast.makeText(Product_Details_Page_Type_4.this,\n \"Product added to cart\",Toast.LENGTH_LONG);\n // show method call to show Toast message\n toast.show();\n\n // create handler to set duration for toast message\n Handler handler = new Handler() {\n\n @Override\n public void close() {\n // set duration for toast message\n toast.setDuration(100);\n // cancel toast message\n toast.cancel();\n }\n @Override\n public void flush() {}\n\n @Override\n public void publish(LogRecord record) {}\n };\n }", "private void showToast(String message){\n\n Toast.makeText(this, message, Toast.LENGTH_SHORT).show();\n }", "public void showErrorMessage(){\n Toast.makeText(context, R.string.generic_error_message, Toast.LENGTH_LONG).show();\n }", "public interface IsShowMessage\n {\n /**\n * not show\n */\n String UN_SHOW = \"0\";\n\n /**\n * show\n */\n String SHOW = \"1\";\n }", "public void toast (String msg)\n\t{\n\t\tToast.makeText (getApplicationContext(), msg, Toast.LENGTH_SHORT).show ();\n\t}", "@Override\n public void onSuccess(Void aVoid) {\n Toast.makeText(getApplicationContext(), \"Success!\",\n Toast.LENGTH_LONG).show();\n }", "protected void toastshow() {\n \n\t\tToast toast=new Toast(getApplicationContext());\n\t\tImageView imageView=new ImageView(getApplicationContext());\n\t\timageView.setImageResource(R.drawable.icon);\n\t\ttoast.setView(imageView);\n\t\ttoast.show();\t\n\t}", "private void displayToast(String message) {\n Toast.makeText(getApplicationContext(), message, Toast.LENGTH_SHORT).show();\n }", "public void displayToastMessage(String msg) {\n\t\tToast toast = Toast.makeText(context, msg, Toast.LENGTH_SHORT);\n\t\ttoast.setGravity(Gravity.CENTER, 0, 0);\n\t\ttoast.show();\n\t}", "public void showToastMessage(String str) {\n Toast.makeText(self, str, Toast.LENGTH_SHORT).show();\n }", "private void displayToast(String paintingDescription) {\n Toast.makeText(this, paintingDescription, Toast.LENGTH_SHORT).show();\n }", "private void sendToCatLit()\n {\n Toast.makeText(getApplicationContext(), \"No Results Found For 'Literary'\", Toast.LENGTH_SHORT).show();\n }", "protected boolean statusIs(String state)\n { return call_state.equals(state); \n }", "public void ting(String msg) {\r\n\t\tToast.makeText(this, msg, Toast.LENGTH_SHORT).show();\r\n\t}", "public boolean getAtmStatus();", "private void ShowToast(String massage, int colorText, int background) {\n Typeface font = Typeface.createFromAsset(getAssets(), \"comic.ttf\");\n Toast toast = Toast.makeText(SignUpActivity.this, massage,\n Toast.LENGTH_LONG);\n View view=toast.getView();\n TextView view1= view.findViewById(android.R.id.message);\n view1.setTextColor(colorText);\n view.setBackgroundResource(background);\n view1.setTypeface(font);\n toast.show();\n }" ]
[ "0.63599706", "0.63599557", "0.63006586", "0.63006586", "0.62095124", "0.614648", "0.6127007", "0.60437435", "0.60437435", "0.596177", "0.59470564", "0.59325516", "0.5931804", "0.5904271", "0.5904271", "0.5904271", "0.58795184", "0.58728683", "0.58573437", "0.5840294", "0.57884383", "0.57784605", "0.57442844", "0.56855065", "0.56819254", "0.5681694", "0.5681694", "0.56815064", "0.56732166", "0.56510395", "0.5647176", "0.563977", "0.5630589", "0.5624612", "0.56205356", "0.5616288", "0.55988187", "0.5579111", "0.5552885", "0.5552885", "0.5551853", "0.5546182", "0.55363256", "0.55288166", "0.55255365", "0.5523916", "0.5521989", "0.55179137", "0.5517547", "0.5513652", "0.5512092", "0.5509448", "0.5508286", "0.5504117", "0.5488632", "0.5477581", "0.5476146", "0.54746896", "0.54708093", "0.54661196", "0.54615843", "0.5459901", "0.5459631", "0.5451541", "0.5437741", "0.5437085", "0.5436802", "0.5434757", "0.54319304", "0.5429113", "0.5414026", "0.5414026", "0.5414026", "0.54051155", "0.54023844", "0.54013824", "0.53959554", "0.5392313", "0.53836924", "0.5382147", "0.53808707", "0.5365068", "0.53614235", "0.5355162", "0.535322", "0.5351303", "0.5350605", "0.53439933", "0.5340138", "0.5333885", "0.5332935", "0.53308785", "0.533047", "0.5330455", "0.5321347", "0.5318695", "0.531544", "0.53096557", "0.53031075", "0.5299438" ]
0.69046247
0
TODO Autogenerated method stub
@Override public void onCameraNotify(int notify) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public void onRedBagTip(RewardResult arg0) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.66713095", "0.6567948", "0.652319", "0.648097", "0.64770466", "0.64586824", "0.64132667", "0.6376419", "0.62759", "0.62545097", "0.62371093", "0.62237984", "0.6201738", "0.619477", "0.619477", "0.61924416", "0.61872935", "0.6173417", "0.613289", "0.6127952", "0.6080854", "0.6076905", "0.6041205", "0.6024897", "0.60200036", "0.59985113", "0.5967729", "0.5967729", "0.5965808", "0.5949083", "0.5941002", "0.59236866", "0.5909713", "0.59030116", "0.589475", "0.58857024", "0.58837134", "0.586915", "0.58575684", "0.5850424", "0.5847001", "0.5824116", "0.5810248", "0.5809659", "0.58069366", "0.58069366", "0.5800507", "0.5792168", "0.5792168", "0.5792168", "0.5792168", "0.5792168", "0.5792168", "0.57900196", "0.5790005", "0.578691", "0.578416", "0.578416", "0.5774115", "0.5774115", "0.5774115", "0.5774115", "0.5774115", "0.5761079", "0.57592577", "0.57592577", "0.5749888", "0.5749888", "0.5749888", "0.5748457", "0.5733414", "0.5733414", "0.5733414", "0.57209575", "0.57154554", "0.57149583", "0.57140404", "0.57140404", "0.57140404", "0.57140404", "0.57140404", "0.57140404", "0.57140404", "0.571194", "0.57043016", "0.56993437", "0.5696782", "0.5687825", "0.5677794", "0.5673577", "0.5672046", "0.5669512", "0.5661156", "0.56579345", "0.5655569", "0.5655569", "0.5655569", "0.56546396", "0.56543446", "0.5653163", "0.56502634" ]
0.0
-1
TODO Autogenerated method stub
@Override public void onRewordEnable(boolean arg0, boolean arg1) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public void onThirdVote(String arg0) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_identify); initView(); timeCount = new TimeCount(60000, 1000, agin); setEditChanged(); setListener(); timeCount.start(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public void onTextChanged(CharSequence arg0, int arg1, int arg2, int arg3) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.66713095", "0.6567948", "0.652319", "0.648097", "0.64770466", "0.64586824", "0.64132667", "0.6376419", "0.62759", "0.62545097", "0.62371093", "0.62237984", "0.6201738", "0.619477", "0.619477", "0.61924416", "0.61872935", "0.6173417", "0.613289", "0.6127952", "0.6080854", "0.6076905", "0.6041205", "0.6024897", "0.60200036", "0.59985113", "0.5967729", "0.5967729", "0.5965808", "0.5949083", "0.5941002", "0.59236866", "0.5909713", "0.59030116", "0.589475", "0.58857024", "0.58837134", "0.586915", "0.58575684", "0.5850424", "0.5847001", "0.5824116", "0.5810248", "0.5809659", "0.58069366", "0.58069366", "0.5800507", "0.5792168", "0.5792168", "0.5792168", "0.5792168", "0.5792168", "0.5792168", "0.57900196", "0.5790005", "0.578691", "0.578416", "0.578416", "0.5774115", "0.5774115", "0.5774115", "0.5774115", "0.5774115", "0.5761079", "0.57592577", "0.57592577", "0.5749888", "0.5749888", "0.5749888", "0.5748457", "0.5733414", "0.5733414", "0.5733414", "0.57209575", "0.57154554", "0.57149583", "0.57140404", "0.57140404", "0.57140404", "0.57140404", "0.57140404", "0.57140404", "0.57140404", "0.571194", "0.57043016", "0.56993437", "0.5696782", "0.5687825", "0.5677794", "0.5673577", "0.5672046", "0.5669512", "0.5661156", "0.56579345", "0.5655569", "0.5655569", "0.5655569", "0.56546396", "0.56543446", "0.5653163", "0.56502634" ]
0.0
-1
TODO Autogenerated method stub
@Override public void beforeTextChanged(CharSequence arg0, int arg1, int arg2, int arg3) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) { int[][] maps = { {1,0,1,1,1}, {1,0,1,0,1}, {1,0,1,1,1}, {1,1,1,0,1}, {0,0,0,0,1} }; System.out.println(solution(maps)); }
{ "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
Checks whether an inventory is valid. For the check to return true it must: 1) Exist; it cannot be null. 2) Have slots.
public static boolean isValidInventory(final Inventory inventory) { if (inventory == null) { return false; } if (inventory.getSize() < 1) { return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isItemValidForSlot(int p_94041_1_, ItemStack p_94041_2_)\n {\n return true;\n }", "@Override\n\tpublic boolean isItemValidForSlot(int p_94041_1_, ItemStack p_94041_2_) {\n\t\treturn true;\n\t}", "public static boolean isValidInventory(final ItemStack[] inventory) {\n if (inventory == null) {\n return false;\n }\n if (inventory.length < 1) {\n return false;\n }\n return true;\n }", "@Override\n\tpublic boolean isItemValidForSlot(int slot, ItemStack stack){\n\t return true;\n\t}", "public boolean isItemValidForSlot(int slot, ItemStack stack)\n {\n return slot == 0;\n }", "@Override\n public boolean isValid() {\n return (27 - Inventory.getAll().length <= Inventory.find(\"Soft clay\").length)\n || (Inventory.find(\"Soft clay\").length < 1 || Inventory\n .find(\"Astral rune\").length < 1)\n && !Banking.isBankScreenOpen()\n && GlassBlower.antiban.canInteractObject();\n }", "@Override\n\tpublic boolean isItemValidForSlot(int i, ItemStack itemstack) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean isItemValidForSlot(int index, ItemStack stack) {\n\t\treturn super.isValid();\n\t}", "public boolean isItemValid(ItemStack par1ItemStack)\n {\n return true;\n }", "public boolean isFull(){\n\t\tfor(int i = 0; i < INVENTORY_SLOTS; i++){\n\t\t\tif(inventoryItems[i] == null){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "void checkInventoryExists() {\n\n MrnInventory[] checkInventory =\n new MrnInventory(survey.getSurveyId()).get();\n inventoryExists = false;\n if (checkInventory.length > 0) {\n inventoryExists = true;\n } // if (checkInventory.length > 0)\n\n\n }", "public boolean checkInventory(int serialNum, int qty){\n \n //create a boolean var and set to false- change to true only if there is enough of requested inventory\n boolean enoughInventory = false;\n \n //loop through all Inventory\n for(int i=0; i<this.items.size(); i++){\n //check if inventoryItem has matching serialNumber with specified serialNum\n if(this.items.get(i).getSerialNum()==serialNum){\n //if serial numbers match, check if inventoryItem has enough in stock for requested order\n if(this.items.get(i).getQty() >= qty){\n enoughInventory = true; //if quantity in inventory is greater than or equal to requested quantity there is enough\n }\n }\n }\n \n //return enoughInventory- will be false if no serial number matched or if there was not enough for requested qty\n return enoughInventory;\n \n }", "public boolean isItemValid(ItemStack var1)\n {\n return canHoldPotion(var1);\n }", "public static boolean checkIsItemValid(ItemStack itemStack) {\n return !itemStack.isEmpty() && EvilCraft._instance.getRegistryManager().getRegistry(IBloodChestRepairActionRegistry.class).\n isItemValidForSlot(itemStack);\n }", "private boolean inventoryValid(int min, int max, int stock) {\n\n boolean isValid = true;\n\n if (stock < min || stock > max) {\n isValid = false;\n AlartMessage.displayAlertAdd(4);\n }\n\n return isValid;\n }", "private boolean partIsValid(){\r\n int min = Integer.parseInt(partMin.getText());\r\n int max = Integer.parseInt(partMax.getText());\r\n int inventory = Integer.parseInt(partInv.getText());\r\n if(max < min || min >= max){\r\n Alert alert = new Alert(Alert.AlertType.ERROR);\r\n alert.setTitle(\"Error: Change Max and Min Values\");\r\n alert.setContentText(\"Change Max value to be greater than min\");\r\n alert.showAndWait();\r\n return false;\r\n } else if(max < inventory || min > inventory){\r\n Alert alert = new Alert(Alert.AlertType.ERROR);\r\n alert.setTitle(\"Error: Invalid Inventory number\");\r\n alert.setContentText(\"Inventory must be less than max and more than min\");\r\n alert.showAndWait();\r\n return false;\r\n }\r\n return true;\r\n }", "public static boolean inventoryIsEmpty() {\n\t\treturn Inventory.getCount() == 0;\n\t}", "public static int checkSlotsAvailable(Inventory inv) {\n ItemStack[] items = inv.getContents(); //Contents of player inventory\n int emptySlots = 0;\n\n for (ItemStack is : items) {\n if (is == null) {\n emptySlots = emptySlots + 1;\n }\n }\n\n return emptySlots;\n }", "@Override\n public boolean stillValid(Player playerIn) {\n return player == playerIn && !stack.isEmpty() && player.getItemBySlot(slotType) == stack;\n }", "@Override\n\tpublic boolean isItemValid(ItemStack stack) {\n\t\treturn true;\n\t}", "public static boolean inventoryIsFull() {\n\t\treturn Inventory.getCount() == 28;\n\t}", "@java.lang.Override\n public boolean hasInventoryItemData() {\n return inventoryItemCase_ == 3;\n }", "public boolean isValidItem() {\n return validItem;\n }", "@java.lang.Override\n public boolean hasInventoryItemData() {\n return inventoryItemCase_ == 3;\n }", "private boolean validInventory(int min, int max, int stock) {\r\n\r\n boolean isTrue = true;\r\n\r\n if (stock < min || stock > max) {\r\n isTrue = false;\r\n alertDisplay(4);\r\n }\r\n\r\n return isTrue;\r\n }", "public boolean isItemValid(ItemStack itemstack)\n {\n return itemstack.getItem() == Items.water_bucket;\n }", "public boolean needsRepair() {\n if (id == 5509) {\n return false;\n }\n return inventory.contains(id + 1);\n }", "private boolean isSlotsValid (int slots) {\n\t\treturn slots>=0 && slots<5;\n\t}", "public static void validateInventoryRequest(final InvInventoryRequest request) {\r\n//\t\ttry {\r\n\t\t\tvalidateBaseRequest(request);\r\n//\t\t} \r\n//\t\tcatch (IllegalArgumentException e) {\r\n//\t\t\tthrow e;\r\n//\t\t}\r\n\t}", "public abstract boolean isValidInputItem(@Nonnull ItemStack stack);", "public static boolean isValidStack (ItemStack stack) {\n \n return stack != null && stack.getItem() != null;\n }", "public static boolean hasInventorySpace(Inventory inventory, ItemStack is) {\n Inventory inv = Bukkit.createInventory(null, inventory.getSize());\n\n for (int i = 0; i < inv.getSize(); i++) {\n if (inventory.getItem(i) != null) {\n ItemStack item = inventory.getItem(i).clone();\n inv.setItem(i, item);\n }\n }\n\n if (inv.addItem(is.clone()).size() > 0) {\n return false;\n }\n\n return true;\n }", "public abstract boolean canAddItem(Player player, Item item, int slot);", "public boolean isValidPart() {\n boolean result = false;\n boolean isComplete = !partPrice.getText().equals(\"\")\n && !partName.getText().equals(\"\")\n && !inventoryCount.getText().equals(\"\")\n && !partId.getText().equals(\"\")\n && !maximumInventory.getText().equals(\"\")\n && !minimumInventory.getText().equals(\"\")\n && !variableTextField.getText().equals(\"\");\n boolean isValidPrice = isDoubleValid(partPrice);\n boolean isValidName = isCSVTextValid(partName);\n boolean isValidId = isIntegerValid(partId);\n boolean isValidMax = isIntegerValid(maximumInventory);\n boolean isValidMin = isIntegerValid(minimumInventory);\n boolean isMinLessThanMax = false;\n if (isComplete)\n isMinLessThanMax = Integer.parseInt(maximumInventory.getText()) > Integer.parseInt(minimumInventory.getText());\n\n if (!isComplete) {\n Alert errorMessage = new Alert(Alert.AlertType.INFORMATION);\n errorMessage.setTitle(\"Missing Information\");\n errorMessage.setHeaderText(\"You didn't enter required information!\");\n errorMessage.setContentText(\"All fields are required! Your part has not been saved. Press \\\"OK\\\" and try again.\");\n errorMessage.show();\n } else if (!isMinLessThanMax) {\n Alert errorMessage = new Alert(Alert.AlertType.INFORMATION);\n errorMessage.setTitle(\"Invalid Entry\");\n errorMessage.setHeaderText(\"Min must be less than Max!\");\n errorMessage.setContentText(\"Re-enter your data! Your part has not been saved.Press \\\"OK\\\" and try again.\");\n errorMessage.show();\n } else if (!isValidPrice) {\n Alert errorMessage = new Alert(Alert.AlertType.INFORMATION);\n errorMessage.setTitle(\"Price is not valid\");\n errorMessage.setHeaderText(\"The value you entered for price is not valid\");\n errorMessage.setContentText(\"Please ensure that the value you have entered does\" +\n \" not include more than one decimal point (.), does not contain any letters, and does not \" +\n \"have more than two digits after the decimal. \");\n errorMessage.show();\n } else if (!isValidName) {\n Alert errorMessage = new Alert(Alert.AlertType.INFORMATION);\n errorMessage.setTitle(\"Invalid Name\");\n errorMessage.setHeaderText(\"The value you entered for name is not valid.\");\n errorMessage.setContentText(\"Please ensure that the text you enter does not\" +\n \" include any quotation marks,\" +\n \"(\\\"), or commas (,).\");\n errorMessage.show();\n } else if (!isValidId) {\n Alert errorMessage = new Alert(Alert.AlertType.INFORMATION);\n errorMessage.setTitle(\"Incorrect ID\");\n errorMessage.setHeaderText(\"The value you entered for ID is not valid\");\n errorMessage.setContentText(\"Please ensure that the value you have entered\" +\n \" is a whole number, with no letters, symbols or decimal points. \");\n errorMessage.show();\n } else if (!isValidMax) {\n Alert errorMessage = new Alert(Alert.AlertType.INFORMATION);\n errorMessage.setTitle(\"Incorrect Max Inventory\");\n errorMessage.setHeaderText(\"The value you entered for Max is not valid\");\n errorMessage.setContentText(\"Please ensure that the value you have entered\" +\n \" is a whole number, with no letters, symbols or decimal points. \");\n errorMessage.show();\n } else if (!isValidMin) {\n Alert errorMessage = new Alert(Alert.AlertType.INFORMATION);\n errorMessage.setTitle(\"Incorrect Min Inventory\");\n errorMessage.setHeaderText(\"The value you entered for Min is not valid\");\n errorMessage.setContentText(\"Please ensure that the value you have entered\" +\n \" is a whole number, with no letters, symbols or decimal points. \");\n errorMessage.show();\n } else {\n result = true;\n }\n\n return result;\n }", "public boolean isItemValid(ItemStack par1ItemStack)\n/* 23: */ {\n/* 24:20 */ if (isItemTwoHanded(par1ItemStack)) {\n/* 25:21 */ return false;\n/* 26: */ }\n/* 27:23 */ if ((this.rightHand.getHasStack()) && \n/* 28:24 */ (isItemTwoHanded(this.rightHand.getStack()))) {\n/* 29:25 */ return false;\n/* 30: */ }\n/* 31:27 */ return super.isItemValid(par1ItemStack);\n/* 32: */ }", "public boolean isEmpty() {\n\t\treturn Arrays.stream(inventory.getContents())\n\t\t\t\t.noneMatch(ItemStackUtils::isValid);\n\t}", "public boolean haveItem(Items item)\n {\n //boolean haveItem = Inventory.values().contains(item);\n return Inventory.containsValue(item);\n }", "public Boolean canAddItem(ItemStack item, Player player){\n\t\tint freeSpace = 0;\n\t\tfor(ItemStack i : player.getInventory() ){\n\t\t\tif(i == null){\n\t\t\t\tfreeSpace += item.getType().getMaxStackSize();\n\t\t\t} else if (i.getType() == item.getType() ){\n\t\t\t\tfreeSpace += (i.getType().getMaxStackSize() - i.getAmount());\n\t\t\t}\n\t\t}\n\t\tdebugOut(\"Item has: \"+item.getAmount()+\" and freeSpace is: \"+freeSpace);\n\t\tif(item.getAmount() > freeSpace){\n\t\t\tdebugOut(\"There is not enough freeSpace in the inventory\");\n\t\t\treturn false;\n\t\t}else{\n\t\t\tdebugOut(\"There is enough freeSpace in the inventory\");\n\t\t\treturn true;\n\t\t}\n\t}", "public boolean setSlot(int debug1, ItemStack debug2) {\n/* */ EquipmentSlot debug3;\n/* 2048 */ if (debug1 >= 0 && debug1 < this.inventory.items.size()) {\n/* 2049 */ this.inventory.setItem(debug1, debug2);\n/* 2050 */ return true;\n/* */ } \n/* */ \n/* */ \n/* 2054 */ if (debug1 == 100 + EquipmentSlot.HEAD.getIndex()) {\n/* 2055 */ debug3 = EquipmentSlot.HEAD;\n/* 2056 */ } else if (debug1 == 100 + EquipmentSlot.CHEST.getIndex()) {\n/* 2057 */ debug3 = EquipmentSlot.CHEST;\n/* 2058 */ } else if (debug1 == 100 + EquipmentSlot.LEGS.getIndex()) {\n/* 2059 */ debug3 = EquipmentSlot.LEGS;\n/* 2060 */ } else if (debug1 == 100 + EquipmentSlot.FEET.getIndex()) {\n/* 2061 */ debug3 = EquipmentSlot.FEET;\n/* */ } else {\n/* 2063 */ debug3 = null;\n/* */ } \n/* */ \n/* 2066 */ if (debug1 == 98) {\n/* 2067 */ setItemSlot(EquipmentSlot.MAINHAND, debug2);\n/* 2068 */ return true;\n/* 2069 */ } if (debug1 == 99) {\n/* 2070 */ setItemSlot(EquipmentSlot.OFFHAND, debug2);\n/* 2071 */ return true;\n/* */ } \n/* */ \n/* 2074 */ if (debug3 != null) {\n/* 2075 */ if (!debug2.isEmpty()) {\n/* 2076 */ if (debug2.getItem() instanceof net.minecraft.world.item.ArmorItem || debug2.getItem() instanceof ElytraItem) {\n/* 2077 */ if (Mob.getEquipmentSlotForItem(debug2) != debug3) {\n/* 2078 */ return false;\n/* */ }\n/* 2080 */ } else if (debug3 != EquipmentSlot.HEAD) {\n/* 2081 */ return false;\n/* */ } \n/* */ }\n/* 2084 */ this.inventory.setItem(debug3.getIndex() + this.inventory.items.size(), debug2);\n/* 2085 */ return true;\n/* */ } \n/* 2087 */ int debug4 = debug1 - 200;\n/* 2088 */ if (debug4 >= 0 && debug4 < this.enderChestInventory.getContainerSize()) {\n/* 2089 */ this.enderChestInventory.setItem(debug4, debug2);\n/* 2090 */ return true;\n/* */ } \n/* 2092 */ return false;\n/* */ }", "public boolean checkExist(String itemName, int Qty) {\n\n for (int i = 0; i < inventory.size(); i++) {\n Map<String, Object> newItem = new HashMap<>();\n newItem = inventory.get(i);\n if (itemName.equals(newItem.get(\"Name\").toString())) {\n int a = Integer.parseInt((String) newItem.get(\"Amount\"));\n //isInList = true;\n if (a >= Qty) {\n isExist = true;\n break;\n } else {\n isExist = false;\n }\n } else {\n isExist = false;\n }\n\n }\n return isExist;\n\n }", "public boolean isValid() {\n\t\tif (!super.isValid()) {\n\t\t\treturn false;\n\t\t}\n\t\tif (mKey == null)\n\t\t\treturn false;\n\t\tif (mItems == null)\n\t\t\treturn false;\n\n\t\treturn true;\n\t}", "public boolean isValidBoard() {\n\t\t\n\t\tif(mainSlots.size() != NUM_MAIN_SLOTS) {\n\t\t\treturn false;\n\t\t} else if ((redHomeZone != null && redHomeZone.size() != NUM_HOME_SLOTS) ||\n\t\t\t\t(greenHomeZone != null && greenHomeZone.size() != NUM_HOME_SLOTS) ||\n\t\t\t\t(yellowHomeZone != null && yellowHomeZone.size() != NUM_HOME_SLOTS) || \n\t\t\t\t(blueHomeZone != null && blueHomeZone.size() != NUM_HOME_SLOTS)) {\n\t\t\treturn false;\n\t\t} else if ((redEndZone != null && redEndZone.size() != NUM_END_SLOTS) ||\n\t\t\t\t(greenEndZone != null && greenEndZone.size() != NUM_END_SLOTS) || \n\t\t\t\t(yellowEndZone != null && yellowEndZone.size() != NUM_END_SLOTS) || \n\t\t\t\t(blueEndZone != null && blueEndZone.size() != NUM_END_SLOTS)) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t\t\n\t}", "public boolean isInventoryFull()\n\t{\n\t\tif (myWorker.getLoadInInventory() >= getMyPlayer().getPlayerInfo()\n\t\t\t\t.getMaxCarryingLoadByWorker())\n\t\t\treturn true;\n\t\treturn false;\n\t}", "public boolean areBlocksValid() {\n\t\tif (!isValidMaterial(this.mainblock))\n\t\t\tthis.player.sendMessage(ChatColor.RED + \"Please stand on a valid block for this type of ship\");\n\t\telse {\n\t\t\tif (this.blocks.length > this.properties.MAX_BLOCKS)\n\t\t\t\tthis.player.sendMessage(ChatColor.RED + \"Your ship has \" + ChatColor.YELLOW + this.blocks.length + ChatColor.RED + \"/\" + ChatColor.YELLOW + this.properties.MAX_BLOCKS + ChatColor.RED + \" blocks. Please delete some.\");\n\t\t\telse if (this.numMainBlocks < this.properties.MIN_BLOCKS)\n\t\t\t\tthis.player.sendMessage(ChatColor.RED + \"Your ship has \" + ChatColor.YELLOW + this.numMainBlocks + ChatColor.RED + \"/\" + ChatColor.YELLOW + this.properties.MIN_BLOCKS + ChatColor.AQUA + \" \" + getMainType() + ChatColor.RED + \" blocks. Please add more.\");\n\t\t\telse\n\t\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "private boolean inventoryVerify(int min, int max, int stock) {\r\n\r\n boolean invBetween = true;\r\n\r\n if (stock < min || stock > max) {\r\n invBetween = false;\r\n //LOGICAL ERROR: Inventory value error\r\n errorLabel.setVisible(true);\r\n errorTxtLabel.setText(\"Inventory must be less than Max and greater than Min.\");\r\n errorTxtLabel.setVisible(true);\r\n }\r\n\r\n return invBetween;\r\n }", "public void partValidation () throws ValidationException {\n\n // checks for a name to be entered\n if (getPartName().isEmpty() || !getPartName().matches(\"^[a-zA-Z0-9_ ]*$\")){\n throw new ValidationException(\"Name field is invalid. Can't be blank. Must be alphanumeric\");\n\n // checks that minimum stock isn't less than 0\n }else if (getPartStockMin() < 0) {\n throw new ValidationException(\"Inventory minimum can't be less than 0\");\n\n } else if (getPartStockMax() < 0) {\n throw new ValidationException(\"Inventory max must be greater than 0\");\n\n // checks to make sure max stock is not less than the minimum\n }else if (getPartStockMax() < getPartStockMin()) {\n throw new ValidationException(\"Max inventory can't be less than the minimum\");\n\n // checks that stock on hadn is not less than the minimum\n } else if (getPartStock() < getPartStockMin()){\n throw new ValidationException(\"Part inventory can't be less than the minimum\");\n\n // part price can't be 0 or less\n }else if (getPartPrice() < 0){\n throw new ValidationException(\"Price has to be a positive number\");\n\n // max stock can't be less than what you already have\n }else if (getPartStockMax() < getPartStock()){\n throw new ValidationException(\"Max inventory can't be less than what you have on hand\");\n\n // check stock is between min and max\n } else if (getPartStock() < getPartStockMin() || getPartStock() > getPartStockMax()){\n throw new ValidationException(\"Inventory level must be between min and max\");\n\n }\n }", "public boolean checkItem () {\r\n\t\tfor (Entity e : getLocation().getWorld().getEntities())\r\n\t\t{\r\n\t\t\tdouble x = e.getLocation().getX();\r\n\t\t\tdouble z = e.getLocation().getZ();\r\n\t\t\tdouble yDiff = getSpawnLocation().getY() - e.getLocation().getY();\r\n \r\n\t\t\tif (yDiff < 0)\r\n\t\t\t\tyDiff *= -1;\r\n\r\n\t\t\tif (x == getSpawnLocation().getX() && yDiff <= 1.5 && z == getSpawnLocation().getZ()) {\r\n \r\n ShowCaseStandalone.slog(Level.FINEST, \"Potential hit on checkItem()\");\r\n\t\t\t\ttry {\r\n\t\t\t\t\tItem itemE = (Item)e;\r\n\t\t\t\t\tif (ItemStackHandler.itemsEqual(itemE.getItemStack(), getItemStack(), true)) {\r\n ShowCaseStandalone.slog(Level.FINEST, \"Existing stack: \" + itemE.getItemStack().toString());\r\n itemE.getItemStack().setAmount(1); //Removes duped items, which can occur.\r\n\t\t\t\t\t\tthis.item = itemE;\r\n\t\t\t\t\t\tscs.log(Level.FINER, \"Attaching to existing item.\");\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (Exception ex) {}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "final boolean isValidCartQty() {\n Map<Integer, ReturnedItemDTO> cartMap = returnTable.getIdAndQuantityMap();\n for (Entry<Integer, ReturnedItemDTO> entry : cartMap.entrySet()) {\n ReturnedItemDTO ret = entry.getValue();\n int qty = ret.qty;\n int damageStatus = ret.damageStatus;\n if (qty > 0 && damageStatus > 0) {\n return true;\n }\n }\n return false;\n\n }", "public static int checkSlotsAvailable(Player player) {\n return checkSlotsAvailable(player.getInventory());\n }", "public static void validateInventorySummaryRequest(final InvInventoryRequest request) {\r\n//\t\ttry {\r\n\t\t\tvalidateBaseRequest(request);\r\n//\t\t} \r\n//\t\tcatch (IllegalArgumentException e) {\r\n//\t\t\tthrow e;\r\n//\t\t}\r\n\t}", "private boolean hasItem(Client c, int itemId, boolean inventory) {\r\n\t\treturn inventory ? c.getItems().playerHasItem(itemId) : c.getItems().playerHasItem(itemId) || c.playerEquipment[5] == itemId;\r\n\t}", "boolean hasOpenedInventory(Player player);", "@Test\r\n\tpublic void testMakePurchase_empty_slot() {\r\n\t\tassertEquals(false, vendMachine.makePurchase(\"D\"));\r\n\t}", "public boolean showInventory() {\n\n // removes products of 0 quantity\n for (int k = 0; k < this.getInventorySize(); k++) {\n\n if (this.getProduct(k).getQuantity() == 0) {\n this.removeProduct(this.getProduct(k));\n k --;\n }\n }\n return (this.getInventorySize() != 0);\n }", "public boolean isValid(BptSlotInfo slot, IBptContext context)\r\n/* 31: */ {\r\n/* 32:38 */ int id = context.world().a(slot.x, slot.y, slot.z);\r\n/* 33: */ \r\n/* 34:40 */ return (id == amq.y.cm) || (id == amq.x.cm) || (id == amq.aD.cm);\r\n/* 35: */ }", "private boolean validaCompra() {\n\n List<Purchase> purchasesList = billingClient.queryPurchases(INAPP).getPurchasesList();\n if (purchasesList != null && !purchasesList.isEmpty()) {\n for (Purchase purchase : purchasesList) {\n if (purchase.getSku().equals(skuId)) {\n return true;\n }\n }\n }\n return false;\n\n }", "public boolean hasEmptySlots() {\n return (numMaxPlayers - activePlayers) != 0;\n }", "public boolean canSmelt() {\n\t\tif (this.slots[0] == null) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\tItemStack itemstack = FurnaceRecipes.smelting().getSmeltingResult(\n\t\t\t\t\tthis.slots[0]);\n\n\t\t\tif (itemstack == null)\n\t\t\t\treturn false;\n\t\t\tif (this.slots[1] == null)\n\t\t\t\treturn true;\n\t\t\tif (!this.slots[1].isItemEqual(itemstack))\n\t\t\t\treturn false;\n\n\t\t\tint result = slots[1].stackSize + itemstack.stackSize;\n\n\t\t\treturn result <= getInventoryStackLimit()\n\t\t\t\t\t&& result <= itemstack.getMaxStackSize();\n\t\t}\n\t}", "protected boolean hasInventoryValues(final int studyID) {\n\t\ttry {\n\t\t\tGermplasmList germplasmList = null;\n\t\t\tfinal GermplasmListType listType = GermplasmListType.STUDY;\n\t\t\tfinal List<GermplasmList> germplasmLists = this.fieldbookMiddlewareService.getGermplasmListsByProjectId(studyID, listType);\n\t\t\tif (!germplasmLists.isEmpty()) {\n\t\t\t\tgermplasmList = germplasmLists.get(0);\n\t\t\t}\n\n\t\t\tif (germplasmList != null) {\n\t\t\t\tfinal Integer listId = germplasmList.getId();\n\t\t\t\tfinal String germplasmListType = germplasmList.getType();\n\t\t\t\tfinal List<InventoryDetails> inventoryDetailList =\n\t\t\t\t\t\tthis.inventoryMiddlewareService.getInventoryDetailsByGermplasmList(listId, germplasmListType);\n\n\t\t\t\tfor (final InventoryDetails inventoryDetails : inventoryDetailList) {\n\t\t\t\t\tif (inventoryDetails.getLotId() != null) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (final MiddlewareQueryException e) {\n\t\t\tLabelPrintingServiceImpl.LOG.error(e.getMessage(), e);\n\t\t}\n\n\t\treturn false;\n\t}", "public static boolean canInsertItem(IItemHandler handler, ItemStack stack)\n\t{\n\t\tfor (int i=0; i<handler.getSlots(); i++)\n\t\t{\n\t\t\t// for each slot, if the itemstack can be inserted into the slot\n\t\t\t\t// (i.e. if the type of that item is valid for that slot AND\n\t\t\t\t// if there is room to put at least part of that stack into the slot)\n\t\t\t// then the inventory at this endpoint can receive the stack, so return true\n\t\t\tif (handler.isItemValid(i, stack) && handler.insertItem(i, stack, true).getCount() < stack.getCount())\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// return false if no acceptable slot is found\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean isValidArmor(ItemStack stack, int armorType, Entity entity) {\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean canDropInventory(IBlockState state)\n\t{\n\t\treturn false;\n\t}", "public interface SlotConstraint {\n /**\n * Check the entry\n */\n public void check(Item item, int quantity) throws InventoryException;\n}", "private boolean checkValidQuantity (int quantity){\n if (quantity >= 0){\n return true;\n }\n return false;\n }", "public boolean isSetTeamInventory() {\n return EncodingUtils.testBit(__isset_bitfield, __TEAMINVENTORY_ISSET_ID);\n }", "public boolean check(ItemStack item) {\n return item != null && item.getType() == material && item.hasItemMeta() && item.getItemMeta().hasDisplayName() && item.getItemMeta().getDisplayName().equals(displayName);\n }", "@Override\n public boolean isValid() {\n if(width < 0){\n return false;\n }\n\n if(height < 0){\n return false;\n }\n\n //no null objects\n if(origin == null){\n return false;\n }\n\n if(color == null){\n return false;\n }\n\n //if texture doesn't exist, sprite is not buildable\n if(!Gdx.files.internal(texture).exists()){\n Gdx.app.log(TAG, \"Texture cannot be found: \" + texture);\n return false;\n }\n\n return true;\n }", "@Override\n public boolean active() {\n return !Inventory.isFull();\n }", "private boolean isInputValid(){\n\t\tString errorMessage = \"\";\n\t\tif((nameField.getText() == null) || (nameField.getText().length() == 0)){\n\t\t\terrorMessage += \"No valid product name!\\n\";\n\t\t}\n\t\tif((amountAvailableField.getText() == null) || (amountAvailableField.getText().length() == 0)){\n\t\t\terrorMessage += \"No valid amount available value!\\n\";\n\t\t}\n\t\tif((amountSoldField.getText() == null) || (amountSoldField.getText().length() == 0)){\n\t\t\terrorMessage += \"No valid amount sold value!\\n\";\n\t\t}\n\t\tif((priceEachField.getText() == null) || (priceEachField.getText().length() == 0)){\n\t\t\terrorMessage += \"No valid price for each!\\n\";\n\t\t}\n\t\tif((priceMakeField.getText() == null) || (priceMakeField.getText().length() == 0)){\n\t\t\terrorMessage += \"No valid price to make the product!\\n\";\n\t\t}\n\t\tif(errorMessage.length() == 0){\n\t\t\treturn true;\n\t\t}\n\t\telse{\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean hasValidHolder(){\r\n\t\tHolder directHolder = getDirectHolder();\r\n\t\tif(isTerminated() && directHolder == null) \r\n\t\t\treturn true;\r\n\t\telse if(isTerminated() && directHolder != null){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif(directHolder == null || directHolder == this)\r\n\t\t\treturn false;\t\t\r\n\t\telse{\r\n\t\t\tHolder parser = getDirectHolder();\r\n\t\t\twhile(!parser.isSupremeHolder()){\r\n\t\t\t\tif(parser == this)\r\n\t\t\t\t\treturn false;\r\n\t\t\t\tparser = ((Item)parser).getDirectHolder();\r\n\t\t\t}\t\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public boolean checkInventory(String _roll, int wantedAmount) {\r\n int quantity = dailyRollInventory.get(_roll);\r\n if (wantedAmount <= quantity) {\r\n return true;\r\n } \r\n return false;\r\n }", "public boolean isSlot(int i);", "public boolean addNewInventory() {\n if (characterVM.addNewInventory(inventoryEntityToRetrieve.peek())) {\n removeTopRewardAndContinue();\n return true;\n }\n return false;\n }", "@Override\n\tpublic boolean containsSlots() {\n\t\treturn !labelTemplate.getSlots().isEmpty() || !valueTemplate.getSlots().isEmpty();\n\t}", "public boolean isValid(World world, BlockPos pos, IBlockState state) {\n return true;\n }", "public boolean isValid() {\n return _id != null && !_id.isEmpty() &&\n _name != null && !_name.isEmpty() &&\n _created != null && !_created.isEmpty();\n }", "public final boolean has(Player player, Collection<ItemStack> items)\n\t{\n\t\treturn InventoryHelper.findMissing(player, items).size() == 0;\n\t}", "public boolean hasItem(final String name) {\n for (final Item item : this.getInventory()) {\n if (item.name().equals(name)) {\n return true;\n }\n }\n return false;\n }", "public boolean canPlayerPlace(int slot) {\n\n TradeItem item = getItem(slot);\n\n if (item == null) {\n return false;\n }\n\n return item.hasItemFlag(\"SELF\");\n }", "public boolean valid() {\n \n return ObjectUtils.isValid(PartitionConfig.class, this) \n && ((PartitionType.COUNT.equals(this.type) && ((this.count != null) \n || StringUtils.isNotBlank(this.countRef))) \n || ((PartitionType.ITEMS.equals(this.type) \n || (PartitionType.FUNCTION.equals(this.type) && StringUtils.isNotBlank(this.output)\n && BooleanUtils.xor(new boolean [] {StringUtils.isBlank(this.className), \n StringUtils.isBlank(this.functionName)})))\n && ((this.input != null) && (this.input.get(PartitionFunction.ITEMS_KEY) != null))));\n \n }", "private boolean isInputValid() {\n String errorMessage = \"\";\n\n if (gemNameField.getText() == null || gemNameField.getText().length() == 0) {\n errorMessage += \"No valid gem name!\\n\";\n }\n if (gemValueField.getText() == null || gemValueField.getText().length() == 0) {\n errorMessage += \"No valid gem value!\\n\";\n } else {\n // try to parse the gem value into an int.\n try {\n Integer.parseInt(gemValueField.getText());\n } catch (NumberFormatException e) {\n errorMessage += \"No valid gem value (must be an integer)!\\n\";\n }\n }\n if (gemDescripField.getText() == null || gemDescripField.getText().length() == 0) {\n errorMessage += \"No valid gem description!\\n\";\n }\n\n if (errorMessage.length() == 0) {\n return true;\n } else {\n // Show the error message.\n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.initOwner(dialogStage);\n alert.setTitle(\"Invalid Fields\");\n alert.setHeaderText(\"Please correct invalid fields\");\n alert.setContentText(errorMessage);\n\n alert.showAndWait();\n\n return false;\n }\n }", "public boolean takeItem(Items item)\n { \n boolean itemTaken = false;\n if(!haveItem(item) && currentRoom.haveItem(item)){ //if item in room not inventory\n if(!item.canBeHeld()){ // if item can't be held\n System.out.println (\"This item can not be picked up\");\n }else if(itemsHeld >= itemLimit) { //item can be held but not enough space\n System.out.println(\"Inventory is full. Drop something first\");\n }else{ //item can be held and there is space in inventory\n Inventory.put(item.getName(), item);\n //currentRoom.removeItem(item); //responsibility for this is in cmd_take\n itemsHeld ++; //inventory tracker +1\n itemTaken = true;\n }\n }\n return itemTaken;\n }", "protected boolean isEquipmentValid(String equipment) {\n String[] equipArray = equipment.split(\" \");\n for (String plane : equipArray) {\n if (!(plane.length() == 3 && plane.matches(\"[0-9A-Z]+\"))) {\n return false;\n }\n }\n return true;\n }", "private List<ItemBO> checkInventoryProblem(final List<ItemBO> itemList)\n\t{\n\t\tfinal List<ItemBO> itemBOList = new ArrayList<ItemBO>();\n\t\tif (itemList != null && (!itemList.isEmpty()))\n\t\t{\n\t\t\tfinal Iterator<ItemBO> itemListIterator = itemList.iterator();\n\t\t\twhile (itemListIterator.hasNext())\n\t\t\t{\n\t\t\t\tfinal ItemBO itemBO = itemListIterator.next();\n\t\t\t\tboolean isProblemPart = false;\n\t\t\t\tif (null != itemBO.getProblemItemList() && !itemBO.getProblemItemList().isEmpty())\n\t\t\t\t{\n\t\t\t\t\tfinal List<ProblemBO> problemBOList = itemBO.getProblemItemList();\n\t\t\t\t\tfor (final ProblemBO problem : problemBOList)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (MessageResourceUtil.NO_INVENTORY.equals(problem.getMessageKey()))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tisProblemPart = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (!isProblemPart)\n\t\t\t\t{\n\t\t\t\t\titemBOList.add(itemBO);\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t\treturn itemBOList;\n\t}", "public static boolean hasItem(String name)\n {\n boolean found = false;\n for (Item inventory1 : inventory)\n {\n if(inventory1.getName().equals(name)) found = true;\n }\n \n return found;\n }", "protected void checkinventory(ArrayList <String> checker, ArrayList <ObjetoEquipable> inventory) {\n Inventario.verInventarioAsk(inventory,checker);\r\n }", "public boolean isValid()\n {\n return this.address >= 0 && this.slaveId >= 0 && this.xlator != null\n && this.gatewayProtocol != null\n && (this.serialParameters != null\n || (this.gatewayIPAddress != null\n && this.gatewayPort != null));\n }", "public void validate(EbXMLSlotList slotList) throws XDSMetaDataException {\r\n var slotValues = slotList.getSlotValues(slotName);\r\n metaDataAssert(slotValues.size() >= min && slotValues.size() <= max,\r\n WRONG_NUMBER_OF_SLOT_VALUES, slotName, min, max, slotValues.size());\r\n\r\n for (var value : slotValues) {\r\n metaDataAssert(value != null, EMPTY_SLOT_VALUE, slotName); \r\n validator.validate(value);\r\n }\r\n }", "public Boolean playerHasItem(Player player, String itemName) {\n Collection<Item> playerInventory = player.getInventory();\n\n return playerInventory.stream().anyMatch(item -> item.getItemName().equals(itemName));\n }", "private boolean isHorseBetsValidForTable(Game game) throws ServiceException {\r\n\r\n Map<Horse, List<BetType>> horsesBets = game.getHorseBetTypes();\r\n for (Map.Entry<Horse, List<BetType>> horseBets : horsesBets.entrySet()){\r\n\r\n if (horseBets.getValue() == null || horseBets.getValue().isEmpty()){\r\n return false;\r\n }\r\n }\r\n return true;\r\n }", "@Test\n\tpublic void testUseValidItem() {\n\t\tLightGrenade lightGrenade = new LightGrenade();\n\t\tSquare square = new Square();\n\t\t\n\t\tPlayer player = new Player(square, 0);\n\t\tplayer.addItem(lightGrenade);\n\t\t\n\t\tplayer.useItem(lightGrenade);\n\t\tassertFalse(player.hasItem(lightGrenade));\n\t}", "private boolean checkStock(){\n int i;\n int inventorySize = inventory.size();\n int count = 0;\n for(i = 0; i < inventorySize; i++){\n count = count + inventory.get(i).getStock();\n\n }\n //System.out.println(\"Count was: \" + count);\n if(count < 1){\n return false;\n }else{\n return true;\n }\n }", "void updateInventory() {\n\n // make sure there isn't already an inventory record\n MrnInventory checkInv[] =\n new MrnInventory(survey.getSurveyId()).get();\n\n if (dbg3) {\n System.out.println(\"<br>updateInventory: survey.getSurveyId() = \" +\n survey.getSurveyId());\n System.out.println(\"<br>updateInventory: inventory = \" + inventory);\n System.out.println(\"<br>updateInventory: checkInv[0] = \" +\n checkInv[0]);\n System.out.println(\"<br>updateInventory: checkInv.length = \" +\n checkInv.length);\n } // if (dbg3)\n\n if (checkInv.length > 0) {\n\n //MrnInventory updInventory = new MrnInventory();\n\n if (dbg3) {\n System.out.println(\"<br>updateInventory: dateMin = \" + dateMin);\n System.out.println(\"<br>updateInventory: dateMax = \" + dateMax);\n System.out.println(\"<br>updateInventory: latitudeMin = \" + latitudeMin);\n System.out.println(\"<br>updateInventory: latitudeMax = \" + latitudeMax);\n System.out.println(\"<br>updateInventory: longitudeMin = \" + longitudeMin);\n System.out.println(\"<br>updateInventory: longitudeMax = \" + longitudeMax);\n } // if (dbg3)\n\n // check dates\n if (MrnInventory.DATENULL.equals(checkInv[0].getDateStart()) ||\n dateMin.before(checkInv[0].getDateStart())) {\n inventory.setDateStart(dateMin);\n\n } // if (dateMin.before(checkInv[0].getDateStart()))\n if (MrnInventory.DATENULL.equals(checkInv[0].getDateEnd()) ||\n dateMax.after(checkInv[0].getDateEnd())) {\n inventory.setDateEnd(dateMax);\n } // if (dateMax.after(checkInv[0].getDateEnd()))\n\n // check area\n if ((MrnInventory.FLOATNULL == checkInv[0].getLatNorth()) ||\n (latitudeMin < checkInv[0].getLatNorth())) {\n inventory.setLatNorth(latitudeMin);\n } // if (latitudeMin < checkInv[0].getLatNorth())\n if ((MrnInventory.FLOATNULL == checkInv[0].getLatSouth()) ||\n (latitudeMax > checkInv[0].getLatSouth())) {\n inventory.setLatSouth(latitudeMax);\n } // if (latitudeMin < checkInv[0].getLatSouth())\n if ((MrnInventory.FLOATNULL == checkInv[0].getLongWest()) ||\n (longitudeMin < checkInv[0].getLongWest())) {\n inventory.setLongWest(longitudeMin);\n } // if (longitudeMin < checkInv[0].getlongWest())\n if ((MrnInventory.FLOATNULL == checkInv[0].getLongEast()) ||\n (longitudeMax > checkInv[0].getLongEast())) {\n inventory.setLongEast(longitudeMax);\n } // if (longitudeMax < checkInv[0].getlongEast())\n\n // check others\n if (\"\".equals(checkInv[0].getCruiseName(\"\"))) {\n inventory.setCruiseName(inventory.getCruiseName());\n } // if (\"\".equals(checkInv[0].getCruiseName()))\n if (\"\".equals(checkInv[0].getProjectName(\"\"))) {\n inventory.setProjectName(inventory.getProjectName());\n } // if (\"\".equals(checkInv[0].getProjectName()))\n\n inventory.setDataRecorded(\"Y\");\n\n MrnInventory whereInventory =\n new MrnInventory(survey.getSurveyId());\n\n try {\n //whereInventory.upd(updInventory);\n whereInventory.upd(inventory);\n } catch(Exception e) {\n System.err.println(\"updateInventory: upd inventory = \" + inventory);\n System.err.println(\"updateInventory: upd whereInventory = \" + whereInventory);\n System.err.println(\"updateStation: upd sql = \" + whereInventory.getUpdStr());\n e.printStackTrace();\n } // try-catch\n if (dbg3) System.out.println(\n \"<br>updateInventory: upd inventory = \" + inventory);\n if (dbg3) System.out.println(\n \"<br>updateInventory: upd whereInventory = \" + whereInventory);\n //if (dbg3)\n System.out.println(\"<br>updateInventory: updSQL = \" + whereInventory.getUpdStr());\n\n\n/* } else {\n inventory.setSurveyId(survey.getSurveyId());\n // defaults\n inventory.setDataCentre(\"SADCO\");\n //inventory.setCountryCode(0); // done in LoadMrnData\n inventory.setTargetCountryCode(0);\n inventory.setStnidPrefix(survey.getInstitute());\n inventory.setDataRecorded(\"Y\");\n\n // from data\n inventory.setDateStart(dateMin);\n inventory.setDateEnd(dateMax);\n inventory.setLatNorth(latitudeMin);\n inventory.setLatSouth(latitudeMax);\n inventory.setLongWest(longitudeMin);\n inventory.setLongEast(longitudeMax);\n\n // from screen - done in LoadMRNData.getArgsFromFile()\n //inventory.setCountryCode(screenInv.getCountryCode());\n //inventory.setPlanamCode(screenInv.getPlanamCode());\n //inventory.setInstitCode(screenInv.getInstitCode());\n //inventory.setCruiseName(screenInv.getCruiseName());\n //inventory.setProjectName(screenInv.getProjectName());\n //inventory.setAreaname(screenInv.getAreaname()); // use as default to show on screen\n //inventory.setDomain(screenInv.getDomain()); // use as default to show on screen\n\n inventory.put();\n*/\n } // if (checkInv.length > 0)\n\n // make sure there isn't already an invStats record\n MrnInvStats checkInvStats[] =\n new MrnInvStats(survey.getSurveyId()).get();\n\n MrnInvStats invStats = new MrnInvStats();\n\n if (checkInvStats.length > 0) {\n\n System.out.println(\"updateInventory: checkInvStats[0] = \" + checkInvStats[0]);\n\n invStats.setStationCnt(\n checkInvStats[0].getStationCnt() + newStationCount); //stationCount\n invStats.setWeatherCnt(\n checkNull(checkInvStats[0].getWeatherCnt()) + weatherCount);\n\n if (dataType == CURRENTS) {\n\n invStats.setWatcurrentsCnt(\n checkNull(checkInvStats[0].getWatcurrentsCnt()) + currentsCount);\n\n } else if (dataType == SEDIMENT) {\n\n System.out.println(\n \"updateInventory: checkInvStats[0].getSedphyCnt(), sedphyCount = \" +\n checkInvStats[0].getSedphyCnt() + \" \" + sedphyCount + \" \" +\n checkNull(checkInvStats[0].getSedphyCnt()));\n System.out.println(\n \"updateInventory: checkInvStats[0].getSedchem1Cnt(), sedchem1Count = \" +\n checkInvStats[0].getSedchem1Cnt() + \" \" + sedchem1Count + \" \" +\n checkNull(checkInvStats[0].getSedchem1Cnt()));\n System.out.println(\n \"updateInventory: checkInvStats[0].getSedchem2Cnt(), sedchem2Count = \" +\n checkInvStats[0].getSedchem2Cnt() + \" \" + sedchem2Count + \" \" +\n checkNull(checkInvStats[0].getSedchem2Cnt()));\n System.out.println(\n \"updateInventory: checkInvStats[0].getSedpol1Cnt(), sedpol1Count = \" +\n checkInvStats[0].getSedpol1Cnt() + \" \" + sedpol1Count + \" \" +\n checkNull(checkInvStats[0].getSedpol1Cnt()));\n System.out.println(\n \"updateInventory: checkInvStats[0].getSedpol2Cnt(), sedpol2Count = \" +\n checkInvStats[0].getSedpol2Cnt() + \" \" + sedpol2Count + \" \" +\n checkNull(checkInvStats[0].getSedpol2Cnt()));\n\n invStats.setSedphyCnt(\n checkNull(checkInvStats[0].getSedphyCnt()) + sedphyCount);\n invStats.setSedchem1Cnt(\n checkNull(checkInvStats[0].getSedchem1Cnt()) + sedchem1Count);\n invStats.setSedchem2Cnt(\n checkNull(checkInvStats[0].getSedchem2Cnt()) + sedchem2Count);\n invStats.setSedpol1Cnt(\n checkNull(checkInvStats[0].getSedpol1Cnt()) + sedpol1Count);\n invStats.setSedpol2Cnt(\n checkNull(checkInvStats[0].getSedpol2Cnt()) + sedpol2Count);\n\n System.out.println(\"updateInventory: invStats = \" + invStats);\n\n\n } else if ((dataType == WATER) || (dataType == WATERWOD)) {\n\n invStats.setWatphyCnt(\n checkNull(checkInvStats[0].getWatphyCnt()) + watphyCount);\n invStats.setWatchem1Cnt(\n checkNull(checkInvStats[0].getWatchem1Cnt()) + watchem1Count);\n invStats.setWatchem2Cnt(\n checkNull(checkInvStats[0].getWatchem2Cnt()) + watchem2Count);\n invStats.setWatchlCnt(\n checkNull(checkInvStats[0].getWatchlCnt()) + watchlCount);\n invStats.setWatnutCnt(\n checkNull(checkInvStats[0].getWatnutCnt()) + watnutCount);\n invStats.setWatpol1Cnt(\n checkNull(checkInvStats[0].getWatpol1Cnt()) + watpol1Count);\n invStats.setWatpol2Cnt(\n checkNull(checkInvStats[0].getWatpol2Cnt()) + watpol2Count);\n\n } // if (dataType == CURRENTS)\n\n MrnInvStats whereInvStats =\n new MrnInvStats(survey.getSurveyId());\n try {\n whereInvStats.upd(invStats);\n } catch(Exception e) {\n System.err.println(\"updateInventory: upd invStats = \" + invStats);\n System.err.println(\"updateInventory: upd whereInvStats = \" + whereInvStats);\n System.err.println(\"updateInventory: upd sql = \" + whereInvStats.getUpdStr());\n e.printStackTrace();\n } // try-catch\n if (dbg3) System.out.println(\"<br>updateInventory: upd invStats = \" +\n invStats);\n\n } else {\n\n invStats.setStationCnt(stationCount);\n invStats.setWeatherCnt(weatherCount);\n\n if (dataType == CURRENTS) {\n\n invStats.setWatcurrentsCnt(currentsCount);\n\n } else if (dataType == SEDIMENT) {\n\n invStats.setSedphyCnt(sedphyCount);\n invStats.setSedchem1Cnt(sedchem1Count);\n invStats.setSedchem2Cnt(sedchem2Count);\n invStats.setSedpol1Cnt(sedpol1Count);\n invStats.setSedpol2Cnt(sedpol2Count);\n\n } else if ((dataType == WATER) || (dataType == WATERWOD)) {\n\n invStats.setWatphyCnt(watphyCount);\n invStats.setWatchem1Cnt(watchem1Count);\n invStats.setWatchem2Cnt(watchem2Count);\n invStats.setWatchlCnt(watchlCount);\n invStats.setWatnutCnt(watnutCount);\n invStats.setWatpol1Cnt(watpol1Count);\n invStats.setWatpol2Cnt(watpol2Count);\n\n } // if (dataType == CURRENTS)\n\n invStats.setSurveyId(survey.getSurveyId());\n try {\n invStats.put();\n } catch(Exception e) {\n System.err.println(\"updateInventory: put invStats = \" + invStats);\n System.err.println(\"updateInventory: put sql = \" + invStats.getInsStr());\n e.printStackTrace();\n } // try-catch\n if (dbg3) System.out.println(\"<br>updateInventory: put invStats = \" +\n invStats);\n } // if (checkInvStats.length > 0)\n\n/* ????\n\n // define the value that should be updated\n MrnInventory updateInv = new MrnInventory();\n updateInv.setDateStart(dateMin);\n\n // define the 'where' clause\n MrnInventory whereInv = new MrnInventory(inventory.getSurveyId());\n\n // do the update\n whereInv.upd(updateInv);\n\n*/\n\n }", "public boolean isValid(){\n\t\treturn this.arm.isValid();\n\t}", "public boolean isSatSlot(int slotNumber) throws IOException { \n int result = isSatSlot0(slotNumber);\n if (result == -1) {\n String err_msg = getErrorMessage0();\n if (err_msg != null)\n throw new IOException(err_msg);\n else\n throw new IOException(\"isSAT failed\");\n }\n return result != 0; \n }", "public abstract boolean canRemoveItem(Player player, Item item, int slot);", "public boolean containItem(Item item) {\r\n for (Item i : inventoryItems) {\r\n if (i.getName() == item.getName()) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }", "private boolean isValidSolitaireBoard() {\n \n /**\n \u0016The number of piles should be greater than or equal to zero but smaller than piles.length\n should be true\n */\n boolean containsPiles = numPiles >= 0 && numPiles < piles.length;\n \n /**\n The number of piles should be equal to the CARD_TOTAL.\n should be true\n */\n boolean pilesSizeEqualCardTotal = (piles.length == CARD_TOTAL);\n \n /**\n None of the elements in the partially filled array is equal to zero\n should be true\n */\n boolean pilesDoesntContainZeros = true;\n \n /**\n The card sum is equal to the card total\n should be true\n */\n boolean cardSumEqualCardTotal = true;\n \n \n if (containsPiles && pilesSizeEqualCardTotal){\n int cardSum = 0;\n for (int i = 0; i < numPiles; i++){\n cardSum += piles[i];\n //checks if array has any zeros\n if (piles [i] == 0)\n pilesDoesntContainZeros = false;\n }\n //check if the card sum is equal to the card total\n if (cardSum != CARD_TOTAL){\n cardSumEqualCardTotal = false;\n }\n }\n \n //returns true if all true\n return containsPiles && pilesSizeEqualCardTotal && cardSumEqualCardTotal &&\n pilesDoesntContainZeros;\n }", "public boolean isValid(LivingEntity casterIn, IMagicEffect spellIn)\r\n\t\t{\r\n\t\t\tif(casterIn == null) return true;\r\n\t\t\tswitch(this)\r\n\t\t\t{\r\n\t\t\t\tcase FOCUS:\r\n\t\t\t\t\tif(casterIn instanceof PlayerEntity && ((PlayerEntity)casterIn).isCreative()) return true;\r\n\t\t\t\t\t\r\n\t\t\t\t\tboolean focusFound = false;\r\n\t\t\t\t\tfor(Hand hand : Hand.values())\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tItemStack heldItem = casterIn.getHeldItem(hand);\r\n\t\t\t\t\t\tif(spellIn.itemMatchesFocus(heldItem))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tfocusFound = true;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(!focusFound && casterIn instanceof PlayerEntity)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tPlayerEntity player = (PlayerEntity)casterIn;\r\n\t\t\t\t\t\tfor(int slot=0; slot<9; slot++)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tItemStack heldItem = player.inventory.getStackInSlot(slot);\r\n\t\t\t\t\t\t\tif(spellIn.itemMatchesFocus(heldItem))\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tfocusFound = true;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\treturn focusFound;\r\n\t\t\t\tcase MATERIAL:\r\n\t\t\t\t\tif(casterIn instanceof PlayerEntity && ((PlayerEntity)casterIn).isCreative()) ;\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tPlayerEntity player = casterIn instanceof PlayerEntity ? (PlayerEntity)casterIn : null;\r\n\t\t\t\t\t\tfor(ItemStack material : spellIn.getMaterialComponents())\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tint count = material.getCount();\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t// Check player inventory\r\n\t\t\t\t\t\t\tif(player != null)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tfor(int slot=0; slot<player.inventory.getSizeInventory(); slot++)\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tItemStack heldItem = player.inventory.getStackInSlot(slot);\r\n\t\t\t\t\t\t\t\t\tif(heldItem.isEmpty()) continue;\r\n\t\t\t\t\t\t\t\t\tif(isMatchingItem(heldItem, material)) count -= Math.min(count, heldItem.getCount());\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\telse\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t// Check held items\r\n\t\t\t\t\t\t\t\tfor(Hand hand : Hand.values())\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tItemStack heldItem = casterIn.getHeldItem(hand);\r\n\t\t\t\t\t\t\t\t\tif(heldItem.isEmpty()) continue;\r\n\t\t\t\t\t\t\t\t\tif(isMatchingItem(heldItem, material)) count -= Math.min(count, heldItem.getCount());\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t// Check armour slots\r\n\t\t\t\t\t\t\t\tfor(EquipmentSlotType hand : EquipmentSlotType.values())\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tItemStack heldItem = casterIn.getItemStackFromSlot(hand);\r\n\t\t\t\t\t\t\t\t\tif(heldItem.isEmpty()) continue;\r\n\t\t\t\t\t\t\t\t\tif(isMatchingItem(heldItem, material)) count -= Math.min(count, heldItem.getCount());\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\t\r\n\t\t\t\t\t\t\tif(count > 0) return false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn true;\r\n\t\t\t\tcase SOMATIC:\r\n\t\t\t\t\treturn !VOPotions.isParalysed(casterIn);\r\n\t\t\t\tcase VERBAL:\r\n\t\t\t\t\treturn !VOPotions.isSilenced(casterIn);\r\n\t\t\t\tdefault: return true;\r\n\t\t\t}\r\n\t\t}", "public boolean isValid() {\n return (this.S>=0 && this.I>=0 && this.R>=0);\n }" ]
[ "0.7373194", "0.72145176", "0.7180513", "0.7070173", "0.7061817", "0.6961236", "0.6945313", "0.69093704", "0.6894716", "0.68371326", "0.66406786", "0.6570922", "0.6533641", "0.65170264", "0.65122694", "0.6504145", "0.63689584", "0.6329226", "0.63124114", "0.6311172", "0.62648916", "0.6199819", "0.619825", "0.6180324", "0.61475414", "0.6116779", "0.6092492", "0.6068028", "0.6040317", "0.59492064", "0.5937013", "0.59305185", "0.5915102", "0.59135586", "0.59043247", "0.59030885", "0.5865088", "0.585373", "0.5840023", "0.5837668", "0.5806159", "0.579506", "0.57842183", "0.5758941", "0.5755327", "0.5754257", "0.5752677", "0.574957", "0.5748224", "0.57430655", "0.57424647", "0.57320523", "0.571017", "0.57093453", "0.5694768", "0.5678278", "0.5647543", "0.5608787", "0.56074566", "0.5604738", "0.559718", "0.55866563", "0.5566025", "0.5555306", "0.5554491", "0.5543804", "0.55348945", "0.5534893", "0.5523563", "0.55182797", "0.5511306", "0.55061275", "0.5505391", "0.54997283", "0.54566324", "0.54522926", "0.5427746", "0.5412829", "0.5412489", "0.5412205", "0.5411478", "0.540939", "0.5400415", "0.5400379", "0.5396021", "0.5388964", "0.5385433", "0.53663117", "0.5362133", "0.5355356", "0.53474486", "0.5346541", "0.53379357", "0.5327301", "0.53244585", "0.532366", "0.53221077", "0.532198", "0.5315225", "0.53069293" ]
0.7509425
0
Checks whether an inventory is valid. For this check to return true it must: 1) Exist; it cannot be null. 2) Have elements. (Null elements are counted.)
public static boolean isValidInventory(final ItemStack[] inventory) { if (inventory == null) { return false; } if (inventory.length < 1) { return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isFull(){\n\t\tfor(int i = 0; i < INVENTORY_SLOTS; i++){\n\t\t\tif(inventoryItems[i] == null){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public static boolean isValidInventory(final Inventory inventory) {\n if (inventory == null) {\n return false;\n }\n if (inventory.getSize() < 1) {\n return false;\n }\n return true;\n }", "void checkInventoryExists() {\n\n MrnInventory[] checkInventory =\n new MrnInventory(survey.getSurveyId()).get();\n inventoryExists = false;\n if (checkInventory.length > 0) {\n inventoryExists = true;\n } // if (checkInventory.length > 0)\n\n\n }", "public static boolean inventoryIsEmpty() {\n\t\treturn Inventory.getCount() == 0;\n\t}", "@Override\n public boolean isValid() {\n return (27 - Inventory.getAll().length <= Inventory.find(\"Soft clay\").length)\n || (Inventory.find(\"Soft clay\").length < 1 || Inventory\n .find(\"Astral rune\").length < 1)\n && !Banking.isBankScreenOpen()\n && GlassBlower.antiban.canInteractObject();\n }", "public boolean isItemValid(ItemStack par1ItemStack)\n {\n return true;\n }", "public static boolean inventoryIsFull() {\n\t\treturn Inventory.getCount() == 28;\n\t}", "public boolean isEmpty() {\n\t\treturn Arrays.stream(inventory.getContents())\n\t\t\t\t.noneMatch(ItemStackUtils::isValid);\n\t}", "@java.lang.Override\n public boolean hasInventoryItemData() {\n return inventoryItemCase_ == 3;\n }", "@java.lang.Override\n public boolean hasInventoryItemData() {\n return inventoryItemCase_ == 3;\n }", "public boolean checkInventory(int serialNum, int qty){\n \n //create a boolean var and set to false- change to true only if there is enough of requested inventory\n boolean enoughInventory = false;\n \n //loop through all Inventory\n for(int i=0; i<this.items.size(); i++){\n //check if inventoryItem has matching serialNumber with specified serialNum\n if(this.items.get(i).getSerialNum()==serialNum){\n //if serial numbers match, check if inventoryItem has enough in stock for requested order\n if(this.items.get(i).getQty() >= qty){\n enoughInventory = true; //if quantity in inventory is greater than or equal to requested quantity there is enough\n }\n }\n }\n \n //return enoughInventory- will be false if no serial number matched or if there was not enough for requested qty\n return enoughInventory;\n \n }", "public static int checkSlotsAvailable(Inventory inv) {\n ItemStack[] items = inv.getContents(); //Contents of player inventory\n int emptySlots = 0;\n\n for (ItemStack is : items) {\n if (is == null) {\n emptySlots = emptySlots + 1;\n }\n }\n\n return emptySlots;\n }", "private boolean checkStock(){\n int i;\n int inventorySize = inventory.size();\n int count = 0;\n for(i = 0; i < inventorySize; i++){\n count = count + inventory.get(i).getStock();\n\n }\n //System.out.println(\"Count was: \" + count);\n if(count < 1){\n return false;\n }else{\n return true;\n }\n }", "public boolean isItemValid(ItemStack var1)\n {\n return canHoldPotion(var1);\n }", "public boolean isValidItem() {\n return validItem;\n }", "public boolean showInventory() {\n\n // removes products of 0 quantity\n for (int k = 0; k < this.getInventorySize(); k++) {\n\n if (this.getProduct(k).getQuantity() == 0) {\n this.removeProduct(this.getProduct(k));\n k --;\n }\n }\n return (this.getInventorySize() != 0);\n }", "final boolean isValidCartQty() {\n Map<Integer, ReturnedItemDTO> cartMap = returnTable.getIdAndQuantityMap();\n for (Entry<Integer, ReturnedItemDTO> entry : cartMap.entrySet()) {\n ReturnedItemDTO ret = entry.getValue();\n int qty = ret.qty;\n int damageStatus = ret.damageStatus;\n if (qty > 0 && damageStatus > 0) {\n return true;\n }\n }\n return false;\n\n }", "public boolean isItemValidForSlot(int p_94041_1_, ItemStack p_94041_2_)\n {\n return true;\n }", "@Override\n\tpublic boolean isItemValid(ItemStack stack) {\n\t\treturn true;\n\t}", "public boolean isValid() {\n\t\tif (!super.isValid()) {\n\t\t\treturn false;\n\t\t}\n\t\tif (mKey == null)\n\t\t\treturn false;\n\t\tif (mItems == null)\n\t\t\treturn false;\n\n\t\treturn true;\n\t}", "public boolean checkExist(String itemName, int Qty) {\n\n for (int i = 0; i < inventory.size(); i++) {\n Map<String, Object> newItem = new HashMap<>();\n newItem = inventory.get(i);\n if (itemName.equals(newItem.get(\"Name\").toString())) {\n int a = Integer.parseInt((String) newItem.get(\"Amount\"));\n //isInList = true;\n if (a >= Qty) {\n isExist = true;\n break;\n } else {\n isExist = false;\n }\n } else {\n isExist = false;\n }\n\n }\n return isExist;\n\n }", "private boolean validaCompra() {\n\n List<Purchase> purchasesList = billingClient.queryPurchases(INAPP).getPurchasesList();\n if (purchasesList != null && !purchasesList.isEmpty()) {\n for (Purchase purchase : purchasesList) {\n if (purchase.getSku().equals(skuId)) {\n return true;\n }\n }\n }\n return false;\n\n }", "@Override\n\tpublic boolean isItemValidForSlot(int i, ItemStack itemstack) {\n\t\treturn false;\n\t}", "public boolean needsRepair() {\n if (id == 5509) {\n return false;\n }\n return inventory.contains(id + 1);\n }", "@Override\n\tpublic boolean isItemValidForSlot(int p_94041_1_, ItemStack p_94041_2_) {\n\t\treturn true;\n\t}", "public final boolean has(Player player, Collection<ItemStack> items)\n\t{\n\t\treturn InventoryHelper.findMissing(player, items).size() == 0;\n\t}", "@Override\n\tpublic boolean isItemValidForSlot(int index, ItemStack stack) {\n\t\treturn super.isValid();\n\t}", "public boolean isItemValid(ItemStack itemstack)\n {\n return itemstack.getItem() == Items.water_bucket;\n }", "@Override\n\tpublic boolean isItemValidForSlot(int slot, ItemStack stack){\n\t return true;\n\t}", "public boolean isInventoryFull()\n\t{\n\t\tif (myWorker.getLoadInInventory() >= getMyPlayer().getPlayerInfo()\n\t\t\t\t.getMaxCarryingLoadByWorker())\n\t\t\treturn true;\n\t\treturn false;\n\t}", "public static boolean checkIsItemValid(ItemStack itemStack) {\n return !itemStack.isEmpty() && EvilCraft._instance.getRegistryManager().getRegistry(IBloodChestRepairActionRegistry.class).\n isItemValidForSlot(itemStack);\n }", "public boolean haveItem(Items item)\n {\n //boolean haveItem = Inventory.values().contains(item);\n return Inventory.containsValue(item);\n }", "public Boolean canAddItem(ItemStack item, Player player){\n\t\tint freeSpace = 0;\n\t\tfor(ItemStack i : player.getInventory() ){\n\t\t\tif(i == null){\n\t\t\t\tfreeSpace += item.getType().getMaxStackSize();\n\t\t\t} else if (i.getType() == item.getType() ){\n\t\t\t\tfreeSpace += (i.getType().getMaxStackSize() - i.getAmount());\n\t\t\t}\n\t\t}\n\t\tdebugOut(\"Item has: \"+item.getAmount()+\" and freeSpace is: \"+freeSpace);\n\t\tif(item.getAmount() > freeSpace){\n\t\t\tdebugOut(\"There is not enough freeSpace in the inventory\");\n\t\t\treturn false;\n\t\t}else{\n\t\t\tdebugOut(\"There is enough freeSpace in the inventory\");\n\t\t\treturn true;\n\t\t}\n\t}", "public static boolean hasInventorySpace(Inventory inventory, ItemStack is) {\n Inventory inv = Bukkit.createInventory(null, inventory.getSize());\n\n for (int i = 0; i < inv.getSize(); i++) {\n if (inventory.getItem(i) != null) {\n ItemStack item = inventory.getItem(i).clone();\n inv.setItem(i, item);\n }\n }\n\n if (inv.addItem(is.clone()).size() > 0) {\n return false;\n }\n\n return true;\n }", "public static boolean isValidStack (ItemStack stack) {\n \n return stack != null && stack.getItem() != null;\n }", "public boolean isItemValidForSlot(int slot, ItemStack stack)\n {\n return slot == 0;\n }", "public boolean hasValidHolder(){\r\n\t\tHolder directHolder = getDirectHolder();\r\n\t\tif(isTerminated() && directHolder == null) \r\n\t\t\treturn true;\r\n\t\telse if(isTerminated() && directHolder != null){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif(directHolder == null || directHolder == this)\r\n\t\t\treturn false;\t\t\r\n\t\telse{\r\n\t\t\tHolder parser = getDirectHolder();\r\n\t\t\twhile(!parser.isSupremeHolder()){\r\n\t\t\t\tif(parser == this)\r\n\t\t\t\t\treturn false;\r\n\t\t\t\tparser = ((Item)parser).getDirectHolder();\r\n\t\t\t}\t\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "private boolean inventoryValid(int min, int max, int stock) {\n\n boolean isValid = true;\n\n if (stock < min || stock > max) {\n isValid = false;\n AlartMessage.displayAlertAdd(4);\n }\n\n return isValid;\n }", "public boolean isFull() {\n int size = 0;\n for (int i = 0; i < items.length; i++) {\n if (items[i] != null) {\n size++;\n }\n }\n return size == items.length;\n }", "boolean isValidForBasket(Collection<Item> items);", "private boolean partIsValid(){\r\n int min = Integer.parseInt(partMin.getText());\r\n int max = Integer.parseInt(partMax.getText());\r\n int inventory = Integer.parseInt(partInv.getText());\r\n if(max < min || min >= max){\r\n Alert alert = new Alert(Alert.AlertType.ERROR);\r\n alert.setTitle(\"Error: Change Max and Min Values\");\r\n alert.setContentText(\"Change Max value to be greater than min\");\r\n alert.showAndWait();\r\n return false;\r\n } else if(max < inventory || min > inventory){\r\n Alert alert = new Alert(Alert.AlertType.ERROR);\r\n alert.setTitle(\"Error: Invalid Inventory number\");\r\n alert.setContentText(\"Inventory must be less than max and more than min\");\r\n alert.showAndWait();\r\n return false;\r\n }\r\n return true;\r\n }", "private List<ItemBO> checkInventoryProblem(final List<ItemBO> itemList)\n\t{\n\t\tfinal List<ItemBO> itemBOList = new ArrayList<ItemBO>();\n\t\tif (itemList != null && (!itemList.isEmpty()))\n\t\t{\n\t\t\tfinal Iterator<ItemBO> itemListIterator = itemList.iterator();\n\t\t\twhile (itemListIterator.hasNext())\n\t\t\t{\n\t\t\t\tfinal ItemBO itemBO = itemListIterator.next();\n\t\t\t\tboolean isProblemPart = false;\n\t\t\t\tif (null != itemBO.getProblemItemList() && !itemBO.getProblemItemList().isEmpty())\n\t\t\t\t{\n\t\t\t\t\tfinal List<ProblemBO> problemBOList = itemBO.getProblemItemList();\n\t\t\t\t\tfor (final ProblemBO problem : problemBOList)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (MessageResourceUtil.NO_INVENTORY.equals(problem.getMessageKey()))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tisProblemPart = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (!isProblemPart)\n\t\t\t\t{\n\t\t\t\t\titemBOList.add(itemBO);\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t\treturn itemBOList;\n\t}", "default boolean isEmpty() {\n\t\treturn this.getContents().values().stream().allMatch(ItemStack::isEmpty);\n\t}", "protected boolean hasInventoryValues(final int studyID) {\n\t\ttry {\n\t\t\tGermplasmList germplasmList = null;\n\t\t\tfinal GermplasmListType listType = GermplasmListType.STUDY;\n\t\t\tfinal List<GermplasmList> germplasmLists = this.fieldbookMiddlewareService.getGermplasmListsByProjectId(studyID, listType);\n\t\t\tif (!germplasmLists.isEmpty()) {\n\t\t\t\tgermplasmList = germplasmLists.get(0);\n\t\t\t}\n\n\t\t\tif (germplasmList != null) {\n\t\t\t\tfinal Integer listId = germplasmList.getId();\n\t\t\t\tfinal String germplasmListType = germplasmList.getType();\n\t\t\t\tfinal List<InventoryDetails> inventoryDetailList =\n\t\t\t\t\t\tthis.inventoryMiddlewareService.getInventoryDetailsByGermplasmList(listId, germplasmListType);\n\n\t\t\t\tfor (final InventoryDetails inventoryDetails : inventoryDetailList) {\n\t\t\t\t\tif (inventoryDetails.getLotId() != null) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (final MiddlewareQueryException e) {\n\t\t\tLabelPrintingServiceImpl.LOG.error(e.getMessage(), e);\n\t\t}\n\n\t\treturn false;\n\t}", "public static boolean inspectItems(Player player) {\n boolean itemExists = false;\n System.out.println(\"You look for items.\");\n System.out.println(\"You see:\");\n ArrayList<Collectable> items = player.getCurrentRoom().getItems();\n if(items.size() > 0) {\n itemExists = true;\n for (int i = 0; i < items.size(); i++) {\n System.out.print(\"\\t(\" + i + \") \");\n System.out.println(items.get(i).toString());\n }\n System.out.println(\"Which item will you take? (-1 to not collect any items)\");\n } else System.out.println(\"Nothing in sight\");\n return itemExists;\n }", "@Override\n public boolean stillValid(Player playerIn) {\n return player == playerIn && !stack.isEmpty() && player.getItemBySlot(slotType) == stack;\n }", "public boolean containsNoItems() {\n\t\treturn (this.items.size() == 0);\n\t}", "public boolean checkItem () {\r\n\t\tfor (Entity e : getLocation().getWorld().getEntities())\r\n\t\t{\r\n\t\t\tdouble x = e.getLocation().getX();\r\n\t\t\tdouble z = e.getLocation().getZ();\r\n\t\t\tdouble yDiff = getSpawnLocation().getY() - e.getLocation().getY();\r\n \r\n\t\t\tif (yDiff < 0)\r\n\t\t\t\tyDiff *= -1;\r\n\r\n\t\t\tif (x == getSpawnLocation().getX() && yDiff <= 1.5 && z == getSpawnLocation().getZ()) {\r\n \r\n ShowCaseStandalone.slog(Level.FINEST, \"Potential hit on checkItem()\");\r\n\t\t\t\ttry {\r\n\t\t\t\t\tItem itemE = (Item)e;\r\n\t\t\t\t\tif (ItemStackHandler.itemsEqual(itemE.getItemStack(), getItemStack(), true)) {\r\n ShowCaseStandalone.slog(Level.FINEST, \"Existing stack: \" + itemE.getItemStack().toString());\r\n itemE.getItemStack().setAmount(1); //Removes duped items, which can occur.\r\n\t\t\t\t\t\tthis.item = itemE;\r\n\t\t\t\t\t\tscs.log(Level.FINER, \"Attaching to existing item.\");\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (Exception ex) {}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public boolean valid() {\n \n return ObjectUtils.isValid(PartitionConfig.class, this) \n && ((PartitionType.COUNT.equals(this.type) && ((this.count != null) \n || StringUtils.isNotBlank(this.countRef))) \n || ((PartitionType.ITEMS.equals(this.type) \n || (PartitionType.FUNCTION.equals(this.type) && StringUtils.isNotBlank(this.output)\n && BooleanUtils.xor(new boolean [] {StringUtils.isBlank(this.className), \n StringUtils.isBlank(this.functionName)})))\n && ((this.input != null) && (this.input.get(PartitionFunction.ITEMS_KEY) != null))));\n \n }", "public boolean isValid() {\n\t\t//Check for size=3, then check if their ranks are same.\n\t\tif(this.size()==3) {\n\t\t\tif(this.getCard(0).getRank()==this.getCard(1).getRank()) {\n\t\t\t\tif(this.getCard(1).getRank()==this.getCard(2).getRank()){\n\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "@Test\r\n public void testAddInventory() throws InventoryException {\r\n coffeeMaker.addInventory(\"4\", \"7\", \"0\", \"9\");\r\n coffeeMaker.addInventory(\"0\", \"0\", \"0\", \"0\");\r\n coffeeMaker.addInventory(\"3\", \"6\", \"9\", \"12\"); // this should not fail\r\n coffeeMaker.addInventory(\"10\", \"10\", \"10\", \"10\");// this should not fail\r\n }", "public abstract boolean isValidInputItem(@Nonnull ItemStack stack);", "boolean hasOpenedInventory(Player player);", "private boolean isHorseBetsValidForTable(Game game) throws ServiceException {\r\n\r\n Map<Horse, List<BetType>> horsesBets = game.getHorseBetTypes();\r\n for (Map.Entry<Horse, List<BetType>> horseBets : horsesBets.entrySet()){\r\n\r\n if (horseBets.getValue() == null || horseBets.getValue().isEmpty()){\r\n return false;\r\n }\r\n }\r\n return true;\r\n }", "public boolean isValid() {\n return _id != null && !_id.isEmpty() &&\n _name != null && !_name.isEmpty() &&\n _created != null && !_created.isEmpty();\n }", "public boolean checkIsEmpty() {\n return isEmpty(minimumInstances) && isEmpty(maximumInstances) && isEmpty(dependentProfiles);\n }", "public static void validateInventorySummaryRequest(final InvInventoryRequest request) {\r\n//\t\ttry {\r\n\t\t\tvalidateBaseRequest(request);\r\n//\t\t} \r\n//\t\tcatch (IllegalArgumentException e) {\r\n//\t\t\tthrow e;\r\n//\t\t}\r\n\t}", "public boolean hasItem() {\n return null != item;\n }", "public boolean hasEmptySlots() {\n return (numMaxPlayers - activePlayers) != 0;\n }", "boolean hasQuantity();", "private boolean hasItem(Client c, int itemId, boolean inventory) {\r\n\t\treturn inventory ? c.getItems().playerHasItem(itemId) : c.getItems().playerHasItem(itemId) || c.playerEquipment[5] == itemId;\r\n\t}", "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 boolean isPackValid() {\n\t\treturn (logData != null\n\t\t\t\t&& logData.entries != null\n\t\t\t\t&& logData.entries.size() > 1);\n\t}", "private void verifyLiquidAmount(List<Liquid> liquids) {\n if (liquids.isEmpty())\n throw new ValidationException(\"A cocktail needs at least one liquid.\");\n }", "public static void validateInventoryRequest(final InvInventoryRequest request) {\r\n//\t\ttry {\r\n\t\t\tvalidateBaseRequest(request);\r\n//\t\t} \r\n//\t\tcatch (IllegalArgumentException e) {\r\n//\t\t\tthrow e;\r\n//\t\t}\r\n\t}", "public static boolean hasItem(String name)\n {\n boolean found = false;\n for (Item inventory1 : inventory)\n {\n if(inventory1.getName().equals(name)) found = true;\n }\n \n return found;\n }", "private boolean validInventory(int min, int max, int stock) {\r\n\r\n boolean isTrue = true;\r\n\r\n if (stock < min || stock > max) {\r\n isTrue = false;\r\n alertDisplay(4);\r\n }\r\n\r\n return isTrue;\r\n }", "public boolean isSetQuantity()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(QUANTITY$10) != 0;\n }\n }", "public boolean addNewInventory() {\n if (characterVM.addNewInventory(inventoryEntityToRetrieve.peek())) {\n removeTopRewardAndContinue();\n return true;\n }\n return false;\n }", "public boolean isValidPart() {\n boolean result = false;\n boolean isComplete = !partPrice.getText().equals(\"\")\n && !partName.getText().equals(\"\")\n && !inventoryCount.getText().equals(\"\")\n && !partId.getText().equals(\"\")\n && !maximumInventory.getText().equals(\"\")\n && !minimumInventory.getText().equals(\"\")\n && !variableTextField.getText().equals(\"\");\n boolean isValidPrice = isDoubleValid(partPrice);\n boolean isValidName = isCSVTextValid(partName);\n boolean isValidId = isIntegerValid(partId);\n boolean isValidMax = isIntegerValid(maximumInventory);\n boolean isValidMin = isIntegerValid(minimumInventory);\n boolean isMinLessThanMax = false;\n if (isComplete)\n isMinLessThanMax = Integer.parseInt(maximumInventory.getText()) > Integer.parseInt(minimumInventory.getText());\n\n if (!isComplete) {\n Alert errorMessage = new Alert(Alert.AlertType.INFORMATION);\n errorMessage.setTitle(\"Missing Information\");\n errorMessage.setHeaderText(\"You didn't enter required information!\");\n errorMessage.setContentText(\"All fields are required! Your part has not been saved. Press \\\"OK\\\" and try again.\");\n errorMessage.show();\n } else if (!isMinLessThanMax) {\n Alert errorMessage = new Alert(Alert.AlertType.INFORMATION);\n errorMessage.setTitle(\"Invalid Entry\");\n errorMessage.setHeaderText(\"Min must be less than Max!\");\n errorMessage.setContentText(\"Re-enter your data! Your part has not been saved.Press \\\"OK\\\" and try again.\");\n errorMessage.show();\n } else if (!isValidPrice) {\n Alert errorMessage = new Alert(Alert.AlertType.INFORMATION);\n errorMessage.setTitle(\"Price is not valid\");\n errorMessage.setHeaderText(\"The value you entered for price is not valid\");\n errorMessage.setContentText(\"Please ensure that the value you have entered does\" +\n \" not include more than one decimal point (.), does not contain any letters, and does not \" +\n \"have more than two digits after the decimal. \");\n errorMessage.show();\n } else if (!isValidName) {\n Alert errorMessage = new Alert(Alert.AlertType.INFORMATION);\n errorMessage.setTitle(\"Invalid Name\");\n errorMessage.setHeaderText(\"The value you entered for name is not valid.\");\n errorMessage.setContentText(\"Please ensure that the text you enter does not\" +\n \" include any quotation marks,\" +\n \"(\\\"), or commas (,).\");\n errorMessage.show();\n } else if (!isValidId) {\n Alert errorMessage = new Alert(Alert.AlertType.INFORMATION);\n errorMessage.setTitle(\"Incorrect ID\");\n errorMessage.setHeaderText(\"The value you entered for ID is not valid\");\n errorMessage.setContentText(\"Please ensure that the value you have entered\" +\n \" is a whole number, with no letters, symbols or decimal points. \");\n errorMessage.show();\n } else if (!isValidMax) {\n Alert errorMessage = new Alert(Alert.AlertType.INFORMATION);\n errorMessage.setTitle(\"Incorrect Max Inventory\");\n errorMessage.setHeaderText(\"The value you entered for Max is not valid\");\n errorMessage.setContentText(\"Please ensure that the value you have entered\" +\n \" is a whole number, with no letters, symbols or decimal points. \");\n errorMessage.show();\n } else if (!isValidMin) {\n Alert errorMessage = new Alert(Alert.AlertType.INFORMATION);\n errorMessage.setTitle(\"Incorrect Min Inventory\");\n errorMessage.setHeaderText(\"The value you entered for Min is not valid\");\n errorMessage.setContentText(\"Please ensure that the value you have entered\" +\n \" is a whole number, with no letters, symbols or decimal points. \");\n errorMessage.show();\n } else {\n result = true;\n }\n\n return result;\n }", "private boolean isValidSolitaireBoard() {\n \n /**\n \u0016The number of piles should be greater than or equal to zero but smaller than piles.length\n should be true\n */\n boolean containsPiles = numPiles >= 0 && numPiles < piles.length;\n \n /**\n The number of piles should be equal to the CARD_TOTAL.\n should be true\n */\n boolean pilesSizeEqualCardTotal = (piles.length == CARD_TOTAL);\n \n /**\n None of the elements in the partially filled array is equal to zero\n should be true\n */\n boolean pilesDoesntContainZeros = true;\n \n /**\n The card sum is equal to the card total\n should be true\n */\n boolean cardSumEqualCardTotal = true;\n \n \n if (containsPiles && pilesSizeEqualCardTotal){\n int cardSum = 0;\n for (int i = 0; i < numPiles; i++){\n cardSum += piles[i];\n //checks if array has any zeros\n if (piles [i] == 0)\n pilesDoesntContainZeros = false;\n }\n //check if the card sum is equal to the card total\n if (cardSum != CARD_TOTAL){\n cardSumEqualCardTotal = false;\n }\n }\n \n //returns true if all true\n return containsPiles && pilesSizeEqualCardTotal && cardSumEqualCardTotal &&\n pilesDoesntContainZeros;\n }", "public boolean isValid()\r\n {\r\n \treturn this.vp.data != null;\r\n }", "private static boolean isAllItemsAreNotSoldOut(List<Chef> foodItemList) {\n boolean result = false;\n for (int i = 0; i < foodItemList.size(); i++) {\n for (int j = 0; j < foodItemList.get(i).getFoodItemList().size(); j++) {\n if (foodItemList.get(i).getFoodItemList().get(j).getAvailQty() == 0 || !foodItemList.get(i).getFoodItemList().get(j).getAvailable()) {\n result = true;\n }\n }\n }\n return result;\n }", "public boolean canAdd() {\r\n int temp = 0;\r\n for (int i = 0; i < elem.length; i++) {\r\n if (elem[i] == null) {\r\n temp++;\r\n }\r\n }\r\n if (temp > 1) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }", "private boolean checkValidQuantity (int quantity){\n if (quantity >= 0){\n return true;\n }\n return false;\n }", "@Override\n public boolean validate() {\n int numFeathers = c.getInventory().count(FEATHERS);\n return (c.getSkills().getRealLevel(Skill.FISHING) >= 20 && !c.isCollectFeathers());\n }", "public boolean isSetTeamInventory() {\n return EncodingUtils.testBit(__isset_bitfield, __TEAMINVENTORY_ISSET_ID);\n }", "public Boolean validEntries() {\n String orderNumber = orderNo.getText();\n String planTime = plannedTime.getText();\n String realTime = actualTime.getText();\n String worker = workerSelected();\n String productType = productTypeSelected();\n Boolean validData = false;\n if (orderNumber.equals(\"\")) {\n warning.setText(emptyOrderNum);\n } else if (!Validation.isValidOrderNumber(orderNumber)) {\n warning.setText(invalidOrderNum);\n } else if (worker.equals(\"\")) {\n warning.setText(workerNotSelected);\n } else if (productType.equals(\"\")) {\n warning.setText(productTypeNotSelected);\n } else if (planTime.equals(\"\")) {\n warning.setText(emptyPlannedTime);\n } else if (!Validation.isValidPlannedTime(planTime)) {\n warning.setText(invalidPlannedTime);\n } else if (!actualTime.getText().isEmpty() && !Validation.isValidActualTime(realTime)) {\n warning.setText(invalidActualTime);\n } else if (comboStatus.getSelectionModel().isEmpty()) {\n warning.setText(emptyStatus);\n } else validData = true;\n return validData;\n }", "final protected boolean isValid() {\n boolean valid = true;\n for (Hex h : hexagons)\n for (Vertex v : h.vertices)\n if (isAdjacent(v) && v.getBuilding() == null)\n valid = false;\n return valid;\n }", "public boolean isItemValid(ItemStack par1ItemStack)\n/* 23: */ {\n/* 24:20 */ if (isItemTwoHanded(par1ItemStack)) {\n/* 25:21 */ return false;\n/* 26: */ }\n/* 27:23 */ if ((this.rightHand.getHasStack()) && \n/* 28:24 */ (isItemTwoHanded(this.rightHand.getStack()))) {\n/* 29:25 */ return false;\n/* 30: */ }\n/* 31:27 */ return super.isItemValid(par1ItemStack);\n/* 32: */ }", "public boolean validateContainsAtLeastOneItem(PurchasingDocument purDocument) {\n boolean valid = false;\n for (PurApItem item : purDocument.getItems()) {\n if (!((PurchasingItemBase) item).isEmpty() && item.getItemType().isLineItemIndicator()) {\n\n return true;\n }\n }\n String documentType = getDocumentTypeLabel(purDocument.getDocumentHeader().getWorkflowDocument().getDocumentTypeName());\n\n if (!valid) {\n GlobalVariables.getMessageMap().putError(PurapConstants.ITEM_TAB_ERROR_PROPERTY, PurapKeyConstants.ERROR_ITEM_REQUIRED, documentType);\n }\n\n return valid;\n }", "public boolean valid() {\n return start != null && ends != null && weavingRegion != null;\n }", "public boolean hasItem(final String name) {\n for (final Item item : this.getInventory()) {\n if (item.name().equals(name)) {\n return true;\n }\n }\n return false;\n }", "public boolean hasItem() {\n return this.item != null;\n }", "default boolean canFit(ItemStack stack) {\n return !InvTools.isEmpty(stack) && stream().anyMatch(inv -> {\n InventoryManipulator im = InventoryManipulator.get(inv);\n return im.canAddStack(stack);\n });\n }", "@Override\n public boolean isValid() {\n if(width < 0){\n return false;\n }\n\n if(height < 0){\n return false;\n }\n\n //no null objects\n if(origin == null){\n return false;\n }\n\n if(color == null){\n return false;\n }\n\n //if texture doesn't exist, sprite is not buildable\n if(!Gdx.files.internal(texture).exists()){\n Gdx.app.log(TAG, \"Texture cannot be found: \" + texture);\n return false;\n }\n\n return true;\n }", "public boolean hasExoskeleton() {\r\n\t\tList<Item> inventory = new ArrayList<Item>();\r\n\t\tinventory=this.getInventory();\r\n\t\tfor (Item item:inventory) {\r\n\t\t\tif (item instanceof ExoskeletonItem) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public boolean hasElements(List<T> items) {\n \tif(stack.size() != items.size()) //if items and the stack have different sizes\n \t\treturn false;\n \t\n \tfor(int i = 0; i < stack.size(); i++){\n \t\tif(!items.get(i).equals(stack.get(i))){ //check that the elements appear in the same order \n \t\t\treturn false;\n \t\t}\n \t}\n \treturn true;\n }", "private boolean isInputValid(){\n\t\tString errorMessage = \"\";\n\t\tif((nameField.getText() == null) || (nameField.getText().length() == 0)){\n\t\t\terrorMessage += \"No valid product name!\\n\";\n\t\t}\n\t\tif((amountAvailableField.getText() == null) || (amountAvailableField.getText().length() == 0)){\n\t\t\terrorMessage += \"No valid amount available value!\\n\";\n\t\t}\n\t\tif((amountSoldField.getText() == null) || (amountSoldField.getText().length() == 0)){\n\t\t\terrorMessage += \"No valid amount sold value!\\n\";\n\t\t}\n\t\tif((priceEachField.getText() == null) || (priceEachField.getText().length() == 0)){\n\t\t\terrorMessage += \"No valid price for each!\\n\";\n\t\t}\n\t\tif((priceMakeField.getText() == null) || (priceMakeField.getText().length() == 0)){\n\t\t\terrorMessage += \"No valid price to make the product!\\n\";\n\t\t}\n\t\tif(errorMessage.length() == 0){\n\t\t\treturn true;\n\t\t}\n\t\telse{\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean isEmpty(){\n\t\treturn isPassable&&!containsItems()&&!containsMonster()&&tileItems.noGold();\r\n\t}", "public void validate_remainingItem_ShoppingCart() {\n System.out.println(\"List of remaining items ===>> \" + listOfShoppingCardItem);\n System.out.println(\"List of Deleted items =====>> \" + listOfDeletedItemNameShoppingCart);\n Assert.assertTrue(!(listOfShoppingCardItem.containsAll(listOfDeletedItemNameShoppingCart)));\n }", "private Boolean checkForEmptyList() {\n Boolean emptyListAvailable = tin_perLitrePrice.getText().toString().trim().isEmpty() ||\n tin_fuelQuantityLitres.getText().toString().trim().isEmpty() ||\n tin_totalFuelPrice.getText().toString().trim().isEmpty() ||\n tin_currentKm.getText().toString().trim().isEmpty() ||\n tin_startingKm.getText().toString().trim().isEmpty() ||\n tin_distanceCovered.getText().toString().trim().isEmpty() ||\n tv_calculatedAverage_addEdit.getText().toString().trim().isEmpty() ||\n tv_coverableDistance_addEdit.getText().toString().trim().isEmpty() ||\n tv_nextFuelFill_addEdit.getText().toString().trim().isEmpty();\n\n if (emptyListAvailable) {\n validationList(); // set error messages\n }\n Log.d(TAG, \"checkForEmptyList: emptyListAvailable = \" + emptyListAvailable);\n\n\n return emptyListAvailable; //\n }", "void updateInventory() {\n\n // make sure there isn't already an inventory record\n MrnInventory checkInv[] =\n new MrnInventory(survey.getSurveyId()).get();\n\n if (dbg3) {\n System.out.println(\"<br>updateInventory: survey.getSurveyId() = \" +\n survey.getSurveyId());\n System.out.println(\"<br>updateInventory: inventory = \" + inventory);\n System.out.println(\"<br>updateInventory: checkInv[0] = \" +\n checkInv[0]);\n System.out.println(\"<br>updateInventory: checkInv.length = \" +\n checkInv.length);\n } // if (dbg3)\n\n if (checkInv.length > 0) {\n\n //MrnInventory updInventory = new MrnInventory();\n\n if (dbg3) {\n System.out.println(\"<br>updateInventory: dateMin = \" + dateMin);\n System.out.println(\"<br>updateInventory: dateMax = \" + dateMax);\n System.out.println(\"<br>updateInventory: latitudeMin = \" + latitudeMin);\n System.out.println(\"<br>updateInventory: latitudeMax = \" + latitudeMax);\n System.out.println(\"<br>updateInventory: longitudeMin = \" + longitudeMin);\n System.out.println(\"<br>updateInventory: longitudeMax = \" + longitudeMax);\n } // if (dbg3)\n\n // check dates\n if (MrnInventory.DATENULL.equals(checkInv[0].getDateStart()) ||\n dateMin.before(checkInv[0].getDateStart())) {\n inventory.setDateStart(dateMin);\n\n } // if (dateMin.before(checkInv[0].getDateStart()))\n if (MrnInventory.DATENULL.equals(checkInv[0].getDateEnd()) ||\n dateMax.after(checkInv[0].getDateEnd())) {\n inventory.setDateEnd(dateMax);\n } // if (dateMax.after(checkInv[0].getDateEnd()))\n\n // check area\n if ((MrnInventory.FLOATNULL == checkInv[0].getLatNorth()) ||\n (latitudeMin < checkInv[0].getLatNorth())) {\n inventory.setLatNorth(latitudeMin);\n } // if (latitudeMin < checkInv[0].getLatNorth())\n if ((MrnInventory.FLOATNULL == checkInv[0].getLatSouth()) ||\n (latitudeMax > checkInv[0].getLatSouth())) {\n inventory.setLatSouth(latitudeMax);\n } // if (latitudeMin < checkInv[0].getLatSouth())\n if ((MrnInventory.FLOATNULL == checkInv[0].getLongWest()) ||\n (longitudeMin < checkInv[0].getLongWest())) {\n inventory.setLongWest(longitudeMin);\n } // if (longitudeMin < checkInv[0].getlongWest())\n if ((MrnInventory.FLOATNULL == checkInv[0].getLongEast()) ||\n (longitudeMax > checkInv[0].getLongEast())) {\n inventory.setLongEast(longitudeMax);\n } // if (longitudeMax < checkInv[0].getlongEast())\n\n // check others\n if (\"\".equals(checkInv[0].getCruiseName(\"\"))) {\n inventory.setCruiseName(inventory.getCruiseName());\n } // if (\"\".equals(checkInv[0].getCruiseName()))\n if (\"\".equals(checkInv[0].getProjectName(\"\"))) {\n inventory.setProjectName(inventory.getProjectName());\n } // if (\"\".equals(checkInv[0].getProjectName()))\n\n inventory.setDataRecorded(\"Y\");\n\n MrnInventory whereInventory =\n new MrnInventory(survey.getSurveyId());\n\n try {\n //whereInventory.upd(updInventory);\n whereInventory.upd(inventory);\n } catch(Exception e) {\n System.err.println(\"updateInventory: upd inventory = \" + inventory);\n System.err.println(\"updateInventory: upd whereInventory = \" + whereInventory);\n System.err.println(\"updateStation: upd sql = \" + whereInventory.getUpdStr());\n e.printStackTrace();\n } // try-catch\n if (dbg3) System.out.println(\n \"<br>updateInventory: upd inventory = \" + inventory);\n if (dbg3) System.out.println(\n \"<br>updateInventory: upd whereInventory = \" + whereInventory);\n //if (dbg3)\n System.out.println(\"<br>updateInventory: updSQL = \" + whereInventory.getUpdStr());\n\n\n/* } else {\n inventory.setSurveyId(survey.getSurveyId());\n // defaults\n inventory.setDataCentre(\"SADCO\");\n //inventory.setCountryCode(0); // done in LoadMrnData\n inventory.setTargetCountryCode(0);\n inventory.setStnidPrefix(survey.getInstitute());\n inventory.setDataRecorded(\"Y\");\n\n // from data\n inventory.setDateStart(dateMin);\n inventory.setDateEnd(dateMax);\n inventory.setLatNorth(latitudeMin);\n inventory.setLatSouth(latitudeMax);\n inventory.setLongWest(longitudeMin);\n inventory.setLongEast(longitudeMax);\n\n // from screen - done in LoadMRNData.getArgsFromFile()\n //inventory.setCountryCode(screenInv.getCountryCode());\n //inventory.setPlanamCode(screenInv.getPlanamCode());\n //inventory.setInstitCode(screenInv.getInstitCode());\n //inventory.setCruiseName(screenInv.getCruiseName());\n //inventory.setProjectName(screenInv.getProjectName());\n //inventory.setAreaname(screenInv.getAreaname()); // use as default to show on screen\n //inventory.setDomain(screenInv.getDomain()); // use as default to show on screen\n\n inventory.put();\n*/\n } // if (checkInv.length > 0)\n\n // make sure there isn't already an invStats record\n MrnInvStats checkInvStats[] =\n new MrnInvStats(survey.getSurveyId()).get();\n\n MrnInvStats invStats = new MrnInvStats();\n\n if (checkInvStats.length > 0) {\n\n System.out.println(\"updateInventory: checkInvStats[0] = \" + checkInvStats[0]);\n\n invStats.setStationCnt(\n checkInvStats[0].getStationCnt() + newStationCount); //stationCount\n invStats.setWeatherCnt(\n checkNull(checkInvStats[0].getWeatherCnt()) + weatherCount);\n\n if (dataType == CURRENTS) {\n\n invStats.setWatcurrentsCnt(\n checkNull(checkInvStats[0].getWatcurrentsCnt()) + currentsCount);\n\n } else if (dataType == SEDIMENT) {\n\n System.out.println(\n \"updateInventory: checkInvStats[0].getSedphyCnt(), sedphyCount = \" +\n checkInvStats[0].getSedphyCnt() + \" \" + sedphyCount + \" \" +\n checkNull(checkInvStats[0].getSedphyCnt()));\n System.out.println(\n \"updateInventory: checkInvStats[0].getSedchem1Cnt(), sedchem1Count = \" +\n checkInvStats[0].getSedchem1Cnt() + \" \" + sedchem1Count + \" \" +\n checkNull(checkInvStats[0].getSedchem1Cnt()));\n System.out.println(\n \"updateInventory: checkInvStats[0].getSedchem2Cnt(), sedchem2Count = \" +\n checkInvStats[0].getSedchem2Cnt() + \" \" + sedchem2Count + \" \" +\n checkNull(checkInvStats[0].getSedchem2Cnt()));\n System.out.println(\n \"updateInventory: checkInvStats[0].getSedpol1Cnt(), sedpol1Count = \" +\n checkInvStats[0].getSedpol1Cnt() + \" \" + sedpol1Count + \" \" +\n checkNull(checkInvStats[0].getSedpol1Cnt()));\n System.out.println(\n \"updateInventory: checkInvStats[0].getSedpol2Cnt(), sedpol2Count = \" +\n checkInvStats[0].getSedpol2Cnt() + \" \" + sedpol2Count + \" \" +\n checkNull(checkInvStats[0].getSedpol2Cnt()));\n\n invStats.setSedphyCnt(\n checkNull(checkInvStats[0].getSedphyCnt()) + sedphyCount);\n invStats.setSedchem1Cnt(\n checkNull(checkInvStats[0].getSedchem1Cnt()) + sedchem1Count);\n invStats.setSedchem2Cnt(\n checkNull(checkInvStats[0].getSedchem2Cnt()) + sedchem2Count);\n invStats.setSedpol1Cnt(\n checkNull(checkInvStats[0].getSedpol1Cnt()) + sedpol1Count);\n invStats.setSedpol2Cnt(\n checkNull(checkInvStats[0].getSedpol2Cnt()) + sedpol2Count);\n\n System.out.println(\"updateInventory: invStats = \" + invStats);\n\n\n } else if ((dataType == WATER) || (dataType == WATERWOD)) {\n\n invStats.setWatphyCnt(\n checkNull(checkInvStats[0].getWatphyCnt()) + watphyCount);\n invStats.setWatchem1Cnt(\n checkNull(checkInvStats[0].getWatchem1Cnt()) + watchem1Count);\n invStats.setWatchem2Cnt(\n checkNull(checkInvStats[0].getWatchem2Cnt()) + watchem2Count);\n invStats.setWatchlCnt(\n checkNull(checkInvStats[0].getWatchlCnt()) + watchlCount);\n invStats.setWatnutCnt(\n checkNull(checkInvStats[0].getWatnutCnt()) + watnutCount);\n invStats.setWatpol1Cnt(\n checkNull(checkInvStats[0].getWatpol1Cnt()) + watpol1Count);\n invStats.setWatpol2Cnt(\n checkNull(checkInvStats[0].getWatpol2Cnt()) + watpol2Count);\n\n } // if (dataType == CURRENTS)\n\n MrnInvStats whereInvStats =\n new MrnInvStats(survey.getSurveyId());\n try {\n whereInvStats.upd(invStats);\n } catch(Exception e) {\n System.err.println(\"updateInventory: upd invStats = \" + invStats);\n System.err.println(\"updateInventory: upd whereInvStats = \" + whereInvStats);\n System.err.println(\"updateInventory: upd sql = \" + whereInvStats.getUpdStr());\n e.printStackTrace();\n } // try-catch\n if (dbg3) System.out.println(\"<br>updateInventory: upd invStats = \" +\n invStats);\n\n } else {\n\n invStats.setStationCnt(stationCount);\n invStats.setWeatherCnt(weatherCount);\n\n if (dataType == CURRENTS) {\n\n invStats.setWatcurrentsCnt(currentsCount);\n\n } else if (dataType == SEDIMENT) {\n\n invStats.setSedphyCnt(sedphyCount);\n invStats.setSedchem1Cnt(sedchem1Count);\n invStats.setSedchem2Cnt(sedchem2Count);\n invStats.setSedpol1Cnt(sedpol1Count);\n invStats.setSedpol2Cnt(sedpol2Count);\n\n } else if ((dataType == WATER) || (dataType == WATERWOD)) {\n\n invStats.setWatphyCnt(watphyCount);\n invStats.setWatchem1Cnt(watchem1Count);\n invStats.setWatchem2Cnt(watchem2Count);\n invStats.setWatchlCnt(watchlCount);\n invStats.setWatnutCnt(watnutCount);\n invStats.setWatpol1Cnt(watpol1Count);\n invStats.setWatpol2Cnt(watpol2Count);\n\n } // if (dataType == CURRENTS)\n\n invStats.setSurveyId(survey.getSurveyId());\n try {\n invStats.put();\n } catch(Exception e) {\n System.err.println(\"updateInventory: put invStats = \" + invStats);\n System.err.println(\"updateInventory: put sql = \" + invStats.getInsStr());\n e.printStackTrace();\n } // try-catch\n if (dbg3) System.out.println(\"<br>updateInventory: put invStats = \" +\n invStats);\n } // if (checkInvStats.length > 0)\n\n/* ????\n\n // define the value that should be updated\n MrnInventory updateInv = new MrnInventory();\n updateInv.setDateStart(dateMin);\n\n // define the 'where' clause\n MrnInventory whereInv = new MrnInventory(inventory.getSurveyId());\n\n // do the update\n whereInv.upd(updateInv);\n\n*/\n\n }", "public Boolean playerHasItem(Player player, String itemName) {\n Collection<Item> playerInventory = player.getInventory();\n\n return playerInventory.stream().anyMatch(item -> item.getItemName().equals(itemName));\n }", "public boolean isEmpty() {\n\t\treturn allItems.size() == 0;\n\t}", "public synchronized boolean isEmpty(){\n boolean isEmpty = true;\n for(ShoppingCartItem item : getItems()){\n if(item!=null)\n isEmpty=false;\n }\n return isEmpty;\n }", "@MethodContract(post = @Expression(\"elementExceptions.empty\"))\n public final boolean isEmpty() {\n return $elementExceptions.isEmpty();\n }", "private boolean isListValid()\n {\n boolean isValid = true;\n Collection<RecognizedElement> elementsList = tree.getChildren();\n for (Iterator<RecognizedElement> iterator = elementsList.iterator(); iterator.hasNext();)\n {\n RecognizedElement recognizedElement = (RecognizedElement) iterator.next();\n if (isSpreadsheet)\n {\n if (recognizedElement instanceof Style || recognizedElement instanceof Regex)\n {\n isValid = false;\n break;\n }\n }\n else\n {\n if (recognizedElement instanceof Column)\n {\n isValid = false;\n break;\n }\n }\n }\n return isValid;\n }", "public boolean isSetItems() {\n return this.items != null;\n }", "public boolean check(ItemStack item) {\n return item != null && item.getType() == material && item.hasItemMeta() && item.getItemMeta().hasDisplayName() && item.getItemMeta().getDisplayName().equals(displayName);\n }" ]
[ "0.7091034", "0.70574063", "0.69521445", "0.6875585", "0.67426056", "0.6593444", "0.65839016", "0.6461781", "0.63883513", "0.63832515", "0.6367358", "0.6343354", "0.62962776", "0.6209375", "0.613085", "0.6116828", "0.60444176", "0.6030244", "0.6026377", "0.60034835", "0.5960815", "0.5910063", "0.590819", "0.5888403", "0.58759856", "0.58507466", "0.583453", "0.5825598", "0.5818515", "0.58175194", "0.5765113", "0.57632995", "0.5756401", "0.57482296", "0.57432634", "0.5740688", "0.5727262", "0.5726192", "0.57038045", "0.5658276", "0.5636218", "0.5635825", "0.5635039", "0.5624975", "0.5624376", "0.56121725", "0.5581089", "0.55686146", "0.5555868", "0.55141175", "0.55095893", "0.55074227", "0.55007404", "0.5480716", "0.5480282", "0.5474145", "0.54656804", "0.54514503", "0.54506344", "0.54483706", "0.54480475", "0.5436811", "0.5433038", "0.54199713", "0.5411916", "0.5411248", "0.5409599", "0.5407091", "0.5403762", "0.53976035", "0.53975123", "0.53965783", "0.5392655", "0.5387648", "0.53767323", "0.53752404", "0.53741807", "0.5371236", "0.53709126", "0.5368833", "0.53584665", "0.53474045", "0.5328995", "0.5307113", "0.52969784", "0.5293912", "0.5288493", "0.52876264", "0.528663", "0.528596", "0.5283508", "0.52821475", "0.5276199", "0.52726465", "0.527197", "0.5263261", "0.52489483", "0.52478004", "0.5243986", "0.5243716" ]
0.6814296
4
Duplicates an inventory contents. See Inventory::getContents Items Duplicates an inventory in array form via Inventory.getContents() Items that do not fulfill the requirements of isValidItem() are replaced with null.
public static ItemStack[] duplicateInventory(final ItemStack[] inventory) { if (isValidInventory(inventory)) { ItemStack[] duplicate = new ItemStack[inventory.length]; for (int i = 0; i < inventory.length; i++) { if (ItemAPI.isValidItem(inventory[i])) { duplicate[i] = inventory[i].clone(); } } return duplicate; } return new ItemStack[0]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "default Collection<ItemStack> getContentsSimulated() {\n\t\treturn this.getContents().values().stream().map(ItemStack::copy).collect(Collectors.toList());\n\t}", "private Inventory clone_inv(Inventory inv_original, String title) {\n // Copy name, size and other stuff\n Inventory inv = createInventory(this, inv_original.getSize(), title);\n inv.setContents(inv_original.getContents());\n\n return inv;\n }", "public void add(Inventory toAdd) throws DuplicateInventoryException {\n requireNonNull(toAdd);\n if (contains(toAdd)) {\n throw new DuplicateInventoryException();\n }\n\n list.add(toAdd);\n }", "public static void swapInventoryContents(final Inventory inventory1, final Inventory inventory2) throws InvalidParameterException, NotEnoughSpaceException {\n if (inventory1 == null) {\n throw new InvalidParameterException(\"Cannot swap contents, inventory1 is null.\");\n }\n if (inventory2 == null) {\n throw new InvalidParameterException(\"Cannot swap contents, inventory2 is null.\");\n }\n ItemStack[] contents1 = Arrays.stream(inventory1.getContents()).filter(ItemAPI::isValidItem).toArray(ItemStack[]::new);\n ItemStack[] contents2 = Arrays.stream(inventory2.getContents()).filter(ItemAPI::isValidItem).toArray(ItemStack[]::new);\n if (contents1.length > inventory2.getSize()) {\n throw new NotEnoughSpaceException(\"Cannot swap contents, inventory2 doesn't have enough space for inventory1's items.\");\n }\n if (contents2.length > inventory1.getSize()) {\n throw new NotEnoughSpaceException(\"Cannot swap contents, inventory1 doesn't have enough space for inventory2's items.\");\n }\n inventory1.clear();\n inventory2.clear();\n inventory1.setContents(contents2);\n inventory2.setContents(contents1);\n }", "@Test\n public void addExactDupItemTest() {\n List<Item> items = itemSrv.getAllItems();\n Assert.assertNotNull(\"List of items is null\", items);\n\n Assert.assertEquals(\"Wrong initial size of the list, should be 0\", 0, items.size());\n\n final Item item = new Item(\"item1\", \"item1 description\");\n Assert.assertEquals(\"Item adding failure\", ErrCode.ADD_SUCCESS, itemSrv.addItem(item));\n\n items = itemSrv.getAllItems();\n Assert.assertEquals(\"Total item count should be 1\", 1, items.size());\n\n // Add same exact/original/duplicate item\n Assert.assertEquals(\"Duplicate item protection fails\", ErrCode.ADD_DUPLICATE_ITEM, itemSrv.addItem(item));\n Assert.assertEquals(\"Total item count should still be 1 after adding duplicate item\", 1, itemSrv.getAllItems().size());\n Assert.assertEquals(\"Retrieved item is not the same as original\", item, items.get(0));\n }", "public Inventory(Inventory referenceInventory) {\n \titems = new ArrayList<Collectable>();\n \t//Clone items list.\n \tfor (Collectable item : referenceInventory.getItems()) {\n \t\titems.add(item);\n \t}\n \t//Clone num tokens.\n \tnumTokens =\treferenceInventory.numTokens;\n }", "@Override\n public boolean areContentsTheSame(Item one,\n Item two) {\n return one.equals(two);\n }", "public void duplicateCard(Card originalCard)\n\t{\n\t\tint index = cards.indexOf(originalCard);\n\t\t\n\t\t// If it's found, add it again at that index\n\t\tif(index >= 0) {\n\t\t\t\n\t\t\taddCard(index, new Card(originalCard));\n\t\t\t\n\t\t\t// Remove and re-add all cards\n\t\t\tsyncCardsWithViews();\n\t\t\t\n\t\t}\n\t\t\n\t}", "public Collection<BundleEntry> getDuplicates() {\n return duplicates;\n }", "public void onInventoryChanged()\n\t{\n\t\tfor (int i = 0; i < this.items.length; i++)\n\t\t{\n\t\t\tItemStack stack = this.items[i];\n\t\t\tif (stack != null && stack.stackSize <= 0)\n\t\t\t{\n\t\t\t\tthis.items[i] = null;\n\t\t\t}\n\n\t\t}\n\t}", "@Override\r\n\tpublic void copy(MetaInterface item, MetaInterface alreadyExists) {\n\t\t\r\n\t}", "public Inventory() {\n this.SIZE = DEFAULT_SIZE;\n this.ITEMS = new ArrayList<>();\n }", "@Override\r\n\tpublic ItemStack getCraftingResult(InventoryCrafting par1InventoryCrafting) {\r\n\t\tItemStack itemstack = this.getRecipeOutput().copy();\r\n\r\n\t\tif (this.field_92101_f) {\r\n\t\t\tfor (int i = 0; i < par1InventoryCrafting.getSizeInventory(); ++i) {\r\n\t\t\t\tItemStack itemstack1 = par1InventoryCrafting.getStackInSlot(i);\r\n\r\n\t\t\t\tif (itemstack1 != null && itemstack1.hasTagCompound()) {\r\n\t\t\t\t\titemstack.setTagCompound((NBTTagCompound) itemstack1.stackTagCompound.copy());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn itemstack;\r\n\t}", "public void duplicate() {\n System.out.println(\"Je bent al in bezit van deze vragenlijst!\");\n }", "public void setInventorySlotContents(int p_70299_1_, ItemStack p_70299_2_)\n {\n this.inventoryContents[p_70299_1_] = p_70299_2_;\n\n if (p_70299_2_ != null && p_70299_2_.stackSize > this.getInventoryStackLimit())\n {\n p_70299_2_.stackSize = this.getInventoryStackLimit();\n }\n\n this.markDirty();\n }", "@Override\r\n\tpublic void setInventoryItems() {\n\t\t\r\n\t}", "@Override\n public ItemStack[] getContents() {\n final ItemStack[] items = new ItemStack[36];\n\n items[0] = this.getSword();\n\n for(int i = 0; i < this.getAbilities().length; i++) {\n final Ability ability = this.getAbilities()[i];\n\n if (ability instanceof ItemAbility) {\n items[i+1] = new ItemStack(((ItemAbility) ability).getMaterial());\n }\n }\n\n for (int i = 0; i < items.length; i++) {\n if (items[i] == null) {\n items[i] = this.getHealthType();\n }\n }\n\n return items;\n }", "public void removeAllItems() {\n contents.clear();\n }", "public void setDuplicateRecordItems(com.sforce.soap.enterprise.QueryResult duplicateRecordItems) {\r\n this.duplicateRecordItems = duplicateRecordItems;\r\n }", "public Item[] getInventoryItems(){\n\t\treturn inventoryItems;\n\t}", "@Override\n public ItemStack transferStackInSlot(EntityPlayer player, int sourceSlotIndex)\n {\n Slot sourceSlot = (Slot)inventorySlots.get(sourceSlotIndex);\n if (sourceSlot == null || !sourceSlot.getHasStack()) return ItemStack.EMPTY; //EMPTY_ITEM\n ItemStack sourceStack = sourceSlot.getStack();\n ItemStack copyOfSourceStack = sourceStack.copy();\n\n // Check if the slot clicked is one of the vanilla container slots\n if (sourceSlotIndex >= VANILLA_FIRST_SLOT_INDEX && sourceSlotIndex < VANILLA_FIRST_SLOT_INDEX + VANILLA_SLOT_COUNT) {\n // This is a vanilla container slot so merge the stack into the tile inventory\n // We can only put it into the first slot though, keep that in mind.\n if (!mergeItemStack(sourceStack, TE_INVENTORY_FIRST_SLOT_INDEX, TE_INVENTORY_FIRST_SLOT_INDEX + 1, false)){\n return ItemStack.EMPTY; // EMPTY_ITEM\n }\n } else if (sourceSlotIndex >= TE_INVENTORY_FIRST_SLOT_INDEX && sourceSlotIndex < TE_INVENTORY_FIRST_SLOT_INDEX + TE_INVENTORY_SLOT_COUNT) {\n // This is a TE slot so merge the stack into the players inventory\n if (!mergeItemStack(sourceStack, VANILLA_FIRST_SLOT_INDEX, VANILLA_FIRST_SLOT_INDEX + VANILLA_SLOT_COUNT, false)) {\n return ItemStack.EMPTY; // EMPTY_ITEM\n }\n } else {\n return ItemStack.EMPTY; // EMPTY_ITEM\n }\n\n // If stack size == 0 (the entire stack was moved) set slot contents to null\n if (sourceStack.getCount() == 0) { // getStackSize\n sourceSlot.putStack(ItemStack.EMPTY); // EMPTY_ITEM\n } else {\n sourceSlot.onSlotChanged();\n }\n\n sourceSlot.onTake(player, sourceStack); //onPickupFromSlot()\n return copyOfSourceStack;\n }", "public DuplicateItemException() {\r\n super();\r\n }", "Collection<Item> getInventory();", "@Override\n\tpublic boolean matches(InventoryCrafting ic, World world) {\n\t\tList<ItemStack> list = new ArrayList();\n\t\tlist.add(input);\n\t\t\n\t\tfor (int i = 0; i < 3; ++i) {\n\t\t\tfor (int j = 0; j < 3; ++j) {\n\t\t\t\t\n\t\t\t\tItemStack stack = ic.getStackInRowAndColumn(j, i);\n\t\t\t\tif (!stack.isEmpty())\n\t\t\t\t{\n\t\t\t\t\tboolean flag = false;\n\t\t\t\t\tIterator iter = list.iterator();\n\t\t\t\t\t\n\t\t\t\t\twhile (iter.hasNext())\n\t\t\t\t\t{\n\t\t\t\t\t\tItemStack stack1 = (ItemStack)iter.next();\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (stack.getItem() == stack1.getItem())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tflag = true;\n\t\t\t\t\t\t\tlist.remove(stack1);\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 (!flag)\n\t\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn list.isEmpty();\n\t}", "public com.sforce.soap.enterprise.QueryResult getDuplicateRecordItems() {\r\n return duplicateRecordItems;\r\n }", "public Builder clearInventoryItemData() {\n if (inventoryItemDataBuilder_ == null) {\n if (inventoryItemCase_ == 3) {\n inventoryItemCase_ = 0;\n inventoryItem_ = null;\n onChanged();\n }\n } else {\n if (inventoryItemCase_ == 3) {\n inventoryItemCase_ = 0;\n inventoryItem_ = null;\n }\n inventoryItemDataBuilder_.clear();\n }\n return this;\n }", "Map<Integer, ItemStack> getContents();", "private static Inventory[] createInventoryList() {\n Inventory[] inventory = new Inventory[3];\r\n \r\n Inventory potion = new Inventory();\r\n potion.setDescription(\"potion\");\r\n potion.setQuantityInStock(0);\r\n inventory[Item.potion.ordinal()] = potion;\r\n \r\n Inventory powerup = new Inventory();\r\n powerup.setDescription(\"powerup\");\r\n powerup.setQuantityInStock(0);\r\n inventory[Item.powerup.ordinal()] = powerup;\r\n \r\n Inventory journalclue = new Inventory();\r\n journalclue.setDescription(\"journalclue\");\r\n journalclue.setQuantityInStock(0);\r\n inventory[Item.journalclue.ordinal()] = journalclue;\r\n \r\n return inventory;\r\n }", "public void clone(ItemStack itemStack) {\n this.clone = true;\n cloneItem = itemStack.clone();\n }", "public PageInventory withItems(Collection<ItemStack> items)\n {\n this.contents.addAll(items);\n this.recalculate();\n return this;\n }", "public void writeInventoryToNBT(CompoundNBT tag) {\n IInventory inventory = this;\n ListNBT nbttaglist = new ListNBT();\n\n for (int i = 0; i < inventory.getSizeInventory(); i++) {\n if (!inventory.getStackInSlot(i).isEmpty()) {\n CompoundNBT itemTag = new CompoundNBT();\n itemTag.putByte(TAG_SLOT, (byte) i);\n inventory.getStackInSlot(i).write(itemTag);\n nbttaglist.add(itemTag);\n }\n }\n\n tag.put(TAG_ITEMS, nbttaglist);\n }", "public Sudoku copy(){\n\t\treturn (Sudoku) this.clone();\n\t}", "private static String[] placeInBag(String item, String[] inventory){\r\n for(int i=0; i<inventory.length; i++){\r\n if(inventory[i].equals(\"\")){\r\n inventory[i] = item;\r\n break;\r\n }\r\n }\r\n return inventory;\r\n }", "public static void disperseInventory(Inventory inv1, Inventory inv2) {\r\n if (inv1 != null) {\r\n for (ItemStack item : inv1) {\r\n if (item != null)\r\n inv2.addItem(item);\r\n }\r\n removeAllItems(inv1);\r\n }\r\n }", "public void testDuplicate() {\n System.out.println(\"duplicate\");\n BufferedCharSequence instance = null;\n BufferedCharSequence expResult = null;\n BufferedCharSequence result = instance.duplicate();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "static void findDuplicate()\n\t{\n\n\t\tList<String> oList = null;\n\t\tSet<String> oSet = null;\n\t\ttry {\n\t\t\toList = new ArrayList<String>();\n\t\t\toList.add(\"Apple\");\n\t\t\toList.add(\"Boy\");\n\t\t\toList.add(\"Frog\");\n\t\t\toList.add(\"Dog\");\n\t\t\toList.add(\"Eagle\");\n\t\t\toList.add(\"Frog\");\n\t\t\toList.add(\"Apple\");\n\t\t\toList.add(\"Boy\");\n\t\t\toList.add(\"Apple\");\n\t\t\toList.add(\"Boy\");\n\t\t\tSystem.out.println(oList);\n\t\t\t\n\t\t\toSet = new TreeSet<>();\n\t\t\t\n\t\t\tString s = \"\";\n\t\t\tfor(int i=0;i<oList.size();i++)\n\t\t\t{\n\t\t\t\tif((oSet.add(oList.get(i))==false) && (!s.contains(oList.get(i))))\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"Duplicate: \"+oList.get(i));\n\t\t\t\t\ts+=oList.get(i);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}catch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally {\n\t\t\toList = null;\n\t\t\toSet = null;\n\t\t}\n\t}", "protected ItemBO segregateSelectedAndAdditionalInventoryForAnItem(ItemBO anItem) {\n\t\tlogger.info(\"segregateSelectedAndAdditionalInventoryForAnItem(...): Line # - Display Part #: \" + anItem.getLineNumber() + \" - \" + anItem.getDisplayPartNumber());\n\t\tlogger.info(\"segregateSelectedAndAdditionalInventoryForAnItem(...): anItem.getInventory().size(): \" + anItem.getInventory().size());\n\n\t\tList<InventoryBO> shortListedInventory = shortListRelevantInventory(anItem);\n\t\tif (shortListedInventory != null) {\n\t\t\tlogger.info(\"segregateSelectedAndAdditionalInventoryForAnItem(...): shortListedInventory.size(): \" + shortListedInventory.size());\n\t\t} else {\n\t\t\tlogger.info(\"segregateSelectedAndAdditionalInventoryForAnItem(...): shortListedInventory is null\");\n\t\t}\n\n\t\tif (!isPartFoundInMultipleLocations(anItem) || shortListedInventory == null || shortListedInventory.size() == 0) {\n\t\t\tanItem.setInventory(shortListedInventory);\n\t\t\tanItem.setAdditionalInventory(new ArrayList<InventoryBO>());\n\t\t} else { // Part found in multiple locations OR short-listed inventory is not null or empty\n\n\t\t\tList<InventoryBO> additionalInventory = new ArrayList<InventoryBO>();\n\t\t\tboolean sufficientQtyAvailable = hasSufficientQty(shortListedInventory, anItem);\n\t\t\tif (sufficientQtyAvailable) { // Short-listed Inventory has sufficient qty\n\t\t\t\t// Get remaining inventory locations. We will set them as additional inventory.\n\t\t\t\tadditionalInventory = getRemainingInventoryList(anItem, shortListedInventory);\n\t\t\t\n\t\t\t\tanItem.setInventory(shortListedInventory);\n\t\t\t\tanItem.setAdditionalInventory(additionalInventory);\n\t\t\t} else { // Short-listed Inventory does NOT have sufficient qty\n\t\t\t\tanItem = handleInsufficientQtyInShortlistedInventory(shortListedInventory, anItem);\n\t\t\t\tif (shortListedInventory != null) {\n\t\t\t\t\tlogger.info(\"segregateSelectedAndAdditionalInventoryForAnItem(...): shortListedInventory.size(): \" + shortListedInventory.size());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (anItem.getAdditionalInventory() != null) {\n\t\t\tlogger.info(\"segregateSelectedAndAdditionalInventoryForAnItem(...): anItem.getAdditionalInventory().size(): \" + anItem.getAdditionalInventory().size());\n\t\t} else {\n\t\t\tlogger.info(\"segregateSelectedAndAdditionalInventoryForAnItem(...): anItem.getAdditionalInventory() is null\");\n\t\t}\n\t\tlogger.info(\"segregateSelectedAndAdditionalInventoryForAnItem(...): ----------\");\n\n\t\treturn anItem;\n\t}", "public String setContentsToEmpty() {\n removeAllItems();\n return description + '\\n' + '\\n'\n + \"Room Contents: \" + '\\n';\n }", "public Shout dup (Shout self)\n {\n if (self == null)\n return null;\n\n Shout copy = new Shout ();\n if (self.getIdentity () != null)\n copy.setAddress (self.getIdentity ());\n copy.group = self.group;\n copy.content = self.content.duplicate ();\n return copy;\n }", "private static String[] removeFromBag(String[] inventory, String item){\r\n for(int i=0; i<inventory.length; i++){\r\n if(inventory[i].equals(item)){\r\n inventory[i] = \"\";\r\n break;\r\n }\r\n }\r\n return inventory;\r\n }", "public interface IInventoryComposite extends Iterable<IInventoryAdapter> {\n\n @Override\n default Iterator<IInventoryAdapter> iterator() {\n if (this instanceof IInventoryAdapter)\n return Iterators.singletonIterator((IInventoryAdapter) this);\n return Collections.emptyIterator();\n }\n\n default int slotCount() {\n return stream().mapToInt(IInventoryAdapter::getNumSlots).sum();\n }\n\n default boolean hasItems() {\n return streamStacks().findAny().isPresent();\n }\n\n default boolean hasNoItems() {\n return !hasItems();\n }\n\n default boolean isFull() {\n return streamSlots().allMatch(IInvSlot::hasStack);\n }\n\n default boolean hasEmptySlot() {\n return !isFull();\n }\n\n /**\n * Counts the number of items.\n *\n * @return the number of items in the inventory\n */\n default int countItems() {\n return countItems(StandardStackFilters.ALL);\n }\n\n /**\n * Counts the number of items that match the filter.\n *\n * @param filter the Predicate to match against\n * @return the number of items in the inventory\n */\n default int countItems(Predicate<ItemStack> filter) {\n return streamStacks().filter(filter).mapToInt(InvTools::sizeOf).sum();\n }\n\n /**\n * Counts the number of items that match the filter.\n *\n * @param filters the items to match against\n * @return the number of items in the inventory\n */\n default int countItems(ItemStack... filters) {\n return countItems(StackFilters.anyOf(filters));\n }\n\n default int countStacks() {\n return countStacks(StandardStackFilters.ALL);\n }\n\n default int countStacks(Predicate<ItemStack> filter) {\n return (int) streamStacks().filter(filter).count();\n }\n\n /**\n * Returns true if the inventory contains any of the specified items.\n *\n * @param items The ItemStack to look for\n * @return true is exists\n */\n default boolean contains(ItemStack... items) {\n return contains(StackFilters.anyOf(items));\n\n }\n\n /**\n * Returns true if the inventory contains the specified item.\n *\n * @param filter The ItemStack to look for\n * @return true is exists\n */\n default boolean contains(Predicate<ItemStack> filter) {\n return streamStacks().anyMatch(filter);\n }\n\n default boolean numItemsMoreThan(int amount) {\n int count = 0;\n for (IInventoryAdapter inventoryObject : this) {\n for (IInvSlot slot : InventoryIterator.get(inventoryObject)) {\n ItemStack stack = slot.getStack();\n if (!InvTools.isEmpty(stack))\n count += InvTools.sizeOf(stack);\n if (count >= amount)\n return true;\n }\n }\n return false;\n }\n\n default int countMaxItemStackSize() {\n return streamStacks().mapToInt(ItemStack::getMaxStackSize).sum();\n }\n\n /**\n * Checks if there is room for the ItemStack in the inventory.\n *\n * @param stack The ItemStack\n * @return true if room for stack\n */\n default boolean canFit(ItemStack stack) {\n return !InvTools.isEmpty(stack) && stream().anyMatch(inv -> {\n InventoryManipulator im = InventoryManipulator.get(inv);\n return im.canAddStack(stack);\n });\n }\n\n /**\n * Returns a single item from the inventory that matches the\n * filter, but does not remove it.\n *\n * @param filter the filter to match against\n * @return An ItemStack\n */\n default ItemStack findOne(Predicate<ItemStack> filter) {\n for (IInventoryAdapter inventoryObject : this) {\n InventoryManipulator im = InventoryManipulator.get(inventoryObject);\n ItemStack removed = im.tryRemoveItem(filter);\n if (!InvTools.isEmpty(removed))\n return removed;\n }\n return InvTools.emptyStack();\n }\n\n /**\n * Returns all items from the inventory that match the\n * filter, but does not remove them.\n * The resulting set will be populated with a single instance of each item type.\n *\n * @param filter EnumItemType to match against\n * @return A Set of ItemStacks\n */\n default Set<StackKey> findAll(Predicate<ItemStack> filter) {\n Set<StackKey> items = new HashSet<>();\n for (IInventoryAdapter inventoryObject : this) {\n for (IInvSlot slot : InventoryIterator.get(inventoryObject)) {\n ItemStack stack = slot.getStack();\n if (!InvTools.isEmpty(stack) && filter.test(stack)) {\n stack = stack.copy();\n InvTools.setSize(stack, 1);\n items.add(StackKey.make(stack));\n }\n }\n }\n return items;\n }\n\n /**\n * Attempts to move a single item from one inventory to another.\n *\n * @param dest the destination inventory\n * @return null if nothing was moved, the stack moved otherwise\n */\n default ItemStack moveOneItemTo(IInventoryComposite dest) {\n return moveOneItemTo(dest, Predicates.alwaysTrue());\n }\n\n /**\n * Attempts to move a single item from one inventory to another.\n *\n * @param dest the destination inventory\n * @param filter Predicate to match against\n * @return null if nothing was moved, the stack moved otherwise\n */\n default ItemStack moveOneItemTo(IInventoryComposite dest, Predicate<ItemStack> filter) {\n for (IInventoryAdapter src : this) {\n for (IInventoryAdapter dst : dest) {\n InventoryManipulator imSource = InventoryManipulator.get(src);\n ItemStack moved = imSource.moveItem(dst, filter);\n if (!InvTools.isEmpty(moved))\n return moved;\n }\n }\n return InvTools.emptyStack();\n }\n\n /**\n * Removes a specified number of items matching the filter, but only if the\n * operation can be completed. If the function returns false, the inventory\n * will not be modified.\n *\n * @param amount the amount of items to remove\n * @param filter the filter to match against\n * @return true if there are enough items that can be removed, false\n * otherwise.\n */\n default boolean removeItemsAbsolute(int amount, ItemStack... filter) {\n return removeItemsAbsolute(amount, StackFilters.anyOf(filter));\n }\n\n /**\n * Removes a specified number of items matching the filter, but only if the\n * operation can be completed. If the function returns false, the inventory\n * will not be modified.\n *\n * @param amount the amount of items to remove\n * @param filter the filter to match against\n * @return true if there are enough items that can be removed, false\n * otherwise.\n */\n default boolean removeItemsAbsolute(int amount, Predicate<ItemStack> filter) {\n for (IInventoryAdapter inventoryObject : this) {\n InventoryManipulator im = InventoryManipulator.get(inventoryObject);\n if (im.canRemoveItems(filter, amount)) {\n im.removeItems(filter, amount);\n return true;\n }\n }\n return false;\n }\n\n /**\n * Removes and returns a single item from the inventory.\n *\n * @return An ItemStack\n */\n default ItemStack removeOneItem() {\n return removeOneItem(StandardStackFilters.ALL);\n }\n\n /**\n * Removes and returns a single item from the inventory that matches the\n * filter.\n *\n * @param filter the filter to match against\n * @return An ItemStack\n */\n default ItemStack removeOneItem(ItemStack... filter) {\n return removeOneItem(StackFilters.anyOf(filter));\n }\n\n /**\n * Removes and returns a single item from the inventory that matches the\n * filter.\n *\n * @param filter the filter to match against\n * @return An ItemStack\n */\n default ItemStack removeOneItem(Predicate<ItemStack> filter) {\n for (IInventoryAdapter inventoryObject : this) {\n InventoryManipulator im = InventoryManipulator.get(inventoryObject);\n ItemStack stack = im.removeItem(filter);\n if (!InvTools.isEmpty(stack))\n return stack;\n }\n return InvTools.emptyStack();\n }\n\n /**\n * Places an ItemStack in a destination Inventory. Will attempt to move as\n * much of the stack as possible, returning any remainder.\n *\n * @param stack The ItemStack to put in the inventory.\n * @return Null if itemStack was completely moved, a new itemStack with\n * remaining stackSize if part or none of the stack was moved.\n */\n default ItemStack addStack(ItemStack stack) {\n for (IInventoryAdapter inv : this) {\n InventoryManipulator im = InventoryManipulator.get(inv);\n stack = im.addStack(stack);\n if (InvTools.isEmpty(stack))\n return InvTools.emptyStack();\n }\n return stack;\n }\n\n /**\n * Checks if inventory will accept the ItemStack.\n *\n * @param stack The ItemStack\n * @return true if room for stack\n */\n default boolean willAccept(ItemStack stack) {\n if (InvTools.isEmpty(stack))\n return false;\n ItemStack newStack = InvTools.copyOne(stack);\n return streamSlots().anyMatch(slot -> slot.canPutStackInSlot(newStack));\n }\n\n /**\n * Checks if inventory will accept any item from the list.\n *\n * @param stacks The ItemStacks\n * @return true if room for stack\n */\n default boolean willAcceptAny(List<ItemStack> stacks) {\n return stacks.stream().anyMatch(this::willAccept);\n }\n\n default Stream<IInventoryAdapter> stream() {\n return StreamSupport.stream(spliterator(), false);\n }\n\n default Stream<? extends IInvSlot> streamSlots() {\n return stream().flatMap(inv -> InventoryIterator.get(inv).stream());\n }\n\n default Stream<ItemStack> streamStacks() {\n return stream().flatMap(inv -> InventoryIterator.get(inv).streamStacks());\n }\n\n /**\n * @see Container#calcRedstoneFromInventory(IInventory)\n */\n default int calcRedstone() {\n double average = streamSlots()\n .filter(IInvSlot::hasStack)\n .mapToDouble(slot -> {\n ItemStack stack = slot.getStack();\n return (double) InvTools.sizeOf(stack) / (double) Math.min(stack.getMaxStackSize(), slot.maxStackSize());\n }).sum();\n\n average = average / (double) slotCount();\n return MathHelper.floor(average * 14.0F) + (hasNoItems() ? 0 : 1);\n }\n}", "@Override\n public void setInventorySlotContents(int index, @Nullable ItemStack stack1) {\n markDirty();\n int flag = 1;\n if (null == stack) {\n stack = stack1.copy();\n stack1.stackSize = 0;\n flag = 3;\n } else {\n int limit = Config.Feeder.InvSize - stack.stackSize;\n if (stack1.stackSize > limit) {\n stack.stackSize += limit;\n stack1.stackSize -= limit;\n } else {\n stack.stackSize += stack1.stackSize;\n stack1.stackSize = 0;\n }\n }\n IBlockState state = worldObj.getBlockState(getPos());\n worldObj.notifyBlockUpdate(getPos(), state, state, flag);\n }", "public static void removeDuplicates(HeapIntPriorityQueue dupes){\n //Auxillery queue to hold the non-dupes\n Queue <Integer> holder = new LinkedList<Integer>();\n //Exception clause\n if(dupes.isEmpty()){\n throw new IllegalArgumentException();\n //Test parameter, if the PriorityQueue only has one int it falls through\n }else if (dupes.size()>1){\n int first = dupes.remove();\n int second = 0;\n //If we are not at the end, keep going\n while(!dupes.isEmpty()){\n second = dupes.remove();\n if(first!=second){\n holder.add(first);\n first=second;\n }\n }\n //Move the remaining int to the holder\n holder.add(first);\n }\n //Shift everything from the holder back to the parameter PriorityQueue\n while (!holder.isEmpty()){\n dupes.add(holder.remove());\n }\n }", "@Override\n public boolean hasDuplicates() {\n ArrayList<String> itemList = new ArrayList(Arrays.asList(\"\"));\n Node currNode = this.head;\n while(true){\n if(itemList.contains(currNode.getItem())){ // need to edit\n return true;\n }else{\n itemList.add(currNode.getItem());\n }\n if(currNode.getNextNode() == null){\n break;\n }\n currNode = currNode.getNextNode();\n }\n return false;\n }", "public Item[] getRoomContents() {\n Item[] contentsArray = new Item[contents.size()];\n contentsArray = contents.toArray(contentsArray);\n return contentsArray;\n }", "public Builder mergeInventoryItemData(POGOProtos.Rpc.HoloInventoryItemProto value) {\n if (inventoryItemDataBuilder_ == null) {\n if (inventoryItemCase_ == 3 &&\n inventoryItem_ != POGOProtos.Rpc.HoloInventoryItemProto.getDefaultInstance()) {\n inventoryItem_ = POGOProtos.Rpc.HoloInventoryItemProto.newBuilder((POGOProtos.Rpc.HoloInventoryItemProto) inventoryItem_)\n .mergeFrom(value).buildPartial();\n } else {\n inventoryItem_ = value;\n }\n onChanged();\n } else {\n if (inventoryItemCase_ == 3) {\n inventoryItemDataBuilder_.mergeFrom(value);\n }\n inventoryItemDataBuilder_.setMessage(value);\n }\n inventoryItemCase_ = 3;\n return this;\n }", "private static ArrayList<String> readInventory(Scanner source) {\n\n\t\tArrayList<String> contents = new ArrayList<String>();\n\n\t\twhile (source.hasNext()) {\n\t\t\tString line = source.nextLine();\n\t\t\tcontents.add(line);\n\t\t}\n\n\t\treturn contents;\n\t}", "@Override\n\tpublic boolean addItem(ItemStack item, Player player) {\n\t\tif (!canAddItem(item, player)) {\n\t\t\treturn false;\n\t\t}\n\t\tif (item == null) {\n\t\t\treturn true;\n\t\t}\n\t\t//Backup contents\n\t\tItemStack[] backup = getContents().clone();\n\t\tItemStack backupItem = new ItemStack(item.getTypeId(), item.getAmount(), item.getDurability());\n\t\t\n\t\tint max = MinecartManiaWorld.getMaxStackSize(item);\n\t\t\n\t\t//First attempt to merge the itemstack with existing item stacks that aren't full (< 64)\n\t\tfor (int i = 0; i < size(); i++) {\n\t\t\tif (getItem(i) != null) {\n\t\t\t\tif (getItem(i).getTypeId() == item.getTypeId() && getItem(i).getDurability() == item.getDurability()) {\n\t\t\t\t\tif (getItem(i).getAmount() + item.getAmount() <= max) {\n\t\t\t\t\t\tsetItem(i, new ItemStack(item.getTypeId(), getItem(i).getAmount() + item.getAmount(), item.getDurability()));\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tint diff = getItem(i).getAmount() + item.getAmount() - max;\n\t\t\t\t\t\tsetItem(i, new ItemStack(item.getTypeId(), max, item.getDurability()));\n\t\t\t\t\t\titem = new ItemStack(item.getTypeId(), diff, item.getDurability());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Attempt to add the item to an empty slot\n\t\tint emptySlot = firstEmpty();\n\t\tif (emptySlot > -1) {\n\t\t\tsetItem(emptySlot, item);\n\t\t\tupdate();\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\t\n\t\t//Try to merge the itemstack with the neighbor chest, if we have one\n\t\tMinecartManiaChest neighbor = getNeighborChest();\n\t\tif (neighbor != null) {\n\t\t\t//flag to prevent infinite recursion\n\t\t\tif (getDataValue(\"neighbor\") == null) {\n\t\t\t\tneighbor.setDataValue(\"neighbor\", Boolean.TRUE);\n\t\t\t\tif (getNeighborChest().addItem(item)) {\n\t\t\t\t\tupdate();\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//reset flag\n\t\t\t\tsetDataValue(\"neighbor\", null);\n\t\t\t}\n\t\t}\n\t\t\t\n\t\t//if we fail, reset the inventory and item back to previous values\n\t\tgetChest().getInventory().setContents(backup);\n\t\titem = backupItem;\n\t\treturn false;\n\t}", "@Test(groups = \"Transactions Tests\", description = \"Duplicate transaction\")\n\tpublic void duplicateTransaction() {\n\t\tMainScreen.clickAccountItem(\"Income\");\n\t\tSubAccountScreen.clickSubAccountItem(\"Salary\");\n\t\tTransactionsScreen.clickOptionsBtnFromTransactionItem(\"Bonus\");\n\t\tTransactionsScreen.clickDuplicateTransactionOption();\n\t\tTransactionsScreen.transactionItens(\"Bonus\").shouldHave(size(2));\n\t\ttest.log(Status.PASS, \"Transaction successfully duplicated\");\n\n\t\t//Testing if there is two identical transactions in the 'Double Entry' account and logging the result to the report\n\t\treturnToHomeScreen();\n\t\tMainScreen.clickAccountItem(\"Assets\");\n\t\tSubAccountScreen.clickSubAccountItem(\"Current Assets\");\n\t\tSubAccountScreen.clickSubAccountItem(\"Cash in Wallet\");\n\t\tTransactionsScreen.transactionItens(\"Bonus\").shouldHave(size(2));\n\t\ttest.log(Status.PASS, \"Transaction successfully duplicated in the 'Double Entry' account\");\n\n\t}", "public ItemStack getResultOf(ItemStack[] contents) {\n for(int i=0;i<9;i++){ \r\n if(this.isBlankRareEssence(contents[i])){\r\n int hashCode = this.getRecipeHashCode(contents);\r\n \r\n RareItemProperty rip = this.essenceRecipes.get(hashCode);\r\n \r\n if(rip != null){\r\n return this.generateRareEssence(rip);\r\n }\r\n \r\n return null;\r\n }\r\n }\r\n \r\n ItemStack isAddPropertiesTo = null;\r\n Map<RareItemProperty,Integer> propertyLevels = new HashMap<>();\r\n \r\n // allow one itemstack to add properties to\r\n // and rare essences of a specific type\r\n // otherwise it's an invalid recipe\r\n for(ItemStack is : contents) {\r\n if(is != null && !is.getType().equals(Material.AIR)){\r\n if(is.getType().equals(Material.MAGMA_CREAM)){\r\n RareItemProperty rip = this.getPropertyFromRareEssence(is);\r\n \r\n if(rip != null){\r\n Integer currentLevel = propertyLevels.get(rip);\r\n \r\n if(currentLevel == null){\r\n propertyLevels.put(rip,1);\r\n }\r\n else if(currentLevel < rip.getMaxLevel() && propertyLevels.size() < this.MAX_PROPERTIES_PER_ITEM){\r\n propertyLevels.put(rip,currentLevel+1);\r\n }\r\n }\r\n else {\r\n return null;\r\n }\r\n }\r\n else if(isAddPropertiesTo == null){\r\n isAddPropertiesTo = is.clone();\r\n \r\n isAddPropertiesTo.setAmount(1);\r\n }\r\n else {\r\n return null;\r\n }\r\n }\r\n }\r\n \r\n if(isAddPropertiesTo != null && !propertyLevels.isEmpty()){\r\n // strip existing properties from the item and add them to the properties to add\r\n ItemMeta meta = isAddPropertiesTo.getItemMeta();\r\n List<String> lore;\r\n List<String> newLore = new ArrayList<>();\r\n \r\n if(meta.hasLore()){\r\n lore = meta.getLore();\r\n\r\n for(String sLore : lore){\r\n if(sLore.startsWith(PROPERTY_LINE_PREFIX)){\r\n String sPID = sLore.substring(sLore.lastIndexOf(ChatColor.COLOR_CHAR)+2);\r\n int itemPropertyLevel = 1;\r\n \r\n try{\r\n itemPropertyLevel = RomanNumeral.valueOf(sLore.substring(\r\n sLore.lastIndexOf(ChatColor.GREEN.toString())+2,\r\n sLore.lastIndexOf(ChatColor.COLOR_CHAR)-1\r\n ));\r\n }\r\n catch(IllegalArgumentException ex){\r\n continue;\r\n }\r\n \r\n int pid;\r\n \r\n try{\r\n pid = Integer.parseInt(sPID);\r\n }\r\n catch(NumberFormatException ex){\r\n continue;\r\n }\r\n \r\n RareItemProperty rip = this.plugin.getPropertymanager().getProperty(pid);\r\n \r\n if(rip != null){\r\n Integer currentLevel = propertyLevels.get(rip);\r\n \r\n if(currentLevel == null){\r\n currentLevel = 0;\r\n }\r\n \r\n int newLevel = currentLevel + itemPropertyLevel;\r\n\r\n if(currentLevel < rip.getMaxLevel() && propertyLevels.size() < this.MAX_PROPERTIES_PER_ITEM){\r\n propertyLevels.put(rip,newLevel);\r\n }\r\n }\r\n }\r\n else if(!sLore.equals(PROPERTY_HEADER)){\r\n newLore.add(sLore);\r\n }\r\n }\r\n }\r\n else{\r\n lore = new ArrayList<>();\r\n }\r\n \r\n lore = newLore;\r\n \r\n lore.add(PROPERTY_HEADER);\r\n \r\n for(Entry<RareItemProperty,Integer> entry : propertyLevels.entrySet()){\r\n RareItemProperty rip = entry.getKey();\r\n int level = entry.getValue();\r\n \r\n lore.add(String.format(PROPERTY_LINE,new Object[]{\r\n rip.getName(),\r\n RomanNumeral.convertToRoman(level),\r\n rip.getID()\r\n }));\r\n }\r\n \r\n meta.setLore(lore);\r\n \r\n isAddPropertiesTo.setItemMeta(meta);\r\n \r\n return isAddPropertiesTo;\r\n }\r\n \r\n return null;\r\n }", "public static boolean hasInventorySpace(Inventory inventory, ItemStack is) {\n Inventory inv = Bukkit.createInventory(null, inventory.getSize());\n\n for (int i = 0; i < inv.getSize(); i++) {\n if (inventory.getItem(i) != null) {\n ItemStack item = inventory.getItem(i).clone();\n inv.setItem(i, item);\n }\n }\n\n if (inv.addItem(is.clone()).size() > 0) {\n return false;\n }\n\n return true;\n }", "void loadInventory() {\n\n // make sure there isn't already an inventory record\n MrnInventory checkInv[] =\n new MrnInventory(survey.getSurveyId()).get();\n\n if (dbg3) System.out.println(\"<br>loadInventory: survey.getSurveyId() = \" +\n survey.getSurveyId());\n if (dbg3) System.out.println(\"<br>loadInventory: checkInv.length = \" +\n checkInv.length);\n\n if (checkInv.length == 0) {\n\n inventory.setSurveyId(survey.getSurveyId());\n\n // defaults\n inventory.setDataCentre(\"SADCO\");\n inventory.setTargetCountryCode(0); // unknown\n inventory.setStnidPrefix(survey.getInstitute());\n inventory.setDataRecorded(\"Y\");\n\n // from screen - done in LoadMRNData.getArgsFromFile()\n //inventory.setCountryCode(screenInv.getCountryCode());\n //inventory.setPlanamCode(screenInv.getPlanamCode());\n //inventory.setInstitCode(screenInv.getInstitCode());\n //inventory.setCruiseName(screenInv.getCruiseName());\n //inventory.setProjectName(screenInv.getProjectName());\n //inventory.setAreaname(screenInv.getAreaname()); // use as default to show on screen\n //inventory.setDomain(screenInv.getDomain()); // use as default to show on screen\n\n inventory.setCountryCode(0); // unknown\n\n inventory.setSciCode1(1); // unknown\n inventory.setSciCode2(1); // unknown // new\n inventory.setCoordCode(1); // unknown\n\n inventory.setProjectionCode(1); // unknown\n inventory.setSpheroidCode(1); // unknown\n inventory.setDatumCode(1); // unknown\n\n inventory.setSurveyTypeCode(1); // hydro\n if (dbg) System.out.println(\"loadInventory: put inventory = \" + inventory);\n\n try {\n inventory.put();\n } catch(Exception e) {\n System.err.println(\"loadInventory: put inventory = \" + inventory);\n System.err.println(\"loadInventory: put sql = \" + inventory.getInsStr());\n e.printStackTrace();\n } // try-catch\n if (dbg3) System.out.println(\"<br>loadInventory: put inventory = \" +\n inventory);\n\n } // if (checkInv.length > 0)\n\n }", "private void resizeInternal(int size) {\n // save effort if the size did not change\n if (size == this.inventory.size()) {\n return;\n }\n ItemStackList newInventory = ItemStackList.withSize(size);\n\n for (int i = 0; i < size && i < this.inventory.size(); i++) {\n newInventory.set(i, this.inventory.get(i));\n }\n this.inventory = newInventory;\n }", "default ItemStack moveOneItemTo(IInventoryComposite dest) {\n return moveOneItemTo(dest, Predicates.alwaysTrue());\n }", "public Inventory(){\n this.items = new ArrayList<InventoryItem>(); \n }", "public static InventoryItem[] getSortedInventoryList(){\n InventoryItem[] originalInventoryList = \r\n VikingQuest.getCurrentGame().getItems();\r\n // Clone (make a copy) origionalList\r\n InventoryItem[] inventoryList = originalInventoryList.clone();\r\n \r\n // Using a BubbleSort to sort the list of inventoryList by name\r\n Item tempInventoryItem;\r\n for (int i=0; i<inventoryList.length-1; i++){\r\n for (int j=0; j<inventoryList.length-1-i; j++){\r\n if (inventoryList[j].getType().\r\n compareToIgnoreCase(inventoryList[j + 1].getType()) > 0){\r\n tempItem = inventoryList[j];\r\n inventoryList[j] = inventoryList[j+1];\r\n inventoryList[j+1] = tempItem;\r\n }\r\n }\r\n }\r\n return inventoryList; \r\n }", "public void setList(ArrayList<Item> inventory) {\r\n\t\tthis.inventory = inventory;\r\n\t}", "public ItemStack transferStackInSlot(EntityPlayer playerIn, int index) {\n/* 79 */ ItemStack var3 = null;\n/* 80 */ Slot var4 = this.inventorySlots.get(index);\n/* */ \n/* 82 */ if (var4 != null && var4.getHasStack()) {\n/* */ \n/* 84 */ ItemStack var5 = var4.getStack();\n/* 85 */ var3 = var5.copy();\n/* */ \n/* 87 */ if (index < this.field_111243_a.getSizeInventory()) {\n/* */ \n/* 89 */ if (!mergeItemStack(var5, this.field_111243_a.getSizeInventory(), this.inventorySlots.size(), true))\n/* */ {\n/* 91 */ return null;\n/* */ }\n/* */ }\n/* 94 */ else if (getSlot(1).isItemValid(var5) && !getSlot(1).getHasStack()) {\n/* */ \n/* 96 */ if (!mergeItemStack(var5, 1, 2, false))\n/* */ {\n/* 98 */ return null;\n/* */ }\n/* */ }\n/* 101 */ else if (getSlot(0).isItemValid(var5)) {\n/* */ \n/* 103 */ if (!mergeItemStack(var5, 0, 1, false))\n/* */ {\n/* 105 */ return null;\n/* */ }\n/* */ }\n/* 108 */ else if (this.field_111243_a.getSizeInventory() <= 2 || !mergeItemStack(var5, 2, this.field_111243_a.getSizeInventory(), false)) {\n/* */ \n/* 110 */ return null;\n/* */ } \n/* */ \n/* 113 */ if (var5.stackSize == 0) {\n/* */ \n/* 115 */ var4.putStack(null);\n/* */ }\n/* */ else {\n/* */ \n/* 119 */ var4.onSlotChanged();\n/* */ } \n/* */ } \n/* */ \n/* 123 */ return var3;\n/* */ }", "@Override\n\tpublic int getSizeInventory() {\n\t\treturn inputInventory.length + outputInventory.length ;\n\t}", "Set<String> getInventory();", "private List<InventoryBO> shortListRelevantInventory(final ItemBO anItem)\n\t{\n\t\tfinal InventoryBO selected = anItem.getSelectedInventory();\n\t\tfinal InventoryBO main = anItem.getMainDCInventory();\n\n\t\tlogger.info(\"shortListRelevantInventory(...): selected: \" + selected);\n\t\tlogger.info(\"shortListRelevantInventory(...): main: \" + main);\n\t\tlogger.info(\"shortListRelevantInventory(...): ------------------------\");\n\t\t\n\t\tfinal Set<InventoryBO> temp = new HashSet<InventoryBO>();\n\t\tif (selected != null)\n\t\t{\n\t\t\ttemp.add(selected);\n\t\t}\n\t\tif (main != null)\n\t\t{\n\t\t\ttemp.add(main);\n\t\t}\n\n\t\treturn new ArrayList<InventoryBO>(temp);\n\t}", "private List<ItemBO> checkInventoryProblem(final List<ItemBO> itemList)\n\t{\n\t\tfinal List<ItemBO> itemBOList = new ArrayList<ItemBO>();\n\t\tif (itemList != null && (!itemList.isEmpty()))\n\t\t{\n\t\t\tfinal Iterator<ItemBO> itemListIterator = itemList.iterator();\n\t\t\twhile (itemListIterator.hasNext())\n\t\t\t{\n\t\t\t\tfinal ItemBO itemBO = itemListIterator.next();\n\t\t\t\tboolean isProblemPart = false;\n\t\t\t\tif (null != itemBO.getProblemItemList() && !itemBO.getProblemItemList().isEmpty())\n\t\t\t\t{\n\t\t\t\t\tfinal List<ProblemBO> problemBOList = itemBO.getProblemItemList();\n\t\t\t\t\tfor (final ProblemBO problem : problemBOList)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (MessageResourceUtil.NO_INVENTORY.equals(problem.getMessageKey()))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tisProblemPart = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (!isProblemPart)\n\t\t\t\t{\n\t\t\t\t\titemBOList.add(itemBO);\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t\treturn itemBOList;\n\t}", "public void inventory() {\n\t\tList<Item> items = super.getItems();\n\n\t\tString retStr = \"Items: \";\n\t\tItem item;\n\t\tfor (int i = 0; i < items.size(); i++) {\n\t\t\titem = items.get(i);\n\t\t\tretStr += item.toString();\n\t\t\tif (i != items.size()-1)\n \t{\n\t\t\t\tretStr += \", \";\n \t}\n\t\t}\n\t\tretStr += \"\\nCapacity: \" + this.currentCapacity() + \"/\" + this.maxCapacity;\n\t\tSystem.out.println(retStr);\n\t}", "public void takeItemsFromChest() {\r\n currentRoom = player.getCurrentRoom();\r\n for (int i = 0; i < currentRoom.getChest().size(); i++) {\r\n player.addToInventory(currentRoom.getChest().get(i));\r\n currentRoom.getChest().remove(i);\r\n }\r\n\r\n }", "public void duplicate()\n\t{\n\t\tfor(int i=0;i<n;i++)\n\t\t{\n\t\t\tfor(int j=0;j<n;j++)\n\t\t\t{\n\t\t\t\ttemp[i][j] = cost[i][j];\n\t\t\t}\n\t\t}\n\t}", "public void containsNoDuplicates() {\n List<Entry<T>> duplicates = Lists.newArrayList();\n for (Multiset.Entry<T> entry : LinkedHashMultiset.create(getSubject()).entrySet()) {\n if (entry.getCount() > 1) {\n duplicates.add(entry);\n }\n }\n if (!duplicates.isEmpty()) {\n failWithRawMessage(\"%s has the following duplicates: <%s>\", getDisplaySubject(), duplicates);\n }\n }", "public boolean addItem(Scanner scanner){\n String input;\n\n for(int i = 0; i < numItems; i++) {\n if(inventory[i] == null){\n do {\n System.out.print(\"Do you wish to add a fruit(f), vegetable(v) or a preserve(p)? \");\n input = scanner.next();\n if (input.equals(\"f\")) {\n Fruit fruit = new Fruit();\n fruit.inputCode(scanner);\n int var = alreadyExists(fruit);\n if(var != -1) {\n System.out.println(\"Item code already exists\");\n return false;\n }\n fruit.addItem(scanner);\n inventory[i]=fruit;\n } else if (input.equals(\"v\")) {\n Vegetable vegetable = new Vegetable();\n vegetable.inputCode(scanner);\n int var = alreadyExists(vegetable);\n if(var != -1) {\n System.out.println(\"Item code already exists\");\n return false;\n }\n vegetable.addItem(scanner);\n inventory[i]=vegetable;\n } else if (input.equals(\"p\")) {\n Preserve preserve = new Preserve();\n preserve.inputCode(scanner);\n int var = alreadyExists(preserve);\n if(var != -1) {\n System.out.println(\"Item code already exists\");\n return false;\n }\n preserve.addItem(scanner);\n inventory[i]=preserve;\n } else {\n System.out.println(\"Invalid entry\");\n }\n }while(!input.equals(\"f\") && !input.equals(\"v\") && !input.equals(\"p\"));\n break;\n }\n\n }\n return true;\n }", "public ImageData duplicate() {\r\n\t\treturn new ImageData(imageProcessor.duplicate(), label);\r\n\t}", "@Override\n protected boolean mergeItemStack(@Nonnull ItemStack par1ItemStack, int fromIndex, int toIndex, boolean reversOrder) {\n\n boolean result = false;\n int checkIndex = fromIndex;\n\n if (reversOrder) {\n checkIndex = toIndex - 1;\n }\n\n Slot slot;\n ItemStack itemstack1;\n\n if (par1ItemStack.isStackable()) {\n\n while (!par1ItemStack.isEmpty() && (!reversOrder && checkIndex < toIndex || reversOrder && checkIndex >= fromIndex)) {\n slot = this.inventorySlots.get(checkIndex);\n itemstack1 = slot.getStack();\n\n if (!itemstack1.isEmpty() && itemstack1.getItem() == par1ItemStack.getItem()\n && (!par1ItemStack.getHasSubtypes() || par1ItemStack.getItemDamage() == itemstack1.getItemDamage())\n && ItemStack.areItemStackTagsEqual(par1ItemStack, itemstack1) && slot.isItemValid(par1ItemStack) && par1ItemStack != itemstack1) {\n\n int mergedSize = itemstack1.getCount() + par1ItemStack.getCount();\n int maxStackSize = Math.min(par1ItemStack.getMaxStackSize(), slot.getSlotStackLimit());\n if (mergedSize <= maxStackSize) {\n par1ItemStack.setCount(0);\n itemstack1.setCount(mergedSize);\n slot.onSlotChanged();\n result = true;\n } else if (itemstack1.getCount() < maxStackSize) {\n par1ItemStack.shrink(maxStackSize - itemstack1.getCount());\n itemstack1.setCount(maxStackSize);\n slot.onSlotChanged();\n result = true;\n }\n }\n\n if (reversOrder) {\n --checkIndex;\n } else {\n ++checkIndex;\n }\n }\n }\n\n if (!par1ItemStack.isEmpty()) {\n if (reversOrder) {\n checkIndex = toIndex - 1;\n } else {\n checkIndex = fromIndex;\n }\n\n while (!reversOrder && checkIndex < toIndex || reversOrder && checkIndex >= fromIndex) {\n slot = this.inventorySlots.get(checkIndex);\n itemstack1 = slot.getStack();\n\n if (itemstack1.isEmpty() && slot.isItemValid(par1ItemStack)) {\n ItemStack in = par1ItemStack.copy();\n in.setCount(Math.min(in.getCount(), slot.getSlotStackLimit()));\n\n slot.putStack(in);\n slot.onSlotChanged();\n par1ItemStack.shrink(in.getCount());\n result = true;\n break;\n }\n\n if (reversOrder) {\n --checkIndex;\n } else {\n ++checkIndex;\n }\n }\n }\n\n return result;\n }", "public Inventory getInventory() {\n return inventory;\n }", "@Override\n\tpublic void setInventorySlotContents(int p_70299_1_, ItemStack p_70299_2_) {\n\t\tfield_145900_a[p_70299_1_] = p_70299_2_;\n\n\t\tif (p_70299_2_ != null\n\t\t\t\t&& p_70299_2_.stackSize > getInventoryStackLimit()) {\n\t\t\tp_70299_2_.stackSize = getInventoryStackLimit();\n\t\t}\n\t}", "@java.lang.Override\n public POGOProtos.Rpc.HoloInventoryItemProto getInventoryItemData() {\n if (inventoryItemCase_ == 3) {\n return (POGOProtos.Rpc.HoloInventoryItemProto) inventoryItem_;\n }\n return POGOProtos.Rpc.HoloInventoryItemProto.getDefaultInstance();\n }", "public Inventory getInventory() {\r\n\t\treturn inventory;\r\n\t}", "public void initItems() {\n List<Integer> emptySlots = NimbleServer.enchantmentConfig.getEmptySlots();\n for (int i = 0; i < getSize(); i++) {\n if(!(emptySlots.contains(i))) {\n getInventory().setItem(i, getFiller());\n }\n }\n }", "default Collection<ItemStack> getContentsMatchingSimulated(Predicate<ItemStack> predicate) {\n\t\treturn this.getContentsSimulated().stream().map(ItemStack::copy).filter(predicate).collect(Collectors.toList());\n\t}", "public Inventory getInventory(){ //needed for InventoryView - Sam\n return inventory;\n }", "@Override\n public LinkedList removeDuplicates() {\n ArrayList<String> itemList = new ArrayList(Arrays.asList(\"\"));\n LinkedList newLinkedList = new LinkedList();\n Node currNode = this.head;\n while(true){\n if(!itemList.contains(currNode.getItem())){\n itemList.add(currNode.getItem());\n newLinkedList.addNode(currNode.getItem());\n }\n if(currNode.getNextNode() == null){\n break;\n }\n currNode = currNode.getNextNode();\n }\n return newLinkedList;\n }", "@Override\n public String prepareCloneForItemToClone() {\n cloneCreateItemElementPlaceholders = true;\n newItemsToAdd = null;\n\n return super.prepareCloneForItemToClone();\n }", "public boolean isEmpty() {\n\t\treturn Arrays.stream(inventory.getContents())\n\t\t\t\t.noneMatch(ItemStackUtils::isValid);\n\t}", "public void mapItemsToSlots(Inventory inventory) {\n\t\tint slotIndex = 0;\n\t\tfor(ItemSlot slot : itemSlots) {\n\t\t\tif(slotIndex < inventory.getItems().size()) {\n\t\t\t\tslot.setMappedItem(inventory.getItems().get(slotIndex++));\n\t\t\t} else {\n\t\t\t\tslot.setMappedItem(null);\n\t\t\t}\n\t\t}\n\t}", "public PageInventory withItems(ItemStack... items)\n {\n this.contents.addAll(Arrays.asList(items));\n this.recalculate();\n return this;\n }", "@java.lang.Override\n public boolean hasInventoryItemData() {\n return inventoryItemCase_ == 3;\n }", "void checkInventoryExists() {\n\n MrnInventory[] checkInventory =\n new MrnInventory(survey.getSurveyId()).get();\n inventoryExists = false;\n if (checkInventory.length > 0) {\n inventoryExists = true;\n } // if (checkInventory.length > 0)\n\n\n }", "private Inventory createInventory() {\n\n\t\tInventory inv;\n\n\t\tif (guiMetadata.getInvType() == InventoryType.CHEST) {\n\t\t\tinv = Bukkit.createInventory(null, guiMetadata.getSize(), guiMetadata.getGuiName());\n\t\t} else {\n\t\t\tinv = Bukkit.createInventory(null, guiMetadata.getInvType(), guiMetadata.getGuiName());\n\t\t}\n\n\t\treturn inv;\n\t}", "@Override\n\tpublic void setInventorySlotContents(int index, ItemStack stack) {\n\t\t\n\t}", "public ArrayList<Tool> ret(ArrayList<Tool> cart, ArrayList<Tool> Inventory){\n\t\t\n\n\t\tfor (int i=0; i<cart.size(); i++) {\n\t\t\tInventory.add(cart.get(i));\n\t\t}\n\t\t\n\t\tcart = new ArrayList<Tool>();\n\t\treturn cart;\n\t\t\n\t}", "@java.lang.Override\n public boolean hasInventoryItemData() {\n return inventoryItemCase_ == 3;\n }", "public List<InventoryEntity> addInventory(Inventory inventory) {\n\t\treturn inventoryDao.addInventory(inventory);\n\t}", "protected void removeDuplicates() {\n log.trace(\"Removing duplicated\");\n long startTime = System.currentTimeMillis();\n int initial = size();\n E last = null;\n int index = 0;\n while (index < size()) {\n E current = get(index);\n if (last != null && last.equals(current)) {\n if (log.isTraceEnabled()) {\n log.trace(\"Removing duplicate '\" + current + \"'\");\n }\n remove(index);\n } else {\n index++;\n }\n last = current;\n }\n log.debug(String.format(\"Removed %d duplicates from a total of %d values in %dms\",\n initial - size(), initial, System.currentTimeMillis() - startTime));\n }", "@JsonIgnore public Collection<Mass> getSodiumContents() {\n final Object current = myData.get(\"sodiumContent\");\n if (current == null) return Collections.emptyList();\n if (current instanceof Collection) {\n return (Collection<Mass>) current;\n }\n return Arrays.asList((Mass) current);\n }", "default boolean isEmpty() {\n\t\treturn this.getContents().values().stream().allMatch(ItemStack::isEmpty);\n\t}", "public boolean checkQuestionDuplication(String content) {\n \t\tif (questions.size() != 0) {\n \t\t\tfor (int i = 0; i < questions.size(); i++) {\n \t\t\t\tif (content.equals(questions.get(i).getContent())) {\n \t\t\t\t\treturn true;\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t\treturn false;\n \t}", "List<InventoryItem> getInventory();", "@Override\r\n public void onCraftMatrixChanged(IInventory par1IInventory)\r\n {\r\n this.craftResult.setInventorySlotContents(0, CraftingManager.getInstance().findMatchingRecipe(this.craftMatrix, this.worldObj));\r\n }", "@Test\r\n\tpublic void testEmptyContents() throws Exception {\n\t\tassertThat(this.basket.getContents().count(), is(0L));\r\n\t}", "public void craft() {\n \t\tItemStack[] clonedContents = this.getGrid().getClonedContents();\n \t\tfor (int i = 0; i < clonedContents.length; i++) {\n \t\t\tItemStack clickedItem = clonedContents[i];\n \t\t\tif (clickedItem == null) {\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\tclickedItem.setAmount(clickedItem.getAmount() - 1);\n \t\t\tif (clickedItem.isEmpty()) {\n \t\t\t\tclickedItem = null;\n \t\t\t}\n \t\t\tclonedContents[i] = clickedItem;\n \t\t}\n \t\tthis.getGrid().setContents(clonedContents);\n \t}", "public void moveTo(Inventory inventory) {\n for (ItemStack itemStack : this.getItemStacks()) {\n int added = inventory.addItemStack(itemStack);\n this.ITEMS.get(this.getItemStack(itemStack)).addAmount(-added);\n }\n }", "@Override\n\tpublic Inventory getInventory() {\n\t\treturn null;\n\t}", "@NotNull\n @Override\n public Inventory getInventory() {\n Inventory inventory = Bukkit.createInventory(this, missionType == Mission.MissionType.ONCE ? IridiumSkyblock.getInstance().getInventories().missionsGUISize : 27, StringUtils.color(\"&7Island Missions\"));\n\n InventoryUtils.fillInventory(inventory);\n\n if (missionType == Mission.MissionType.DAILY) {\n HashMap<String, Mission> missions = IridiumSkyblock.getInstance().getIslandManager().getDailyIslandMissions(island);\n int i = 0;\n\n for (String key : missions.keySet()) {\n Mission mission = IridiumSkyblock.getInstance().getMissionsList().get(key);\n List<Placeholder> placeholders = new ArrayList<>();\n\n for (int j = 1; j <= mission.getMissions().size(); j++) {\n IslandMission islandMission = IridiumSkyblock.getInstance().getIslandManager().getIslandMission(island, mission, key, j);\n placeholders.add(new Placeholder(\"progress_\" + j, String.valueOf(islandMission.getProgress())));\n }\n\n inventory.setItem(IridiumSkyblock.getInstance().getMissions().dailySlots.get(i), ItemStackUtils.makeItem(mission.getItem(), placeholders));\n i++;\n }\n } else {\n for (String key : IridiumSkyblock.getInstance().getMissionsList().keySet()) {\n Mission mission = IridiumSkyblock.getInstance().getMissionsList().get(key);\n if (mission.getMissionType() != Mission.MissionType.ONCE) continue;\n List<Placeholder> placeholders = new ArrayList<>();\n\n for (int j = 1; j <= mission.getMissions().size(); j++) {\n IslandMission islandMission = IridiumSkyblock.getInstance().getIslandManager().getIslandMission(island, mission, key, j);\n placeholders.add(new Placeholder(\"progress_\" + j, String.valueOf(islandMission.getProgress())));\n IridiumSkyblock.getInstance().getLogger().info(j + \" - \" + islandMission.getProgress());\n }\n\n inventory.setItem(mission.getItem().slot, ItemStackUtils.makeItem(mission.getItem(), placeholders));\n }\n }\n\n return inventory;\n }", "public Inventory()\r\n\t{\r\n\t\t_tiles = new ArrayList<Tile>();\r\n\t\t\r\n\t\tfor(int i = 'A'; i <= 'Z'; i++)\r\n\t\t{\r\n\t\t\tswitch(i)\r\n\t\t\t{\r\n\t\t\tcase 'A':\r\n\t\t\tcase 'E':\r\n\t\t\tcase 'I':\r\n\t\t\tcase 'O':\r\n\t\t\tcase 'U':\r\n\t\t\t\tfor(int j = 0; j < 29; j++)\r\n\t\t\t\t{\r\n\t\t\t\t\t_tiles.add(new Tile((char) i));\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'Y':\r\n\t\t\t\tfor(int j = 0; j < 15; j++)\r\n\t\t\t\t{\r\n\t\t\t\t\t_tiles.add(new Tile((char) i));\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tfor(int j = 0; j < 12; j++)\r\n\t\t\t\t{\r\n\t\t\t\t\t_tiles.add(new Tile((char) i));\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\t\r\n\t\tthis.shuffle();\r\n\t}" ]
[ "0.60234576", "0.5848233", "0.5565454", "0.5464573", "0.5371011", "0.5309753", "0.5296734", "0.52806735", "0.5165767", "0.5150483", "0.5148123", "0.51321226", "0.51196176", "0.5070655", "0.5048638", "0.5010307", "0.50003374", "0.49727684", "0.4971765", "0.49537215", "0.4938391", "0.4931713", "0.49258387", "0.49149495", "0.4914315", "0.49053022", "0.4903359", "0.4871138", "0.4868481", "0.48652396", "0.48551103", "0.48531774", "0.48422945", "0.4841855", "0.48274848", "0.48203626", "0.48194182", "0.48181066", "0.4816536", "0.48142353", "0.480694", "0.47997627", "0.47861612", "0.4783674", "0.4771046", "0.4766835", "0.47633424", "0.47525996", "0.4748159", "0.47471678", "0.47462982", "0.4740797", "0.4736871", "0.4736639", "0.47363454", "0.47295642", "0.4728772", "0.4726409", "0.47138044", "0.4699143", "0.46958777", "0.46922573", "0.46881515", "0.4681721", "0.46792492", "0.46786064", "0.46781334", "0.4677113", "0.46753553", "0.46723577", "0.46688306", "0.46673104", "0.4666461", "0.46661532", "0.46592087", "0.465861", "0.46572405", "0.46560702", "0.4654704", "0.4652141", "0.46494758", "0.46448946", "0.46410468", "0.46382093", "0.46353242", "0.46302617", "0.46229157", "0.46221656", "0.4615525", "0.4614483", "0.46142465", "0.46123543", "0.46112934", "0.4610671", "0.46106246", "0.4610091", "0.4609964", "0.46012223", "0.4598892", "0.4597994" ]
0.7091674
0
Swaps the contents of two inventories. Throws if either inventory is null. Throws if either inventory has no space for the other inventory's items. Items that do not fulfill the requirements of isValidItem() are replaced with null.
public static void swapInventoryContents(final Inventory inventory1, final Inventory inventory2) throws InvalidParameterException, NotEnoughSpaceException { if (inventory1 == null) { throw new InvalidParameterException("Cannot swap contents, inventory1 is null."); } if (inventory2 == null) { throw new InvalidParameterException("Cannot swap contents, inventory2 is null."); } ItemStack[] contents1 = Arrays.stream(inventory1.getContents()).filter(ItemAPI::isValidItem).toArray(ItemStack[]::new); ItemStack[] contents2 = Arrays.stream(inventory2.getContents()).filter(ItemAPI::isValidItem).toArray(ItemStack[]::new); if (contents1.length > inventory2.getSize()) { throw new NotEnoughSpaceException("Cannot swap contents, inventory2 doesn't have enough space for inventory1's items."); } if (contents2.length > inventory1.getSize()) { throw new NotEnoughSpaceException("Cannot swap contents, inventory1 doesn't have enough space for inventory2's items."); } inventory1.clear(); inventory2.clear(); inventory1.setContents(contents2); inventory2.setContents(contents1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void inventoryTransaction(final Inventory inventory1, final ItemStack[] items1, final Inventory inventory2, final ItemStack[] items2) throws InvalidParameterException, FailedTransactionException {\n if (!isValidInventory(inventory1)) {\n throw new InvalidParameterException(\"Cannot perform transaction, inventory1 is invalid.\");\n }\n if (items1 == null) {\n throw new InvalidParameterException(\"Cannot perform transaction, items1 is null.\");\n }\n if (!isValidInventory(inventory2)) {\n throw new InvalidParameterException(\"Cannot perform transaction, inventory2 is invalid.\");\n }\n if (items2 == null) {\n throw new InvalidParameterException(\"Cannot perform transaction, items2 is null.\");\n }\n if (!ItemAPI.isValidItemSet(items1)) {\n throw new InvalidParameterException(\"Cannot perform transaction, items1 contains an invalid item!\");\n }\n if (!ItemAPI.isValidItemSet(items2)) {\n throw new InvalidParameterException(\"Cannot perform transaction, items2 contains an invalid item!\");\n }\n ItemStack[] savedInventory1 = duplicateInventory(inventory1.getContents());\n ItemStack[] savedInventory2 = duplicateInventory(inventory2.getContents());\n try {\n // Remove items1 from inventory1\n for (ItemStack item : items1) {\n removeItemFromInventory(inventory1, item);\n }\n // Remove items2 from inventory2\n for (ItemStack item : items2) {\n removeItemFromInventory(inventory2, item);\n }\n // Add items2 to inventory1\n for (ItemStack item : items2) {\n addItemToInventory(inventory1, item);\n }\n // Add items1 to inventory2\n for (ItemStack item : items1) {\n addItemToInventory(inventory2, item);\n }\n }\n catch (FailedTransactionException exception) {\n // Restore the inventory to its previous state\n inventory1.setContents(savedInventory1);\n inventory2.setContents(savedInventory2);\n throw exception;\n }\n }", "public static void disperseInventory(Inventory inv1, Inventory inv2) {\r\n if (inv1 != null) {\r\n for (ItemStack item : inv1) {\r\n if (item != null)\r\n inv2.addItem(item);\r\n }\r\n removeAllItems(inv1);\r\n }\r\n }", "public void swapItemFromInventoryToOther(@NotNull Usable item, Usable other) {\n for (int i = 0; i < size; i++) {\n if (item == items[i]) {\n this.removeItem(i);\n if (other != null) {\n this.setItem(other, i);\n }\n return;\n }\n }\n }", "public void swapInventoryItems(int i, int j) {\n\t\tint k = inv[i];\n\t\tinv[i] = inv[j];\n\t\tinv[j] = k;\n\t\tk = invStackSizes[i];\n\t\tinvStackSizes[i] = invStackSizes[j];\n\t\tinvStackSizes[j] = k;\n\t}", "@Override\n protected boolean mergeItemStack(@Nonnull ItemStack par1ItemStack, int fromIndex, int toIndex, boolean reversOrder) {\n\n boolean result = false;\n int checkIndex = fromIndex;\n\n if (reversOrder) {\n checkIndex = toIndex - 1;\n }\n\n Slot slot;\n ItemStack itemstack1;\n\n if (par1ItemStack.isStackable()) {\n\n while (!par1ItemStack.isEmpty() && (!reversOrder && checkIndex < toIndex || reversOrder && checkIndex >= fromIndex)) {\n slot = this.inventorySlots.get(checkIndex);\n itemstack1 = slot.getStack();\n\n if (!itemstack1.isEmpty() && itemstack1.getItem() == par1ItemStack.getItem()\n && (!par1ItemStack.getHasSubtypes() || par1ItemStack.getItemDamage() == itemstack1.getItemDamage())\n && ItemStack.areItemStackTagsEqual(par1ItemStack, itemstack1) && slot.isItemValid(par1ItemStack) && par1ItemStack != itemstack1) {\n\n int mergedSize = itemstack1.getCount() + par1ItemStack.getCount();\n int maxStackSize = Math.min(par1ItemStack.getMaxStackSize(), slot.getSlotStackLimit());\n if (mergedSize <= maxStackSize) {\n par1ItemStack.setCount(0);\n itemstack1.setCount(mergedSize);\n slot.onSlotChanged();\n result = true;\n } else if (itemstack1.getCount() < maxStackSize) {\n par1ItemStack.shrink(maxStackSize - itemstack1.getCount());\n itemstack1.setCount(maxStackSize);\n slot.onSlotChanged();\n result = true;\n }\n }\n\n if (reversOrder) {\n --checkIndex;\n } else {\n ++checkIndex;\n }\n }\n }\n\n if (!par1ItemStack.isEmpty()) {\n if (reversOrder) {\n checkIndex = toIndex - 1;\n } else {\n checkIndex = fromIndex;\n }\n\n while (!reversOrder && checkIndex < toIndex || reversOrder && checkIndex >= fromIndex) {\n slot = this.inventorySlots.get(checkIndex);\n itemstack1 = slot.getStack();\n\n if (itemstack1.isEmpty() && slot.isItemValid(par1ItemStack)) {\n ItemStack in = par1ItemStack.copy();\n in.setCount(Math.min(in.getCount(), slot.getSlotStackLimit()));\n\n slot.putStack(in);\n slot.onSlotChanged();\n par1ItemStack.shrink(in.getCount());\n result = true;\n break;\n }\n\n if (reversOrder) {\n --checkIndex;\n } else {\n ++checkIndex;\n }\n }\n }\n\n return result;\n }", "public void onInventoryChanged()\n\t{\n\t\tfor (int i = 0; i < this.items.length; i++)\n\t\t{\n\t\t\tItemStack stack = this.items[i];\n\t\t\tif (stack != null && stack.stackSize <= 0)\n\t\t\t{\n\t\t\t\tthis.items[i] = null;\n\t\t\t}\n\n\t\t}\n\t}", "@Test\r\n public void testResetInventory2()\r\n {\r\n testLongTermStorage.addItem(item2, testLongTermStorage.getCapacity() / item2.getVolume());\r\n testLongTermStorage.resetInventory();\r\n assertEquals(\"Storage should be empty\", new HashMap<>(), testLongTermStorage.getInventory());\r\n }", "public void moveItemStackTo(ItemStack itemStack, Inventory inventory) {\n int itemsAdded = inventory.addItemStack(itemStack);\n\n this.removeItemStack(new ItemStack(itemStack.getItem(), itemsAdded));\n }", "public void moveTo(Inventory inventory) {\n for (ItemStack itemStack : this.getItemStacks()) {\n int added = inventory.addItemStack(itemStack);\n this.ITEMS.get(this.getItemStack(itemStack)).addAmount(-added);\n }\n }", "private void updateInventory(List<Item> items) {\r\n for(Item item : items) {\r\n inventory.put(item, STARTING_INVENTORY);\r\n inventorySold.put(item, 0);\r\n itemLocations.put(item.getSlot(), item);\r\n }\r\n }", "private void swapTiles(Tile tile1, Tile tile2) {\n\n\t\tint temp = tile2.getValue();\n\t\ttile2.setValue(tile1.getValue());\n\t\ttile1.setValue(temp);\n\t}", "public void mapItemsToSlots(Inventory inventory) {\n\t\tint slotIndex = 0;\n\t\tfor(ItemSlot slot : itemSlots) {\n\t\t\tif(slotIndex < inventory.getItems().size()) {\n\t\t\t\tslot.setMappedItem(inventory.getItems().get(slotIndex++));\n\t\t\t} else {\n\t\t\t\tslot.setMappedItem(null);\n\t\t\t}\n\t\t}\n\t}", "public synchronized void elementSwapped(Object source, int index1,\n\t\t\tObject other, int index2) {\n\n\t}", "public void setInventorySlotContents(int par1, ItemStack par2ItemStack)\n {\n this.furnaceItemStacks[par1] = par2ItemStack;\n\n if (par2ItemStack != null && par2ItemStack.stackSize > this.getInventoryStackLimit())\n {\n par2ItemStack.stackSize = this.getInventoryStackLimit();\n }\n }", "@Override\n public ItemStack transferStackInSlot(EntityPlayer player, int sourceSlotIndex)\n {\n Slot sourceSlot = (Slot)inventorySlots.get(sourceSlotIndex);\n if (sourceSlot == null || !sourceSlot.getHasStack()) return ItemStack.EMPTY; //EMPTY_ITEM\n ItemStack sourceStack = sourceSlot.getStack();\n ItemStack copyOfSourceStack = sourceStack.copy();\n\n // Check if the slot clicked is one of the vanilla container slots\n if (sourceSlotIndex >= VANILLA_FIRST_SLOT_INDEX && sourceSlotIndex < VANILLA_FIRST_SLOT_INDEX + VANILLA_SLOT_COUNT) {\n // This is a vanilla container slot so merge the stack into the tile inventory\n // We can only put it into the first slot though, keep that in mind.\n if (!mergeItemStack(sourceStack, TE_INVENTORY_FIRST_SLOT_INDEX, TE_INVENTORY_FIRST_SLOT_INDEX + 1, false)){\n return ItemStack.EMPTY; // EMPTY_ITEM\n }\n } else if (sourceSlotIndex >= TE_INVENTORY_FIRST_SLOT_INDEX && sourceSlotIndex < TE_INVENTORY_FIRST_SLOT_INDEX + TE_INVENTORY_SLOT_COUNT) {\n // This is a TE slot so merge the stack into the players inventory\n if (!mergeItemStack(sourceStack, VANILLA_FIRST_SLOT_INDEX, VANILLA_FIRST_SLOT_INDEX + VANILLA_SLOT_COUNT, false)) {\n return ItemStack.EMPTY; // EMPTY_ITEM\n }\n } else {\n return ItemStack.EMPTY; // EMPTY_ITEM\n }\n\n // If stack size == 0 (the entire stack was moved) set slot contents to null\n if (sourceStack.getCount() == 0) { // getStackSize\n sourceSlot.putStack(ItemStack.EMPTY); // EMPTY_ITEM\n } else {\n sourceSlot.onSlotChanged();\n }\n\n sourceSlot.onTake(player, sourceStack); //onPickupFromSlot()\n return copyOfSourceStack;\n }", "public void handleCrafting() {\n if(input.getStackInSlot(0).getItem() != input.getStackInSlot(1).getItem() && !input.getStackInSlot(0).isEmpty() && !input.getStackInSlot(1).isEmpty()) {\n isRecipeInvalid = true;\n }\n // Handles two compatible items\n else if(input.getStackInSlot(0).getMaxDamage() > 1 && input.getStackInSlot(0).getMaxStackSize() == 1 && input.getStackInSlot(0).getItem() == input.getStackInSlot(1).getItem()) {\n isRecipeInvalid = false;\n ItemStack stack = input.getStackInSlot(0);\n int sum = (stack.getMaxDamage() - stack.getItemDamage()) + (stack.getMaxDamage() - input.getStackInSlot(1).getItemDamage());\n\n sum = sum + (int)(sum * 0.2);\n if(sum > stack.getMaxDamage()) {\n sum = stack.getMaxDamage();\n }\n\n output.setStackInSlot(0, new ItemStack(stack.getItem(), 1, stack.getMaxDamage() - sum));\n }\n // Resets the grid when the two items are incompatible\n if(input.getStackInSlot(0).getItem() != input.getStackInSlot(1).getItem() && !output.getStackInSlot(0).isEmpty()) {\n output.setStackInSlot(0, ItemStack.EMPTY);\n }\n }", "public void dropItems() {\n\t\tlocation.getChunk().load();\n\t\tArrays.stream(inventory.getContents())\n\t\t\t.filter(ItemStackUtils::isValid)\n\t\t\t.forEach((item) -> location.getWorld().dropItemNaturally(location, item));\n\t\tinventory.clear();\n\t}", "private boolean processInventDrop(String source, String target, Item toMove, Item toSwap){\n\n\t\tif (source.startsWith(\"Invent\") && target.startsWith(\"Invent\")){\n\t\t\treturn (inventToInvent(source, target, toMove, toSwap));\n\t\t}\n\t\tif (source.startsWith(\"Invent\") && target.startsWith(\"EquipPos\")){\n\n\t\t\tif (!(toMove instanceof Equippable)){\n\t\t\t\tdisplayMessage(\"YOU CANNOT EQUIP THAT ITEM\");\n\t\t\t\treturn false;\n\t\t\t}else{\n\t\t\t\tif (!canEquip(toMove,target))return false;\n\t\t\t\tdisplayMessage(\"EQUIPPED\");\n\t\t\t\tif (toSwap!=null){\n\t\t\t\t\tElement toSwapDrag = nifty.getScreen(\"hud\").findElementByName(\"ItemVal\"+toSwap.getId());\n\t\t\t\t\tcleanRemove(toSwapDrag);\n\t\t\t\t\tscreenManager.getInventoryManager().addItemInPos(toSwap, toMove.getInventoryPosition());\n\t\t\t\t\tscreenManager.getInventoryManager().unequip(toSwap);\n\t\t\t\t\ttoMove.setInventoryPosition(target);\n\t\t\t\t}\n\t\t\t\tElement message = nifty.getScreen(\"hud\").findElementByName(\"MessagePanel\");\n\t\t\t\tmessage = screen.findElementByName(\"CharEquipVisuals\");\n\t\t\t\tmessage.startEffect(EffectEventId.onCustom,null,\"shaker\");\n\t\t\t\ttoMove.setInventoryPosition(target);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\tif (source.startsWith(\"Invent\") && target.startsWith(\"Chest\")){\n\t\t\t//toSwap = findChestItemByPos(target);\n\t\t\tif (toSwap == null){\n\t\t\t\tInventory from = toMove.getInventory();\n\t\t\t\tInventory chest = screenManager.getInventoryManager().getOpenWorldChest();\n\t\t\t\tfrom.removeItem(toMove);\n\t\t\t\ttoMove.setInventoryPosition(target);\n\t\t\t\tchest.addDirect(toMove);\n\n\t\t\t\t// send transfer message\n\t\t\t\tfor(GUIObserver g : observers){\n\t\t\t\t\tg.onItemTransfer(from, chest, toMove);\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\n\t\tif (source.startsWith(\"Invent\") && target.startsWith(\"Con\")){\n\t\t\tif (toSwap == null){\n\t\t\t\tInventory from = toMove.getInventory();\n\t\t\t\tInventory container = ((AbstractContainerItem)openContainer).getContainerInventory();\n\t\t\t\tif (container == null){\n\t\t\t\t\tthrow new AssertionError(\"Container not open\");\n\t\t\t\t}\n\t\t\t\tfrom.removeItem(toMove);\n\t\t\t\ttoMove.setInventoryPosition(target);\n\t\t\t\tcontainer.addDirect(toMove);\n\t\t\t\tfor(GUIObserver g : observers){\n\t\t\t\t\tg.onItemTransfer(from, container, toMove);\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\n\t\tif (source.startsWith(\"Invent\") && target.startsWith(\"Drop\") || target.startsWith(\"EqDrop\")){\n\t\t\tif (target.startsWith(\"EqDrop\")){\n\t\t\t\tif(nifty.getScreen(\"hud\").findElementByName(\"CharEquip\").isVisible()){\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (currentElementId.startsWith(\"ItemVal\")){\n\t\t\t\tscreenManager.getInventoryManager().dropItem(toMove);\n\n\t\t\t\tif (toMove == openContainer){\n\t\t\t\t\tcloseContainer();\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\ttoMove.setInventoryPosition(null);\n\t\t\t\t}\n\n\t\t\t\t// network\n\t\t\t\tfor(GUIObserver g : observers){\n\t\t\t\t\tg.onDropItem(toMove);\n\t\t\t\t}\n\n\t\t\t\tnifty.removeElement(nifty.getScreen(\"hud\"),nifty.getScreen(\"hud\").findElementByName(currentElementId));\n\t\t\t}\n\t\t\tDroppable dropArea = nifty.getScreen(\"hud\").findNiftyControl(\"DropArea\",Droppable.class);\n\t\t\tfor(Element el : dropArea.getElement().getElements()){\n\t\t\t\tnifty.removeElement(nifty.getScreen(\"hud\"), el);\n\t\t\t}\n\t\t\tDroppable eqDropArea = nifty.getScreen(\"hud\").findNiftyControl(\"EqDropArea\",Droppable.class);\n\t\t\tfor(Element el : eqDropArea.getElement().getElements()){\n\t\t\t\tnifty.removeElement(nifty.getScreen(\"hud\"), el);\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\n\t\tif (source.startsWith(\"Equip\") && target.startsWith(\"Invent\")){\n\t\t\tif (inventToInvent(source, target, toMove, toSwap)){\n\t\t\t\tscreenManager.getInventoryManager().unequip(toMove);\n\t\t\t\treturn true;\n\t\t\t};\n\t\t}\n\n\t\treturn false;\n\t}", "public ItemStack transferStackInSlot(EntityPlayer playerIn, int index) {\n/* 79 */ ItemStack var3 = null;\n/* 80 */ Slot var4 = this.inventorySlots.get(index);\n/* */ \n/* 82 */ if (var4 != null && var4.getHasStack()) {\n/* */ \n/* 84 */ ItemStack var5 = var4.getStack();\n/* 85 */ var3 = var5.copy();\n/* */ \n/* 87 */ if (index < this.field_111243_a.getSizeInventory()) {\n/* */ \n/* 89 */ if (!mergeItemStack(var5, this.field_111243_a.getSizeInventory(), this.inventorySlots.size(), true))\n/* */ {\n/* 91 */ return null;\n/* */ }\n/* */ }\n/* 94 */ else if (getSlot(1).isItemValid(var5) && !getSlot(1).getHasStack()) {\n/* */ \n/* 96 */ if (!mergeItemStack(var5, 1, 2, false))\n/* */ {\n/* 98 */ return null;\n/* */ }\n/* */ }\n/* 101 */ else if (getSlot(0).isItemValid(var5)) {\n/* */ \n/* 103 */ if (!mergeItemStack(var5, 0, 1, false))\n/* */ {\n/* 105 */ return null;\n/* */ }\n/* */ }\n/* 108 */ else if (this.field_111243_a.getSizeInventory() <= 2 || !mergeItemStack(var5, 2, this.field_111243_a.getSizeInventory(), false)) {\n/* */ \n/* 110 */ return null;\n/* */ } \n/* */ \n/* 113 */ if (var5.stackSize == 0) {\n/* */ \n/* 115 */ var4.putStack(null);\n/* */ }\n/* */ else {\n/* */ \n/* 119 */ var4.onSlotChanged();\n/* */ } \n/* */ } \n/* */ \n/* 123 */ return var3;\n/* */ }", "private static String[] placeInBag(String item, String[] inventory){\r\n for(int i=0; i<inventory.length; i++){\r\n if(inventory[i].equals(\"\")){\r\n inventory[i] = item;\r\n break;\r\n }\r\n }\r\n return inventory;\r\n }", "public void swap (int index1, int index2)\n {\n if(index1 >= 0 && index2 >= 0\n && index1 < (stocks.size())\n && index2 < (stocks.size()))\n {\n Stock temp = stocks.get(index1);\n Stock second = stocks.set(index1, stocks.get(index2));\n stocks.set(index2, temp);\n }\n }", "public ItemStack transferStackInSlot(EntityPlayer par1EntityPlayer, int par2)\n {\n ItemStack itemstack = null;\n Slot slot = (Slot)this.inventorySlots.get(par2);\n\n if (slot != null && slot.getHasStack())\n {\n ItemStack itemstack1 = slot.getStack();\n itemstack = itemstack1.copy();\n\n if (par2 == 0)\n {\n if (!this.mergeItemStack(itemstack1, 9, 45, true))\n {\n return null;\n }\n\n slot.onSlotChange(itemstack1, itemstack);\n }\n else if (par2 >= 1 && par2 < 5)\n {\n if (!this.mergeItemStack(itemstack1, 9, 45, false))\n {\n return null;\n }\n }\n else if (par2 >= 5 && par2 < 9)\n {\n if (!this.mergeItemStack(itemstack1, 9, 45, false))\n {\n return null;\n }\n }\n else if (itemstack.getItem() instanceof ItemArmor && !((Slot)this.inventorySlots.get(5 + ((ItemArmor)itemstack.getItem()).armorType)).getHasStack())\n {\n int j = 5 + ((ItemArmor)itemstack.getItem()).armorType;\n\n if (!this.mergeItemStack(itemstack1, j, j + 1, false))\n {\n return null;\n }\n }\n else if (par2 >= 9 && par2 < 36)\n {\n if (!this.mergeItemStack(itemstack1, 36, 45, false))\n {\n return null;\n }\n }\n else if (par2 >= 36 && par2 < 45)\n {\n if (!this.mergeItemStack(itemstack1, 9, 36, false))\n {\n return null;\n }\n }\n else if (!this.mergeItemStack(itemstack1, 9, 45, false))\n {\n return null;\n }\n\n if (itemstack1.stackSize == 0)\n {\n slot.putStack((ItemStack)null);\n }\n else\n {\n slot.onSlotChanged();\n }\n\n if (itemstack1.stackSize == itemstack.stackSize)\n {\n return null;\n }\n\n slot.onPickupFromSlot(par1EntityPlayer, itemstack1);\n }\n\n return itemstack;\n }", "public void setInventorySlotContents(int p_70299_1_, ItemStack p_70299_2_)\n {\n this.inventoryContents[p_70299_1_] = p_70299_2_;\n\n if (p_70299_2_ != null && p_70299_2_.stackSize > this.getInventoryStackLimit())\n {\n p_70299_2_.stackSize = this.getInventoryStackLimit();\n }\n\n this.markDirty();\n }", "@Override\r\n\tpublic void setInventoryItems() {\n\t\t\r\n\t}", "default ItemStack moveOneItemTo(IInventoryComposite dest) {\n return moveOneItemTo(dest, Predicates.alwaysTrue());\n }", "private void moveStack1ToStack2() \n {\n while (!stack1.isEmpty())\n stack2.push(stack1.pop());\n }", "public void testUpdateSlots_NullSlots() throws PersistenceException {\n try {\n dao.updateSlots(null);\n fail(\"IllegalArgumentException expected\");\n } catch (IllegalArgumentException e) {\n // should land here\n }\n }", "@Override\r\n public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_)\r\n {\r\n ItemStack itemstack = null;\r\n Slot slot = (Slot)this.inventorySlots.get(p_82846_2_);\r\n\r\n if (slot != null && slot.getHasStack())\r\n {\r\n ItemStack itemstack1 = slot.getStack();\r\n itemstack = itemstack1.copy();\r\n\r\n if (p_82846_2_ == 2 ||p_82846_2_ == 3 )\r\n {\r\n if (!this.mergeItemStack(itemstack1, 4, 40, true))\r\n {\r\n return null;\r\n }\r\n\r\n slot.onSlotChange(itemstack1, itemstack);\r\n }\r\n else if (p_82846_2_ != 1 && p_82846_2_ != 0)\r\n {\r\n \r\n if (p_82846_2_ >= 4 && p_82846_2_ < 31)\r\n {\r\n if (!this.mergeItemStack(itemstack1, 31, 40, false))\r\n {\r\n return null;\r\n }\r\n }\r\n else if (p_82846_2_ >= 31 && p_82846_2_ < 40 && !this.mergeItemStack(itemstack1, 4, 31, false))\r\n {\r\n return null;\r\n }\r\n }\r\n else if (!this.mergeItemStack(itemstack1, 4, 40, false))\r\n {\r\n return null;\r\n }\r\n\r\n if (itemstack1.stackSize == 0)\r\n {\r\n slot.putStack((ItemStack)null);\r\n }\r\n else\r\n {\r\n slot.onSlotChanged();\r\n }\r\n\r\n if (itemstack1.stackSize == itemstack.stackSize)\r\n {\r\n return null;\r\n }\r\n\r\n slot.onPickupFromSlot(p_82846_1_, itemstack1);\r\n }\r\n\r\n return itemstack;\r\n }", "private void swap(int pos1, int pos2) {\n\t\tE temp = apq.get(pos1);\n\t\tapq.set(pos1, apq.get(pos2));\n\t\tapq.set(pos2, temp);\n\n\t\tlocator.set(apq.get(pos1), pos1);\n\t\tlocator.set(apq.get(pos2), pos2);\n\t}", "public void swapLocation(Card firstCard, Card secondCard){\n //Check if origX is -1, meaning the computer made the move. If it is populate the\n //original cards values\n if(origX == -1){\n origX = secondCard.getXVal();\n origY = secondCard.getYVal();\n origBottomX = secondCard.getBottomX();\n origBottomY = secondCard.getBottomY();\n blankCardTopX = firstCard.getXVal();\n blankCardTopY = firstCard.getYVal();\n blankCardBottomX = firstCard.getBottomX();\n blankCardBottomY = firstCard.getBottomY();\n }\n\n //Set the second cards location to be the first cards\n secondCard.setXVal(blankCardTopX);\n secondCard.setYVal(blankCardTopY);\n secondCard.setBottomX(blankCardBottomX);\n secondCard.setBottomY(blankCardBottomY);\n\n //Set the first cards location to be the second cards\n firstCard.setXVal(origX);\n firstCard.setYVal(origY);\n firstCard.setBottomX(origBottomX);\n firstCard.setBottomY(origBottomY);\n\n //Reset all values to check for the next computer move\n origX = -1;\n origY = -1;\n origBottomX = -1;\n origBottomY = -1;\n blankCardTopX = -1;\n blankCardTopY = -1;\n blankCardBottomX = -1;\n blankCardBottomY = -1;\n\n return;\n }", "public void transferItem(Items item) throws Exception {\n\t\tif (item.getHolder() instanceof Monsters) {\n\t\t\titem.setHolder(null);\n\t\t\tthis.addAnchor(item);\n\t\t}\n\t\telse if (item.getHolder() instanceof Backpacks) {\n\t\t\titem.setHolder(null);\n\t\t\tthis.addAnchor(item);\n\t\t}\n\t\telse\n\t\t\tthrow new Exception(\"The transaction is only possible between monsters and/or backpacks.\");\n\t}", "@Test\r\n public void testUpdateSugarInventory() throws InventoryException {\r\n coffeeMaker.addInventory(\"0\", \"0\", \"5\", \"0\");\r\n String updatedInventory = \"Coffee: 15\\nMilk: 15\\nSugar: 20\\nChocolate: 15\\n\";\r\n assertEquals(updatedInventory, coffeeMaker.checkInventory());\r\n }", "@Test\r\n public void testUpdateMilkInventory() throws InventoryException {\r\n coffeeMaker.addInventory(\"0\", \"5\", \"0\", \"0\");\r\n String updatedInventory = \"Coffee: 15\\nMilk: 20\\nSugar: 15\\nChocolate: 15\\n\";\r\n assertEquals(updatedInventory, coffeeMaker.checkInventory());\r\n }", "@Override\n\tpublic void setInventorySlotContents(int p_70299_1_, ItemStack p_70299_2_) {\n\t\tfield_145900_a[p_70299_1_] = p_70299_2_;\n\n\t\tif (p_70299_2_ != null\n\t\t\t\t&& p_70299_2_.stackSize > getInventoryStackLimit()) {\n\t\t\tp_70299_2_.stackSize = getInventoryStackLimit();\n\t\t}\n\t}", "private void exchangeCards(int i, int j){\r\n\t Card temp = cards[i];\r\n\t cards[i] = cards[j];\r\n\t cards[j] = temp;\r\n\t}", "protected void handleAutoInsertAsIndividualActions(Player viewer, InventoryState inventoryState, GUISession session, Inventory destInv, InventoryClickEvent shiftClickEvent){\n shiftClickEvent.setCancelled(true); //Cancel the event\n boolean destIsTopInv = shiftClickEvent.getView().getTopInventory().equals(destInv);\n //find an empty slot and try and place it there\n ItemStack toMove = shiftClickEvent.getCurrentItem().clone();\n int totalToMove = toMove.getAmount(); //The total amount trying to be moved\n if(toMove == null || toMove.getType().equals(Material.AIR) || toMove.getAmount() < 1){\n return; //No item to move\n }\n int destSlotNum = -1;\n int moveAmount = toMove.getAmount(); //The amount we can move\n for(int i=0;i<destInv.getSize();i++){ //First try and find a slot that we can stack with\n if(!destIsTopInv && i > 35){ //Moving to bottom (Always Player) inventory, slots outside of 35 are not allowed to be auto-inserted into\n break;\n }\n ItemStack it = destInv.getItem(i);\n if(it != null && !it.getType().equals(Material.AIR)){ //Slot isn't empty, let's try and place it here\n GUIElement inSlot = !destIsTopInv ? null : inventoryState.getElementInSlot(i); //The GUIElement in this slot if dest is the GUI\n if(inSlot == null || inSlot.canAutoInsertIntoSlot(viewer, session)) { //Slot is able to be auto inserted into\n if(it.getAmount() < it.getMaxStackSize() && StackCompatibilityUtil.canStack(it, toMove)){ //They can be stacked together and it's not a full stack\n destSlotNum = i;\n moveAmount = Math.min(moveAmount, it.getMaxStackSize() - it.getAmount()); //Reduce the number to move if moving the current amount would overflow the stack\n break;\n }\n }\n }\n }\n if(destSlotNum == -1){ //If still not found a slot\n for(int i=0;i<destInv.getSize();i++){ //Second try and find an allowed empty slot to try and place into\n if(!destIsTopInv && i > 35){ //Moving to bottom (Always Player) inventory, slots outside of 35 are not allowed to be auto-inserted into\n break;\n }\n ItemStack it = destInv.getItem(i);\n if(it == null || it.getType().equals(Material.AIR)){ //Slot is empty, let's try and place it here\n GUIElement inSlot = !destIsTopInv ? null : inventoryState.getElementInSlot(i); //The GUIElement in this slot if dest is the GUI\n if(inSlot == null || inSlot.canAutoInsertIntoSlot(viewer, session)) {\n destSlotNum = i;\n break;\n }\n }\n }\n }\n toMove.setAmount(moveAmount);\n\n if(destSlotNum >= 0) { //If we have found a destination slot\n //Simulate a place event for here\n ItemStack cursor = shiftClickEvent.getView().getCursor();\n\n if(destIsTopInv) { //If destination is GUI, then simulate placing it\n shiftClickEvent.getView().setCursor(toMove);\n InventoryClickEvent placeEvent = new InventoryClickEvent(shiftClickEvent.getView(), InventoryType.SlotType.CONTAINER, destSlotNum, ClickType.LEFT, InventoryAction.PLACE_ALL);\n handleBukkitEvent(placeEvent, session);\n boolean placed = !placeEvent.isCancelled() || shiftClickEvent.getView().getCursor() == null\n || shiftClickEvent.getView().getCursor().getType().equals(Material.AIR); //If cursor is now cleared or event not cancelled, then item was/should be moved\n shiftClickEvent.getView().setCursor(cursor); //Reset cursor to how it was before we did the shift click\n if(!placeEvent.isCancelled()){\n //Move item as it not being cancelled means it's expected to happen\n destInv.setItem(destSlotNum, toMove); //Make the slot contain the item to move\n }\n if(placed){ //Has been placed into the destination slot, so now clear the source slot of the items we moved\n int newAmount = totalToMove - moveAmount; //Figure out how many are left\n ItemStack remainder = toMove.clone(); //Get the item stack that was moved\n remainder.setAmount(newAmount); //Set the amount to be how many are left\n shiftClickEvent.getView().setItem(shiftClickEvent.getRawSlot(), newAmount < 1 ? null : remainder); //Update in inventory\n }\n }\n else { //Source is GUI, so simulate picking it up\n shiftClickEvent.getView().setCursor(null); //Set the current cursor to nothing, so we can pickup everything available\n //Pickup all the items in the slot\n InventoryClickEvent pickupEvent = new InventoryClickEvent(shiftClickEvent.getView(), shiftClickEvent.getSlotType(), shiftClickEvent.getRawSlot(), ClickType.LEFT, InventoryAction.PICKUP_ALL);\n handleBukkitEvent(pickupEvent, session);\n boolean pickedUp = !pickupEvent.isCancelled() || (shiftClickEvent.getView().getCursor() != null\n && !shiftClickEvent.getView().getCursor().getType().equals(Material.AIR)); //If all the items were picked up\n if(!pickupEvent.isCancelled()){ //If not cancelled we actually have to do the action\n shiftClickEvent.getView().setItem(shiftClickEvent.getRawSlot(), null);\n }\n if(pickedUp){\n //We picked up too much, so put back any needed\n int amtPickedUp = shiftClickEvent.getView().getCursor() == null ? 0 : shiftClickEvent.getView().getCursor().getAmount();\n int toPutBack = amtPickedUp - moveAmount;\n if(toPutBack > 0){ //Put back the extra\n ItemStack toReturn = toMove.clone();\n toReturn.setAmount(toPutBack);\n shiftClickEvent.getView().setCursor(toReturn);\n InventoryClickEvent placeEvent = new InventoryClickEvent(shiftClickEvent.getView(), shiftClickEvent.getSlotType(), shiftClickEvent.getRawSlot(), ClickType.LEFT, InventoryAction.PLACE_ALL);\n handleBukkitEvent(placeEvent, session);\n if(!placeEvent.isCancelled()){\n //Change item as it not being cancelled means it's expected to happen\n shiftClickEvent.getView().setItem(shiftClickEvent.getRawSlot(), toReturn);\n }\n }\n\n //Put the 'picked up' items into the destination inventory\n ItemStack currentItem = destInv.getItem(destSlotNum);\n int currentAmt = currentItem == null || !StackCompatibilityUtil.canStack(toMove, currentItem) ? 0 : currentItem.getAmount();\n int amt = currentAmt + moveAmount; //Add the existing amount and the amount to add\n toMove.setAmount(amt);\n destInv.setItem(destSlotNum, toMove);\n }\n shiftClickEvent.getView().setCursor(cursor); //Reset cursor to how it was before we did the shift click\n }\n\n if(totalToMove > moveAmount){ //If not all of the stack was moved into the GUI, call recursively to try and move the remainder\n InventoryClickEvent newShiftClickEvent = new InventoryClickEvent(shiftClickEvent.getView(), shiftClickEvent.getSlotType(),\n shiftClickEvent.getRawSlot(), shiftClickEvent.getClick(), InventoryAction.MOVE_TO_OTHER_INVENTORY);\n //Call self recursively to move the remainder somewhere\n handleAutoInsertAsIndividualActions(viewer, inventoryState, session, destInv, newShiftClickEvent);\n }\n }\n return;\n }", "@Test\r\n public void testUpdateCoffeeInventory() throws InventoryException {\r\n coffeeMaker.addInventory(\"5\", \"0\", \"0\", \"0\");\r\n String updatedInventory = \"Coffee: 20\\nMilk: 15\\nSugar: 15\\nChocolate: 15\\n\";\r\n assertEquals(updatedInventory, coffeeMaker.checkInventory());\r\n }", "public ItemStack transferStackInSlot(EntityPlayer par1EntityPlayer, int par2)\r\n\t {\r\n\t\t ItemStack itemstack = null;\r\n\t\t Slot slot = (Slot)this.inventorySlots.get(par2);\r\n\r\n\t\t if (slot != null && slot.getHasStack())\r\n\t\t {\r\n\t\t\t ItemStack itemstack1 = slot.getStack();\r\n\t\t\t itemstack = itemstack1.copy();\r\n\r\n\t\t\t if (par2 == 0)\r\n\t\t\t {\r\n\t\t\t\t if (!this.mergeItemStack(itemstack1, 1, 37, true))\r\n\t\t\t\t {\r\n\t\t\t\t\t return null;\r\n\t\t\t\t }\r\n\t\t\t }\r\n\t\t\t else\r\n\t\t\t {\r\n\t\t\t\t if (((Slot)this.inventorySlots.get(0)).getHasStack() || !((Slot)this.inventorySlots.get(0)).isItemValid(itemstack1))\r\n\t\t\t\t {\r\n\t\t\t\t\t return null;\r\n\t\t\t\t }\r\n\r\n\t\t\t\t if (itemstack1.hasTagCompound() && itemstack1.stackSize == 1)\r\n\t\t\t\t {\r\n\t\t\t\t\t ((Slot)this.inventorySlots.get(0)).putStack(itemstack1.copy());\r\n\t\t\t\t\t itemstack1.stackSize = 0;\r\n\t\t\t\t }\r\n\t\t\t\t else if (itemstack1.stackSize >= 1)\r\n\t\t\t\t {\r\n\t\t\t\t\t ((Slot)this.inventorySlots.get(0)).putStack(new ItemStack(itemstack1.itemID, 1, itemstack1.getItemDamage()));\r\n\t\t\t\t\t --itemstack1.stackSize;\r\n\t\t\t\t }\r\n\t\t\t }\r\n\r\n\t\t\t if (itemstack1.stackSize == 0)\r\n\t\t\t {\r\n\t\t\t\t slot.putStack((ItemStack)null);\r\n\t\t\t }\r\n\t\t\t else\r\n\t\t\t {\r\n\t\t\t\t slot.onSlotChanged();\r\n\t\t\t }\r\n\r\n\t\t\t if (itemstack1.stackSize == itemstack.stackSize)\r\n\t\t\t {\r\n\t\t\t\t return null;\r\n\t\t\t }\r\n\r\n\t\t\t slot.onPickupFromSlot(par1EntityPlayer, itemstack1);\r\n\t\t }\r\n\r\n\t\t return itemstack;\r\n\t }", "@Override\n\n\t public ItemStack transferStackInSlot(EntityPlayer par1EntityPlayer, int par2)\n\t {\n\t ItemStack itemstack = null;\n\t Slot slot = (Slot)this.inventorySlots.get(par2);\n\n\t if (slot != null && slot.getHasStack())\n\t {\n\t ItemStack itemstack1 = slot.getStack();\n\t itemstack = itemstack1.copy();\n\n\t if (par2 < this.giftBoxEntity.getSizeInventory())\n\t {\n\t if (!this.mergeItemStack(itemstack1, this.giftBoxEntity.getSizeInventory(), this.inventorySlots.size(), true))\n\t {\n\t return null;\n\t }\n\t }\n\t else if (!this.mergeItemStack(itemstack1, 0, this.giftBoxEntity.getSizeInventory(), false))\n\t {\n\t return null;\n\t }\n\n\t if (itemstack1.stackSize == 0)\n\t {\n\t slot.putStack((ItemStack)null);\n\t }\n\t else\n\t {\n\t slot.onSlotChanged();\n\t }\n\t }\n\n\t return itemstack;\n\t }", "private boolean processChestDrop(String fromType, String toType, Inventory inventFrom, Inventory inventTo, String source, String target, Item toMove, Item toSwap){\n\t\tif (source.startsWith(fromType) && target.startsWith(toType)){\n\t\t\tif (toSwap == null){\n\t\t\t\tinventFrom.removeItem(toMove);\n\t\t\t\tinventTo.addDirect(toMove);\n\n\t\t\t\ttoMove.setInventoryPosition(target);\n\n\t\t\t\t// network\n\t\t\t\tfor (GUIObserver g : observers) {\n\t\t\t\t\tg.onItemTransfer(\n\t\t\t\t\t\t\tinventFrom,\n\t\t\t\t\t\t\tinventTo,\n\t\t\t\t\t\t\ttoMove);\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\n\t\tif (source.startsWith(fromType) && target.startsWith(fromType)){\n\t\t\treturn inventToInvent(source, target, toMove, toSwap);\n\t\t}\n\t\treturn false;\n\t}", "@Override\n\tpublic void editInventory(Inventory inventory) {\n\t\tinventoryDao.save(inventory);\n\t}", "private void swap(int index1, int index2) {\n E element1 = getElement(index1);\n E element2 = getElement(index2);\n setElement(index2, element1);\n setElement(index1, element2);\n }", "public static void bankInventoryAndEquipment(Player player) {\n\t\tplayer.bankIsFullWhileUsingPreset = false;\n\t\tBankButtons.depositInventoryItems(player, false);\n\t\tBankButtons.depositWornItems(player, false, false, false);\n\t}", "@Override\r\n public ItemStack transferStackInSlot(EntityPlayer par1EntityPlayer, int par2)\r\n {\r\n\t\tItemStack stack = null;\r\n Slot slot = (Slot)this.inventorySlots.get(par2);\r\n\r\n if (slot != null && slot.getHasStack()) {\r\n ItemStack stack1 = slot.getStack();\r\n stack = stack1.copy();\r\n\r\n if (par2 == 0) {\r\n if (!this.mergeItemStack(stack1, 10, 46, true)) {\r\n return null;\r\n }\r\n slot.onSlotChange(stack1, stack);\r\n }\r\n else if (par2 >= 10 && par2 < 37) {\r\n if (!this.mergeItemStack(stack1, 37, 46, false)) {\r\n return null;\r\n }\r\n }\r\n else if (par2 >= 37 && par2 < 46) {\r\n if (!this.mergeItemStack(stack1, 10, 37, false)) {\r\n return null;\r\n }\r\n }\r\n else if (!this.mergeItemStack(stack1, 10, 46, false)) {\r\n return null;\r\n }\r\n\r\n if (stack1.stackSize == 0) {\r\n slot.putStack((ItemStack)null);\r\n }\r\n else {\r\n slot.onSlotChanged();\r\n }\r\n\r\n if (stack1.stackSize == stack.stackSize) {\r\n return null;\r\n }\r\n\r\n slot.onPickupFromSlot(par1EntityPlayer, stack1);\r\n }\r\n\r\n return stack;\r\n }", "@Override\n\tpublic void swap(int pos1, int pos2) {\n\t}", "@Override\r\n\tpublic ItemStack transferStackInSlot(EntityPlayer playerIn, int index)\r\n {\r\n ItemStack itemstack = ItemStackTools.getEmptyStack();\r\n Slot slot = this.inventorySlots.get(index);\r\n\r\n if (slot != null && slot.getHasStack())\r\n {\r\n ItemStack itemstack1 = slot.getStack();\r\n itemstack = itemstack1.copy();\r\n\r\n if (index == 0)\r\n {\r\n if (!this.mergeItemStack(itemstack1, 10, 46, false))\r\n {\r\n return ItemStackTools.getEmptyStack();\r\n }\r\n\r\n slot.onSlotChange(itemstack1, itemstack);\r\n }\r\n else if (index >= 10 && index < 37)\r\n {\r\n if (!this.mergeItemStack(itemstack1, 37, 46, false))\r\n {\r\n return ItemStackTools.getEmptyStack();\r\n }\r\n }\r\n else if (index >= 37 && index < 46)\r\n {\r\n if (!this.mergeItemStack(itemstack1, 10, 37, false))\r\n {\r\n return ItemStackTools.getEmptyStack();\r\n }\r\n }\r\n else if (!this.mergeItemStack(itemstack1, 10, 46, false))\r\n {\r\n return ItemStackTools.getEmptyStack();\r\n }\r\n\r\n if (ItemStackTools.isEmpty(itemstack1))\r\n {\r\n slot.putStack(ItemStackTools.getEmptyStack());\r\n }\r\n else\r\n {\r\n slot.onSlotChanged();\r\n }\r\n\r\n if (ItemStackTools.getStackSize(itemstack1) == ItemStackTools.getStackSize(itemstack))\r\n {\r\n return ItemStackTools.getEmptyStack();\r\n }\r\n\r\n slot.onTake(playerIn, itemstack1);\r\n }\r\n\r\n return itemstack;\r\n }", "public void replaceBooks(List<Book> newItems)\r\n\t{\r\n\t\tList<Book> oldValue = items;\r\n\t\titems = newItems;\r\n\t\tfirePropertyChange(\"books\", oldValue, items);\r\n\t\ttry {\r\n\t\t\tfirePropertyChange(\"itemsCount\", oldValue.size(), items.size());\r\n\t\t} catch(NullPointerException npe) {\r\n\t\t\tfirePropertyChange(\"itemsCount\", 0, items.size());\r\n\t\t}\r\n\t}", "public void updateInventory ( ) {\n\t\texecute ( handle -> handle.updateInventory ( ) );\n\t}", "private boolean inventToInvent(String source, String target, Item toMove, Item toSwap){\n\t\tif (toSwap == null){\n\t\t\ttoMove.setInventoryPosition(target);\n\t\t\treturn true;\n\t\t}\n\t\telse if (source.equals(target)){\n\t\t\treturn false;\n\t\t}\n\t\telse{\n\t\t\tElement toSwapDrag = nifty.getScreen(\"hud\").findElementByName(\"ItemVal\"+toSwap.getId());\n\t\t\tcleanRemove(toSwapDrag);\n\t\t\tscreenManager.getInventoryManager().addItemInPos(toSwap, toMove.getInventoryPosition());\n\t\t\ttoMove.setInventoryPosition(target);\n\t\t\treturn true;\n\t\t}\n\t}", "private void swap(int index1, int index2) {\n \t\tNode node1 = getNode(index1);\n \t\tNode node2 = getNode(index2);\n \t\tthis.contents.set(index1, node2);\n \t\tthis.contents.set(index2, node1);\n \t}", "void updateInventory(String busNumber, String tripDate, int inventory) throws NotFoundException;", "public Item swapItem(Item i){\r\n if(size()!=1) throw new IllegalStateException(\"Trying to swap item of\"\r\n + \"large container\");\r\n add(i);\r\n return remove(0);\r\n }", "@Override\n\tpublic void update(Inventory inventory) throws Exception {\n\t\tInventory oldInventory = inventoryDao.get(inventory.getUuid());\n\t\toldInventory.setStoreuuid(inventory.getStoreuuid());\n\t\toldInventory.setGoodsuuid(inventory.getGoodsuuid());\n\t\toldInventory.setNum(inventory.getNum());\n\t\toldInventory.setType(inventory.getType());\n\t\toldInventory.setRemark(inventory.getRemark());\n\t}", "public boolean accept(Droppable dropSource, Draggable dragged, Droppable dropTarget) {\n\t\ttry{\n\t\t\t//assess the item and route to appropriate helper method\n\t\t\tif (!currentElementId.startsWith(\"ItemVal\")) return false;\n\t\t\tString target = dropTarget.getId();\n\t\t\tItem swapItem = fullSearch(target);\n\n\t\t\t//Within the inventory\n\t\t\tItem inventItem = findItemById(currentElementId.substring(7),screenManager.getInventoryManager().getPlayer().getContainerInventory());\n\t\t\tif (inventItem != null){\n\t\t\t\tString source = inventItem.getInventoryPosition();\n\t\t\t\tif (checkInception(inventItem,target))return false;\n\t\t\t\treturn (processInventDrop(source, target, inventItem, swapItem));\n\t\t\t}\n\n\t\t\t//Within a chest\n\t\t\tinventItem = findItemById(currentElementId.substring(7),screenManager.getInventoryManager().getOpenWorldChest());\n\t\t\tif (inventItem != null ){\n\t\t\t\tString source = inventItem.getInventoryPosition();\n\t\t\t\tif (checkInception(inventItem,target))return false;\n\t\t\t\treturn (processChestDrop(\"Chest\",\"Invent\",screenManager.getInventoryManager().getOpenWorldChest(),\n\t\t\t\t\t\tscreenManager.getInventoryManager().getPlayer().getContainerInventory(),source, target, inventItem, swapItem));\n\t\t\t}\n\n\t\t\t//Within a container\n\t\t\tinventItem = findItemById(currentElementId.substring(7),((AbstractContainerItem)openContainer).getContainerInventory());\n\t\t\tif (inventItem == null)return false;\n\t\t\tif (inventItem.getWeight()>30){\n\t\t\t\tdisplayMessage(\"Item too heavy to be placed in that container\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tString source = inventItem.getInventoryPosition();\n\t\t\tif (checkInception(inventItem,target))return false;\n\t\t\treturn (processChestDrop(\"ContPos\",\"Invent\",inventItem.getInventory(),\n\t\t\t\t\tscreenManager.getInventoryManager().getPlayer().getContainerInventory(),source, target, inventItem, swapItem));\n\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn false;\n\t}", "public void setList(ArrayList<Item> inventory) {\r\n\t\tthis.inventory = inventory;\r\n\t}", "public void testInversePutItems()\r\n throws Exception\r\n {\r\n try\r\n {\r\n SCOMapTests.checkPutItems(pmf,\r\n HashMap2.class,\r\n HashMap2Item.class);\r\n }\r\n finally\r\n {\r\n clean(HashMap2.class);\r\n clean(HashMap2Item.class);\r\n }\r\n }", "public void consumeInputs() {\n\t\tgetInputs().removeFrom(getInventory());\n\t}", "private void swap(byte[] bytes, int pos1, int pos2) {\n \t\tbyte temp = bytes[pos1];\n \t\tbytes[pos1] = bytes[pos2];\n \t\tbytes[pos2] = temp;\n \t}", "@Test\r\n public void testUpdateChocolateInventory() throws InventoryException {\r\n coffeeMaker.addInventory(\"0\", \"0\", \"0\", \"5\");\r\n String updatedInventory = \"Coffee: 15\\nMilk: 15\\nSugar: 15\\nChocolate: 20\\n\";\r\n assertEquals(updatedInventory, coffeeMaker.checkInventory());\r\n }", "public void sortInventory() {\n int i = 0;\n //update all the the button icons with our inventory for if the inventory is less than full (10 items)\n for (; i < inventory.items.size(); i++) {\n //set the button to display the item in the inventory\n buttonsArray[i].setType(inventory.items.get(i).type);\n }\n //clears the remaining items in the inventory if the inventory has less than 10 items\n for (; i < 10; i++) {\n //set any button in the inventory panel to empty if there is not item in that inventory slot\n buttonsArray[i].setType(null);\n }\n\n this.parent.itemsPanel.updateItems();\n }", "public void takeItemsFromChest() {\r\n currentRoom = player.getCurrentRoom();\r\n for (int i = 0; i < currentRoom.getChest().size(); i++) {\r\n player.addToInventory(currentRoom.getChest().get(i));\r\n currentRoom.getChest().remove(i);\r\n }\r\n\r\n }", "public ItemStack transferStackInSlot(EntityPlayer playerIn, int index) {\r\n ItemStack itemstack = null;\r\n Slot slot = (Slot) this.inventorySlots.get(index);\r\n\r\n if (slot != null && slot.getHasStack()) {\r\n ItemStack itemstack1 = slot.getStack();\r\n itemstack = itemstack1.copy();\r\n\r\n if (index == 0) {\r\n if (!this.mergeItemStack(itemstack1, this.inventoryHandler.getSlots(), this.inventorySlots.size(), true)) {\r\n return null;\r\n }\r\n\r\n slot.onSlotChange(itemstack1, itemstack);\r\n } else if (index >= 1 && index < this.inventorySlots.size()) {\r\n if (!this.mergeItemStack(itemstack1, this.inventorySlots.size() - 9, this.inventorySlots.size(), false)) {\r\n return null;\r\n }\r\n } else if (!this.mergeItemStack(itemstack1, this.inventoryHandler.getSlots(), this.inventorySlots.size(), false)) {\r\n return null;\r\n }\r\n\r\n if (itemstack1.stackSize == 0) {\r\n slot.putStack((ItemStack) null);\r\n } else {\r\n slot.onSlotChanged();\r\n }\r\n\r\n if (itemstack1.stackSize == itemstack.stackSize) {\r\n return null;\r\n }\r\n\r\n slot.onPickupFromSlot(playerIn, itemstack1);\r\n }\r\n\r\n return itemstack;\r\n }", "@Override\n public void setInventorySlotContents(int index, @Nullable ItemStack stack1) {\n markDirty();\n int flag = 1;\n if (null == stack) {\n stack = stack1.copy();\n stack1.stackSize = 0;\n flag = 3;\n } else {\n int limit = Config.Feeder.InvSize - stack.stackSize;\n if (stack1.stackSize > limit) {\n stack.stackSize += limit;\n stack1.stackSize -= limit;\n } else {\n stack.stackSize += stack1.stackSize;\n stack1.stackSize = 0;\n }\n }\n IBlockState state = worldObj.getBlockState(getPos());\n worldObj.notifyBlockUpdate(getPos(), state, state, flag);\n }", "public void swap() {\n\t\tCode.put(Code.dup_x1);\n\t\tCode.put(Code.pop);\n\t}", "private void actualizarEnemigosItems() {\n if(estadoMapa== EstadoMapa.RURAL || estadoMapa== EstadoMapa.RURALURBANO ){\n moverCamionetas();\n moverAves();\n }\n if(estadoMapa== EstadoMapa.URBANO || estadoMapa == EstadoMapa.URBANOUNIVERSIDAD){\n moverCarroLujo();\n moverAves();\n }\n if(estadoMapa== EstadoMapa.UNIVERSIDAD){\n moverCarritoGolf();\n moverAves();\n }\n if (estadoMapa == EstadoMapa.SALONES){\n moverLamparas();\n moverSillas();\n }\n actualizaPuntuacion();\n moverTareas();\n moverItemCorazon();\n verificarColisiones();\n verificarMuerte();\n moverItemRayo();\n /*\n IMPLEMENTAR\n\n //moverPajaro();\n //etc\n */\n }", "public void useItem(OutputStreamWriter out, InputStreamReader newIn) {\r\n InputStreamReader instream = newIn;\r\n BufferedReader in = new BufferedReader(instream);\r\n boolean equipped = false;\r\n if (this.player.getInventory().isEmpty()) {\r\n try {\r\n out.write(\"You have nothing in your inventory you can use..\" + System.lineSeparator());\r\n } catch (IOException ex) {\r\n Logger.getLogger(Game.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n } else {\r\n while (!equipped) {\r\n try {\r\n out.write(this.getPlayerInventory());\r\n out.write(System.getProperty(\"line.separator\"));\r\n out.write(\"Choose an item by pressing a number: \");\r\n out.write(System.getProperty(\"line.separator\"));\r\n out.flush();\r\n try {\r\n int itemNumber = Integer.parseInt(in.readLine());\r\n if (itemNumber >= player.getInventory().size() || itemNumber < 0) {\r\n out.write(\"You do not have that item...\");\r\n out.write(System.getProperty(\"line.separator\"));\r\n out.flush();\r\n } else {\r\n if (player.getInventory().get(itemNumber).getItemType() == 3 || player.getInventory().get(itemNumber).getItemType() == 4) {\r\n out.write(player.useItem(itemNumber));\r\n equipped = true;\r\n out.write(System.getProperty(\"line.separator\"));\r\n out.flush();\r\n } else {\r\n out.write(\"Choose between slot 1 and slot 2 by pressing 1 or 2: \");\r\n out.write(System.getProperty(\"line.separator\"));\r\n out.flush();\r\n int slotNumber = Integer.parseInt(in.readLine());\r\n while (slotNumber != 1 && slotNumber != 2) {\r\n out.write(\"You have to choose between slot 1 and slot 2\" + System.lineSeparator());\r\n out.flush();\r\n slotNumber = Integer.parseInt(in.readLine());\r\n }\r\n out.write(player.equip(itemNumber, slotNumber));\r\n equipped = true;\r\n out.write(System.getProperty(\"line.separator\"));\r\n out.flush();\r\n }\r\n }\r\n } catch (NumberFormatException ex) {\r\n out.write(\"You have to enter a number. Please try again!\" + System.lineSeparator());\r\n out.write(System.getProperty(\"line.separator\"));\r\n out.flush();\r\n equipped = true;\r\n }\r\n } catch (IOException ex) {\r\n Logger.getLogger(Game.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n }\r\n }", "private Item mergeItem(Item newItem, List<Item> items) throws ItemException{\r\n \t\tfor (Item item2 : items) {\r\n \t\t\tif (!item2.isBought() && item2.getName().equals(newItem.getName())) {\r\n\t\t\t\t// sum price\r\n\t\t\t\titem2.setPrice(newItem.getPrice().add(item2.getPrice()));\r\n \t\t\t\tif (newItem.getUnit() == null && item2.getUnit() == null) {\r\n \t\t\t\t\t// Both have no unit --> item has now 2 pieces.\r\n \t\t\t\t\titem2.setQuantity(BigDecimal.valueOf(2), ItemUnit.PIECE);\r\n \t\t\t\t\treturn item2;\r\n \t\t\t\t} else if (newItem.getUnit() == null && item2.getUnit() == ItemUnit.PIECE) {\r\n \t\t\t\t\t// new Item has no unit, existing item has PIECE as unit. add one piece to the existing item.\r\n \t\t\t\t\titem2.setQuantity(item2.getQuantity().add(BigDecimal.ONE), ItemUnit.PIECE);\r\n \t\t\t\t\treturn item2;\r\n \t\t\t\t} else if (newItem.getUnit() != null && newItem.getUnit() == item2.getUnit()) {\r\n \t\t\t\t\t// Both have same unit --> add them together\r\n \t\t\t\t\tBigDecimal newQuantity = newItem.getQuantity().add(item2.getQuantity());\r\n \t\t\t\t\titem2.setQuantity(newQuantity, item2.getUnit());\r\n \t\t\t\t\treturn item2; // we want to save only one item.\r\n \t\t\t\t} else if (ItemUnit.MASSES.contains(newItem.getUnit()) && ItemUnit.MASSES.contains(item2.getUnit())) {\r\n \t\t\t\t\t// Both units are masses. Convert it first to grams and then add them.\r\n \t\t\t\t\tBigDecimal mass1 = newItem.getUnit()==ItemUnit.GRAM ? newItem.getQuantity():newItem.getQuantity().multiply(THOUSAND);\r\n \t\t\t\t\tBigDecimal mass2 = item2.getUnit()==ItemUnit.GRAM ? item2.getQuantity():item2.getQuantity().multiply(THOUSAND);\r\n \t\t\t\t\tBigDecimal finalMass = mass1.add(mass2);\r\n \t\t\t\t\tItemUnit unit = ItemUnit.GRAM;\r\n \t\t\t\t\tif (finalMass.compareTo(THOUSAND) > 0){\r\n \t\t\t\t\t\tfinalMass = finalMass.divide(THOUSAND);\r\n \t\t\t\t\t\tunit = ItemUnit.KILO_GRAM;\r\n \t\t\t\t\t}\r\n \t\t\t\t\titem2.setQuantity(finalMass, unit);\r\n \t\t\t\t\treturn item2;\r\n \t\t\t\t} else {\r\n \t\t\t\t\tthrow new ItemException();\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t\treturn newItem;\r\n \t}", "private static <T,S> void swap(List<T> x, List<S> a2, int a, int b) {\n\t\tT t = x.get(a);\n\t\tx.set(a, x.get(b));\n\t\tx.set(b,t);\n\t\tS t2 = a2.get(a);\n\t\ta2.set(a,a2.get(b));\n\t\ta2.set(b,t2);\n\t}", "public void swap( Ingredient array[], int first, int second ){\t\t\n\t\tIngredient hold; // temp variable\n\t\thold = array[ first ];\n\t\tarray[ first ] = array[ second ];\n\t\tarray[ second ] = hold;\n\t}", "public void addItemToInventory(Item ... items){\n this.inventory.addItems(items);\n }", "public void sellProduct(){\n if(quantity > 0)\n this.quantity -= 1;\n else\n throw new IllegalArgumentException(\"Cannot sell \"+ this.model +\" with no inventory\");\n\n }", "@Test\n public void testDecrementInventory() throws Exception {\n int firstDecrement;\n int secondDecrement;\n\n List<VendingItem> items;\n VendingItem twix;\n\n try {\n fillInventoryFileWithTestData(VALID);\n dao.loadItems();\n } catch (VendingMachinePersistenceException ex) {\n }\n\n items = dao.getItems();\n\n assertEquals(1, items.size());\n\n twix = items.get(0);\n\n // firstDecrement = 19\n firstDecrement = twix.decrementStock();\n\n // secondDecrement = 18\n secondDecrement = twix.decrementStock();\n\n assertEquals(1, firstDecrement - secondDecrement);\n }", "public final void mSWAP() throws RecognitionException\n\t{\n\t\ttry\n\t\t{\n\t\t\tfinal int _type = AshvmLexer.SWAP;\n\t\t\tfinal int _channel = BaseRecognizer.DEFAULT_TOKEN_CHANNEL;\n\t\t\t// D:\\\\Programmieren\\\\projects\\\\ashvm\\\\Ashvm.g:753:6: ( 'swap' )\n\t\t\t// D:\\\\Programmieren\\\\projects\\\\ashvm\\\\Ashvm.g:753:8: 'swap'\n\t\t\t{\n\t\t\t\tthis.match(\"swap\");\n\n\t\t\t}\n\n\t\t\tthis.state.type = _type;\n\t\t\tthis.state.channel = _channel;\n\t\t}\n\t\tfinally\n\t\t{\n\t\t}\n\t}", "public void replaceItems(Player player, ItemStack toReplace, ItemStack replacement, boolean exactName, boolean exactLore) {\n // Check if the item you want to replace is null\n if (toReplace == null)\n return;\n\n // Check if the replacement item is null\n if (replacement == null)\n return;\n\n // Loop through the player's inventory\n for (int i = 0; i < player.getInventory().getContents().length; i++) {\n ItemStack item = player.getInventory().getContents()[i];\n // Check if the item is null\n if (item == null)\n continue;\n\n // Check if the item is replaceable in the first place\n if (!isReplaceable(item, toReplace, exactName, exactLore))\n continue;\n\n // Set the item in the inventory to the new replacement\n player.getInventory().setItem(i, replacement);\n }\n }", "private void updateItems()\n\t{\t\n\t\tupdatePizzaTypes(items);\n\t\tupdateSidesTypes(items);\n\t\tupdateDrinksTypes(items);\n\t}", "public boolean updateQuantity(Scanner scanner, boolean buyOrSell){\n if(inventory[0]==null){\n System.out.println(\"Error...could not buy item\");\n return false;\n }\n FoodItem foodItem = new FoodItem();\n boolean valid = false;\n int sellQuantity = 0;\n foodItem.inputCode(scanner);\n int var = alreadyExists(foodItem);\n System.out.println(var);\n if(buyOrSell){\n if(var == -1) {\n System.out.println(\"Error...could not buy item\");\n return false;\n }\n } else{\n if(var == -1) {\n System.out.println(\"Error...could not sell item\");\n return false;\n }\n }\n\n do{\n try {\n if(buyOrSell){\n System.out.print(\"Enter valid quantity to buy: \");\n }else{\n System.out.print(\"Enter valid quantity to sell: \");\n }\n sellQuantity = scanner.nextInt();\n System.out.println(sellQuantity);\n valid = true;\n } catch (InputMismatchException e) {\n System.out.println(\"Invalid entry\");\n scanner.next();\n }\n }while(!valid);\n if(buyOrSell){\n if(sellQuantity > inventory[var].itemQuantityInStock){\n System.out.println(\"Error...could not buy item\");\n return false;\n }else {\n inventory[var].updateItem(sellQuantity);\n }\n }else{\n if(sellQuantity > inventory[var].itemQuantityInStock){\n System.out.println(\"Error...could not sell item\");\n return false;\n }else{\n inventory[var].updateItem(-sellQuantity);\n }\n }\n return true;\n }", "@Nullable\n public ItemStack transferStackInSlot(EntityPlayer playerIn, int index)\n {\n ItemStack itemstack = null;\n Slot slot = (Slot)this.inventorySlots.get(index);\n\n if (slot != null && slot.getHasStack())\n {\n ItemStack itemstack1 = slot.getStack();\n \n if(itemstack1.getItem()==TF2weapons.itemTF2&&itemstack1.getMetadata()==9){\n \t\titemstack1=ItemFromData.getRandomWeapon(playerIn.getRNG(),ItemFromData.VISIBLE_WEAPON);\n \t}\n \telse if(itemstack1.getItem()==TF2weapons.itemTF2&&itemstack1.getMetadata()==10){\n \t\titemstack1=ItemFromData.getRandomWeaponOfClass(\"cosmetic\",playerIn.getRNG(), false);\n \t}\n \n itemstack = itemstack1.copy();\n\n if (index == 0)\n {\n if (!this.mergeItemStack(itemstack1, 10, 46, true))\n {\n return null;\n }\n\n slot.onSlotChange(itemstack1, itemstack);\n }\n else if (index >= 10 && index < 37)\n {\n if (!this.mergeItemStack(itemstack1, 37, 46, false))\n {\n return null;\n }\n }\n else if (index >= 37 && index < 46)\n {\n if (!this.mergeItemStack(itemstack1, 10, 37, false))\n {\n return null;\n }\n }\n else if (!this.mergeItemStack(itemstack1, 10, 46, false))\n {\n return null;\n }\n\n if (itemstack1.stackSize == 0)\n {\n slot.putStack((ItemStack)null);\n }\n else\n {\n slot.onSlotChanged();\n }\n\n if (itemstack1.stackSize == itemstack.stackSize)\n {\n return null;\n }\n\n slot.onPickupFromSlot(playerIn, itemstack1);\n }\n\n return itemstack;\n }", "@Override\n public void moveBetweenShelves(Shelf from, Shelf to, int amount) throws IllegalCupboardException{\n if(from == null || to == null)\n throw new NullPointerException();\n if(amount <= 0)\n throw new IllegalArgumentException();\n\n if(!shelves.contains(from) || !shelves.contains(to))\n throw new NoSuchElementException();\n\n if(from.getCurrentType() == null)\n throw new IllegalCupboardException(\"Trying to remove resources from an empty shelf\");\n\n try{\n from.moveTo(to, from.getCurrentType(), amount);\n }catch(IllegalResourceTransferException e){\n throw new IllegalCupboardException(\"Can't transfer the resources\");\n }\n\n //if the new configuration is not valid, initial state is restored and the IllegalCupboardException is thrown\n if(!isValid()){\n try{\n to.moveTo(from, to.getCurrentType(), amount);\n }catch(IllegalResourceTransferException e){\n throw new IllegalArgumentException();\n }\n throw new IllegalCupboardException(\"Cupboard configuration would not be valid\");\n }\n }", "@SuppressWarnings(\"unused\")\n\tpublic void shift() {\n\t\tint totalItems = 0;\n\t\tint highestSlot = 0;\n\t\tfor (int i = 0; i < summonedFamiliar.storeCapacity; i++) {\n\t\t\tif (burdenedItems[i] != 0) {\n\t\t\t\ttotalItems++;\n\t\t\t\tif (highestSlot <= i) {\n\t\t\t\t\thighestSlot = i;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor (int i = 0; i <= highestSlot; i++) {\n\t\t\tif (burdenedItems[i] == 0) {\n\t\t\t\tboolean stop = false;\n\t\t\t\tfor (int k = i; k <= highestSlot; k++) {\n\t\t\t\t\tif (burdenedItems[k] != 0 && !stop) {\n\t\t\t\t\t\tint spots = k - i;\n\t\t\t\t\t\tfor (int j = k; j <= highestSlot; j++) {\n\t\t\t\t\t\t\tburdenedItems[j - spots] = burdenedItems[j];\n\t\t\t\t\t\t\tstop = true;\n\t\t\t\t\t\t\tburdenedItems[j] = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public ItemStack transferStackInSlot(EntityPlayer playerIn, int index) {\n ItemStack var3 = null;\n Slot var4 = (Slot) this.inventorySlots.get(index);\n\n if (var4 != null && var4.getHasStack()) {\n ItemStack var5 = var4.getStack();\n var3 = var5.copy();\n\n if ((index < 0 || index > 2) && index != 3) {\n if (!this.theSlot.getHasStack() && this.theSlot.isItemValid(var5)) {\n if (!this.mergeItemStack(var5, 3, 4, false)) {\n return null;\n }\n } else if (ContainerBrewingStand.Potion.canHoldPotion(var3)) {\n if (!this.mergeItemStack(var5, 0, 3, false)) {\n return null;\n }\n } else if (index >= 4 && index < 31) {\n if (!this.mergeItemStack(var5, 31, 40, false)) {\n return null;\n }\n } else if (index >= 31 && index < 40) {\n if (!this.mergeItemStack(var5, 4, 31, false)) {\n return null;\n }\n } else if (!this.mergeItemStack(var5, 4, 40, false)) {\n return null;\n }\n } else {\n if (!this.mergeItemStack(var5, 4, 40, true)) {\n return null;\n }\n\n var4.onSlotChange(var5, var3);\n }\n\n if (var5.stackSize == 0) {\n var4.putStack((ItemStack) null);\n } else {\n var4.onSlotChanged();\n }\n\n if (var5.stackSize == var3.stackSize) {\n return null;\n }\n\n var4.onPickupFromSlot(playerIn, var5);\n }\n\n return var3;\n }", "public static boolean compareContainers(ItemStack[] oldContainer, ItemStack[] newContainer) {\n if (oldContainer.length != newContainer.length) {\n return false;\n }\n\n for (int i = 0; i < oldContainer.length; i++) {\n ItemStack oldItem = oldContainer[i];\n ItemStack newItem = newContainer[i];\n\n if (oldItem == null && newItem == null) {\n continue;\n }\n\n if (oldItem == null || !oldItem.equals(newItem)) {\n return false;\n }\n }\n\n return true;\n }", "public void swapRows(int pos1, int pos2) {\n\n for (int i = 0; i < columns.length; i++) {\n Object Obj1 = columns[i].getRow(pos1);\n columns[i].setRow(columns[i].getRow(pos2), pos1);\n columns[i].setRow(Obj1, pos2);\n\n // swap missing values.\n boolean missing1 = columns[i].isValueMissing(pos1);\n boolean missing2 = columns[i].isValueMissing(pos2);\n columns[i].setValueToMissing(missing2, pos1);\n columns[i].setValueToMissing(missing1, pos2);\n\n }\n }", "protected void unLockItems() throws NbaBaseException {\n Iterator it = getMatchingWorkItems().iterator();\n NbaDst nbaDst; \n\t\t//NBA213 deleted code\n\t\t//process transactions\n\t\twhile (it.hasNext()) {\n\t\t\tnbaDst = (NbaDst) it.next();\n\t\t\tunlockWork(getUser(), nbaDst); //NBA213\n\t\t}\n\t\tit = getCaseWorkItems().values().iterator();\n\t\t//process cases\n\t\twhile (it.hasNext()) {\n\t\t\tnbaDst = (NbaDst) it.next();\n\t\t\tunlockWork(getUser(), nbaDst); //NBA213\n\t\t}\n\t\t//NBA213 deleted code\n }", "private void arrangeInputJob(Job inputJob, List<ItemMovement> itemMovements) {\n\n //overige inputjobs afwerken\n int row = heightList.indexOf(Collections.max(heightList));\n Slot destination = GeneralMeasures.zoekLeegSlot(new HashSet<>(grondSlots.get(row).values()));\n\n //De verplaatsingen nodig om de outputjob te vervolledigen en alle sloten updaten met hun huidige items\n inputJob.getPickup().getSlot().setItem(inputJob.getItem());\n itemMovements.addAll(GeneralMeasures.createMoves(pickupPlaceDuration,gantries.get(0),inputJob.getPickup().getSlot(), destination));\n update(Operatie.VerplaatsNaarBinnen, destination,inputJob.getPickup().getSlot());\n }", "public void moveTo(Holder newHolder) throws IllegalArgumentException, IllegaleToestandsUitzondering {\r\n\t\tHolder oldHolder = getHolder();\r\n\t\tif(newHolder == null)\r\n\t\t\tthrow new IllegalArgumentException();\r\n\t\tif(!newHolder.canHoldItem(this) || !isValidHolder(newHolder)) { \r\n\t\t\tthrow new IllegaleToestandsUitzondering(\"the given holder isn't valid for this item\");\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tsetHolder(newHolder);\r\n\t\t\toldHolder.removeItem(this);\r\n\t\t\tnewHolder.addItem(this); \r\n\t\t} catch (IllegaleToestandsUitzondering e) {\r\n\t\t\treset(oldHolder);\r\n\t\t\tthrow e;\r\n\t\t} catch (IllegalArgumentException e) {\r\n\t\t\treset(oldHolder);\r\n\t\t\tthrow e;\r\n\t\t} \r\n\t}", "public void dropItem(int x, int y, int i) {\n \n ParentItem item = getInventory()[i];\n \n if (item != null) {\n \n inventory.removeItem(i);\n \n item.putOnBoard(x, y, gameboard);\n \n }\n \n }", "void updateInventory() {\n\n // make sure there isn't already an inventory record\n MrnInventory checkInv[] =\n new MrnInventory(survey.getSurveyId()).get();\n\n if (dbg3) {\n System.out.println(\"<br>updateInventory: survey.getSurveyId() = \" +\n survey.getSurveyId());\n System.out.println(\"<br>updateInventory: inventory = \" + inventory);\n System.out.println(\"<br>updateInventory: checkInv[0] = \" +\n checkInv[0]);\n System.out.println(\"<br>updateInventory: checkInv.length = \" +\n checkInv.length);\n } // if (dbg3)\n\n if (checkInv.length > 0) {\n\n //MrnInventory updInventory = new MrnInventory();\n\n if (dbg3) {\n System.out.println(\"<br>updateInventory: dateMin = \" + dateMin);\n System.out.println(\"<br>updateInventory: dateMax = \" + dateMax);\n System.out.println(\"<br>updateInventory: latitudeMin = \" + latitudeMin);\n System.out.println(\"<br>updateInventory: latitudeMax = \" + latitudeMax);\n System.out.println(\"<br>updateInventory: longitudeMin = \" + longitudeMin);\n System.out.println(\"<br>updateInventory: longitudeMax = \" + longitudeMax);\n } // if (dbg3)\n\n // check dates\n if (MrnInventory.DATENULL.equals(checkInv[0].getDateStart()) ||\n dateMin.before(checkInv[0].getDateStart())) {\n inventory.setDateStart(dateMin);\n\n } // if (dateMin.before(checkInv[0].getDateStart()))\n if (MrnInventory.DATENULL.equals(checkInv[0].getDateEnd()) ||\n dateMax.after(checkInv[0].getDateEnd())) {\n inventory.setDateEnd(dateMax);\n } // if (dateMax.after(checkInv[0].getDateEnd()))\n\n // check area\n if ((MrnInventory.FLOATNULL == checkInv[0].getLatNorth()) ||\n (latitudeMin < checkInv[0].getLatNorth())) {\n inventory.setLatNorth(latitudeMin);\n } // if (latitudeMin < checkInv[0].getLatNorth())\n if ((MrnInventory.FLOATNULL == checkInv[0].getLatSouth()) ||\n (latitudeMax > checkInv[0].getLatSouth())) {\n inventory.setLatSouth(latitudeMax);\n } // if (latitudeMin < checkInv[0].getLatSouth())\n if ((MrnInventory.FLOATNULL == checkInv[0].getLongWest()) ||\n (longitudeMin < checkInv[0].getLongWest())) {\n inventory.setLongWest(longitudeMin);\n } // if (longitudeMin < checkInv[0].getlongWest())\n if ((MrnInventory.FLOATNULL == checkInv[0].getLongEast()) ||\n (longitudeMax > checkInv[0].getLongEast())) {\n inventory.setLongEast(longitudeMax);\n } // if (longitudeMax < checkInv[0].getlongEast())\n\n // check others\n if (\"\".equals(checkInv[0].getCruiseName(\"\"))) {\n inventory.setCruiseName(inventory.getCruiseName());\n } // if (\"\".equals(checkInv[0].getCruiseName()))\n if (\"\".equals(checkInv[0].getProjectName(\"\"))) {\n inventory.setProjectName(inventory.getProjectName());\n } // if (\"\".equals(checkInv[0].getProjectName()))\n\n inventory.setDataRecorded(\"Y\");\n\n MrnInventory whereInventory =\n new MrnInventory(survey.getSurveyId());\n\n try {\n //whereInventory.upd(updInventory);\n whereInventory.upd(inventory);\n } catch(Exception e) {\n System.err.println(\"updateInventory: upd inventory = \" + inventory);\n System.err.println(\"updateInventory: upd whereInventory = \" + whereInventory);\n System.err.println(\"updateStation: upd sql = \" + whereInventory.getUpdStr());\n e.printStackTrace();\n } // try-catch\n if (dbg3) System.out.println(\n \"<br>updateInventory: upd inventory = \" + inventory);\n if (dbg3) System.out.println(\n \"<br>updateInventory: upd whereInventory = \" + whereInventory);\n //if (dbg3)\n System.out.println(\"<br>updateInventory: updSQL = \" + whereInventory.getUpdStr());\n\n\n/* } else {\n inventory.setSurveyId(survey.getSurveyId());\n // defaults\n inventory.setDataCentre(\"SADCO\");\n //inventory.setCountryCode(0); // done in LoadMrnData\n inventory.setTargetCountryCode(0);\n inventory.setStnidPrefix(survey.getInstitute());\n inventory.setDataRecorded(\"Y\");\n\n // from data\n inventory.setDateStart(dateMin);\n inventory.setDateEnd(dateMax);\n inventory.setLatNorth(latitudeMin);\n inventory.setLatSouth(latitudeMax);\n inventory.setLongWest(longitudeMin);\n inventory.setLongEast(longitudeMax);\n\n // from screen - done in LoadMRNData.getArgsFromFile()\n //inventory.setCountryCode(screenInv.getCountryCode());\n //inventory.setPlanamCode(screenInv.getPlanamCode());\n //inventory.setInstitCode(screenInv.getInstitCode());\n //inventory.setCruiseName(screenInv.getCruiseName());\n //inventory.setProjectName(screenInv.getProjectName());\n //inventory.setAreaname(screenInv.getAreaname()); // use as default to show on screen\n //inventory.setDomain(screenInv.getDomain()); // use as default to show on screen\n\n inventory.put();\n*/\n } // if (checkInv.length > 0)\n\n // make sure there isn't already an invStats record\n MrnInvStats checkInvStats[] =\n new MrnInvStats(survey.getSurveyId()).get();\n\n MrnInvStats invStats = new MrnInvStats();\n\n if (checkInvStats.length > 0) {\n\n System.out.println(\"updateInventory: checkInvStats[0] = \" + checkInvStats[0]);\n\n invStats.setStationCnt(\n checkInvStats[0].getStationCnt() + newStationCount); //stationCount\n invStats.setWeatherCnt(\n checkNull(checkInvStats[0].getWeatherCnt()) + weatherCount);\n\n if (dataType == CURRENTS) {\n\n invStats.setWatcurrentsCnt(\n checkNull(checkInvStats[0].getWatcurrentsCnt()) + currentsCount);\n\n } else if (dataType == SEDIMENT) {\n\n System.out.println(\n \"updateInventory: checkInvStats[0].getSedphyCnt(), sedphyCount = \" +\n checkInvStats[0].getSedphyCnt() + \" \" + sedphyCount + \" \" +\n checkNull(checkInvStats[0].getSedphyCnt()));\n System.out.println(\n \"updateInventory: checkInvStats[0].getSedchem1Cnt(), sedchem1Count = \" +\n checkInvStats[0].getSedchem1Cnt() + \" \" + sedchem1Count + \" \" +\n checkNull(checkInvStats[0].getSedchem1Cnt()));\n System.out.println(\n \"updateInventory: checkInvStats[0].getSedchem2Cnt(), sedchem2Count = \" +\n checkInvStats[0].getSedchem2Cnt() + \" \" + sedchem2Count + \" \" +\n checkNull(checkInvStats[0].getSedchem2Cnt()));\n System.out.println(\n \"updateInventory: checkInvStats[0].getSedpol1Cnt(), sedpol1Count = \" +\n checkInvStats[0].getSedpol1Cnt() + \" \" + sedpol1Count + \" \" +\n checkNull(checkInvStats[0].getSedpol1Cnt()));\n System.out.println(\n \"updateInventory: checkInvStats[0].getSedpol2Cnt(), sedpol2Count = \" +\n checkInvStats[0].getSedpol2Cnt() + \" \" + sedpol2Count + \" \" +\n checkNull(checkInvStats[0].getSedpol2Cnt()));\n\n invStats.setSedphyCnt(\n checkNull(checkInvStats[0].getSedphyCnt()) + sedphyCount);\n invStats.setSedchem1Cnt(\n checkNull(checkInvStats[0].getSedchem1Cnt()) + sedchem1Count);\n invStats.setSedchem2Cnt(\n checkNull(checkInvStats[0].getSedchem2Cnt()) + sedchem2Count);\n invStats.setSedpol1Cnt(\n checkNull(checkInvStats[0].getSedpol1Cnt()) + sedpol1Count);\n invStats.setSedpol2Cnt(\n checkNull(checkInvStats[0].getSedpol2Cnt()) + sedpol2Count);\n\n System.out.println(\"updateInventory: invStats = \" + invStats);\n\n\n } else if ((dataType == WATER) || (dataType == WATERWOD)) {\n\n invStats.setWatphyCnt(\n checkNull(checkInvStats[0].getWatphyCnt()) + watphyCount);\n invStats.setWatchem1Cnt(\n checkNull(checkInvStats[0].getWatchem1Cnt()) + watchem1Count);\n invStats.setWatchem2Cnt(\n checkNull(checkInvStats[0].getWatchem2Cnt()) + watchem2Count);\n invStats.setWatchlCnt(\n checkNull(checkInvStats[0].getWatchlCnt()) + watchlCount);\n invStats.setWatnutCnt(\n checkNull(checkInvStats[0].getWatnutCnt()) + watnutCount);\n invStats.setWatpol1Cnt(\n checkNull(checkInvStats[0].getWatpol1Cnt()) + watpol1Count);\n invStats.setWatpol2Cnt(\n checkNull(checkInvStats[0].getWatpol2Cnt()) + watpol2Count);\n\n } // if (dataType == CURRENTS)\n\n MrnInvStats whereInvStats =\n new MrnInvStats(survey.getSurveyId());\n try {\n whereInvStats.upd(invStats);\n } catch(Exception e) {\n System.err.println(\"updateInventory: upd invStats = \" + invStats);\n System.err.println(\"updateInventory: upd whereInvStats = \" + whereInvStats);\n System.err.println(\"updateInventory: upd sql = \" + whereInvStats.getUpdStr());\n e.printStackTrace();\n } // try-catch\n if (dbg3) System.out.println(\"<br>updateInventory: upd invStats = \" +\n invStats);\n\n } else {\n\n invStats.setStationCnt(stationCount);\n invStats.setWeatherCnt(weatherCount);\n\n if (dataType == CURRENTS) {\n\n invStats.setWatcurrentsCnt(currentsCount);\n\n } else if (dataType == SEDIMENT) {\n\n invStats.setSedphyCnt(sedphyCount);\n invStats.setSedchem1Cnt(sedchem1Count);\n invStats.setSedchem2Cnt(sedchem2Count);\n invStats.setSedpol1Cnt(sedpol1Count);\n invStats.setSedpol2Cnt(sedpol2Count);\n\n } else if ((dataType == WATER) || (dataType == WATERWOD)) {\n\n invStats.setWatphyCnt(watphyCount);\n invStats.setWatchem1Cnt(watchem1Count);\n invStats.setWatchem2Cnt(watchem2Count);\n invStats.setWatchlCnt(watchlCount);\n invStats.setWatnutCnt(watnutCount);\n invStats.setWatpol1Cnt(watpol1Count);\n invStats.setWatpol2Cnt(watpol2Count);\n\n } // if (dataType == CURRENTS)\n\n invStats.setSurveyId(survey.getSurveyId());\n try {\n invStats.put();\n } catch(Exception e) {\n System.err.println(\"updateInventory: put invStats = \" + invStats);\n System.err.println(\"updateInventory: put sql = \" + invStats.getInsStr());\n e.printStackTrace();\n } // try-catch\n if (dbg3) System.out.println(\"<br>updateInventory: put invStats = \" +\n invStats);\n } // if (checkInvStats.length > 0)\n\n/* ????\n\n // define the value that should be updated\n MrnInventory updateInv = new MrnInventory();\n updateInv.setDateStart(dateMin);\n\n // define the 'where' clause\n MrnInventory whereInv = new MrnInventory(inventory.getSurveyId());\n\n // do the update\n whereInv.upd(updateInv);\n\n*/\n\n }", "@Override\n public ItemStack transferStackInSlot(EntityPlayer player, int index) {\n ItemStack result = ItemStack.EMPTY;\n Slot slot = inventorySlots.get(index);\n ItemStack stack = slot.getStack();\n if (slot != null && slot.getHasStack()) {\n SlotRange destRange = transferSlotRange(index, stack);\n if (destRange != null) {\n if (index >= destRange.numSlots) {\n result = stack.copy();\n if (!mergeItemStackIntoRange(stack, destRange))\n return ItemStack.EMPTY;\n if (stack.getCount() == 0)\n slot.putStack(ItemStack.EMPTY);\n else\n slot.onSlotChanged();\n }\n else\n player.inventory.addItemStackToInventory(stack);\n }\n }\n return result;\n }", "public void swapRecipes(Cursor newRecipes)\n {\n mCursor = newRecipes;\n notifyDataSetChanged();\n }", "@Test\n\tpublic void invalidEnterShip_2(){\n\t\tShip ship = new Ship(new ShipPart(0,0),new ShipPart(1,1));\n\t\tPlayer p = new Player(0, \"Test\", null, null, null);\n\t\tp.giveItem(new ShipPart(0,0));\n\t\tp.giveItem(new ShipPart(1,1));\n\t\tassertFalse(ship.canEnter(p, null));\n\t}", "public static ItemStack[] duplicateInventory(final ItemStack[] inventory) {\n if (isValidInventory(inventory)) {\n ItemStack[] duplicate = new ItemStack[inventory.length];\n for (int i = 0; i < inventory.length; i++) {\n if (ItemAPI.isValidItem(inventory[i])) {\n duplicate[i] = inventory[i].clone();\n }\n }\n return duplicate;\n }\n return new ItemStack[0];\n }", "public void copyFromSAOItems(SAOItems otherSAO){\n\t\tthis.addEntities(\"S\", otherSAO.getEntities(\"S\"));\n\t\tthis.addEntities(\"O\", otherSAO.getEntities(\"O\"));\n\t\tthis.setSubjectReln(otherSAO.getSubjectReln());\n\t\tthis.checkValid();\n\t}", "@Override\n\tpublic void setInventorySlotContents(int index, ItemStack stack) {\n\t\t\n\t}", "@Override\n public void interactWith(Shop shop, Orientation orientation) {\n if (getOrientation().opposite().equals(orientation)) {\n shop.shop(inventory);\n }\n }", "protected void swapTilesInPlace(int row1, int col1, int row2, int col2) {\r\n int temp = getTile(row1, col1);\r\n state.setTile(row1, col1, getTile(row2, col2));\r\n state.setTile(row2, col2, temp);\r\n }", "public boolean isValidSwap(Coordinates box1, Coordinates box2) {\n\n if (box1.x == -1 || box2.x == -1 || box1.y == -1 || box2.y == -1) return false;\n if (Math.abs(box2.x - box1.x) + Math.abs(box2.y - box1.y) != 1) return false;\n if (gameBoard.getValue(box1) == gameBoard.getValue(box2)) return false;\n\n swap(box1, box2);\n\n // we check that it creates a new alignment\n boolean newAlignment = false;\n for (int i = 0; i < 3; i++) {\n newAlignment |= horizontalAligned(box1.x - i, box1.y);\n newAlignment |= horizontalAligned(box2.x - i, box2.y);\n newAlignment |= verticalAligned(box1.x, box1.y - i);\n newAlignment |= verticalAligned(box2.x, box2.y - i);\n }\n\n // then we cancel the exchange\n swap(box1, box2);\n\n return newAlignment;\n }", "public void initItems() {\n List<Integer> emptySlots = NimbleServer.enchantmentConfig.getEmptySlots();\n for (int i = 0; i < getSize(); i++) {\n if(!(emptySlots.contains(i))) {\n getInventory().setItem(i, getFiller());\n }\n }\n }", "@Override\n\tpublic ItemStack transferStackInSlot(EntityPlayer player, int p_82846_2_)\n\t{\n\t\tItemStack itemstack = null;\n\t\tSlot slot = (Slot)this.inventorySlots.get(p_82846_2_);\n\n\t\tif (slot != null && slot.getHasStack())\n\t\t{\n\t\t\tItemStack stackInSlot = slot.getStack();\n\t\t\titemstack = stackInSlot.copy();\n\n\t\t\t//merges the item into player inventory since its in the tileEntity\n\t\t\tif (p_82846_2_ <= 1) {\n\t\t\t\tif (!this.mergeItemStack(stackInSlot, 0, 35, true)) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//places it into the tileEntity is possible since its in the player inventory\n\t\t\telse if (!this.mergeItemStack(stackInSlot, 0, 0, false)) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\n\t\t\tif (stackInSlot.stackSize == 0)\n\t\t\t{\n\t\t\t\tslot.putStack((ItemStack)null);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tslot.onSlotChanged();\n\t\t\t}\n\t\t}\n\t\treturn itemstack;\n\t}", "private void resetPlayer() {\r\n List<Artefact> inventory = currentPlayer.returnInventory();\r\n Artefact item;\r\n int i = inventory.size();\r\n\r\n while (i > 0) {\r\n item = currentPlayer.removeInventory(inventory.get(i - 1).getName());\r\n currentLocation.addArtefact(item);\r\n i--;\r\n }\r\n currentLocation.removePlayer(currentPlayer.getName());\r\n locationList.get(0).addPlayer(currentPlayer);\r\n currentPlayer.setHealth(3);\r\n }", "public boolean swap(int index1, int index2)\n\t{\n\t\tif (index1 >= 0 && index2 >= 0 && index1 < arraySize && index2 < arraySize)\n\t\t{ \n\t\t\tif (index1 != index2)\n\t\t\t{\n\t\t\t\tint holder = array[index1];\n\t\t\t\tarray[index1] = array[index2];\n\t\t\t\tarray[index2] = holder;\n\t\t\t}\n\t\t\treturn true;\n\t\t}\t\n\t\treturn false;\n\t}" ]
[ "0.6634399", "0.6618912", "0.6260327", "0.61508006", "0.57647896", "0.5513971", "0.5466108", "0.54033166", "0.54013425", "0.53946894", "0.5334176", "0.5308927", "0.52133566", "0.51929426", "0.51768476", "0.5150068", "0.5140028", "0.51239747", "0.5108385", "0.5098427", "0.50538313", "0.5034317", "0.5015246", "0.49781337", "0.49760395", "0.49626777", "0.49594837", "0.49311855", "0.49220383", "0.48661643", "0.48541772", "0.48522156", "0.4849296", "0.48488215", "0.48269516", "0.48178774", "0.48170632", "0.48103365", "0.4799797", "0.47979566", "0.47890666", "0.47584745", "0.47550687", "0.4753122", "0.473102", "0.4723899", "0.47084966", "0.46966198", "0.4692836", "0.46857435", "0.46781003", "0.46778217", "0.467689", "0.46714327", "0.4670576", "0.46588525", "0.46574372", "0.46467024", "0.46394244", "0.46383837", "0.46370938", "0.46365258", "0.4629215", "0.46278587", "0.46226427", "0.46199036", "0.46168855", "0.4613025", "0.4608573", "0.459928", "0.45858365", "0.45848173", "0.4580698", "0.45777714", "0.45686617", "0.45513144", "0.45508927", "0.45499972", "0.45491695", "0.45455086", "0.45351207", "0.4533658", "0.4533636", "0.4526965", "0.4524556", "0.45218816", "0.4516051", "0.45152715", "0.45084226", "0.45011014", "0.44994748", "0.44985396", "0.44947067", "0.44906336", "0.4489615", "0.4489197", "0.44882008", "0.44631204", "0.4460225", "0.44594145" ]
0.75517523
0
Checks whether an inventory has the required amount of a specific item. The amount on the given item stack is ignored, please use the amount parameter. Returns false if the inventory not valid. Returns false if the item is not valid. Returns false if the amount is zero or below.
@SuppressWarnings("deprecation") public static boolean hasRequiredItem(final Inventory inventory, final ItemStack item, final int amount) { if (!isValidInventory(inventory)) { return false; } if (!ItemAPI.isValidItem(item)) { return false; } int count = 0; for (ItemStack currentItem : inventory.getContents()) { if (ItemAPI.isSimilarItem(currentItem, item)) { count += currentItem.getAmount(); if (count >= amount) { return true; } } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static boolean containsAmount(Inventory i, Material material, int amount) {\n ItemStack[] contents = i.getContents();\n int count = 0;\n for (ItemStack item : contents) {\n if (item != null && item.getData().getItemType().equals(material)) {\n count = count + item.getAmount();\n }\n }\n return count >= amount;\n }", "public Boolean canAddItem(ItemStack item, Player player){\n\t\tint freeSpace = 0;\n\t\tfor(ItemStack i : player.getInventory() ){\n\t\t\tif(i == null){\n\t\t\t\tfreeSpace += item.getType().getMaxStackSize();\n\t\t\t} else if (i.getType() == item.getType() ){\n\t\t\t\tfreeSpace += (i.getType().getMaxStackSize() - i.getAmount());\n\t\t\t}\n\t\t}\n\t\tdebugOut(\"Item has: \"+item.getAmount()+\" and freeSpace is: \"+freeSpace);\n\t\tif(item.getAmount() > freeSpace){\n\t\t\tdebugOut(\"There is not enough freeSpace in the inventory\");\n\t\t\treturn false;\n\t\t}else{\n\t\t\tdebugOut(\"There is enough freeSpace in the inventory\");\n\t\t\treturn true;\n\t\t}\n\t}", "public abstract boolean isValidInputItem(@Nonnull ItemStack stack);", "public boolean checkInventory(int serialNum, int qty){\n \n //create a boolean var and set to false- change to true only if there is enough of requested inventory\n boolean enoughInventory = false;\n \n //loop through all Inventory\n for(int i=0; i<this.items.size(); i++){\n //check if inventoryItem has matching serialNumber with specified serialNum\n if(this.items.get(i).getSerialNum()==serialNum){\n //if serial numbers match, check if inventoryItem has enough in stock for requested order\n if(this.items.get(i).getQty() >= qty){\n enoughInventory = true; //if quantity in inventory is greater than or equal to requested quantity there is enough\n }\n }\n }\n \n //return enoughInventory- will be false if no serial number matched or if there was not enough for requested qty\n return enoughInventory;\n \n }", "@Override\n\tpublic boolean isItemValidForSlot(int i, ItemStack itemstack) {\n\t\treturn false;\n\t}", "public boolean isItemValid(ItemStack itemstack)\n {\n return itemstack.getItem() == Items.water_bucket;\n }", "public boolean isItemValid(ItemStack var1)\n {\n return canHoldPotion(var1);\n }", "public boolean isItemValid(ItemStack par1ItemStack)\n {\n return true;\n }", "public static boolean checkIsItemValid(ItemStack itemStack) {\n return !itemStack.isEmpty() && EvilCraft._instance.getRegistryManager().getRegistry(IBloodChestRepairActionRegistry.class).\n isItemValidForSlot(itemStack);\n }", "@Override\n\tpublic boolean isItemValid(ItemStack stack) {\n\t\treturn true;\n\t}", "public static boolean isValidInventory(final Inventory inventory) {\n if (inventory == null) {\n return false;\n }\n if (inventory.getSize() < 1) {\n return false;\n }\n return true;\n }", "public boolean checkInventory(String _roll, int wantedAmount) {\r\n int quantity = dailyRollInventory.get(_roll);\r\n if (wantedAmount <= quantity) {\r\n return true;\r\n } \r\n return false;\r\n }", "@Override\n\tpublic boolean isItemValidForSlot(int slot, ItemStack stack){\n\t return true;\n\t}", "@Override\n\tpublic boolean isItemValidForSlot(int index, ItemStack stack) {\n\t\treturn super.isValid();\n\t}", "boolean canCharge(ItemStack me);", "default boolean canFit(ItemStack stack) {\n return !InvTools.isEmpty(stack) && stream().anyMatch(inv -> {\n InventoryManipulator im = InventoryManipulator.get(inv);\n return im.canAddStack(stack);\n });\n }", "private boolean checkValidQuantity (int quantity){\n if (quantity >= 0){\n return true;\n }\n return false;\n }", "public boolean isItemValidForSlot(int p_94041_1_, ItemStack p_94041_2_)\n {\n return true;\n }", "public boolean isItemValidForSlot(int slot, ItemStack stack)\n {\n return slot == 0;\n }", "boolean canReceiveManaFromItem(ItemStack otherStack);", "public static boolean canInsertItem(IItemHandler handler, ItemStack stack)\n\t{\n\t\tfor (int i=0; i<handler.getSlots(); i++)\n\t\t{\n\t\t\t// for each slot, if the itemstack can be inserted into the slot\n\t\t\t\t// (i.e. if the type of that item is valid for that slot AND\n\t\t\t\t// if there is room to put at least part of that stack into the slot)\n\t\t\t// then the inventory at this endpoint can receive the stack, so return true\n\t\t\tif (handler.isItemValid(i, stack) && handler.insertItem(i, stack, true).getCount() < stack.getCount())\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// return false if no acceptable slot is found\n\t\treturn false;\n\t}", "public boolean isItemValid(ItemStack par1ItemStack)\n/* 23: */ {\n/* 24:20 */ if (isItemTwoHanded(par1ItemStack)) {\n/* 25:21 */ return false;\n/* 26: */ }\n/* 27:23 */ if ((this.rightHand.getHasStack()) && \n/* 28:24 */ (isItemTwoHanded(this.rightHand.getStack()))) {\n/* 29:25 */ return false;\n/* 30: */ }\n/* 31:27 */ return super.isItemValid(par1ItemStack);\n/* 32: */ }", "@Override\n\tpublic boolean isItemValidForSlot(int p_94041_1_, ItemStack p_94041_2_) {\n\t\treturn true;\n\t}", "boolean canCharge(ItemStack stack);", "final boolean isValidCartQty() {\n Map<Integer, ReturnedItemDTO> cartMap = returnTable.getIdAndQuantityMap();\n for (Entry<Integer, ReturnedItemDTO> entry : cartMap.entrySet()) {\n ReturnedItemDTO ret = entry.getValue();\n int qty = ret.qty;\n int damageStatus = ret.damageStatus;\n if (qty > 0 && damageStatus > 0) {\n return true;\n }\n }\n return false;\n\n }", "public boolean checkItem () {\r\n\t\tfor (Entity e : getLocation().getWorld().getEntities())\r\n\t\t{\r\n\t\t\tdouble x = e.getLocation().getX();\r\n\t\t\tdouble z = e.getLocation().getZ();\r\n\t\t\tdouble yDiff = getSpawnLocation().getY() - e.getLocation().getY();\r\n \r\n\t\t\tif (yDiff < 0)\r\n\t\t\t\tyDiff *= -1;\r\n\r\n\t\t\tif (x == getSpawnLocation().getX() && yDiff <= 1.5 && z == getSpawnLocation().getZ()) {\r\n \r\n ShowCaseStandalone.slog(Level.FINEST, \"Potential hit on checkItem()\");\r\n\t\t\t\ttry {\r\n\t\t\t\t\tItem itemE = (Item)e;\r\n\t\t\t\t\tif (ItemStackHandler.itemsEqual(itemE.getItemStack(), getItemStack(), true)) {\r\n ShowCaseStandalone.slog(Level.FINEST, \"Existing stack: \" + itemE.getItemStack().toString());\r\n itemE.getItemStack().setAmount(1); //Removes duped items, which can occur.\r\n\t\t\t\t\t\tthis.item = itemE;\r\n\t\t\t\t\t\tscs.log(Level.FINER, \"Attaching to existing item.\");\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (Exception ex) {}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "@Override\n public boolean isValid() {\n return (27 - Inventory.getAll().length <= Inventory.find(\"Soft clay\").length)\n || (Inventory.find(\"Soft clay\").length < 1 || Inventory\n .find(\"Astral rune\").length < 1)\n && !Banking.isBankScreenOpen()\n && GlassBlower.antiban.canInteractObject();\n }", "public boolean checkExist(String itemName, int Qty) {\n\n for (int i = 0; i < inventory.size(); i++) {\n Map<String, Object> newItem = new HashMap<>();\n newItem = inventory.get(i);\n if (itemName.equals(newItem.get(\"Name\").toString())) {\n int a = Integer.parseInt((String) newItem.get(\"Amount\"));\n //isInList = true;\n if (a >= Qty) {\n isExist = true;\n break;\n } else {\n isExist = false;\n }\n } else {\n isExist = false;\n }\n\n }\n return isExist;\n\n }", "public static boolean isValidInventory(final ItemStack[] inventory) {\n if (inventory == null) {\n return false;\n }\n if (inventory.length < 1) {\n return false;\n }\n return true;\n }", "public boolean takeItem(Items item)\n { \n boolean itemTaken = false;\n if(!haveItem(item) && currentRoom.haveItem(item)){ //if item in room not inventory\n if(!item.canBeHeld()){ // if item can't be held\n System.out.println (\"This item can not be picked up\");\n }else if(itemsHeld >= itemLimit) { //item can be held but not enough space\n System.out.println(\"Inventory is full. Drop something first\");\n }else{ //item can be held and there is space in inventory\n Inventory.put(item.getName(), item);\n //currentRoom.removeItem(item); //responsibility for this is in cmd_take\n itemsHeld ++; //inventory tracker +1\n itemTaken = true;\n }\n }\n return itemTaken;\n }", "boolean canBuy( final Item item )\n {\n return !ship.contains( item ) && item.getPrice() <= credits;\n }", "public boolean cannonHasItem(Block b, int id, int num) {\n\t\tDispenser dispenser = (Dispenser) b.getState();\n\t\tif (dispenser.getInventory() != null) {\n\t\t\tfor (ItemStack item : dispenser.getInventory().getContents()) {\n\t\t\t\tif (item != null && item.getTypeId() == id)\n\t\t\t\t\tif (item.getAmount() >= num)\n\t\t\t\t\t\tnum = 0;\n\t\t\t\t\telse\n\t\t\t\t\t\tnum = num - item.getAmount();\n\t\t\t\tif (num <= 0)\n\t\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public boolean haveItem(Items item)\n {\n //boolean haveItem = Inventory.values().contains(item);\n return Inventory.containsValue(item);\n }", "private boolean checkStock(){\n int i;\n int inventorySize = inventory.size();\n int count = 0;\n for(i = 0; i < inventorySize; i++){\n count = count + inventory.get(i).getStock();\n\n }\n //System.out.println(\"Count was: \" + count);\n if(count < 1){\n return false;\n }else{\n return true;\n }\n }", "boolean canExportManaToItem(ItemStack otherStack);", "private boolean canGivePlayer(ItemStack item,EntityPlayer entityplayer){\n ItemStack itemstack3 = entityplayer.inventory.getItemStack();\n if(itemstack3 == null){\n \treturn true;\n }\n else if(NoppesUtilPlayer.compareItems(itemstack3, item, false, false)){\n int k1 = item.stackSize;\n if(k1 > 0 && k1 + itemstack3.stackSize <= itemstack3.getMaxStackSize())\n {\n return true;\n }\n }\n return false;\n }", "public static boolean isValidStack (ItemStack stack) {\n \n return stack != null && stack.getItem() != null;\n }", "private boolean inventoryValid(int min, int max, int stock) {\n\n boolean isValid = true;\n\n if (stock < min || stock > max) {\n isValid = false;\n AlartMessage.displayAlertAdd(4);\n }\n\n return isValid;\n }", "private boolean hasItem(Client c, int itemId, boolean inventory) {\r\n\t\treturn inventory ? c.getItems().playerHasItem(itemId) : c.getItems().playerHasItem(itemId) || c.playerEquipment[5] == itemId;\r\n\t}", "Optional<ItemStack> matchItemStack(String material, int amount);", "public boolean isFull(){\n\t\tfor(int i = 0; i < INVENTORY_SLOTS; i++){\n\t\t\tif(inventoryItems[i] == null){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public boolean canSmelt() {\n\t\tif (this.slots[0] == null) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\tItemStack itemstack = FurnaceRecipes.smelting().getSmeltingResult(\n\t\t\t\t\tthis.slots[0]);\n\n\t\t\tif (itemstack == null)\n\t\t\t\treturn false;\n\t\t\tif (this.slots[1] == null)\n\t\t\t\treturn true;\n\t\t\tif (!this.slots[1].isItemEqual(itemstack))\n\t\t\t\treturn false;\n\n\t\t\tint result = slots[1].stackSize + itemstack.stackSize;\n\n\t\t\treturn result <= getInventoryStackLimit()\n\t\t\t\t\t&& result <= itemstack.getMaxStackSize();\n\t\t}\n\t}", "@Override\r\n\tpublic boolean matches(InventoryCrafting inv, World worldIn) {\r\n\t\tboolean ismatching = super.matches(inv, worldIn);\r\n\t\tfor (int i = 0; ismatching && i < inv.getSizeInventory(); i++) {\r\n\t\t\tItemStack s = inv.getStackInSlot(i);\r\n\t\t\tif (s.getItem() == target)\r\n\t\t\t\tismatching = ItemHelper.getUpgrades(s) + 1 <= target.getMaxUpgrades();\r\n\t\t}\r\n\t\treturn ismatching;\r\n\t}", "public static boolean hasInventorySpace(Inventory inventory, ItemStack is) {\n Inventory inv = Bukkit.createInventory(null, inventory.getSize());\n\n for (int i = 0; i < inv.getSize(); i++) {\n if (inventory.getItem(i) != null) {\n ItemStack item = inventory.getItem(i).clone();\n inv.setItem(i, item);\n }\n }\n\n if (inv.addItem(is.clone()).size() > 0) {\n return false;\n }\n\n return true;\n }", "private boolean canSmelt()\n {\n ItemStack var1 = FurnaceRecipes.smelting().getSmeltingResult(this.furnaceItemStacks[0]);\n if (var1 == null) return false;\n if (this.furnaceItemStacks[2] == null) return true;\n if (!this.furnaceItemStacks[2].isItemEqual(var1)) return false;\n int result = furnaceItemStacks[2].stackSize + var1.stackSize;\n return (result <= getInventoryStackLimit() && result <= var1.getMaxStackSize());\n }", "boolean hasAmount();", "boolean hasAmount();", "public boolean checkRecipe_EM(ItemStack itemStack) {\n return false;\n }", "public boolean test(FluidStack stack) {\n Fluid fluid = stack.getFluid();\n return stack.getAmount() >= getAmount(fluid) && test(stack.getFluid());\n }", "public boolean buyItem(Product n){\n\n if (balance.buyItem(n.getPrice()) == true & n.getQuantity() != 0 & vending_balance != 0) {\n validPurchase = true; // valid purchase was made\n vending_balance = 0; // resets vending balance to 0\n n.setQuantity(); // product quantity is -1\n return true;\n }\n\n else { // if quantity is 0 or balance is does not meet or exceed product's price\n return false;\n }\n }", "public boolean canReceiveItem(Player character) {\n boolean canPick = true;\n Item item = character.items.get(character.getItemOwned2().getName());\n double totalWeight = items.getTotalWeight() + item.getWeight();\n if(totalWeight > maxWeight) {\n canPick = false;\n }\n return canPick; \n }", "@Override\n\tpublic boolean isValidArmor(ItemStack stack, int armorType, Entity entity) {\n\t\treturn true;\n\t}", "boolean hasQuantity();", "@Test\n\tpublic void testGetNumberOfItemsInInventory() throws IOException{\n\t\tassertEquals(amount, Model.getNumberOfItemsInInventory(item));\n\t}", "public static boolean inventoryIsFull() {\n\t\treturn Inventory.getCount() == 28;\n\t}", "default boolean doesItemPassFilter(@Nullable IItemHandler inv, @Nonnull ItemStack item) {\n return getMaxCountThatPassesFilter(inv, item) > 0;\n }", "public final boolean has(Player player, Collection<ItemStack> items)\n\t{\n\t\treturn InventoryHelper.findMissing(player, items).size() == 0;\n\t}", "public final boolean add(Player player, int slot, int amount) {\n\t\tItem invItem = player.inventory.get(slot);\n\t\tif (invItem == null) {\n\t\t\treturn false;\n\t\t}\n\t\tif (!Item.valid(invItem) || !player.inventory.contains(invItem.getId())) {\n\t\t\treturn false;\n\t\t}\n\t\tif (!canOffer) {\n\t\t\treturn false;\n\t\t}\n\t\tif (!inSession(player, type)) {\n\t\t\treturn false;\n\t\t}\n\t\tif (!canAddItem(player, invItem, slot)) {\n\t\t\treturn false;\n\t\t}\n\t\tif (!invItem.isTradeable() && !PlayerRight.isDeveloper(player)) {\n\t\t\tplayer.message(\"You can't offer this item.\");\n\t\t\treturn false;\n\t\t}\n\t\tItem item = new Item(invItem.getId(), amount);\n\t\tint count = player.inventory.computeAmountForId(item.getId());\n\t\tif (item.getAmount() > count) {\n\t\t\titem.setAmount(count);\n\t\t}\n\t\tif (item_containers.get(player).add(item)) {\n\t\t\tplayer.inventory.remove(item);\n\t\t\tupdateOfferComponents();\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public boolean isSalvageable(ItemStack itemStack);", "public boolean isItemAvailable(String itemName) {\n\t\tfor (Item item : itemsInStock) {\n\t\t\tif (item.name.equals(itemName) && item.amount >= 1) {\n\t\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "@Override\n public boolean stillValid(Player playerIn) {\n return player == playerIn && !stack.isEmpty() && player.getItemBySlot(slotType) == stack;\n }", "public int addItemStack(ItemStack itemStack) {\n Item item = itemStack.getItem();\n int amount = itemStack.getAmount();\n int added = 0;\n\n List<ItemStack> itemStacksToRemove = new ArrayList<>();\n for (ItemStack itemStack1 : this.ITEMS) {\n if (itemStack1.getItem() == item) {\n amount += itemStack1.getAmount();\n itemStacksToRemove.add(itemStack1);\n }\n }\n\n // clear inventory\n for (ItemStack itemStack1 : itemStacksToRemove)\n this.ITEMS.remove(itemStack1);\n\n System.out.println(String.format(\"Total amount of %s: %d\", item.getName(), amount));\n\n int stack_size = item.getMaxStack();\n int stacks = amount / stack_size;\n int last_stack = amount % stack_size;\n\n System.out.println(String.format(\"Stack size: %d, full stacks: %s, last stack: %d, inv size: %d, inv full: %d\", stack_size, stacks, last_stack, this.getSize(), this.ITEMS.size()));\n\n // add full stacks\n for (int i = 0; i < stacks; i++) {\n if (this.ITEMS.size() > this.getSize())\n break;\n\n System.out.println(\"Added full stack\");\n this.ITEMS.add(new ItemStack(item, stack_size));\n added += stack_size;\n }\n\n // add last (not full) stack\n if (last_stack != 0 && this.ITEMS.size() < this.getSize()) {\n System.out.println(\"Added partial stack\");\n this.ITEMS.add(new ItemStack(item, last_stack));\n added += last_stack;\n }\n\n for (InventoryChangedEvent listener : listeners)\n listener.onInventoryChanged(this);\n\n return added;\n }", "private int checkItemQuantity() {\n\n int desiredQuantity = initialQuantity;\n MenusItem tempItem = null;\n tempItem = ItemCart.getInstance().checkItem(menusItem);\n\n if(tempItem != null){\n desiredQuantity = tempItem.getDesiredQuantity();\n }\n\n\n return desiredQuantity;\n }", "public static boolean isValidQuantity(int productQuantity) {\n return productQuantity >= 0;\n }", "public Boolean playerHasItem(Player player, String itemName) {\n Collection<Item> playerInventory = player.getInventory();\n\n return playerInventory.stream().anyMatch(item -> item.getItemName().equals(itemName));\n }", "public boolean check(ItemStack item) {\n return item != null && item.getType() == material && item.hasItemMeta() && item.getItemMeta().hasDisplayName() && item.getItemMeta().getDisplayName().equals(displayName);\n }", "private boolean isValidTransaction(double remainingCreditLimit, double transactionAmount){\n return transactionAmount <= remainingCreditLimit;\n }", "public boolean matches(ItemStack stack)\n {\n if (!(itemStack.getItem().equals(stack.getItem()) && (stack.isItemStackDamageable() || itemStack.getMetadata() == stack.getMetadata()))) return false;\n\n\n //Disallowed NBT\n NBTTagCompound compound = stack.getTagCompound();\n\n if (compound != null)\n {\n for (Map.Entry<String, String> entry : tagsDisallowed.entrySet())\n {\n if (checkNBT(compound, entry.getKey().split(\":\", -1), entry.getValue())) return false;\n }\n }\n\n\n //Required NBT\n Set<Map.Entry<String, String>> entrySet = tagsRequired.entrySet();\n if (entrySet.size() > 0)\n {\n if (compound == null) return false;\n\n for (Map.Entry<String, String> entry : entrySet)\n {\n if (!checkNBT(compound, entry.getKey().split(\":\", -1), entry.getValue())) return false;\n }\n }\n\n\n //Passed all filters\n return true;\n }", "public boolean removeItemStack(ItemStack itemStack) {\n boolean success = false;\n\n if (this.ITEMS.contains(itemStack)) {\n this.ITEMS.remove(itemStack);\n success = true;\n } else {\n boolean containItem = false;\n int index = 0;\n\n for (ItemStack itemStack1 : this.ITEMS) {\n if (itemStack1.getItem() == itemStack.getItem()) {\n index = this.ITEMS.lastIndexOf(itemStack1);\n containItem = true;\n }\n }\n\n if (containItem) {\n ItemStack itemStack1 = this.ITEMS.get(index);\n itemStack1.addAmount(-itemStack.getAmount());\n if (itemStack1.getAmount() <= 0)\n this.ITEMS.remove(itemStack1);\n success = true;\n }\n }\n\n for (InventoryChangedEvent listener : listeners)\n listener.onInventoryChanged(this);\n\n return success;\n }", "@Override\n\tprotected boolean isImplementationValid()\n\t{\n\t\treturn (this.amount > 0);\n\t}", "public boolean isItem(ItemStack item){\n\t\tif(item == null) return false;\n\t\tif(material != item.getType()) return false;\n\t\tif(damage >= 0 && item.getDurability() != damage) return false;\n\t\t\n\t\t//early out if no name / lore:\n\t\tif(itemName.isEmpty() && loreLine.isEmpty()) return true;\n\t\t\n\t\t//Problem fix for no Meta:\n\t\tItemMeta meta = item.getItemMeta();\n\t\tif(meta == null) return false;\n\t\t\n\t\t//Check for name:\n\t\tString name = meta.hasDisplayName() ? meta.getDisplayName() : \"\";\n\t\tif(!name.equals(itemName)) return false;\n\n\t\t//Check for display:\n\t\tif(!loreLine.isEmpty() && !meta.hasLore()) return false;\n\t\t\n\t\tboolean found = false;\n\t\tfor(String line : meta.getLore()){\n\t\t\tif(loreLine.equals(line)) found = true;\n\t\t}\n\t\t\n\t\tif(!found) return false;\n\t\t\n\t\treturn true;\n\t}", "public boolean canPickItem(String itemName) {\n boolean canPick = true;\n Item item = currentRoom.getItem(itemName);\n if(item != null) {\n double totalWeight = items.getTotalWeight() + item.getWeight();\n if(totalWeight > maxWeight) {\n canPick = false;\n }\n }\n return canPick; \n }", "@Override\n public boolean canAddToItem(@Nonnull ItemStack stack, @Nonnull IDarkSteelItem item) {\n return (item.isForSlot(EntityEquipmentSlot.FEET) || item.isForSlot(EntityEquipmentSlot.LEGS) || item.isForSlot(EntityEquipmentSlot.CHEST)\n || item.isForSlot(EntityEquipmentSlot.HEAD)) && EnergyUpgradeManager.itemHasAnyPowerUpgrade(stack) && getUpgradeVariantLevel(stack) == variant - 1;\n }", "public static boolean isValidFoodAmount(Integer test) {\n return test > 0;\n }", "public boolean canAddEPC(ItemStack stack, int amountOfEPC);", "public boolean itemIsAllowed(int itemId) {\n\t\tswitch (itemId) {\n\t\tcase 15272: // Rocktail\n\t\tcase 7060: // Tuna potato\n\t\tcase 6685:\n\t\tcase 6687:\n\t\tcase 6689:\n\t\tcase 6691: // Saradomin brew\n\t\tcase 3024:\n\t\tcase 3026:\n\t\tcase 3028:\n\t\tcase 3030: // Super restore\n\t\tcase 391: // Manta Ray\n\t\tcase 385: // Shark\n\t\tcase 229: // Vial\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public abstract boolean canAddItem(Player player, Item item, int slot);", "private boolean checkCost(int owner, ItemType item) {\n\t\t\t\t\treturn false;\n\t\t\t\t}", "@java.lang.Override\n public boolean hasInventoryItemData() {\n return inventoryItemCase_ == 3;\n }", "public boolean isValidItem() {\n return validItem;\n }", "public boolean checkQuantity(Integer numToRemove) {\n return this.quantity >= numToRemove;\n }", "@Override\n\tpublic boolean canExtractItem(int i, ItemStack itemstack, int j)\n\t{\n\t\tif(i == 1 && j == 5 && itemstack.getItem().getDamage(getStackInSlot(1)) == getStackInSlot(1).getItem().getMaxDamage())\n\t\t\treturn true;\n\t\tif(i == 2 && j == 5)\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "public boolean hasAmount() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }", "boolean isValidForBasket(Collection<Item> items);", "public static int checkSlotsAvailable(Inventory inv) {\n ItemStack[] items = inv.getContents(); //Contents of player inventory\n int emptySlots = 0;\n\n for (ItemStack is : items) {\n if (is == null) {\n emptySlots = emptySlots + 1;\n }\n }\n\n return emptySlots;\n }", "default boolean willAccept(ItemStack stack) {\n if (InvTools.isEmpty(stack))\n return false;\n ItemStack newStack = InvTools.copyOne(stack);\n return streamSlots().anyMatch(slot -> slot.canPutStackInSlot(newStack));\n }", "private boolean validInventory(int min, int max, int stock) {\r\n\r\n boolean isTrue = true;\r\n\r\n if (stock < min || stock > max) {\r\n isTrue = false;\r\n alertDisplay(4);\r\n }\r\n\r\n return isTrue;\r\n }", "public boolean hasAmount() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }", "public static boolean isValidFood(ItemStack itemStack) {\n\t\tItem item = itemStack.getItem();\n\n\t\t// Regular ItemFood\n\t\tif (item instanceof ItemFood)\n\t\t\treturn true;\n\n\t\t// Cake - Vanilla\n\t\tif (item instanceof ItemBlock && ((ItemBlock) item).getBlock() instanceof BlockCake)\n\t\t\treturn true;\n\n\t\t// Cake - Modded\n\t\tif (item instanceof ItemBlockSpecial && ((ItemBlockSpecial) item).getBlock() instanceof BlockCake)\n\t\t\treturn true;\n\n\t\t// Milk Bucket\n\t\tif (item instanceof ItemBucketMilk)\n\t\t\treturn true;\n\n\t\treturn false;\n\t}", "public boolean isValidTransfer(double amount) {\n boolean amt = amount >= 0;\n boolean bal = false;\n if (amount <= this.balance + 100 && this.balance > 0) {\n bal = true;\n }\n return amt && bal && !isFreeze();\n }", "public boolean checkIfEnough(Account account, float amount) {\n float remaining = account.getBalance() - amount;\n if (remaining >= 0) {\n return true;\n }\n return false;\n }", "public boolean grabItem(String item) {\n boolean canGrab = false;\n if(grabbedItems.size() < max_inventory){\n System.out.println(\"You have grabbed: \" + item + \"\\n\");\n grabbedItems.add(item);\n canGrab = true;\n }\n else{\n System.out.println(\"You have too many items! Try dropping one if you really need to grab \" + item);\n }\n return canGrab;\n }", "public static boolean isValidLoot(ClientContext ctx, GroundItem groundItem, LootItem i, int maxDistanceToLoot) {\n return (\n (groundItem.stackable() && (ctx.inventory.select().id(groundItem.id()).count() == 1 || !ctx.inventory.isFull()) && (ctx.inventory.select().id(groundItem.id()).first().poll().stackSize() < i.getMaxInventoryCount() || i.getMaxInventoryCount() == -1)) ||\n (!ctx.inventory.isFull() && (ctx.inventory.select().id(groundItem.id()).count() < i.getMaxInventoryCount() || i.getMaxInventoryCount() == -1))\n )\n && groundItem.stackSize() >= i.getMinStackSize()\n && groundItem.tile().matrix(ctx).reachable()\n && groundItem.inViewport() && (maxDistanceToLoot < 0 || groundItem.tile().distanceTo(ctx.players.local()) <= maxDistanceToLoot);\n }", "public static boolean hasEnoughSpace(Player player, Inventory inv1, Inventory inv2){\r\n int inv1Count = -2;\r\n int inv2Count = 0;\r\n for (ItemStack item : inv1.getContents()) {\r\n if (item != null) {\r\n inv1Count++;\r\n }\r\n }\r\n\r\n for (ItemStack item : inv2.getContents()) {\r\n if (item != null) {\r\n inv2Count++;\r\n }\r\n }\r\n\r\n int inv2FreeSpace = 36 - inv2Count;\r\n if (inv2FreeSpace >= inv1Count) {\r\n return true;\r\n }\r\n\r\n return false;\r\n }", "public boolean needsRepair() {\n if (id == 5509) {\n return false;\n }\n return inventory.contains(id + 1);\n }", "public boolean canExtractItem(int i, ItemStack itemstack, int j) {\n\t\t// yes as long as its not from slot 0 or the item is a bucket\n\t\treturn itemstack.getItem() == Items.bucket || j != 0;\n\t}", "private boolean inventoryVerify(int min, int max, int stock) {\r\n\r\n boolean invBetween = true;\r\n\r\n if (stock < min || stock > max) {\r\n invBetween = false;\r\n //LOGICAL ERROR: Inventory value error\r\n errorLabel.setVisible(true);\r\n errorTxtLabel.setText(\"Inventory must be less than Max and greater than Min.\");\r\n errorTxtLabel.setVisible(true);\r\n }\r\n\r\n return invBetween;\r\n }", "public boolean updateQuantity(Scanner scanner, boolean buyOrSell){\n if(inventory[0]==null){\n System.out.println(\"Error...could not buy item\");\n return false;\n }\n FoodItem foodItem = new FoodItem();\n boolean valid = false;\n int sellQuantity = 0;\n foodItem.inputCode(scanner);\n int var = alreadyExists(foodItem);\n System.out.println(var);\n if(buyOrSell){\n if(var == -1) {\n System.out.println(\"Error...could not buy item\");\n return false;\n }\n } else{\n if(var == -1) {\n System.out.println(\"Error...could not sell item\");\n return false;\n }\n }\n\n do{\n try {\n if(buyOrSell){\n System.out.print(\"Enter valid quantity to buy: \");\n }else{\n System.out.print(\"Enter valid quantity to sell: \");\n }\n sellQuantity = scanner.nextInt();\n System.out.println(sellQuantity);\n valid = true;\n } catch (InputMismatchException e) {\n System.out.println(\"Invalid entry\");\n scanner.next();\n }\n }while(!valid);\n if(buyOrSell){\n if(sellQuantity > inventory[var].itemQuantityInStock){\n System.out.println(\"Error...could not buy item\");\n return false;\n }else {\n inventory[var].updateItem(sellQuantity);\n }\n }else{\n if(sellQuantity > inventory[var].itemQuantityInStock){\n System.out.println(\"Error...could not sell item\");\n return false;\n }else{\n inventory[var].updateItem(-sellQuantity);\n }\n }\n return true;\n }", "@java.lang.Override\n public boolean hasInventoryItemData() {\n return inventoryItemCase_ == 3;\n }", "private void checkAmount() throws IOException {\n //System.out.println(\"The total amount in the cash machine is: \" + amountOfCash);\n for (int i : typeOfCash.keySet()) {\n Integer r = typeOfCash.get(i);\n if (r < 20) {\n sendAlert(i);\n JOptionPane.showMessageDialog(null, \"$\" + i + \"bills are out of stock\");\n }\n }\n }" ]
[ "0.7114904", "0.69657856", "0.6910004", "0.6740161", "0.66707337", "0.66247916", "0.6619918", "0.6615574", "0.66001517", "0.6546586", "0.65432024", "0.6509283", "0.64781743", "0.6430944", "0.635889", "0.6328561", "0.6318365", "0.63113314", "0.6254592", "0.6247156", "0.62321997", "0.62237", "0.61917305", "0.614878", "0.6114212", "0.6095417", "0.603084", "0.60177445", "0.60014266", "0.59632754", "0.59395033", "0.5936038", "0.59306884", "0.5907629", "0.58964556", "0.58744895", "0.58419144", "0.58238405", "0.5813103", "0.58099705", "0.579631", "0.57694256", "0.57687545", "0.5760766", "0.5742048", "0.57419735", "0.57419735", "0.57146645", "0.57030153", "0.56996167", "0.568524", "0.5672121", "0.567041", "0.56681985", "0.5667671", "0.5632306", "0.56274676", "0.56274354", "0.5626586", "0.5626567", "0.56257427", "0.5615083", "0.56017303", "0.5578358", "0.5577644", "0.55751544", "0.55722874", "0.556087", "0.55582887", "0.55564564", "0.5553442", "0.55461806", "0.5541063", "0.5532356", "0.5532064", "0.55249894", "0.55243814", "0.55230856", "0.55065054", "0.55055445", "0.5502342", "0.5497389", "0.5483909", "0.54831564", "0.54773885", "0.547213", "0.54705614", "0.54656416", "0.5458578", "0.5439618", "0.543895", "0.5431777", "0.54314184", "0.54301816", "0.5426393", "0.5424995", "0.54203725", "0.54186606", "0.54115754", "0.5405855" ]
0.76389444
0
Safely removes an item stack from an inventory. It is recommended that this function be called from a synchronous scheduler. The inventory will be restored to its previous state if an error occurs.
public static void removeItemFromInventory(final Inventory inventory, final ItemStack item) throws InvalidParameterException, FailedTransactionException { if (!isValidInventory(inventory)) { throw new InvalidParameterException("Cannot remove item from an invalid inventory."); } if (!ItemAPI.isValidItem(item)) { throw new InvalidParameterException("Cannot remove an invalid item from an inventory."); } if (!hasRequiredItem(inventory, item, item.getAmount())) { throw new FailedTransactionException("That inventory does not have the amount of times to remove."); } ItemStack[] savedInventory = duplicateInventory(inventory.getContents()); try { int remaining = item.getAmount(); for (int i = 0; i < inventory.getSize(); i++) { ItemStack currentItem = inventory.getItem(i); if (ItemAPI.isSimilarItem(currentItem, item)) { int currentItemAmount = currentItem.getAmount(); // If this item can satisfy the remaining amount with some left over // then lower the amount of that item and break out of the loop if (currentItemAmount > remaining) { currentItem.setAmount(currentItemAmount - remaining); remaining = 0; break; } // If this item can satisfy the remaining amount exactly // then remove the item from the inventory and break out of the loop else if (currentItemAmount == remaining) { inventory.setItem(i, null); remaining = 0; break; } // Otherwise this item still leaves some remaining, so // remove the item from the inventory and reduce the remaining else { inventory.setItem(i, null); remaining -= currentItemAmount; } } } if (remaining != 0) { throw new FailedTransactionException("Was not able to remove the exact amount of that item!"); } } catch (FailedTransactionException exception) { // Restore the inventory to its previous state inventory.setContents(savedInventory); throw exception; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean removeItemStack(ItemStack itemStack) {\n boolean success = false;\n\n if (this.ITEMS.contains(itemStack)) {\n this.ITEMS.remove(itemStack);\n success = true;\n } else {\n boolean containItem = false;\n int index = 0;\n\n for (ItemStack itemStack1 : this.ITEMS) {\n if (itemStack1.getItem() == itemStack.getItem()) {\n index = this.ITEMS.lastIndexOf(itemStack1);\n containItem = true;\n }\n }\n\n if (containItem) {\n ItemStack itemStack1 = this.ITEMS.get(index);\n itemStack1.addAmount(-itemStack.getAmount());\n if (itemStack1.getAmount() <= 0)\n this.ITEMS.remove(itemStack1);\n success = true;\n }\n }\n\n for (InventoryChangedEvent listener : listeners)\n listener.onInventoryChanged(this);\n\n return success;\n }", "@Override\n\tpublic ItemStack removeStackFromSlot(int index) {\n\t\treturn null;\n\t}", "public ItemStack remove(int debug1) {\n/* 104 */ return this.container.removeItem(this.slot, debug1);\n/* */ }", "public void moveItemStackTo(ItemStack itemStack, Inventory inventory) {\n int itemsAdded = inventory.addItemStack(itemStack);\n\n this.removeItemStack(new ItemStack(itemStack.getItem(), itemsAdded));\n }", "public void pop() throws StackUnderflowException {\r\n if(!isEmpty()) items.remove(0);\r\n else throw new StackUnderflowException(\"Stack Empty\");\r\n }", "public void onContainerClosed(EntityPlayer playerIn)\n {\n super.onContainerClosed(playerIn);\n\n if (!this.worldObj.isRemote)\n {\n for (int i = 0; i < 9; ++i)\n {\n ItemStack itemstack = this.craftMatrix.removeStackFromSlot(i);\n\n if (itemstack != null)\n {\n playerIn.dropItem(itemstack, false);\n }\n }\n }\n }", "ItemStack removePage(EntityPlayer player, ItemStack itemstack, int index);", "public static ItemStack consumeItem(ItemStack stack)\n\t{\n\t\treturn consumeItem(stack, 1);\n\t}", "public Item pop() throws EmptyStackException{\n return (Item) stack.pop();\n\n }", "public void removeItemInventory(Item item){\r\n playerItem.remove(item);\r\n System.out.println(item.getName() + \" was removed from your inventory\");\r\n }", "public void removeItemInventory(Item item){\n playerItem.remove(item);\n System.out.println(item.getName() + \" was removed from your inventory\");\n }", "@Override\r\n public void uncall() {\r\n Player player = MbPets.getInstance().getServer().getPlayer(getOwner());\r\n if (player != null) {\r\n if (getEntity().getInventory().getDecor() != null) {\r\n if (player.getInventory().firstEmpty() >= 0) {\r\n player.getInventory().addItem(getEntity().getInventory().getDecor());\r\n } else {\r\n player.getWorld().dropItemNaturally(player.getLocation(),\r\n getEntity().getInventory().getDecor());\r\n }\r\n }\r\n }\r\n super.uncall();\r\n }", "public void dropItems() {\n\t\tlocation.getChunk().load();\n\t\tArrays.stream(inventory.getContents())\n\t\t\t.filter(ItemStackUtils::isValid)\n\t\t\t.forEach((item) -> location.getWorld().dropItemNaturally(location, item));\n\t\tinventory.clear();\n\t}", "public void removeChild(TaskStack stack) {\n super.removeChild((TaskStackContainers) stack);\n removeStackReferenceIfNeeded(stack);\n }", "protected void doItemDrop(Location loc, Player player, ItemStack itemStack) {\n // To avoid drops occasionally spawning in a block and warping up to the\n // surface, wait for the next tick and check whether the block is\n // actually unobstructed. We don't attempt to save the drop if e.g.\n // a mob is standing in lava, however.\n Bukkit.getScheduler().scheduleSyncDelayedTask(BeastMaster.PLUGIN, () -> {\n Block block = loc.getBlock();\n Location revisedLoc = (block != null &&\n !canAccomodateItemDrop(block) &&\n player != null) ? player.getLocation()\n : loc;\n org.bukkit.entity.Item item = revisedLoc.getWorld().dropItem(revisedLoc, itemStack);\n item.setInvulnerable(isInvulnerable());\n item.setGlowing(isGlowing());\n }, 1);\n }", "public void deleteStack(){\n // check if there is any stack present or not\n if(this.arr==null){\n System.out.println(\"No stack present, first create a stack\");\n return;\n }\n // if stack is present\n topOfStack=-1;\n arr=null;\n System.out.println(\"Stack deleted successfully\");\n }", "private void addItemStack(Item itemStack) {\n\t\tint findStackable = findStackableItem(itemStack);\r\n\t\tif(findStackable!=-1){\r\n\t\t\tItem heldStack=tileItems.getItem(findStackable);\r\n\t\t\twhile(!heldStack.stackFull()&&\t//as long as the current stack isn't full and the stack we're picking up isn't empty\r\n\t\t\t\t!itemStack.stackEmpty()){\r\n\t\t\t\theldStack.incrementStack();\r\n\t\t\t\titemStack.decrementStack(tileItems);\r\n\t\t\t\tif(itemStack.stackEmpty())\t//will this cause an error since the item is removed by the inventory?\r\n\t\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\taddItemStack(itemStack);\r\n\t\t}\r\n\t\telse\r\n\t\t\taddFullStack(itemStack);\r\n\t}", "public void removeItem(Item theItem) {\n\t\tinventory.remove(theItem);\t\n\t}", "public static void invalidateItemstack(ItemStack stack) {\n ItemMeta meta = stack.getItemMeta();\n String id = stack.getItemMeta().getPersistentDataContainer().get(HoloItemsAPI.getKeys().CUSTOM_ITEM_ID, PersistentDataType.STRING);\n String owner = \"?\";\n String ownerName = \"?\";\n\n if (stack.getItemMeta().getPersistentDataContainer().has(HoloItemsAPI.getKeys().CUSTOM_ITEM_OWNER, UUIDTagType.TYPE)) {\n owner = stack.getItemMeta().getPersistentDataContainer().get(HoloItemsAPI.getKeys().CUSTOM_ITEM_OWNER, UUIDTagType.TYPE).toString();\n }\n if (stack.getItemMeta().getPersistentDataContainer().has(HoloItemsAPI.getKeys().CUSTOM_ITEM_OWNER_NAME, PersistentDataType.STRING)) {\n ownerName = stack.getItemMeta().getPersistentDataContainer().get(HoloItemsAPI.getKeys().CUSTOM_ITEM_OWNER_NAME, PersistentDataType.STRING);\n }\n meta.setDisplayName(ChatColor.RED + \"Invalid Item\");\n List<String> lore = new ArrayList<>();\n lore.add(ChatColor.GRAY + \"\" + ChatColor.ITALIC + \"Can you not break things for one moment???\");\n lore.add(\"\");\n lore.add(ChatColor.DARK_GRAY + \"Internal ID: \" + ChatColor.GRAY + id);\n lore.add(ChatColor.DARK_GRAY + \"Owner: \" + ChatColor.GRAY + owner);\n lore.add(ChatColor.DARK_GRAY + \"Owner Name: \" + ChatColor.GRAY + ownerName);\n\n meta.setLore(lore);\n meta.setCustomModelData(INVALID_ID); //Set custom model for invalid item\n stack.setItemMeta(meta);\n }", "public void onInventoryChanged()\n\t{\n\t\tfor (int i = 0; i < this.items.length; i++)\n\t\t{\n\t\t\tItemStack stack = this.items[i];\n\t\t\tif (stack != null && stack.stackSize <= 0)\n\t\t\t{\n\t\t\t\tthis.items[i] = null;\n\t\t\t}\n\n\t\t}\n\t}", "public void removeItem(Item item)\n\t{\n\t\tinventory.remove(item);\n\t}", "public void removeItem(int itemToRemove){\n\t\tinventoryItems[itemToRemove] = null;\n\t}", "@Test(expected = VendingMachineException.class)\r\n\tpublic void testRemoveItem_empty_slot() {\r\n\t\tvendMachine.removeItem(\"D\");\r\n\t}", "default ItemStack removeOneItem() {\n return removeOneItem(StandardStackFilters.ALL);\n }", "public void EjectStackOnMilled( ItemStack stack )\r\n {\r\n \tint iFacing = 2 + worldObj.rand.nextInt( 4 ); // random direction to the sides\r\n \t\r\n \tVec3 ejectPos = Vec3.createVectorHelper( worldObj.rand.nextDouble() * 1.25F - 0.125F, \r\n \t\tworldObj.rand.nextFloat() * ( 1F / 16F ) + ( 7F / 16F ), \r\n \t\t-0.2F );\r\n \t\r\n \tejectPos.RotateAsBlockPosAroundJToFacing( iFacing );\r\n \t\r\n EntityItem entity = new EntityItem( worldObj, xCoord + ejectPos.xCoord, \r\n \t\tyCoord + ejectPos.yCoord, zCoord + ejectPos.zCoord, stack );\r\n\r\n \tVec3 ejectVel = Vec3.createVectorHelper( worldObj.rand.nextGaussian() * 0.025D, \r\n \t\tworldObj.rand.nextGaussian() * 0.025D + 0.1F, \r\n \t\t-0.06D + worldObj.rand.nextGaussian() * 0.04D );\r\n \t\r\n \tejectVel.RotateAsVectorAroundJToFacing( iFacing );\r\n \t\r\n entity.motionX = ejectVel.xCoord;\r\n entity.motionY = ejectVel.yCoord;\r\n entity.motionZ = ejectVel.zCoord;\r\n \r\n entity.delayBeforeCanPickup = 10;\r\n \r\n worldObj.spawnEntityInWorld( entity );\r\n }", "private void dropItem(String item)//Made by Justin\n {\n itemFound = decodeItem(item);\n if (itemFound == null)\n {\n System.out.println(\"I don't know of any \" + item + \".\");\n }\n else\n {\n player.inventoryDel(itemFound);\n }\n }", "public final void consume(Player player, Collection<ItemStack> items)\n\t{\n\t\tInventoryHelper.remove(player, items);\n\t}", "public Item pop(Item item){\n\nif(isEmpty()) throw new NoSuchElementException(\"Stack undervflow\"); \n Item item =top.item;\n top = top.next;\n N--;\n return item;\n}", "public ItemStack transferStackInSlot(EntityPlayer playerIn, int index) {\n/* 79 */ ItemStack var3 = null;\n/* 80 */ Slot var4 = this.inventorySlots.get(index);\n/* */ \n/* 82 */ if (var4 != null && var4.getHasStack()) {\n/* */ \n/* 84 */ ItemStack var5 = var4.getStack();\n/* 85 */ var3 = var5.copy();\n/* */ \n/* 87 */ if (index < this.field_111243_a.getSizeInventory()) {\n/* */ \n/* 89 */ if (!mergeItemStack(var5, this.field_111243_a.getSizeInventory(), this.inventorySlots.size(), true))\n/* */ {\n/* 91 */ return null;\n/* */ }\n/* */ }\n/* 94 */ else if (getSlot(1).isItemValid(var5) && !getSlot(1).getHasStack()) {\n/* */ \n/* 96 */ if (!mergeItemStack(var5, 1, 2, false))\n/* */ {\n/* 98 */ return null;\n/* */ }\n/* */ }\n/* 101 */ else if (getSlot(0).isItemValid(var5)) {\n/* */ \n/* 103 */ if (!mergeItemStack(var5, 0, 1, false))\n/* */ {\n/* 105 */ return null;\n/* */ }\n/* */ }\n/* 108 */ else if (this.field_111243_a.getSizeInventory() <= 2 || !mergeItemStack(var5, 2, this.field_111243_a.getSizeInventory(), false)) {\n/* */ \n/* 110 */ return null;\n/* */ } \n/* */ \n/* 113 */ if (var5.stackSize == 0) {\n/* */ \n/* 115 */ var4.putStack(null);\n/* */ }\n/* */ else {\n/* */ \n/* 119 */ var4.onSlotChanged();\n/* */ } \n/* */ } \n/* */ \n/* 123 */ return var3;\n/* */ }", "public void dropItem(int x, int y, int i) {\n \n ParentItem item = getInventory()[i];\n \n if (item != null) {\n \n inventory.removeItem(i);\n \n item.putOnBoard(x, y, gameboard);\n \n }\n \n }", "public static ItemStack decreaseStackSize (ItemStack stack, int amount) {\n \n stack.setCount(stack.getCount()-amount);\n return stack.getCount() <= 0 ? null : stack;\n }", "@Override\n public void remove() {\n if (lastItem == null)\n throw new IllegalStateException();\n bag.remove(lastItem);\n lastItem = null;\n }", "public ItemStack removeItems(int paramInt1, int paramInt2)\r\n/* 31: */ {\r\n/* 32: 47 */ if (this.a[paramInt1] != null)\r\n/* 33: */ {\r\n/* 34: 48 */ if (this.a[paramInt1].stackSize <= paramInt2)\r\n/* 35: */ {\r\n/* 36: 49 */ ItemStack localamj = this.a[paramInt1];\r\n/* 37: 50 */ this.a[paramInt1] = null;\r\n/* 38: 51 */ return localamj;\r\n/* 39: */ }\r\n/* 40: 53 */ ItemStack localamj = this.a[paramInt1].split(paramInt2);\r\n/* 41: 54 */ if (this.a[paramInt1].stackSize == 0) {\r\n/* 42: 55 */ this.a[paramInt1] = null;\r\n/* 43: */ }\r\n/* 44: 57 */ return localamj;\r\n/* 45: */ }\r\n/* 46: 60 */ return null;\r\n/* 47: */ }", "public void pop()\n {\n EmptyStackException ex = new EmptyStackException();\n if (top <= 0)\n {\n throw ex;\n }\n else\n {\n stack.remove(top - 1);\n top--;\n }\n }", "public static void removeItem(String itemName)\n {\n inventory.remove(getItem(itemName));\n }", "public void pop() {\n // if the element happen to be minimal, pop it from minStack\n if (stack.peek().equals(minStack.peek())){\n \tminStack.pop();\n }\n stack.pop();\n\n }", "public Object pop() {\n\t\tif(this.isEmpty())\n throw new IllegalStateException(\"Stack is empty\");\n return items.remove(items.size() - 1);\n\t}", "public ItemStack getStackInSlotOnClosing(int p_70304_1_)\n {\n if (this.inventoryContents[p_70304_1_] != null)\n {\n ItemStack itemstack = this.inventoryContents[p_70304_1_];\n this.inventoryContents[p_70304_1_] = null;\n return itemstack;\n } else\n {\n return null;\n }\n }", "public void smeltItem() {\n\t\tif (this.canSmelt()) {\n\t\t\tItemStack itemstack = FurnaceRecipes.smelting().getSmeltingResult(\n\t\t\t\t\tthis.slots[0]);\n\t\t\tif (this.slots[1] == null) {\n\t\t\t\tthis.slots[1] = itemstack.copy();\n\t\t\t} else if (this.slots[1].getItem() == itemstack.getItem()) {\n\t\t\t\tthis.slots[1].stackSize += itemstack.stackSize;\n\t\t\t}\n\n\t\t\t--this.slots[0].stackSize;\n\n\t\t\tif (this.slots[0].stackSize <= 0) {\n\t\t\t\tthis.slots[0] = null;\n\t\t\t}\n\t\t}\n\t}", "protected void deleteStack(DBTraceStack stack) {\n\t\tstackStore.delete(stack);\n\t}", "protected abstract void removeItem();", "@Override\n public ItemStack getStackInSlotOnClosing(int p_70304_1_) {\n ItemStack itemstack = this.furnaceItemStacks[p_70304_1_];\n this.furnaceItemStacks[p_70304_1_] = null;\n return itemstack;\n }", "public ItemStack transferStackInSlot(int i)\n {\n ItemStack itemstack = null;\n Slot slot = (Slot)inventorySlots.get(i);\n\n if (slot != null && slot.getHasStack())\n {\n ItemStack itemstack1 = slot.getStack();\n itemstack = itemstack1.copy();\n\n if (i < 9)\n {\n if (!mergeItemStack(itemstack1, 9, 45, true))\n {\n return null;\n }\n }\n else if (!mergeItemStack(itemstack1, 0, 9, false))\n {\n return null;\n }\n\n if (itemstack1.stackSize == 0)\n {\n slot.putStack(null);\n }\n else\n {\n slot.onSlotChanged();\n }\n\n if (itemstack1.stackSize != itemstack.stackSize)\n {\n slot.onPickupFromSlot(null, itemstack1);\n }\n else\n {\n return null;\n }\n }\n\n return itemstack;\n }", "public void pop() {\r\n readyForPop();\r\n outStack.pop();\r\n }", "@Override\n\tpublic ItemStack decrStackSize(int index, int count) {\n\t\treturn null;\n\t}", "@Test\r\n\tpublic void testRemoveItem() {\r\n\t\tVendingMachineItem test = new VendingMachineItem(\"test\", 10.0);\r\n\t\tvendMachine.addItem(test, \"B\");\r\n\t\tassertEquals(test, vendMachine.removeItem(\"B\"));\r\n\t}", "public void removeProduct(Product item) {\n inventory.remove(item);\n }", "@Test\n public void pop() {\n SimpleStack stack = new DefaultSimpleStack();\n Item item = new Item();\n Item item1 = new Item();\n stack.push(item);\n stack.push(item1);\n\n // When we pop the stack\n Item topItem = stack.pop();\n\n // Then…\n assertEquals(\"The stack constains 1 item\", 1, stack.getSize());\n assertSame(\"The first item is on top of the stack\", item, stack.peek());\n assertSame(item1, topItem);\n }", "public void pop() {\n myCStack.delete();\n }", "public void removeItem(){\n\t\tthis.item = null;\n\t}", "public void unScheduleItem(IItem item, BankFusionEnvironment env) {\n removeItem(item);\n }", "public static void dropStackInWorld (World world, BlockPos pos, ItemStack stack) {\n \n if (!world.isRemote) {\n \n final float offset = 0.7F;\n final double offX = world.rand.nextFloat() * offset + (1.0F - offset) * 0.5D;\n final double offY = world.rand.nextFloat() * offset + (1.0F - offset) * 0.5D;\n final double offZ = world.rand.nextFloat() * offset + (1.0F - offset) * 0.5D;\n final EntityItem entityitem = new EntityItem(world, pos.getX() + offX, pos.getY() + offY, pos.getZ() + offZ, stack);\n entityitem.setPickupDelay(10);\n world.spawnEntity(entityitem);\n }\n }", "@When(\"^I pop from the stack$\")\n\tpublic void i_pop_from_the_stack() throws Throwable {\n\t throw new PendingException();\n\t}", "public void removeInventoryList(Item item) {\n\t\tinventoryList.remove(item);\n\t}", "public void removePlayerItem(Player player, ItemStack item, int amountToRemove){\n\t\tint amountLeft = amountToRemove;\n\t\tdebugOut(\"Searching for \"+amountLeft+\" items\");\n\t\tItemStack[] inventory = player.getInventory().getContents();\n\t\tint invSlot = 1;\n\t\tfor(ItemStack currentItem:inventory){\n\t\t\tif(amountLeft > 0){\n\t\t\t\tdebugOut(\"Inventory slot: \"+invSlot);\n\t\t\t\tdebugOut(\"Amount remaining:\"+amountLeft);\n\t\t\t\tinvSlot++;\n\t\t\t\tif(areEqualItems(currentItem, item)){\n\t\t\t\t\tdebugOut(\"Items match -- getting stack size\");\n\t\t\t\t\tdebugOut(\"Stack size:\"+currentItem.getAmount());\n\t\t\t\t\tint stackSize = currentItem.getAmount();\n\t\t\t\t\tif(stackSize > amountLeft){\n\t\t\t\t\t\tdebugOut(\"There are more items in this stack than needed\");\n\t\t\t\t\t\tcurrentItem.setAmount(stackSize-amountLeft);\n\t\t\t\t\t\tamountLeft = 0;\n\t\t\t\t\t}else {\n\t\t\t\t\t\tdebugOut(\"This stack does not have enough to deposit the item -- deducting amount\");\n\t\t\t\t\t\tplayer.getInventory().removeItem(currentItem);\n\t\t\t\t\t\tdebugOut(\"removingItemAmount: \"+currentItem.getAmount() );\n\t\t\t\t\t\tamountLeft -= currentItem.getAmount();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}else {\n\t\t\t\t\tdebugOut(\"Not the same item\");\n\t\t\t\t}\n\t\t\t}else {\n\t\t\t\tdebugOut(\"Amount left is 0; breaking loop\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "public void smeltItem()\n {\n if (this.canSmelt())\n {\n ItemStack var1 = FurnaceRecipes.smelting().getSmeltingResult(this.furnaceItemStacks[0]);\n\n if (this.furnaceItemStacks[2] == null)\n {\n this.furnaceItemStacks[2] = var1.copy();\n }\n else if (this.furnaceItemStacks[2].isItemEqual(var1))\n {\n ++this.furnaceItemStacks[2].stackSize;\n }\n\n --this.furnaceItemStacks[0].stackSize;\n\n if (this.furnaceItemStacks[0].stackSize <= 0)\n {\n this.furnaceItemStacks[0] = null;\n }\n }\n }", "@Override\r\n\tpublic void undo() throws InstructionExecutionException {\n\t\ttry\r\n\t\t{\r\n\t\t\tthis.robotContainer.pickItem(id);\r\n\t\t\tthis.robotContainer.addItem(lastItem);\r\n\t\t\tthis.engine.addFuel(lastFuel-this.engine.getFuel());\r\n\t\t\tthis.engine.addRecycledMaterial(lastRecycledMaterial-this.engine.getRecycledMaterial());\r\n\t\t} \r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\tthrow new InstructionExecutionException();\r\n\t\t}\r\n\t}", "@SubL(source = \"cycl/stacks.lisp\", position = 3109) \n public static final SubLObject stack_pop(SubLObject stack) {\n checkType(stack, $sym1$STACK_P);\n if ((NIL == stack_empty_p(stack))) {\n {\n SubLObject elements = stack_struc_elements(stack);\n SubLObject item = elements.first();\n SubLObject rest = elements.rest();\n _csetf_stack_struc_num(stack, Numbers.subtract(stack_struc_num(stack), ONE_INTEGER));\n _csetf_stack_struc_elements(stack, rest);\n return item;\n }\n }\n return NIL;\n }", "@Override\r\n\tpublic void sellItem(AbstractItemAPI item) {\n\t\titems.remove(item);\r\n\t\t\r\n\t}", "public void deleteItemFromInventory(Item item) {\n\t\tinventory.deleteItem(item);\n\t}", "public void unloadItems() {\n if (dishwasherState == State.ON) {\n throw new InvalidStateException(\"The washing cycle hasn't been run yet\");\n } else if (dishwasherState == State.RUNNING) {\n throw new InvalidStateException(\"Please wait until washing cycle is finished\");\n }\n items = 0;\n dishwasherState = State.ON;\n System.out.println(\"The dishwasher is ready to go\");\n }", "public void pop() {\n\t\tif(stackTmp.isEmpty()){\n\t\t\twhile(!stack.isEmpty()){\n\t\t\t\tint tmp = stack.peek();\n\t\t\t\tstackTmp.push(tmp);\n\t\t\t\tstack.pop();\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tstackTmp.pop();\n\t\t}\n\t}", "public void removeItem(Item item) {\r\n for (Iterator<Item> it = inventoryItems.iterator(); it.hasNext(); ) {\r\n Item i = it.next();\r\n if (i.getId() == item.getId()) {\r\n i.setCount(i.getCount() - 1);\r\n }\r\n if (i.getCount() <= 0) {\r\n it.remove();\r\n }\r\n }\r\n }", "public void remove() {\n/* 1379 */ super.remove();\n/* 1380 */ this.inventoryMenu.removed(this);\n/* 1381 */ if (this.containerMenu != null) {\n/* 1382 */ this.containerMenu.removed(this);\n/* */ }\n/* */ }", "void popCard() throws IllegalStateException;", "void removeCartItem(int cartItemId);", "public static ItemStack consumeStack (ItemStack stack) {\n \n if (stack.getCount() == 1) {\n \n if (stack.getItem().hasContainerItem(stack))\n return stack.getItem().getContainerItem(stack);\n \n else\n return null;\n }\n \n else {\n \n stack.splitStack(1);\n return stack;\n }\n }", "public void pop()\r\n\t{\r\n\t\ttop--;\r\n\t\tstack[top] = null;\r\n\t}", "public Die removeDie(int position) {\n return this.bag.remove(position);\n }", "private void deleteItem() {\n // Only perform the delete if this is an existing inventory item\n if (mCurrentInventoryUri != null) {\n // Call the ContentResolver to delete the inventory item at the given content URI.\n // Pass in null for the selection and selection args because the mCurrentInventoryUri\n // content URI already identifies the inventory item that we want.\n int rowsDeleted = getContentResolver().delete(mCurrentInventoryUri, null, null);\n\n // Show a toast message depending on whether or not the delete was successful.\n if (rowsDeleted == 0) {\n // If no rows were deleted, then there was an error with the delete.\n Toast.makeText(this, getString(R.string.editor_delete_inventory_failed),\n Toast.LENGTH_SHORT).show();\n } else {\n // Otherwise, the delete was successful and we can display a toast.\n Toast.makeText(this, getString(R.string.editor_delete_inventory_successful),\n Toast.LENGTH_SHORT).show();\n }\n }\n\n // Close the activity\n finish();\n }", "public void setItemStack(ItemStack stack) {\n item = stack.clone();\n }", "private static void removeItemFromCart() {\r\n\t\tString itemName = getValidItemNameInput(scanner);\r\n\t\tfor (Iterator<Map.Entry<Product, Integer>> it = cart.getCartProductsEntries().iterator(); it.hasNext();){\r\n\t\t Map.Entry<Product, Integer> item = it.next();\r\n\t\t if( item.getKey().getName().equals(itemName) ) {\r\n\t\t\t it.remove();\r\n\t\t }\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\" Item removed from the cart successfully\");\r\n\t\tSystem.out.println();\r\n\t}", "public void pop() {\n while(!stack.isEmpty()) container.push(stack.pop());\n container.pop();\n while(!container.isEmpty()) stack.push(container.pop());\n }", "protected ItemStack dispenseStack(IBlockSource source, ItemStack stack)\n {\n ItemStack itemstack = ItemArmor.dispenseArmor(source, stack);\n return itemstack.isEmpty() ? super.dispenseStack(source, stack) : itemstack;\n }", "public void removeFromInventoryPage(Index index) throws InventoryNotFoundException, InventoryNotRemovableException {\n\n try {\n Inventory item = list.get(index.getZeroBased());\n\n if (item.getEventInstances() == 0) {\n list.remove(index.getZeroBased());\n } else {\n throw new InventoryNotRemovableException();\n }\n\n } catch (IndexOutOfBoundsException e) {\n throw new InventoryNotFoundException();\n }\n }", "private void removeAtIndex(int index) {\n // save the last item\n FoodItem toMoveBack = this._stock[this._noOfItems-1];\n // make it null\n this._stock[this._noOfItems-1] = null;\n // for each item until the index to remove from:\n for (int i = this._noOfItems-2; i > index-1; i--) {\n // save the last moved back temporarily\n FoodItem tempToMoveBack = toMoveBack;\n // assign to the next iteration item to move back\n toMoveBack = this._stock[i];\n // move back the item for current iteration\n this._stock[i] = tempToMoveBack;\n }\n // we removed an item - so let's decrease the item counter.\n this._noOfItems--;\n }", "public void removeItem() {\r\n\t\tlog.info(\"Remove item\");\r\n\t\tsu.waitElementClickableAndClick(LocatorType.Xpath, CartSplitViewField.Remove.getName());\r\n\t}", "public void dropItem(Item seekItem)\n {\n //get each item from the items's array list.\n for (Item item : items){\n if(item.getName().equals(seekItem.getName())){\n currentRoom.getInventory().getItems().add(item);\n removePlayerItem(item);\n System.out.println(\"You have placed the \"+ item.getName() +\" in the \" + currentRoom.getName() + \".\");\n }\n }\n }", "public boolean dropItem(Items item)\n {\n boolean itemDropped = false;\n if(haveItem(item) && !currentRoom.haveItem(item)){ //if item in inventory not room\n \n Inventory.remove(item.getName(), item);\n //currentRoom.removeItem(item); //responsibility for this is in cmd_take\n itemsHeld --; //inventory tracker -1\n itemDropped = true;\n \n }\n return itemDropped;\n //if(haveItem(item))\n //Inventory.remove(item);\n //itemsHeld --; //inventory tracker -1\n \n }", "@Override\n\tpublic ItemStack getStackInSlotOnClosing(int slot){\n\t if(modularStacks[slot] != null) {\n\t ItemStack itemstack = modularStacks[slot];\n\t modularStacks[slot] = null;\n\t return itemstack;\n\t } else {\n\t return null;\n\t }\n\t}", "@Override\r\n\tpublic DonationPackage removePackageFromContainer() throws EmptyStackException {\n\t\tif(ContainerEmpty() == false) {\r\n\t\t\treturn (DonationPackage) containerLine.pop();\r\n\t\t} else{\r\n\t\t\tthrow new EmptyStackException();\r\n\t\t}\r\n\t}", "@Override\n public T pop(){\n\n if (arrayAsList.isEmpty()){\n throw new IllegalStateException(\"Stack is empty. Nothing to pop!\");\n }\n\n T tempElement = arrayAsList.get(stackPointer - 1);\n arrayAsList.remove(--stackPointer);\n\n return tempElement;\n }", "E pop() throws EmptyStackException;", "public T popAt(int index) throws Exception{\n if(index<0 || index>=stacks.size()) throw new Exception();\n T c1 = stacks.get(index).pop();\n if(stacks.get(index).size()==0)\n stacks.remove(index);\n return c1;\n }", "public abstract boolean canRemoveItem(Player player, Item item, int slot);", "@Test\n public void testDecrementInventory() throws Exception {\n int firstDecrement;\n int secondDecrement;\n\n List<VendingItem> items;\n VendingItem twix;\n\n try {\n fillInventoryFileWithTestData(VALID);\n dao.loadItems();\n } catch (VendingMachinePersistenceException ex) {\n }\n\n items = dao.getItems();\n\n assertEquals(1, items.size());\n\n twix = items.get(0);\n\n // firstDecrement = 19\n firstDecrement = twix.decrementStock();\n\n // secondDecrement = 18\n secondDecrement = twix.decrementStock();\n\n assertEquals(1, firstDecrement - secondDecrement);\n }", "public void removeExistingItem(Item item) {\n inventory.remove(item);\n Thread updateUserThread = userController.new UpdateUserThread(LoginActivity.USERLOGIN);\n updateUserThread.start();\n synchronized (updateUserThread) {\n try {\n updateUserThread.wait();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n }", "public E pop() throws NoSuchElementException{\n\t\treturn stackList.removeFromFront();\n\t}", "public ItemStack transferStackInSlot(EntityPlayer playerIn, int index) {\n ItemStack var3 = null;\n Slot var4 = (Slot) this.inventorySlots.get(index);\n\n if (var4 != null && var4.getHasStack()) {\n ItemStack var5 = var4.getStack();\n var3 = var5.copy();\n\n if ((index < 0 || index > 2) && index != 3) {\n if (!this.theSlot.getHasStack() && this.theSlot.isItemValid(var5)) {\n if (!this.mergeItemStack(var5, 3, 4, false)) {\n return null;\n }\n } else if (ContainerBrewingStand.Potion.canHoldPotion(var3)) {\n if (!this.mergeItemStack(var5, 0, 3, false)) {\n return null;\n }\n } else if (index >= 4 && index < 31) {\n if (!this.mergeItemStack(var5, 31, 40, false)) {\n return null;\n }\n } else if (index >= 31 && index < 40) {\n if (!this.mergeItemStack(var5, 4, 31, false)) {\n return null;\n }\n } else if (!this.mergeItemStack(var5, 4, 40, false)) {\n return null;\n }\n } else {\n if (!this.mergeItemStack(var5, 4, 40, true)) {\n return null;\n }\n\n var4.onSlotChange(var5, var3);\n }\n\n if (var5.stackSize == 0) {\n var4.putStack((ItemStack) null);\n } else {\n var4.onSlotChanged();\n }\n\n if (var5.stackSize == var3.stackSize) {\n return null;\n }\n\n var4.onPickupFromSlot(playerIn, var5);\n }\n\n return var3;\n }", "public Item dequeue() \n {\n if (isEmpty()) \n \tthrow new NoSuchElementException(\"Queue underflow\");\n \n if (stack2.isEmpty()) \n \tmoveStack1ToStack2();\n \n return stack2.pop();\n }", "public void takeItemsFromChest() {\r\n currentRoom = player.getCurrentRoom();\r\n for (int i = 0; i < currentRoom.getChest().size(); i++) {\r\n player.addToInventory(currentRoom.getChest().get(i));\r\n currentRoom.getChest().remove(i);\r\n }\r\n\r\n }", "public Object pop( )\n {\n Object item = null;\n\n try\n {\n if ( this.top == null)\n {\n throw new Exception( );\n }\n\n item = this.top.data;\n this.top = this.top.next;\n \n this.count--;\n }\n catch (Exception e)\n {\n System.out.println( \" Exception: attempt to pop an empty stack\" );\n }\n\n return item;\n }", "@SubL(source = \"cycl/stacks.lisp\", position = 1928) \n public static final SubLObject clear_stack(SubLObject stack) {\n checkType(stack, $sym1$STACK_P);\n _csetf_stack_struc_num(stack, ZERO_INTEGER);\n _csetf_stack_struc_elements(stack, NIL);\n return stack;\n }", "@Test\n public void testRemove(){\n FunctionalLinkedList newList = new FunctionalLinkedList();\n for(int i = 1; i < 101; i++){\n if(i%2 == 1){\n newList.add(\"Odd\");\n } else {\n newList.add(\"Even\");\n }\n }\n stack = new ImprovedStackImpl(newList);\n \n // Remove one set of elements & check size.\n stack.remove(\"Odd\");\n assertEquals(\"Size of list is incorrect.\", 50, stack.size());\n String even;\n for(int i = 0; i < stack.size(); i++){\n even = (String) stack.pop().getReturnValue();\n assertEquals(\"'Odd' not removed at loop \"+ i +\".\", \"Even\", even);\n }\n }", "public ItemStack decrStackSize(int slotIndex, int numRemove)\n {\n if (this.waterjetStacks[slotIndex] != null)\n {\n ItemStack itemstack;\n\n if (this.waterjetStacks[slotIndex].stackSize <= numRemove)\n {\n itemstack = this.waterjetStacks[slotIndex];\n this.waterjetStacks[slotIndex] = null;\n return itemstack;\n } else\n {\n itemstack = this.waterjetStacks[slotIndex].splitStack(numRemove);\n\n if (this.waterjetStacks[slotIndex].stackSize == 0)\n {\n this.waterjetStacks[slotIndex] = null;\n }\n\n return itemstack;\n }\n } else\n {\n return null;\n }\n }", "public void pop() throws StackUnderflowException;", "@Test\n public void revertBackTest() {\n stack.revertBack(stack2);\n assertEquals(stack2.toString(), stack.toString());\n\n ResourceStack stack3 = new ResourceStack(99,99,99,99);\n stack2.revertBack(stack3);\n assertEquals(stack3.toString(), stack2.toString());\n }", "public T pop() throws StackUnderflowException{\r\n\t\t\t\t\r\n\t\t// check if the stack is empty before popping up.\r\n\t\tif(stackData.isEmpty())\r\n\t\t\tthrow new StackUnderflowException();\r\n\r\n\t\treturn stackData.remove(stackData.size()-1); //popping;\r\n\t}", "public void popFrame(){\n runStack.popFrame();\n }", "@Override\n\tpublic void breakBlock(World worldIn, BlockPos pos, IBlockState state) {\n\t\tTileEntity tileEntity = worldIn.getTileEntity(pos);\n\t\tif (tileEntity instanceof IInventory) {\n\t\t\tInventoryHelper.dropInventoryItems(worldIn, pos, (IInventory) tileEntity);\n\t\t}\n\t\t// Super MUST be called last because it removes the tile entity\n\n\t\t//this.dropBlockAsItem(worldIn, pos, state, 0);\n\t\tsuper.breakBlock(worldIn, pos, state);\n\t}" ]
[ "0.63847023", "0.62713206", "0.6239218", "0.612747", "0.6086902", "0.60573584", "0.60212535", "0.60026765", "0.5956383", "0.59411126", "0.590932", "0.5852704", "0.5850167", "0.58173245", "0.5782623", "0.57805", "0.5777131", "0.5770483", "0.5677582", "0.56739813", "0.5673005", "0.5663193", "0.56412524", "0.56375337", "0.5607323", "0.56005466", "0.55894184", "0.5584411", "0.5567926", "0.5561353", "0.55549777", "0.5554114", "0.55428123", "0.55293936", "0.55229443", "0.5511569", "0.54794973", "0.5475831", "0.54535174", "0.5446664", "0.5438884", "0.54365003", "0.5418576", "0.5418433", "0.5406285", "0.5400435", "0.5394559", "0.5392266", "0.5385054", "0.53822184", "0.5380105", "0.5379157", "0.53766084", "0.5373359", "0.5363882", "0.5350935", "0.53485453", "0.53424424", "0.5340815", "0.5331097", "0.53127", "0.5309217", "0.5305477", "0.5304217", "0.5300055", "0.5286535", "0.5280701", "0.52794224", "0.5277866", "0.5275429", "0.52609086", "0.5251664", "0.52454823", "0.524493", "0.52433586", "0.5240523", "0.5236225", "0.52353644", "0.5231955", "0.5227728", "0.52219707", "0.52194315", "0.52182806", "0.5208912", "0.5193642", "0.5191361", "0.51902133", "0.518887", "0.5187", "0.5186537", "0.51852053", "0.5181594", "0.5180939", "0.5180376", "0.5176441", "0.5173218", "0.51720357", "0.5168551", "0.51673836", "0.5155242" ]
0.5966401
8
Safely adds an item to an inventory. It is recommended that this function be called from a synchronous scheduler. The inventory will be restored to its previous state if an error occurs. Throws if the inventory is not valid. Throws if the item is not valid. Throws if there isn't enough room to add the item in its entirety.
public static void addItemToInventory(final Inventory inventory, final ItemStack item) throws InvalidParameterException, FailedTransactionException { if (!isValidInventory(inventory)) { throw new InvalidParameterException("Cannot add item from an invalid inventory."); } if (!ItemAPI.isValidItem(item)) { throw new InvalidParameterException("Cannot add an invalid item from an inventory."); } ItemStack[] savedInventory = duplicateInventory(inventory.getContents()); Map<Integer, ItemStack> remaining = inventory.addItem(item); if (!remaining.isEmpty()) { // Restore the inventory to its previous state inventory.setContents(savedInventory); throw new FailedTransactionException("Was unable to put that item in that inventory."); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addItem(Item itemToAdd){\n\t\tif(!isFull()){\n\t\t\tint index = findFreeSlot();\n\t\t\tinventoryItems[index] = itemToAdd;\n\t\t}\n\t\telse{\n\t\t\tSystem.out.println(\"Inventory full.\");\n\t\t}\n\t\t\n\t}", "public void addItem(Item item)\n\t{\n\t\tif(inventory.size()<=9)\n\t\t\tinventory.add(item);\n\t\telse\n\t\t\tSystem.out.println(\"Inventory is full.\");\n\t}", "public static void addItem(Item item)\n {\n inventory.add(item);\n if(!(item.getRoomNumber() == -1 || item.getEventNumber() == -1))\n {\n Map.getRoom(item.getRoomNumber()).getEvent(item.getEventNumber()).enable();\n }\n }", "private void addValidItem(Item item){\r\n\t\titems.put(item.getItemIdentifier(), item);\r\n\t\ttotal.updateTotal(item);\r\n\t}", "public void addItem(Item item) {\n inventory.add(item);\n Thread updateUserThread = userController.new UpdateUserThread(LoginActivity.USERLOGIN);\n updateUserThread.start();\n synchronized (updateUserThread) {\n try {\n updateUserThread.wait();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n }", "public Boolean add(Item item) {\n \tif (itemCollection.containsKey(item.getItemName())) {\r\n \tif (checkAvailability(item, 1)) {\r\n \t\titem.setQuatity(item.getQuatity() + 1);\r\n \t\titemCollection.put(item.getItemName(), item);\r\n \t\treturn true;\r\n \t} else return false;\r\n } else {\r\n \titemCollection.put(item.getItemName(), item);\r\n \treturn true;\r\n }\r\n \t\r\n }", "private void addToInventory(Item item) {\n inventory.put(item.getName(), item);\n }", "@Test(expected = VendingMachineException.class)\r\n\tpublic void testAddItem_already_occupied() {\r\n\t\tVendingMachineItem test = new VendingMachineItem(\"test\", 10.0);\r\n\t\tvendMachine.addItem(test, \"A\");\r\n\t\tVendingMachineItem test2 = new VendingMachineItem(\"test\", 10.0);\r\n\t\tvendMachine.addItem(test2, \"A\");\r\n\r\n\t}", "public void addItem(Item theItem) {\n\t\tif (inventory != null) {\n\t\t\tif (!isAuctionAtMaxCapacity()) {\n\t\t\t\t// Check item doesn't already exist as key in map\n\t\t\t\tif (inventory.containsKey(theItem)) {\n\t\t\t\t\t//ERROR CODE: ITEM ALREADY EXISTS\n\t\t\t\t\tSystem.out.println(\"That item already exists in the inventory.\");\n\t\t\t\t} else\n\t\t\t\t\tinventory.put(theItem, new ArrayList<Bid>());\n\t\t\t} else if (isAuctionAtMaxCapacity()) {\n\t\t\t\t//ERROR CODE: AUCTION AT MAX CAPACITY\n\t\t\t\tSystem.out.println(\"\\nYour auction is at maximum capacity\");\n\t\t\t} \n\t\t} else {\n\t\t\tinventory = new HashMap<Item, ArrayList<Bid>>();\n\t\t\tinventory.put(theItem, new ArrayList<Bid>());\t\t\t\t\n\t\t} \t\t\t\t\t\t\n\t}", "public void addItemInventory(Item item){\n playerItem.add(item);\n System.out.println(item.getDescription() + \" was taken \");\n System.out.println(item.getDescription() + \" was removed from the room\"); // add extra information to inform user that the item has been taken\n }", "public boolean addItemToInventory(InventoryItem itemToAdd) {\n if (inventory.size() >= MAX_ITEMS) {\n // Inventory full, could not add the item\n return false;\n }\n\n // Let the strategy know this player received an item\n strategy.onReceiveItem(itemToAdd);\n inventory.add(itemToAdd);\n return true;\n }", "public boolean putItem(@NonNull Item item) {\n return items.add(item);\n }", "public boolean add(T item) {\n boolean addSuccessful = items.add(item);\n if (addSuccessful) {\n currentSize = -1.0;\n inCapacitySize = -1.0;\n }\n return addSuccessful;\n }", "@Test\r\n\tpublic void testAddItem_not_occupied() {\r\n\t\tVendingMachineItem test = new VendingMachineItem(\"test\", 10.0);\r\n\t\tvendMachine.addItem(test, \"A\");\r\n\t\tassertEquals(test, vendMachine.getItem(\"A\"));\r\n\t}", "public void addProduct(Product item){\n inventory.add(item);\n }", "public void addItemtoInventoryList(String item) {\r\n InventoryList.add(item);\r\n }", "public void addItem(Item item) {\n\t\tObjects.requireNonNull(item);\n\t\titems.add(item);\n\t}", "public void addItemInventory(Item item){\r\n playerItem.add(item);\r\n System.out.println(item.getDescription() + \" was taken \");\r\n }", "public void addItemToInventory(Item ... items){\n this.inventory.addItems(items);\n }", "@Override\n\tpublic boolean addItem(ItemStack item, Player player) {\n\t\tif (!canAddItem(item, player)) {\n\t\t\treturn false;\n\t\t}\n\t\tif (item == null) {\n\t\t\treturn true;\n\t\t}\n\t\t//Backup contents\n\t\tItemStack[] backup = getContents().clone();\n\t\tItemStack backupItem = new ItemStack(item.getTypeId(), item.getAmount(), item.getDurability());\n\t\t\n\t\tint max = MinecartManiaWorld.getMaxStackSize(item);\n\t\t\n\t\t//First attempt to merge the itemstack with existing item stacks that aren't full (< 64)\n\t\tfor (int i = 0; i < size(); i++) {\n\t\t\tif (getItem(i) != null) {\n\t\t\t\tif (getItem(i).getTypeId() == item.getTypeId() && getItem(i).getDurability() == item.getDurability()) {\n\t\t\t\t\tif (getItem(i).getAmount() + item.getAmount() <= max) {\n\t\t\t\t\t\tsetItem(i, new ItemStack(item.getTypeId(), getItem(i).getAmount() + item.getAmount(), item.getDurability()));\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tint diff = getItem(i).getAmount() + item.getAmount() - max;\n\t\t\t\t\t\tsetItem(i, new ItemStack(item.getTypeId(), max, item.getDurability()));\n\t\t\t\t\t\titem = new ItemStack(item.getTypeId(), diff, item.getDurability());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Attempt to add the item to an empty slot\n\t\tint emptySlot = firstEmpty();\n\t\tif (emptySlot > -1) {\n\t\t\tsetItem(emptySlot, item);\n\t\t\tupdate();\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\t\n\t\t//Try to merge the itemstack with the neighbor chest, if we have one\n\t\tMinecartManiaChest neighbor = getNeighborChest();\n\t\tif (neighbor != null) {\n\t\t\t//flag to prevent infinite recursion\n\t\t\tif (getDataValue(\"neighbor\") == null) {\n\t\t\t\tneighbor.setDataValue(\"neighbor\", Boolean.TRUE);\n\t\t\t\tif (getNeighborChest().addItem(item)) {\n\t\t\t\t\tupdate();\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//reset flag\n\t\t\t\tsetDataValue(\"neighbor\", null);\n\t\t\t}\n\t\t}\n\t\t\t\n\t\t//if we fail, reset the inventory and item back to previous values\n\t\tgetChest().getInventory().setContents(backup);\n\t\titem = backupItem;\n\t\treturn false;\n\t}", "public void addItem(Item item) {\r\n for (Item i : inventoryItems) {\r\n if (i.getId() == item.getId()) {\r\n i.setCount(i.getCount() + item.getCount());\r\n return;\r\n }\r\n }\r\n inventoryItems.add(item);\r\n }", "private void addItemStack(Item itemStack) {\n\t\tint findStackable = findStackableItem(itemStack);\r\n\t\tif(findStackable!=-1){\r\n\t\t\tItem heldStack=tileItems.getItem(findStackable);\r\n\t\t\twhile(!heldStack.stackFull()&&\t//as long as the current stack isn't full and the stack we're picking up isn't empty\r\n\t\t\t\t!itemStack.stackEmpty()){\r\n\t\t\t\theldStack.incrementStack();\r\n\t\t\t\titemStack.decrementStack(tileItems);\r\n\t\t\t\tif(itemStack.stackEmpty())\t//will this cause an error since the item is removed by the inventory?\r\n\t\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\taddItemStack(itemStack);\r\n\t\t}\r\n\t\telse\r\n\t\t\taddFullStack(itemStack);\r\n\t}", "public boolean addItem(int itemId) {\n\t\tint nextFreeSlot = getSlotForId(1);\n\t\tif (itemId <= 0)\n\t\t\treturn false;\n\t\tif (nextFreeSlot != -1 && burdenedItems[nextFreeSlot] == 0) {\n\t\t\tburdenedItems[nextFreeSlot] = itemId;\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public void addItem(String i) {\n\t\tItem item = Item.getItem(ItemList, i);\n\t Inventory.add(item);\n\t inventoryList.getItems().add(i);\n\n\t}", "public boolean addItem( GameItem gameItem , boolean stack )\n {\n int slot = -1;\n for( int i = 0 ; i < size ; i++ ) {\n GameItem item = items[ i ];\n if( stack ) {\n if( item != null ) {\n if( item.getId() == gameItem.getId() ) {\n item.add( gameItem.getAmount() );\n return true;\n }\n } else {\n if( slot == -1 ) {\n slot = i;\n }\n }\n } else {\n if( item == null ) {\n items[ i ] = gameItem;\n return true;\n }\n }\n }\n \n if( slot != -1 ) {\n items[ slot ] = gameItem;\n return true;\n }\n \n return false;\n }", "public int addItem(String name, int value) {\n\t\tfor (int i = 0; i < inventoryslot.length; i++) {\n\t\t\tif (inventoryslot[i].getItemname()==name) {\n\t\t\t\ttempstate=inventoryslot[i].changevalue(value);\n\t\t\t\tif(tempstate>0)return tempstate;/**Item over stacksize */\n\t\t\t\telse if(tempstate<0)return tempstate;/** Item empty*/\n\t\t\t\treturn tempstate;/** item added inventory */\n\t\t\t}\t\t\t\t\n\t\t}\n\t\treturn -1;/** item does not exists in inventory */\n\t}", "public void addItem(SoldItem item) {\n\n items.add(item);\n log.debug(\"Added \" + item.getName() + \" quantity of \" + item.getQuantity());\n\n }", "public void addItem() {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tSystem.out.print(\"Enter Item Name: \");\n\t\tString itemName = scanner.nextLine();\n\t\tSystem.out.print(\"Enter Item Description: \");\n\t\tString itemDescription = scanner.nextLine();\n\t\tSystem.out.print(\"Enter minimum bid price for item: $\");\n\t\tdouble basePrice = scanner.nextDouble();\n\t\tLocalDate createDate = LocalDate.now();\n\t\tItem item = new Item(itemName, itemDescription, basePrice, createDate);\n\t\taddItem(item);\n\t}", "public void addItem(Item item) throws NoSuchItemException {\n\t\t// update the list of items which have been purchased\n\t\tif (item instanceof BarcodedItem) {\n\t\t\tBarcodedItem barcodeItem = (BarcodedItem) item;\n\t\t\tBarcode barcode = barcodeItem.getBarcode();\n\t\t\t// ensure product exists\n\t\t\tBarcodedProduct product = productDatabase.getProductByBarcode(barcode);\n\t\t\tint numAvailable = productDatabase.getInventoryByProduct(product);\n\t\t\tif (numAvailable == 0) {\n\t\t\t\tthrow new NoSuchItemException(\"No inventory of that product\");\n\t\t\t}\n\t\t\tproductDatabase.setInventoryByProduct(product, numAvailable - 1);\n\t\t\tpurchaseList.addItem(item);\n\t\t} else if (item instanceof PLUCodedItem) {\n\t\t\tPLUCodedItem pluItem = (PLUCodedItem) item;\n\t\t\tPriceLookupCode pluCode = pluItem.getPLUCode();\n\t\t\t// ensure product exists\n\t\t\tPLUCodedProduct product = productDatabase.getProductByPLUCode(pluCode);\n\t\t\tint numAvailable = productDatabase.getInventoryByProduct(product);\n\t\t\tif (numAvailable == 0) {\n\t\t\t\tthrow new NoSuchItemException(\"No inventory of that product\");\n\t\t\t}\n\t\t\tproductDatabase.setInventoryByProduct(product, numAvailable - 1);\n\t\t\tpurchaseList.addItem(item);\n\t\t} else if (item instanceof BagItem) {\n\t\t\tpurchaseList.addItem(item);\n\t\t} else {\n\t\t\tthrow new ControlSoftwareException(\"Item type not implemented in PurchaseManager\");\n\t\t}\n\t}", "public void addItem(Item item){\n if(ChronoUnit.DAYS.between(LocalDate.now(), item.getBestBefore()) <= 2){\n //testInfoMessage = true; //ONLY FOR TESTING\n infoMessage(item.getName(), item.getBestBefore()); // DISABLE FOR TESTING\n }\n itemList.add(item);\n totalCost += item.getPrice();\n }", "@Test\n\tpublic void testAddItem() {\n\t\tassertEquals(\"testAddItem(LongTermTest): valid enter failure\", 0, ltsTest.addItem(item4, 10)); //can enter\n\t\tassertEquals(\"testAddItem(LongTermTest): invalid available capacity after adding\", 900, ltsTest.getAvailableCapacity());\n\t\tassertEquals(\"testAddItem(LongTermTest): invalid item count after adding\", 10, ltsTest.getItemCount(item4.getType()));\n\n\t\tassertEquals(\"testAddItem(LongTermTest): invalid enter failure\", -1, ltsTest.addItem(item4, 100)); // can't enter\n\t\tassertEquals(\"testAddItem(LongTermTest): invalid available capacity after adding\", 900, ltsTest.getAvailableCapacity());\n\t\tassertEquals(\"testAddItem(LongTermTest): invalid item count after adding\", 10, ltsTest.getItemCount(item4.getType()));\n\t}", "public Inventory<T> add(final T item) {\n if (item == null) {\n return this;\n }\n final HashMap<T, Integer> freshMap = new HashMap<>(items);\n freshMap.put(item, items.get(item) + 1);\n return new Inventory<T>(enums, Collections.unmodifiableMap(freshMap));\n }", "public void createItemInInventory(Item newItem) {\n\t\tinventory.createItem(newItem);\n\t}", "public static int reserveItem(Basket basket, String item, int quantity){\n StockItem stockItem = stockList.get(item);\n if(stockItem == null){\n System.out.println(\"We don't sell \"+ item);\n return 0;\n }\n if(stockList.reserveStock(item, quantity) != 0){\n basket.addToBasket(stockItem, quantity);\n return quantity;\n }\n System.out.println(\"Unable to reserve: '\"+item+\"' with quantity \"+ quantity + (quantity == 1 ? \" pc.\" : \" pcs.\"));\n return 0; //if get here means have no sufficient stock to sell.\n }", "public void store(Item item) {\n this.items.add(item);\n }", "public void buy(Item item) {\n // remove money from wallet\n try { \n wallet.removeMoney(item.getPrice());\n // remove item from room\n currentRoom.removeItem(item);\n // add item to inventory\n addToInventory(item);\n } catch (IllegalArgumentException e) {\n System.err.println(\"You don't have enough money to purchase \" + item.getDescription());\n }\n\n\n }", "public Item addItem(Item item) {\r\n uniqueCounter++;\r\n items.add(item);\r\n return item;\r\n }", "public boolean addNewItem(VendItem item) {\n if (itemCount < maxItems) {\n stock[itemCount] = item;\n itemCount++;\n return true;\n } else {\n return false;\n }\n }", "public void addToInventory() {\r\n\t\tdo {\r\n\t\t\tint quantity = 0;\r\n\t\t\tString brand = getToken(\"Enter washer brand: \");\r\n\t\t\tString model = getToken(\"Enter washer model: \");\r\n\t\t\tWasher washer = store.searchWashers(brand + model);\r\n\t\t\tif (washer == null) {\r\n\t\t\t\tSystem.out.println(\"No such washer exists.\");\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tquantity = getInteger(\"Enter quantity to add: \");\r\n\t\t\tboolean result = store.addWasherToInventory(brand, model, quantity);\r\n\t\t\tif(result) {\r\n\t\t\t\tSystem.out.println(\"Added \" + quantity + \" of \" + washer);\r\n\t\t\t}else {\r\n\t\t\t\tSystem.out.println(\"Washer could not be added to inventory.\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t} while (yesOrNo(\"Add more washers to the inventory?\"));\r\n\t}", "void add(Item item);", "@Override\r\n public boolean add(Item item){\r\n if(item.stackable&&contains(item)){\r\n stream().filter(i -> i.name.endsWith(item.name)).forEach(i -> {\r\n i.quantity += item.quantity;\r\n });\r\n }else if(capacity<=size()) return false;\r\n else super.add(item);\r\n return true;\r\n }", "public abstract void addItem(AbstractItemAPI item);", "public void addItem(Item item, int x, int y) {\n\t\tInventory items = getItemsAt(x, y);\n\t\titems.add(item);\n\t}", "public boolean addItem(Item item) throws RemoteException, ClassNotFoundException, SQLException {\n Connection conn = DBConnection.getConnection();\n PreparedStatement stm = conn.prepareStatement(\"Insert into Item values(?,?,?,?)\");\n Object[] itemData = {item.getCode(), item.getDescription(), item.getUnitPrice(), item.getQtyOnHand()};\n for (int i = 0; i < itemData.length; i++) {\n stm.setObject(i + 1, itemData[i]);\n }\n return stm.executeUpdate() > 0;\n }", "public void carry(Item item)\n {\n\n // Check if item to be added doesn't go over carry limit.\n if (!((getPerson(PLAYER).getWeight() + item.getWeight()) > getPerson(PLAYER).getCarryLimit())){\n getPerson(PLAYER).getInventory().getItems().add(item); \n\n removeRoomItem(item);\n System.out.println();\n System.out.println(item.getName() + \" has been added to your bag.\");\n System.out.println(\"You are carrying \" + getPerson(PLAYER).getWeight()+ \"kg.\");\n }\n else {\n System.out.println(\"Your bag is too heavy to add more items.\");\n }\n\n }", "public void putItem(Item item) {\n throw new OurBadException(\"Item '\" + this.serialize() + \"' is not an array.\");\n }", "public void addItem() {\r\n\t\tFacesContext fc = FacesContext.getCurrentInstance();\r\n\t\tif (itemInvoice.getQuantidade() <= itemPO.getQuantidadeSaldo()) {\r\n\t\t\tBigDecimal total = itemInvoice.getPrecoUnit().multiply(\r\n\t\t\t\t\tnew BigDecimal(itemInvoice.getQuantidade()));\r\n\t\t\titemInvoice.setTotal(total);\r\n\t\t\tif (!editarItem) {\r\n\r\n\t\t\t\tif (itemInvoice.getPrecoUnit() == null) {\r\n\t\t\t\t\titemInvoice.setPrecoUnit(new BigDecimal(0.0));\r\n\t\t\t\t}\r\n\t\t\t\tif (itemInvoice.getQuantidade() == null) {\r\n\t\t\t\t\titemInvoice.setQuantidade(0);\r\n\t\t\t\t}\r\n\t\t\t\titemInvoice.setInvoice(invoice);\r\n\r\n\t\t\t\tinvoice.getItensInvoice().add(itemInvoice);\r\n\r\n\t\t\t} else {\r\n\t\t\t\tinvoice.getItensInvoice().set(\r\n\t\t\t\t\t\tinvoice.getItensInvoice().indexOf(itemInvoice),\r\n\t\t\t\t\t\titemInvoice);\r\n\t\t\t}\r\n\t\t\tcarregarTotais();\r\n\t\t\tinicializarItemInvoice();\r\n\t\t\trequired = false;\r\n\t\t} else {\r\n\r\n\t\t\tMessages.adicionaMensagemDeInfo(TemplateMessageHelper.getMessage(\r\n\t\t\t\t\tMensagensSistema.INVOICE, \"lblQtdMaioSaldo\", fc\r\n\t\t\t\t\t\t\t.getViewRoot().getLocale()));\r\n\t\t}\r\n\t}", "public boolean takeItem(Items item)\n { \n boolean itemTaken = false;\n if(!haveItem(item) && currentRoom.haveItem(item)){ //if item in room not inventory\n if(!item.canBeHeld()){ // if item can't be held\n System.out.println (\"This item can not be picked up\");\n }else if(itemsHeld >= itemLimit) { //item can be held but not enough space\n System.out.println(\"Inventory is full. Drop something first\");\n }else{ //item can be held and there is space in inventory\n Inventory.put(item.getName(), item);\n //currentRoom.removeItem(item); //responsibility for this is in cmd_take\n itemsHeld ++; //inventory tracker +1\n itemTaken = true;\n }\n }\n return itemTaken;\n }", "public void addItem(Item item) {\n items.add(item);\n }", "public void addItem(Item item) {\n items.add(item);\n }", "public void addItem(Item newItem) {\n for (Item i : inventory) {\n if (newItem.getClass().equals(i.getClass())) {\n i.setQuantity(i.getQuantity() + newItem.getQuantity());\n return;\n }\n }\n inventory.add(newItem);\n }", "public void addItem(Item item) {\n _items.add(item);\n }", "@Test\r\n public void testAddInventory() throws InventoryException {\r\n coffeeMaker.addInventory(\"4\", \"7\", \"0\", \"9\");\r\n coffeeMaker.addInventory(\"0\", \"0\", \"0\", \"0\");\r\n coffeeMaker.addInventory(\"3\", \"6\", \"9\", \"12\"); // this should not fail\r\n coffeeMaker.addInventory(\"10\", \"10\", \"10\", \"10\");// this should not fail\r\n }", "public void addItem(Item item) {\r\n\t\titems.add(item);\r\n\t}", "public boolean add(T item) {\n // offer(T e) is used here simply to eliminate exceptions. add returns false only\n // if adding the item would have exceeded the capacity of a bounded queue.\n return q.offer(item);\n }", "public void addItem(Item item) {\n\t\titems.add(item);\n\t}", "@Test\n\tpublic void testAddInventory() throws InventoryException {\n\t\tcoffeeMaker.addInventory(\"4\",\"7\",\"0\",\"9\");\n\t}", "public void addItem(Item item, boolean moving, long creatureId, boolean starting) {\n/* 2186 */ if (this.inactive) {\n/* */ \n/* 2188 */ logger.log(Level.WARNING, \"adding \" + item.getName() + \" to inactive tile \" + this.tilex + \",\" + this.tiley + \" surf=\" + this.surfaced + \" itemsurf=\" + item\n/* 2189 */ .isOnSurface(), new Exception());\n/* 2190 */ logger.log(Level.WARNING, \"The zone \" + this.zone.id + \" covers \" + this.zone.startX + \", \" + this.zone.startY + \" to \" + this.zone.endX + \",\" + this.zone.endY);\n/* */ } \n/* */ \n/* */ \n/* 2194 */ if (item.hidden) {\n/* */ return;\n/* */ }\n/* 2197 */ if (this.isTransition && this.surfaced && !item.isVehicle()) {\n/* */ \n/* 2199 */ if (logger.isLoggable(Level.FINEST))\n/* */ {\n/* 2201 */ logger.finest(\"Adding \" + item.getName() + \" to cave level instead.\");\n/* */ }\n/* 2203 */ boolean stayOnSurface = false;\n/* 2204 */ if (Zones.getTextureForTile(this.tilex, this.tiley, 0) != Tiles.Tile.TILE_HOLE.id)\n/* 2205 */ stayOnSurface = true; \n/* 2206 */ if (!stayOnSurface) {\n/* */ \n/* 2208 */ getCaveTile().addItem(item, moving, starting);\n/* */ \n/* */ return;\n/* */ } \n/* */ } \n/* 2213 */ if (item.isTileAligned()) {\n/* */ \n/* 2215 */ item.setPosXY(((this.tilex << 2) + 2), ((this.tiley << 2) + 2));\n/* 2216 */ item.setOwnerId(-10L);\n/* 2217 */ if (item.isFence())\n/* */ {\n/* 2219 */ if (isOnSurface()) {\n/* */ \n/* 2221 */ int offz = 0;\n/* */ \n/* */ try {\n/* 2224 */ offz = (int)((item.getPosZ() - Zones.calculateHeight(item.getPosX(), item.getPosY(), this.surfaced)) / 10.0F);\n/* */ }\n/* 2226 */ catch (NoSuchZoneException nsz) {\n/* */ \n/* 2228 */ logger.log(Level.WARNING, \"Dropping fence item outside zones.\");\n/* */ } \n/* 2230 */ float rot = Creature.normalizeAngle(item.getRotation());\n/* 2231 */ if (rot >= 45.0F && rot < 135.0F)\n/* */ {\n/* 2233 */ VolaTile next = Zones.getOrCreateTile(this.tilex + 1, this.tiley, this.surfaced);\n/* 2234 */ next.addFence((Fence)new TempFence(StructureConstantsEnum.FENCE_SIEGEWALL, this.tilex + 1, this.tiley, offz, item, Tiles.TileBorderDirection.DIR_DOWN, next\n/* 2235 */ .getZone().getId(), getLayer()));\n/* */ }\n/* 2237 */ else if (rot >= 135.0F && rot < 225.0F)\n/* */ {\n/* 2239 */ VolaTile next = Zones.getOrCreateTile(this.tilex, this.tiley + 1, this.surfaced);\n/* 2240 */ next.addFence((Fence)new TempFence(StructureConstantsEnum.FENCE_SIEGEWALL, this.tilex, this.tiley + 1, offz, item, Tiles.TileBorderDirection.DIR_HORIZ, next\n/* 2241 */ .getZone().getId(), getLayer()));\n/* */ }\n/* 2243 */ else if (rot >= 225.0F && rot < 315.0F)\n/* */ {\n/* 2245 */ addFence((Fence)new TempFence(StructureConstantsEnum.FENCE_SIEGEWALL, this.tilex, this.tiley, offz, item, Tiles.TileBorderDirection.DIR_DOWN, \n/* 2246 */ getZone().getId(), getLayer()));\n/* */ }\n/* */ else\n/* */ {\n/* 2250 */ addFence((Fence)new TempFence(StructureConstantsEnum.FENCE_SIEGEWALL, this.tilex, this.tiley, offz, item, Tiles.TileBorderDirection.DIR_HORIZ, \n/* 2251 */ getZone().getId(), getLayer()));\n/* */ }\n/* */ \n/* */ } \n/* */ }\n/* 2256 */ } else if (item.getTileX() != this.tilex || item.getTileY() != this.tiley) {\n/* */ \n/* 2258 */ putRandomOnTile(item);\n/* 2259 */ item.setOwnerId(-10L);\n/* */ } \n/* 2261 */ if (!this.surfaced)\n/* */ {\n/* 2263 */ if (Tiles.isSolidCave(Tiles.decodeType(Server.caveMesh.getTile(this.tilex, this.tiley)))) {\n/* */ \n/* 2265 */ if (!(getSurfaceTile()).isTransition) {\n/* */ \n/* 2267 */ getSurfaceTile().addItem(item, moving, creatureId, starting);\n/* 2268 */ logger.log(Level.INFO, \"adding \" + item.getName() + \" in rock at \" + this.tilex + \", \" + this.tiley + \" \");\n/* */ } \n/* */ \n/* */ return;\n/* */ } \n/* */ }\n/* 2274 */ item.setZoneId(this.zone.getId(), this.surfaced);\n/* 2275 */ if (!starting && !item.getTemplate().hovers()) {\n/* 2276 */ item.updatePosZ(this);\n/* */ }\n/* 2278 */ if (this.vitems == null)\n/* 2279 */ this.vitems = new VolaTileItems(); \n/* 2280 */ if (this.vitems.addItem(item, starting)) {\n/* */ \n/* 2282 */ if (item.getTemplateId() == 726) {\n/* 2283 */ Zones.addDuelRing(item);\n/* */ }\n/* 2285 */ if (!item.isDecoration()) {\n/* */ \n/* 2287 */ Item pile = this.vitems.getPileItem(item.getFloorLevel());\n/* 2288 */ if (this.vitems.checkIfCreatePileItem(item.getFloorLevel()) || pile != null) {\n/* */ \n/* 2290 */ if (pile == null) {\n/* */ \n/* 2292 */ pile = createPileItem(item, starting);\n/* 2293 */ this.vitems.addPileItem(pile);\n/* */ } \n/* 2295 */ pile.insertItem(item, true);\n/* 2296 */ int data = pile.getData1();\n/* 2297 */ if (data != -1 && item.getTemplateId() != data) {\n/* */ \n/* 2299 */ pile.setData1(-1);\n/* 2300 */ pile.setName(pile.getTemplate().getName());\n/* 2301 */ String modelname = pile.getTemplate().getModelName().replaceAll(\" \", \"\") + \"unknown.\";\n/* */ \n/* 2303 */ if (this.watchers != null)\n/* */ {\n/* 2305 */ for (Iterator<VirtualZone> it = this.watchers.iterator(); it.hasNext();) {\n/* 2306 */ ((VirtualZone)it.next()).renameItem(pile, pile.getName(), modelname);\n/* */ }\n/* */ }\n/* */ } \n/* 2310 */ } else if (this.watchers != null) {\n/* */ \n/* 2312 */ boolean onGroundLevel = true;\n/* 2313 */ if (item.getFloorLevel() > 0) {\n/* 2314 */ onGroundLevel = false;\n/* */ \n/* */ }\n/* 2317 */ else if ((getFloors(0, 0)).length > 0) {\n/* 2318 */ onGroundLevel = false;\n/* */ } \n/* 2320 */ for (VirtualZone vz : getWatchers()) {\n/* */ \n/* */ \n/* */ try {\n/* 2324 */ if (vz.isVisible(item, this)) {\n/* 2325 */ vz.addItem(item, this, creatureId, onGroundLevel);\n/* */ }\n/* 2327 */ } catch (Exception e) {\n/* */ \n/* 2329 */ logger.log(Level.WARNING, e.getMessage(), e);\n/* */ }\n/* */ \n/* */ } \n/* */ } \n/* 2334 */ } else if (this.watchers != null) {\n/* */ \n/* 2336 */ boolean onGroundLevel = true;\n/* 2337 */ if (item.getFloorLevel() > 0) {\n/* 2338 */ onGroundLevel = false;\n/* */ \n/* */ }\n/* 2341 */ else if ((getFloors(0, 0)).length > 0) {\n/* 2342 */ onGroundLevel = false;\n/* */ } \n/* 2344 */ for (VirtualZone vz : getWatchers()) {\n/* */ \n/* */ \n/* */ try {\n/* 2348 */ if (vz.isVisible(item, this)) {\n/* 2349 */ vz.addItem(item, this, creatureId, onGroundLevel);\n/* */ }\n/* 2351 */ } catch (Exception e) {\n/* */ \n/* 2353 */ logger.log(Level.WARNING, e.getMessage(), e);\n/* */ } \n/* */ } \n/* */ } \n/* 2357 */ if (item.isDomainItem()) {\n/* 2358 */ Zones.addAltar(item, moving);\n/* */ }\n/* 2360 */ if ((item.getTemplateId() == 1175 || item.getTemplateId() == 1239) && item\n/* 2361 */ .getAuxData() > 0)\n/* 2362 */ Zones.addHive(item, moving); \n/* 2363 */ if (item.getTemplateId() == 939 || item.isEnchantedTurret())\n/* 2364 */ Zones.addTurret(item, moving); \n/* 2365 */ if (item.isEpicTargetItem()) {\n/* 2366 */ EpicTargetItems.addRitualTargetItem(item);\n/* */ }\n/* 2368 */ if (this.village != null && item.getTemplateId() == 757)\n/* */ {\n/* 2370 */ this.village.addBarrel(item);\n/* */ }\n/* */ }\n/* */ else {\n/* */ \n/* 2375 */ item.setZoneId(this.zone.getId(), this.surfaced);\n/* 2376 */ if (!item.deleted) {\n/* 2377 */ logger.log(Level.WARNING, \"tile already contained item \" + item.getName() + \" (ID: \" + item.getWurmId() + \") at \" + this.tilex + \", \" + this.tiley, new Exception());\n/* */ }\n/* */ } \n/* */ }", "protected void addInventoryItemType() {\n\t\tProperties props = new Properties();\n\n\t\t/* DEBUG\n\t\t\n\t\tSystem.out.println(typeNameTF.getText());\n\t\tSystem.out.println(unitsTF.getText());\n\t\tSystem.out.println(unitMeasureTF.getText());\n\t\tSystem.out.println(validityDaysTF.getText());\n\t\tSystem.out.println(reorderPointTF.getText());\n\t\tSystem.out.println(notesTF.getText());\n\t\tSystem.out.println(statusCB.getValue());\n\t\n\t\t*/ \n\n\t\t// Set the values.\n\t\tprops.setProperty(\"ItemTypeName\", typeNameTF.getText());\n\t\tprops.setProperty(\"Units\", unitsTF.getText());\n\t\tprops.setProperty(\"UnitMeasure\", unitMeasureTF.getText());\n\t\tprops.setProperty(\"ValidityDays\", validityDaysTF.getText());\n\t\tprops.setProperty(\"ReorderPoint\", reorderPointTF.getText());\n\t\tprops.setProperty(\"Notes\", notesTF.getText());\n\t\tprops.setProperty(\"Status\", (String) statusCB.getValue());\n\n\t\t// Create the inventory item type.\n\t\tInventoryItemType iit = new InventoryItemType(props);\n\n\t\t// Save it into the database.\n\t\tiit.update();\n\n\t\tpopulateFields();\n\t\t\n\t\t// Display message on GUI.\n\t\t//submitBTN.setVisible(false);\n\t\tcancelBTN.setText(\"Back\");\n\t\tmessageLBL.setText(\"Inventory Item Type added.\");\n\t}", "@Override\r\n\tpublic void addItem(AbstractItemAPI item) {\n\t\titems.add(item);\r\n\t\t\r\n\t}", "public boolean addPlayerItem(PlayerItem playerItem);", "public void addToInventory(IWeapon weapon){\n if (weaponsInventory.size() < 12) {\n this.weaponsInventory.add(weapon);\n lenInventory += 1;\n }\n }", "public void addCostItem(CostItem item) throws CostManagerException;", "public int addItem(Item i);", "public void addItem(Item item) {\n this.reservationItems.add(new ReservationItem(item, this));\n }", "public void add(int item) {\r\n if (!contains(item)) {\r\n items[NumItems++] = item;\r\n } else if (NumItems == MAX_LIST) {\r\n throw new ListFullException(\"List is full\");\r\n }\r\n }", "public void addItem(Item i) {\n this.items.add(i);\n }", "public void addItem(Item item) {\n if (winner(item)) {\n listItems.add(item);\n }\n }", "public void addItem(Item item){\r\n items.add(item);\r\n total = items.getTotal();\r\n }", "public void add(Item item) {\n for (int i = 0; i < items.length; i++) {\n if (items[i] == null) {\n items[i] = item;\n break;\n }\n }\n }", "public void add(Inventory toAdd) throws DuplicateInventoryException {\n requireNonNull(toAdd);\n if (contains(toAdd)) {\n throw new DuplicateInventoryException();\n }\n\n list.add(toAdd);\n }", "public Item add(Item item) {\n Item existing = getItem(item.getItemId());\n if (existing != null) {\n return existing.incrementQuantity(item.getQuantity());\n }\n else {\n items.add(item.setCart(this));\n return item;\n }\n }", "public Boolean canAddItem(ItemStack item, Player player){\n\t\tint freeSpace = 0;\n\t\tfor(ItemStack i : player.getInventory() ){\n\t\t\tif(i == null){\n\t\t\t\tfreeSpace += item.getType().getMaxStackSize();\n\t\t\t} else if (i.getType() == item.getType() ){\n\t\t\t\tfreeSpace += (i.getType().getMaxStackSize() - i.getAmount());\n\t\t\t}\n\t\t}\n\t\tdebugOut(\"Item has: \"+item.getAmount()+\" and freeSpace is: \"+freeSpace);\n\t\tif(item.getAmount() > freeSpace){\n\t\t\tdebugOut(\"There is not enough freeSpace in the inventory\");\n\t\t\treturn false;\n\t\t}else{\n\t\t\tdebugOut(\"There is enough freeSpace in the inventory\");\n\t\t\treturn true;\n\t\t}\n\t}", "@Test(expected = InventoryException.class)\n\tpublic void testAddInventoryException() throws InventoryException {\n\t\tcoffeeMaker.addInventory(\"4\", \"-1\", \"asdf\", \"3\");\n\t}", "public int addItem(Item item, int n) {\r\n if(isContradicting(item)){\r\n System.out.println(CONTRADICTING_MSG1+ item.getType()+CONTRADICTING_MSG2);\r\n return CONTRADICTING;\r\n }\r\n if (super.addItem(item, n) == ZERO) {\r\n if (unitMap.containsKey(item.getType())) {\r\n if ((n+ unitMap.get(item.getType()))* item.getVolume() > capacity * FIFTY_PERCENT) {\r\n return checkNewN(item,n, true);\r\n }\r\n //if less then 50%\r\n else {\r\n unitMap.put(item.getType(),unitMap.get(item.getType()) + n);\r\n availableCapacity -= item.getVolume() * n;\r\n return ZERO;\r\n }\r\n }\r\n //item not in map:\r\n else{\r\n if ((item.getVolume() * n) > capacity * 0.5){\r\n return checkNewN(item,n, false);\r\n }\r\n //if less then 50\r\n else {\r\n unitMap.put(item.getType(), n);\r\n availableCapacity -= item.getVolume() * n;\r\n return ZERO;\r\n }\r\n }\r\n }\r\n //no place in locker:\r\n else return NO_ITEMS_ADDED;\r\n }", "@Test(expected = InsufficientStockException.class)\n\tpublic void testInventoryCheckOnAddingItemsToShoppingCart() throws InsufficientStockException {\n\t\tShoppingCartAggregate shoppingCartAggregate = storeFrontService.getStoreFront()\n\t\t\t\t.getShoppingCounter(SHOPPING_COUNTER_NAME).get().startShoppingCart(CUSTOMER_NAME);\n\n\t\tBigDecimal orderQuantity = TestProductInventory.iphoneInventory.getAvailableStock().add(new BigDecimal(1));\n\t\tshoppingCartAggregate.addToCart(TestProduct.phone.getProductId(), orderQuantity);\n\n\t}", "public boolean addNewInventory() {\n if (characterVM.addNewInventory(inventoryEntityToRetrieve.peek())) {\n removeTopRewardAndContinue();\n return true;\n }\n return false;\n }", "public PageInventory addItem(ItemStack item)\n {\n this.contents.add(item);\n this.recalculate();\n return this;\n }", "public void softAddItem(ItemStack item, Player player){\n\t\tHashMap<Integer,ItemStack> excess = player.getInventory().addItem(item);\n\t\tfor( Map.Entry<Integer, ItemStack> me : excess.entrySet() ){\n\t\t\tplayer.getWorld().dropItem(player.getLocation(), me.getValue() );\n\t\t}\n\t}", "@Test\n\tpublic void testUseValidItem() {\n\t\tLightGrenade lightGrenade = new LightGrenade();\n\t\tSquare square = new Square();\n\t\t\n\t\tPlayer player = new Player(square, 0);\n\t\tplayer.addItem(lightGrenade);\n\t\t\n\t\tplayer.useItem(lightGrenade);\n\t\tassertFalse(player.hasItem(lightGrenade));\n\t}", "public void addItem(final Item item) {\n\t\tnumberOfItems++;\n\t}", "public void addItem( Item anItem) {\n currentItems.add(anItem);\n }", "public boolean addItem(FoodItem newItem) {\n // find index of same item if exists\n int index = findIndexInStock(newItem);\n // if doesn't exist, add in the last clear space, which is the\n if (index < 0) {\n // if there's no space in the array, stop and return false.\n if (this._noOfItems == MAX_STOCK_SIZE)\n return false;\n\n addAtIndex(findIndexToAddNew(newItem.getCatalogueNumber()), newItem);\n }\n else {\n // if exists, increase quantity\n FoodItem existItem = this._stock[index];\n int oldQuantity = existItem.getQuantity();\n // add to old item the quantity\n existItem.setQuantity(oldQuantity+newItem.getQuantity());\n }\n // and return true\n return true;\n }", "public static int addToBasket(Basket basket, String item, int quantity) {\n StockItem stockItem = stockList.get(item);\n if(stockItem == null) {\n System.out.println(\"We don't sell \" + item);\n return 0;\n }\n if(stockList.reserveStock(item, quantity) != 0) {\n basket.addToBasket(stockItem, quantity);\n return quantity;\n }\n return 0;\n }", "public abstract boolean canAddItem(Player player, Item item, int slot);", "@Test(expected = InventoryException.class)\n\tpublic void testAddSugarNotInteger() throws InventoryException {\n\t\tcoffeeMaker.addInventory(\"0\", \"0\", \"abcd\", \"0\");\n\t}", "@Override\n public boolean canAddToItem(@Nonnull ItemStack stack, @Nonnull IDarkSteelItem item) {\n return (item.isForSlot(EntityEquipmentSlot.FEET) || item.isForSlot(EntityEquipmentSlot.LEGS) || item.isForSlot(EntityEquipmentSlot.CHEST)\n || item.isForSlot(EntityEquipmentSlot.HEAD)) && EnergyUpgradeManager.itemHasAnyPowerUpgrade(stack) && getUpgradeVariantLevel(stack) == variant - 1;\n }", "public void addItem(Object item) throws SetException {\n\t\tif (member(item))\n\t\t\tthrow new SetException(\"Item already in set.\");\n\n\t\tlist.add(item);\n\t}", "@Test\r\n public void testUpdateSugarInventory() throws InventoryException {\r\n coffeeMaker.addInventory(\"0\", \"0\", \"5\", \"0\");\r\n String updatedInventory = \"Coffee: 15\\nMilk: 15\\nSugar: 20\\nChocolate: 15\\n\";\r\n assertEquals(updatedInventory, coffeeMaker.checkInventory());\r\n }", "public void addItem(Item toAdd) throws ImpossiblePositionException, NoSuchItemException {\n int itemX = (int) toAdd.getXyLocation().getX();\n int itemY = (int) toAdd.getXyLocation().getY();\n ArrayList<Item> rogueItems = getRogue().getItems();\n int itemFound = 0;\n if ((itemX >= getWidth() - 1) || (itemX <= 0) || (itemY >= getHeight() - 1)\n || (itemY <= 0) || !(roomDisplayArray[itemY][itemX].equals(\"FLOOR\"))) {\n throw new ImpossiblePositionException();\n } else {\n roomItems.add(toAdd);\n }\n for (Item singleItem : rogueItems) {\n if (toAdd.getId() == singleItem.getId()) {\n itemFound = 1;\n }\n }\n if (itemFound != 1) {\n throw new NoSuchItemException();\n }\n\n }", "public void addItemToRoom(Item item) {\n this.ItemsInRoom.put(item.getName(), item);\n }", "public void addItem(Product p, int qty){\n //store info as an InventoryItem and add to items array\n this.items.add(new InventoryItem(p, qty));\n }", "public void addReservable(Reservable item){\n // Adds an item to the manager\n listI.add(item);\n }", "public boolean addItem(Item item, Supplier sup){\r\n //forbids the modification PO that has been Validated\r\n if ((this.currentStatusChange != null) &&\r\n \t(this.currentStatusChange.ordinal >= PoStatusCode.VALIDATED.ordinal))\r\n throw new IllegalAccessError(\"Cannot add item to PO already Validated\");\r\n \r\n for (ListIterator iter = poLineItems.listIterator() ; iter.hasNext() ;) {\r\n PoLineItem linetemp = (PoLineItem)iter.next();\r\n //increase quantity if same Item\r\n if (linetemp.getItem().equals(item)) {\r\n linetemp.incrementQuantity(1);\r\n return false;\r\n }\r\n }\r\n //new Item\r\n PoLineItem lineItem = new PoLineItem(item,1,sup);\r\n return this.poLineItems.add(lineItem);\r\n }", "public boolean add(E item) {\n if (item == null) { //Checks if the item is null if it is throws a new exception\n throw new IllegalArgumentException(\"Yeah Nah, No thanks null.\");\n }\n\n int index = findIndexOf(item); //For simplification\n\n if (data[index] != null) { //if the item at the index is not null\n if (data[index].equals(item))\n return false;\n }\n for (int i = count; i >= index; i--) { //iterates backward through the collection.\n\n if (i == index || i == 0) { //while iterating it checks if the value i is the same as index or 0, increments count and swaps the item.\n count++;\n ensureCapacity(); //checks capacity works, and if so adds item to and returns true.\n data[i] = item;\n return true;\n }\n data[i] = data[i - 1];\n }\n return false;\n }", "@Test(expected = InventoryException.class)\n\tpublic void testAddSugarNotPositiveInteger() throws InventoryException {\n\t\tcoffeeMaker.addInventory(\"0\", \"0\", \"-15\", \"0\");\n\t}", "public void addItem(Item item) {\r\n if (items == null) {\r\n items = new ArrayList();\r\n }\r\n items.add(item);\r\n }", "public boolean offer(Object item) {\r\n\r\n\t\tdata.add(item);\r\n\t\t// no size restriction so it should always be true\r\n\t\treturn true;\r\n\t}", "public Boolean checkAvailability(Item item, Integer current) {\n \tif (item.getQuatity() + current > item.getAvailableQuatity()) {\r\n \t\tSystem.out.println(\"System is unable to add \"\r\n \t\t\t\t+ current + \" \" + item.getItemName() +\r\n \t\t\t\t\". System can only add \"\r\n \t\t\t\t+ item.getAvailableQuatity() + \" \" + item.getItemName() );\r\n \t\treturn false;\r\n \t}\r\n \telse return true;\r\n }", "@Override\n public void onReceiveItem(InventoryItem itemReceived) {\n inventory.add(itemReceived);\n }" ]
[ "0.71333504", "0.70780945", "0.688425", "0.6825277", "0.675303", "0.6678856", "0.66336924", "0.6599533", "0.65718114", "0.6528571", "0.65161437", "0.64479065", "0.6433823", "0.6412779", "0.6403529", "0.639812", "0.6393919", "0.63921076", "0.6348557", "0.6309574", "0.6250647", "0.6210742", "0.62020075", "0.6163771", "0.6152868", "0.61241287", "0.609917", "0.6081331", "0.6061597", "0.6061222", "0.60554093", "0.6045445", "0.6030209", "0.60265774", "0.6017969", "0.60144097", "0.5993695", "0.59923416", "0.5987326", "0.59824854", "0.59519917", "0.5942352", "0.59410906", "0.59393173", "0.59390324", "0.59299684", "0.5927043", "0.59184283", "0.5913526", "0.5913526", "0.5911034", "0.5894259", "0.5881569", "0.58712155", "0.5840558", "0.5840491", "0.58400595", "0.5839761", "0.5837519", "0.58286333", "0.58250564", "0.5824454", "0.57993865", "0.5796755", "0.57814515", "0.57627565", "0.57571507", "0.5748789", "0.5748377", "0.57463986", "0.5734144", "0.5718457", "0.5713116", "0.57126987", "0.5703884", "0.5697849", "0.569007", "0.5687911", "0.56851035", "0.5683598", "0.5680269", "0.5676733", "0.56690735", "0.5663147", "0.5662559", "0.56590956", "0.56518984", "0.56492454", "0.56488377", "0.5645928", "0.5643486", "0.56248", "0.5613729", "0.5609937", "0.56055146", "0.5602954", "0.560168", "0.5601332", "0.5582568", "0.55823594" ]
0.7332396
0
Performs a transaction between two inventories. It is recommended that this function be called from a synchronous scheduler. Both inventories will be restored to their previous states if an error occurs. Items in item1 will be moved from inventory1 to inventory2. Items in item2 will be moved from inventory2 to inventory1. Throws if either inventory is invalid. Throws if either item arrays are null. Throws if either item arrays contain invalid items.
public static void inventoryTransaction(final Inventory inventory1, final ItemStack[] items1, final Inventory inventory2, final ItemStack[] items2) throws InvalidParameterException, FailedTransactionException { if (!isValidInventory(inventory1)) { throw new InvalidParameterException("Cannot perform transaction, inventory1 is invalid."); } if (items1 == null) { throw new InvalidParameterException("Cannot perform transaction, items1 is null."); } if (!isValidInventory(inventory2)) { throw new InvalidParameterException("Cannot perform transaction, inventory2 is invalid."); } if (items2 == null) { throw new InvalidParameterException("Cannot perform transaction, items2 is null."); } if (!ItemAPI.isValidItemSet(items1)) { throw new InvalidParameterException("Cannot perform transaction, items1 contains an invalid item!"); } if (!ItemAPI.isValidItemSet(items2)) { throw new InvalidParameterException("Cannot perform transaction, items2 contains an invalid item!"); } ItemStack[] savedInventory1 = duplicateInventory(inventory1.getContents()); ItemStack[] savedInventory2 = duplicateInventory(inventory2.getContents()); try { // Remove items1 from inventory1 for (ItemStack item : items1) { removeItemFromInventory(inventory1, item); } // Remove items2 from inventory2 for (ItemStack item : items2) { removeItemFromInventory(inventory2, item); } // Add items2 to inventory1 for (ItemStack item : items2) { addItemToInventory(inventory1, item); } // Add items1 to inventory2 for (ItemStack item : items1) { addItemToInventory(inventory2, item); } } catch (FailedTransactionException exception) { // Restore the inventory to its previous state inventory1.setContents(savedInventory1); inventory2.setContents(savedInventory2); throw exception; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void swapInventoryContents(final Inventory inventory1, final Inventory inventory2) throws InvalidParameterException, NotEnoughSpaceException {\n if (inventory1 == null) {\n throw new InvalidParameterException(\"Cannot swap contents, inventory1 is null.\");\n }\n if (inventory2 == null) {\n throw new InvalidParameterException(\"Cannot swap contents, inventory2 is null.\");\n }\n ItemStack[] contents1 = Arrays.stream(inventory1.getContents()).filter(ItemAPI::isValidItem).toArray(ItemStack[]::new);\n ItemStack[] contents2 = Arrays.stream(inventory2.getContents()).filter(ItemAPI::isValidItem).toArray(ItemStack[]::new);\n if (contents1.length > inventory2.getSize()) {\n throw new NotEnoughSpaceException(\"Cannot swap contents, inventory2 doesn't have enough space for inventory1's items.\");\n }\n if (contents2.length > inventory1.getSize()) {\n throw new NotEnoughSpaceException(\"Cannot swap contents, inventory1 doesn't have enough space for inventory2's items.\");\n }\n inventory1.clear();\n inventory2.clear();\n inventory1.setContents(contents2);\n inventory2.setContents(contents1);\n }", "public void swapItemFromInventoryToOther(@NotNull Usable item, Usable other) {\n for (int i = 0; i < size; i++) {\n if (item == items[i]) {\n this.removeItem(i);\n if (other != null) {\n this.setItem(other, i);\n }\n return;\n }\n }\n }", "public static void disperseInventory(Inventory inv1, Inventory inv2) {\r\n if (inv1 != null) {\r\n for (ItemStack item : inv1) {\r\n if (item != null)\r\n inv2.addItem(item);\r\n }\r\n removeAllItems(inv1);\r\n }\r\n }", "public void transferItem(Items item) throws Exception {\n\t\tif (item.getHolder() instanceof Monsters) {\n\t\t\titem.setHolder(null);\n\t\t\tthis.addAnchor(item);\n\t\t}\n\t\telse if (item.getHolder() instanceof Backpacks) {\n\t\t\titem.setHolder(null);\n\t\t\tthis.addAnchor(item);\n\t\t}\n\t\telse\n\t\t\tthrow new Exception(\"The transaction is only possible between monsters and/or backpacks.\");\n\t}", "@Test(expected = IllegalArgumentException.class)\n public void transferBetweenTwoAccountsMustBelongToSameOwner() {\n Account accountFrom = AccountFactory.createAccount(AccountFactory.AccountType.SAVINGS, \"owner1\");\n Account accountTo = AccountFactory.createAccount(AccountFactory.AccountType.SAVINGS, \"owner2\");\n\n // Put some money in the from account\n Transaction transaction = new Transaction.Builder().setDescription(\"Test\").setAmount(DollarAmount.fromInt(100)).setType(Transaction.Type.DEPOSIT).build();\n accountFrom.applyTransaction(transaction);\n assertEquals(accountFrom.getAccountBalance(), DollarAmount.fromInt(100));\n\n // Attempt transfer\n Account.transfer(accountFrom, accountTo, DollarAmount.fromInt(30));\n\n // Assert transfer was successful\n assertEquals(DollarAmount.fromInt(70), accountFrom.getAccountBalance());\n assertEquals(DollarAmount.fromInt(30), accountTo.getAccountBalance());\n }", "private void updateInventory(List<Item> items) {\r\n for(Item item : items) {\r\n inventory.put(item, STARTING_INVENTORY);\r\n inventorySold.put(item, 0);\r\n itemLocations.put(item.getSlot(), item);\r\n }\r\n }", "@Override\r\n\tpublic void transferItems(Robot from, Robot to)\r\n\t{\r\n\t\tfrom.transferItems(to);\r\n\t}", "@Test\n public void customerCanPerformTransferBetweenAccounts() {\n String ownerId = \"ownerId\";\n Account accountFrom = AccountFactory.createAccount(AccountFactory.AccountType.SAVINGS, ownerId);\n Account accountTo = AccountFactory.createAccount(AccountFactory.AccountType.SAVINGS, ownerId);\n\n // Put some money in the from account\n Transaction transaction = new Transaction.Builder().setDescription(\"Test\").setAmount(DollarAmount.fromInt(100)).setType(Transaction.Type.DEPOSIT).build();\n accountFrom.applyTransaction(transaction);\n assertEquals(accountFrom.getAccountBalance(), DollarAmount.fromInt(100));\n\n // Attempt transfer\n Account.transfer(accountFrom, accountTo, DollarAmount.fromInt(30));\n\n // Assert transfer was successful\n assertEquals(DollarAmount.fromInt(70), accountFrom.getAccountBalance());\n assertEquals(DollarAmount.fromInt(30), accountTo.getAccountBalance());\n }", "private Item mergeItem(Item newItem, List<Item> items) throws ItemException{\r\n \t\tfor (Item item2 : items) {\r\n \t\t\tif (!item2.isBought() && item2.getName().equals(newItem.getName())) {\r\n\t\t\t\t// sum price\r\n\t\t\t\titem2.setPrice(newItem.getPrice().add(item2.getPrice()));\r\n \t\t\t\tif (newItem.getUnit() == null && item2.getUnit() == null) {\r\n \t\t\t\t\t// Both have no unit --> item has now 2 pieces.\r\n \t\t\t\t\titem2.setQuantity(BigDecimal.valueOf(2), ItemUnit.PIECE);\r\n \t\t\t\t\treturn item2;\r\n \t\t\t\t} else if (newItem.getUnit() == null && item2.getUnit() == ItemUnit.PIECE) {\r\n \t\t\t\t\t// new Item has no unit, existing item has PIECE as unit. add one piece to the existing item.\r\n \t\t\t\t\titem2.setQuantity(item2.getQuantity().add(BigDecimal.ONE), ItemUnit.PIECE);\r\n \t\t\t\t\treturn item2;\r\n \t\t\t\t} else if (newItem.getUnit() != null && newItem.getUnit() == item2.getUnit()) {\r\n \t\t\t\t\t// Both have same unit --> add them together\r\n \t\t\t\t\tBigDecimal newQuantity = newItem.getQuantity().add(item2.getQuantity());\r\n \t\t\t\t\titem2.setQuantity(newQuantity, item2.getUnit());\r\n \t\t\t\t\treturn item2; // we want to save only one item.\r\n \t\t\t\t} else if (ItemUnit.MASSES.contains(newItem.getUnit()) && ItemUnit.MASSES.contains(item2.getUnit())) {\r\n \t\t\t\t\t// Both units are masses. Convert it first to grams and then add them.\r\n \t\t\t\t\tBigDecimal mass1 = newItem.getUnit()==ItemUnit.GRAM ? newItem.getQuantity():newItem.getQuantity().multiply(THOUSAND);\r\n \t\t\t\t\tBigDecimal mass2 = item2.getUnit()==ItemUnit.GRAM ? item2.getQuantity():item2.getQuantity().multiply(THOUSAND);\r\n \t\t\t\t\tBigDecimal finalMass = mass1.add(mass2);\r\n \t\t\t\t\tItemUnit unit = ItemUnit.GRAM;\r\n \t\t\t\t\tif (finalMass.compareTo(THOUSAND) > 0){\r\n \t\t\t\t\t\tfinalMass = finalMass.divide(THOUSAND);\r\n \t\t\t\t\t\tunit = ItemUnit.KILO_GRAM;\r\n \t\t\t\t\t}\r\n \t\t\t\t\titem2.setQuantity(finalMass, unit);\r\n \t\t\t\t\treturn item2;\r\n \t\t\t\t} else {\r\n \t\t\t\t\tthrow new ItemException();\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t\treturn newItem;\r\n \t}", "public void upDateItems(InventoryItem[] items)\n\t\t\tthrows ItemNotFound, DAOException {\n\t\ttry {\n\t\t\tconn.setAutoCommit(false);\n\t\t\tStatement stmt=conn.createStatement();\n\t\t\tfor(int i=0;i<items.length;i++) {\n\t\t\t\tString qry;\n\n\t\t\t\tif(getItem(items[i].getCode())==null) {\n\t\t\t\t\tthrow new ItemNotFound(\"item not found\");\n\t\t\t\t}else {\t\n\t\t\t\t\tqry= \"update inventory_item set itm_code=\"+items[i].getCode()+\n\t\t\t\t\t\t\t\",item_decription='\"+ items[i].getDescription() +\n\t\t\t\t\t\t\t\"', qty=\"+ items[i].getStock()+\n\t\t\t\t\t\t\t\" ,min_stock=\"+items[i].getMinStock() +\n\t\t\t\t\t\t\t\" ,cost=\"+items[i].getCost() + \n\t\t\t\t\t\t\t\",cate_id=\"+items[i].getCateId()+\"where itm_code=\"+items[i].getCode(); \n\t\t\t\t\tint n=0;\n\t\t\t\t\tstmt=conn.createStatement();\n\t\t\t\t\tn=stmt.executeUpdate(qry);\n\t\t\t\t}\n\t\t\t}\n\t\t\tconn.commit();\n\t\t}\n\t\tcatch(SQLException e) {\n\t\t\ttry {\n\t\t\t\tconn.rollback();\n\t\t\t} catch (SQLException e1) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t\tthrow new DAOException(e.getMessage());\n\t\t}\n\t\tfinally {\n\t\t\ttry {\n\t\t\t\tconn.setAutoCommit(true);\n\t\t\t} catch (SQLException 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}", "private void moveStack1ToStack2() \n {\n while (!stack1.isEmpty())\n stack2.push(stack1.pop());\n }", "public void InsertItems(InventoryItem[] items)\n\t\t\tthrows ItemExists, DAOException {\n\t\tString qry;\n\t\ttry {\n\t\t\tconn.setAutoCommit(false);\n\t\t\tStatement stmt=conn.createStatement();\t\t\t\n\t\t\tfor(int i=0;i<items.length;i++) {\n\t\t\t\tif(getItem(items[i].getCode())!=null)\n\t\t\t\t\tthrow new ItemExists(\"item is already exist\");\n\t\t\t\tint n;\n\t\t\t\tqry= \"INSERT INTO inventory_item (itm_code,item_decription,qty,min_stock,cost,cate_id) VALUES(\" +\n\t\t\t\t\t\t\"'\" + items[i].getCode() + \"', \" +\n\t\t\t\t\t\t\"'\" + items[i].getDescription() + \"', \" +\n\t\t\t\t\t\titems[i].getStock()+ \", \" +\n\t\t\t\t\t\titems[i].getMinStock() + \",\"+\n\t\t\t\t\t\titems[i].getCost()+ \",\"+items[i].getCateId()+\"); \";\n\n\t\t\t\tn = stmt.executeUpdate( qry );\n\t\t\t}\n\t\t\tconn.commit();\n\t\t}catch(SQLException|ItemNotFound e) {\n\t\t\ttry {\n\t\t\t\tconn.rollback();\n\t\t\t} catch (SQLException e1) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t\tthrow new DAOException(e.getMessage());\n\t\t}\n\t\tfinally {\n\t\t\ttry {\n\t\t\t\tconn.setAutoCommit(true);\n\t\t\t} catch (SQLException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public void swapInventoryItems(int i, int j) {\n\t\tint k = inv[i];\n\t\tinv[i] = inv[j];\n\t\tinv[j] = k;\n\t\tk = invStackSizes[i];\n\t\tinvStackSizes[i] = invStackSizes[j];\n\t\tinvStackSizes[j] = k;\n\t}", "private boolean processInventDrop(String source, String target, Item toMove, Item toSwap){\n\n\t\tif (source.startsWith(\"Invent\") && target.startsWith(\"Invent\")){\n\t\t\treturn (inventToInvent(source, target, toMove, toSwap));\n\t\t}\n\t\tif (source.startsWith(\"Invent\") && target.startsWith(\"EquipPos\")){\n\n\t\t\tif (!(toMove instanceof Equippable)){\n\t\t\t\tdisplayMessage(\"YOU CANNOT EQUIP THAT ITEM\");\n\t\t\t\treturn false;\n\t\t\t}else{\n\t\t\t\tif (!canEquip(toMove,target))return false;\n\t\t\t\tdisplayMessage(\"EQUIPPED\");\n\t\t\t\tif (toSwap!=null){\n\t\t\t\t\tElement toSwapDrag = nifty.getScreen(\"hud\").findElementByName(\"ItemVal\"+toSwap.getId());\n\t\t\t\t\tcleanRemove(toSwapDrag);\n\t\t\t\t\tscreenManager.getInventoryManager().addItemInPos(toSwap, toMove.getInventoryPosition());\n\t\t\t\t\tscreenManager.getInventoryManager().unequip(toSwap);\n\t\t\t\t\ttoMove.setInventoryPosition(target);\n\t\t\t\t}\n\t\t\t\tElement message = nifty.getScreen(\"hud\").findElementByName(\"MessagePanel\");\n\t\t\t\tmessage = screen.findElementByName(\"CharEquipVisuals\");\n\t\t\t\tmessage.startEffect(EffectEventId.onCustom,null,\"shaker\");\n\t\t\t\ttoMove.setInventoryPosition(target);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\tif (source.startsWith(\"Invent\") && target.startsWith(\"Chest\")){\n\t\t\t//toSwap = findChestItemByPos(target);\n\t\t\tif (toSwap == null){\n\t\t\t\tInventory from = toMove.getInventory();\n\t\t\t\tInventory chest = screenManager.getInventoryManager().getOpenWorldChest();\n\t\t\t\tfrom.removeItem(toMove);\n\t\t\t\ttoMove.setInventoryPosition(target);\n\t\t\t\tchest.addDirect(toMove);\n\n\t\t\t\t// send transfer message\n\t\t\t\tfor(GUIObserver g : observers){\n\t\t\t\t\tg.onItemTransfer(from, chest, toMove);\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\n\t\tif (source.startsWith(\"Invent\") && target.startsWith(\"Con\")){\n\t\t\tif (toSwap == null){\n\t\t\t\tInventory from = toMove.getInventory();\n\t\t\t\tInventory container = ((AbstractContainerItem)openContainer).getContainerInventory();\n\t\t\t\tif (container == null){\n\t\t\t\t\tthrow new AssertionError(\"Container not open\");\n\t\t\t\t}\n\t\t\t\tfrom.removeItem(toMove);\n\t\t\t\ttoMove.setInventoryPosition(target);\n\t\t\t\tcontainer.addDirect(toMove);\n\t\t\t\tfor(GUIObserver g : observers){\n\t\t\t\t\tg.onItemTransfer(from, container, toMove);\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\n\t\tif (source.startsWith(\"Invent\") && target.startsWith(\"Drop\") || target.startsWith(\"EqDrop\")){\n\t\t\tif (target.startsWith(\"EqDrop\")){\n\t\t\t\tif(nifty.getScreen(\"hud\").findElementByName(\"CharEquip\").isVisible()){\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (currentElementId.startsWith(\"ItemVal\")){\n\t\t\t\tscreenManager.getInventoryManager().dropItem(toMove);\n\n\t\t\t\tif (toMove == openContainer){\n\t\t\t\t\tcloseContainer();\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\ttoMove.setInventoryPosition(null);\n\t\t\t\t}\n\n\t\t\t\t// network\n\t\t\t\tfor(GUIObserver g : observers){\n\t\t\t\t\tg.onDropItem(toMove);\n\t\t\t\t}\n\n\t\t\t\tnifty.removeElement(nifty.getScreen(\"hud\"),nifty.getScreen(\"hud\").findElementByName(currentElementId));\n\t\t\t}\n\t\t\tDroppable dropArea = nifty.getScreen(\"hud\").findNiftyControl(\"DropArea\",Droppable.class);\n\t\t\tfor(Element el : dropArea.getElement().getElements()){\n\t\t\t\tnifty.removeElement(nifty.getScreen(\"hud\"), el);\n\t\t\t}\n\t\t\tDroppable eqDropArea = nifty.getScreen(\"hud\").findNiftyControl(\"EqDropArea\",Droppable.class);\n\t\t\tfor(Element el : eqDropArea.getElement().getElements()){\n\t\t\t\tnifty.removeElement(nifty.getScreen(\"hud\"), el);\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\n\t\tif (source.startsWith(\"Equip\") && target.startsWith(\"Invent\")){\n\t\t\tif (inventToInvent(source, target, toMove, toSwap)){\n\t\t\t\tscreenManager.getInventoryManager().unequip(toMove);\n\t\t\t\treturn true;\n\t\t\t};\n\t\t}\n\n\t\treturn false;\n\t}", "public void addItemToInventory(Item ... items){\n this.inventory.addItems(items);\n }", "@Override\n protected boolean mergeItemStack(@Nonnull ItemStack par1ItemStack, int fromIndex, int toIndex, boolean reversOrder) {\n\n boolean result = false;\n int checkIndex = fromIndex;\n\n if (reversOrder) {\n checkIndex = toIndex - 1;\n }\n\n Slot slot;\n ItemStack itemstack1;\n\n if (par1ItemStack.isStackable()) {\n\n while (!par1ItemStack.isEmpty() && (!reversOrder && checkIndex < toIndex || reversOrder && checkIndex >= fromIndex)) {\n slot = this.inventorySlots.get(checkIndex);\n itemstack1 = slot.getStack();\n\n if (!itemstack1.isEmpty() && itemstack1.getItem() == par1ItemStack.getItem()\n && (!par1ItemStack.getHasSubtypes() || par1ItemStack.getItemDamage() == itemstack1.getItemDamage())\n && ItemStack.areItemStackTagsEqual(par1ItemStack, itemstack1) && slot.isItemValid(par1ItemStack) && par1ItemStack != itemstack1) {\n\n int mergedSize = itemstack1.getCount() + par1ItemStack.getCount();\n int maxStackSize = Math.min(par1ItemStack.getMaxStackSize(), slot.getSlotStackLimit());\n if (mergedSize <= maxStackSize) {\n par1ItemStack.setCount(0);\n itemstack1.setCount(mergedSize);\n slot.onSlotChanged();\n result = true;\n } else if (itemstack1.getCount() < maxStackSize) {\n par1ItemStack.shrink(maxStackSize - itemstack1.getCount());\n itemstack1.setCount(maxStackSize);\n slot.onSlotChanged();\n result = true;\n }\n }\n\n if (reversOrder) {\n --checkIndex;\n } else {\n ++checkIndex;\n }\n }\n }\n\n if (!par1ItemStack.isEmpty()) {\n if (reversOrder) {\n checkIndex = toIndex - 1;\n } else {\n checkIndex = fromIndex;\n }\n\n while (!reversOrder && checkIndex < toIndex || reversOrder && checkIndex >= fromIndex) {\n slot = this.inventorySlots.get(checkIndex);\n itemstack1 = slot.getStack();\n\n if (itemstack1.isEmpty() && slot.isItemValid(par1ItemStack)) {\n ItemStack in = par1ItemStack.copy();\n in.setCount(Math.min(in.getCount(), slot.getSlotStackLimit()));\n\n slot.putStack(in);\n slot.onSlotChanged();\n par1ItemStack.shrink(in.getCount());\n result = true;\n break;\n }\n\n if (reversOrder) {\n --checkIndex;\n } else {\n ++checkIndex;\n }\n }\n }\n\n return result;\n }", "private boolean processChestDrop(String fromType, String toType, Inventory inventFrom, Inventory inventTo, String source, String target, Item toMove, Item toSwap){\n\t\tif (source.startsWith(fromType) && target.startsWith(toType)){\n\t\t\tif (toSwap == null){\n\t\t\t\tinventFrom.removeItem(toMove);\n\t\t\t\tinventTo.addDirect(toMove);\n\n\t\t\t\ttoMove.setInventoryPosition(target);\n\n\t\t\t\t// network\n\t\t\t\tfor (GUIObserver g : observers) {\n\t\t\t\t\tg.onItemTransfer(\n\t\t\t\t\t\t\tinventFrom,\n\t\t\t\t\t\t\tinventTo,\n\t\t\t\t\t\t\ttoMove);\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\n\t\tif (source.startsWith(fromType) && target.startsWith(fromType)){\n\t\t\treturn inventToInvent(source, target, toMove, toSwap);\n\t\t}\n\t\treturn false;\n\t}", "public void moveTo(Inventory inventory) {\n for (ItemStack itemStack : this.getItemStacks()) {\n int added = inventory.addItemStack(itemStack);\n this.ITEMS.get(this.getItemStack(itemStack)).addAmount(-added);\n }\n }", "@Test\n public void testDecrementInventory() throws Exception {\n int firstDecrement;\n int secondDecrement;\n\n List<VendingItem> items;\n VendingItem twix;\n\n try {\n fillInventoryFileWithTestData(VALID);\n dao.loadItems();\n } catch (VendingMachinePersistenceException ex) {\n }\n\n items = dao.getItems();\n\n assertEquals(1, items.size());\n\n twix = items.get(0);\n\n // firstDecrement = 19\n firstDecrement = twix.decrementStock();\n\n // secondDecrement = 18\n secondDecrement = twix.decrementStock();\n\n assertEquals(1, firstDecrement - secondDecrement);\n }", "public ItemStack transferStackInSlot(EntityPlayer par1EntityPlayer, int par2)\r\n\t {\r\n\t\t ItemStack itemstack = null;\r\n\t\t Slot slot = (Slot)this.inventorySlots.get(par2);\r\n\r\n\t\t if (slot != null && slot.getHasStack())\r\n\t\t {\r\n\t\t\t ItemStack itemstack1 = slot.getStack();\r\n\t\t\t itemstack = itemstack1.copy();\r\n\r\n\t\t\t if (par2 == 0)\r\n\t\t\t {\r\n\t\t\t\t if (!this.mergeItemStack(itemstack1, 1, 37, true))\r\n\t\t\t\t {\r\n\t\t\t\t\t return null;\r\n\t\t\t\t }\r\n\t\t\t }\r\n\t\t\t else\r\n\t\t\t {\r\n\t\t\t\t if (((Slot)this.inventorySlots.get(0)).getHasStack() || !((Slot)this.inventorySlots.get(0)).isItemValid(itemstack1))\r\n\t\t\t\t {\r\n\t\t\t\t\t return null;\r\n\t\t\t\t }\r\n\r\n\t\t\t\t if (itemstack1.hasTagCompound() && itemstack1.stackSize == 1)\r\n\t\t\t\t {\r\n\t\t\t\t\t ((Slot)this.inventorySlots.get(0)).putStack(itemstack1.copy());\r\n\t\t\t\t\t itemstack1.stackSize = 0;\r\n\t\t\t\t }\r\n\t\t\t\t else if (itemstack1.stackSize >= 1)\r\n\t\t\t\t {\r\n\t\t\t\t\t ((Slot)this.inventorySlots.get(0)).putStack(new ItemStack(itemstack1.itemID, 1, itemstack1.getItemDamage()));\r\n\t\t\t\t\t --itemstack1.stackSize;\r\n\t\t\t\t }\r\n\t\t\t }\r\n\r\n\t\t\t if (itemstack1.stackSize == 0)\r\n\t\t\t {\r\n\t\t\t\t slot.putStack((ItemStack)null);\r\n\t\t\t }\r\n\t\t\t else\r\n\t\t\t {\r\n\t\t\t\t slot.onSlotChanged();\r\n\t\t\t }\r\n\r\n\t\t\t if (itemstack1.stackSize == itemstack.stackSize)\r\n\t\t\t {\r\n\t\t\t\t return null;\r\n\t\t\t }\r\n\r\n\t\t\t slot.onPickupFromSlot(par1EntityPlayer, itemstack1);\r\n\t\t }\r\n\r\n\t\t return itemstack;\r\n\t }", "public ItemStack transferStackInSlot(EntityPlayer par1EntityPlayer, int par2)\n {\n ItemStack itemstack = null;\n Slot slot = (Slot)this.inventorySlots.get(par2);\n\n if (slot != null && slot.getHasStack())\n {\n ItemStack itemstack1 = slot.getStack();\n itemstack = itemstack1.copy();\n\n if (par2 == 0)\n {\n if (!this.mergeItemStack(itemstack1, 9, 45, true))\n {\n return null;\n }\n\n slot.onSlotChange(itemstack1, itemstack);\n }\n else if (par2 >= 1 && par2 < 5)\n {\n if (!this.mergeItemStack(itemstack1, 9, 45, false))\n {\n return null;\n }\n }\n else if (par2 >= 5 && par2 < 9)\n {\n if (!this.mergeItemStack(itemstack1, 9, 45, false))\n {\n return null;\n }\n }\n else if (itemstack.getItem() instanceof ItemArmor && !((Slot)this.inventorySlots.get(5 + ((ItemArmor)itemstack.getItem()).armorType)).getHasStack())\n {\n int j = 5 + ((ItemArmor)itemstack.getItem()).armorType;\n\n if (!this.mergeItemStack(itemstack1, j, j + 1, false))\n {\n return null;\n }\n }\n else if (par2 >= 9 && par2 < 36)\n {\n if (!this.mergeItemStack(itemstack1, 36, 45, false))\n {\n return null;\n }\n }\n else if (par2 >= 36 && par2 < 45)\n {\n if (!this.mergeItemStack(itemstack1, 9, 36, false))\n {\n return null;\n }\n }\n else if (!this.mergeItemStack(itemstack1, 9, 45, false))\n {\n return null;\n }\n\n if (itemstack1.stackSize == 0)\n {\n slot.putStack((ItemStack)null);\n }\n else\n {\n slot.onSlotChanged();\n }\n\n if (itemstack1.stackSize == itemstack.stackSize)\n {\n return null;\n }\n\n slot.onPickupFromSlot(par1EntityPlayer, itemstack1);\n }\n\n return itemstack;\n }", "public void swap (int index1, int index2)\n {\n if(index1 >= 0 && index2 >= 0\n && index1 < (stocks.size())\n && index2 < (stocks.size()))\n {\n Stock temp = stocks.get(index1);\n Stock second = stocks.set(index1, stocks.get(index2));\n stocks.set(index2, temp);\n }\n }", "public void moveItemStackTo(ItemStack itemStack, Inventory inventory) {\n int itemsAdded = inventory.addItemStack(itemStack);\n\n this.removeItemStack(new ItemStack(itemStack.getItem(), itemsAdded));\n }", "void updateInventory(String busNumber, String tripDate, int inventory) throws NotFoundException;", "@Override\n\tpublic boolean insertItemInRetailerInventory(RetailerInventoryDTO queryArguments) throws RetailerException, ConnectException {\n\t\tboolean productInserted = false;\n\t\t/*\n\t\t * required arguments in `queryArguments`\n\t\t * retailerUserId, productCategory, productUIN, productDispatchTime\n\t\t * \n\t\t * un-required\n\t\t * productRecieveTime, productShelfTimeOut\n\t\t * \n\t\t * in any case, if the arguments are supplied, they will be stored in the database\n\t\t */\n\t\tRetailerInventoryEntity newItem = new RetailerInventoryEntity();\n\t\tnewItem.setRetailerId (queryArguments.getRetailerUserId());\n\t\tnewItem.setProductCategory((byte)queryArguments.getProductCategory());\n\t\tnewItem.setProductUniqueId(queryArguments.getProductUIN());\n\t\tnewItem.setProductDispatchTimestamp(queryArguments.getProductDispatchTime());\n\t\t\n\t\tTransaction transaction = null;\n Session session = HibernateUtil.getSessionFactory().openSession();\n try {\n transaction = session.beginTransaction();\n session.save(newItem);\n transaction.commit();\n } catch (IllegalStateException error) {\n \tGoLog.logger.error(error.getMessage());\n \tthrow new RetailerException (\"Method has been invoked at an illegal or inappropriate time\");\n } catch (RollbackException error) {\n \tGoLog.logger.error(error.getMessage());\n \tthrow new RetailerException (\"Could not Commit changes to Retailer Inventory\");\n } catch (PersistenceException error) {\n \tGoLog.logger.error(error.getMessage());\n \tthrow new RetailerException (\"The item is already present in the inventory\");\n } finally {\n \tsession.close();\n }\n productInserted = true;\n\t\treturn productInserted;\n\t}", "private int transferItemsToLTS(Item item)\r\n {\r\n int redundantItems = this.getItemCount(item.getType()) -\r\n (int)(PERCENT_20 * this.getCapacity() / item.getVolume()); // items to be transfer to LTS\r\n if(Locker.commonLTS.addItem(item, redundantItems) == VALID_VALUE) // items passed to LTS successfully\r\n {\r\n this.removeItem(item, redundantItems);\r\n System.out.println(\"Warning: Action successful, but has caused items to be moved to storage\");\r\n return SPECIAL_VALID_VALUE;\r\n }\r\n nItemsCantBeInsertedMSG(item, redundantItems);\r\n return INVALID_VALUE;\r\n }", "@Override\n\tpublic boolean updateProductSaleTimeStamp(RetailerInventoryDTO queryArguments) throws RetailerException, ConnectException {\n\t\tboolean saleTimestampUpdated = false;\n\t\t/*\n\t\t * required arguments in `queryArguments`\n\t\t * productUIN, productSaleTime\n\t\t * \n\t\t * un-required\n\t\t * productDispatchTime, productReceiveTime, productCategory, retailerUserId\n\t\t */\n\t\tRetailerInventoryEntity newItem = new RetailerInventoryEntity();\n\t\tnewItem.setProductUniqueId(queryArguments.getProductUIN());\n\t\tnewItem.setProductSaleTimestamp(queryArguments.getProductShelfTimeOut());\n\t\t\n\t\tTransaction transaction = null;\n Session session = HibernateUtil.getSessionFactory().openSession();\n try {\n transaction = session.beginTransaction();\n List<RetailerInventoryEntity> itemList = session.createQuery(\"from RetailerInventoryEntity\", RetailerInventoryEntity.class).list();\n boolean productNotFound = true;\n for (RetailerInventoryEntity item : itemList) {\n \tif (item.getProductUniqueId().equals(newItem.getProductUniqueId())) {\n \t\tnewItem.setRetailerId(item.getRetailerId());\n \t\tnewItem.setProductCategory(item.getProductCategory());\n \t\tnewItem.setProductDispatchTimestamp(item.getProductDispatchTimestamp());\n \t\tnewItem.setProductReceiveTimestamp(item.getProductReceiveTimestamp());\n \t\tproductNotFound = false;\n \t\tbreak;\n \t}\n }\n if (productNotFound) {\n \tGoLog.logger.error(\"Product is not a part of the Inventory\");\n \tthrow new RetailerException (\"Product is not a part of the Inventory\");\n } else {\n \tsession.merge(newItem);\n }\n transaction.commit();\n } catch (IllegalStateException error) {\n \tGoLog.logger.error(error.getMessage());\n \tthrow new RetailerException (\"Method has been invoked at an illegal or inappropriate time\");\n } catch (RollbackException error) {\n \tGoLog.logger.error(error.getMessage());\n \tthrow new RetailerException (\"Could not Commit changes to Retailer Inventory\");\n } catch (PersistenceException error) {\n \tGoLog.logger.error(error.getMessage());\n \tthrow new RetailerException (\"The item is already present in the inventory\");\n } finally {\n \tsession.close();\n }\n saleTimestampUpdated = true;\t\t\n\t\treturn saleTimestampUpdated;\n\t}", "public void insertOrderedItems(TireList orderedItems){\n for(int i=0; i<orderedItems.listSize(); i++){\n int temp = Integer.parseInt(orderedItems.getTire(i).getStock()) - orderedItems.getTire(i).getQuantity();\n orderedItems.getTire(i).setStock(temp + \"\");\n orderedItems.getTire(i).updateTire();\n sql=\"Insert into OrderedItems (OrderID, TireID, Quantity) VALUES ('\"+newID+\"','\"+orderedItems.getTire(i).getStockID()+\"',\"+orderedItems.getTire(i).getQuantity()+\")\";\n db.insertDB(sql); \n }\n }", "@Test\r\n public void testResetInventory2()\r\n {\r\n testLongTermStorage.addItem(item2, testLongTermStorage.getCapacity() / item2.getVolume());\r\n testLongTermStorage.resetInventory();\r\n assertEquals(\"Storage should be empty\", new HashMap<>(), testLongTermStorage.getInventory());\r\n }", "@Override\n public void moveBetweenShelves(Shelf from, Shelf to, int amount) throws IllegalCupboardException{\n if(from == null || to == null)\n throw new NullPointerException();\n if(amount <= 0)\n throw new IllegalArgumentException();\n\n if(!shelves.contains(from) || !shelves.contains(to))\n throw new NoSuchElementException();\n\n if(from.getCurrentType() == null)\n throw new IllegalCupboardException(\"Trying to remove resources from an empty shelf\");\n\n try{\n from.moveTo(to, from.getCurrentType(), amount);\n }catch(IllegalResourceTransferException e){\n throw new IllegalCupboardException(\"Can't transfer the resources\");\n }\n\n //if the new configuration is not valid, initial state is restored and the IllegalCupboardException is thrown\n if(!isValid()){\n try{\n to.moveTo(from, to.getCurrentType(), amount);\n }catch(IllegalResourceTransferException e){\n throw new IllegalArgumentException();\n }\n throw new IllegalCupboardException(\"Cupboard configuration would not be valid\");\n }\n }", "private void updateStocks(StockTransferTransactionRequest item) {\n\n Integer updatedQuantity = item.getQuantity();\n StockTraderServiceFactoryIF serviceFactory = new StockTraderServiceFactory();\n DematServiceIF dematService = serviceFactory.dematService();\n\n Optional<Integer> oldQuantity = dematService.getStockStatus(item.getUserName(),\n item.getStock());\n if(oldQuantity != null && oldQuantity.get() > 0) {\n updatedQuantity = oldQuantity.get() + item.getQuantity();\n }\n try(Connection conn = DriverManager.getConnection(Constants.DB_URL,\n Constants.USER,\n Constants.PASS);\n PreparedStatement stmt = conn.prepareStatement(\n Constants.MERGE_STOCK)) {\n stmt.setString(1, item.getUserName());\n stmt.setString(2, item.getStock().toString());\n stmt.setInt(3, updatedQuantity);\n stmt.execute();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n }", "@Test\n\tpublic void orderingBadItemsThrowsException() {\n\t\tItemQuantity wrongItem = new ItemQuantity(201, 5);\n\t\tList<ItemQuantity> wrongItemQuantities = new ArrayList<ItemQuantity>();\n\t\twrongItemQuantities.add(wrongItem);\n\t\t\n\t\tOrderStep wrongStep = new OrderStep(1, wrongItemQuantities);\n\t\t\n\t\tboolean exceptionWasThrown = false;\n\t\ttry {\n\t\t\titemSupplier.executeStep(wrongStep);\n\t\t}\n\t\tcatch (OrderProcessingException ex) {\n\t\t\texceptionWasThrown = true;\n\t\t}\n\t\tassertTrue(exceptionWasThrown);\n\t\t\n\t\t/* \n\t\t * Check that items with negative quantity get rejected \n\t\t */\n\t\twrongItem = new ItemQuantity(101, -5);\n\t\twrongItemQuantities = new ArrayList<ItemQuantity>();\n\t\twrongItemQuantities.add(wrongItem);\n\t\t\n\t\twrongStep = new OrderStep(1, wrongItemQuantities);\n\t\t\n\t\texceptionWasThrown = false;\n\t\ttry {\n\t\t\titemSupplier.executeStep(wrongStep);\n\t\t}\n\t\tcatch (OrderProcessingException ex) {\n\t\t\texceptionWasThrown = true;\n\t\t}\n\t\tassertTrue(exceptionWasThrown);\n\t}", "@Test\r\n public void testUpdateCoffeeInventory() throws InventoryException {\r\n coffeeMaker.addInventory(\"5\", \"0\", \"0\", \"0\");\r\n String updatedInventory = \"Coffee: 20\\nMilk: 15\\nSugar: 15\\nChocolate: 15\\n\";\r\n assertEquals(updatedInventory, coffeeMaker.checkInventory());\r\n }", "public void handleItemMovements() {\n\t\tfor (MovingItem item : currentScene.getMovingItems()) {\n\t\t\tmoveItemX(item);\n\t\t\tmoveItemY(item);\n\t\t\tif (nextScene != null) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\titem.simulateGravity();\n\n\t\t\tif (item.getTranslateXProperty().get() < 0 || item.getTranslateYProperty().get() > currentScene.getHeight() || item.getTranslateYProperty().get() < 0 || item.getTranslateXProperty().get() > currentScene.getWidth()) {\n\t\t\t\titemsToDelete.add(item);\n\t\t\t}\n\t\t\tif (item instanceof Projectile) {\n\t\t\t\tif (((Projectile) item).traveledFullDistance()) itemsToDelete.add(item);\n\t\t\t}\n\t\t\tif (item instanceof Enemy) {\n\t\t\t\tif (((Enemy) item).shouldJump() && item.canJump()) {\n\t\t\t\t\titem.jump();\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (item instanceof ProjectileHurler) {\n\t\t\t\tProjectileHurler hurler = (ProjectileHurler) item;\n\t\t\t\tif (hurler.canFire()) {\n\t\t\t\t\titemsToAdd.add(hurler.fire());\n\t\t\t\t\thurler.resetProjectileCooldown();\n\t\t\t\t} else\n\t\t\t\t\thurler.decrementProjectileCooldownTimer();\n\t\t\t}\n\t\t}\n\t\titemsToDelete.forEach(item -> currentScene.removeItem(item));\n\t\titemsToDelete.clear();\n\t\titemsToAdd.forEach(item -> currentScene.addItem(item));\n\t\titemsToAdd.clear();\n\t\tif (nextScene != null) setCurrentScene();\n\t}", "@Test\r\n public void testUpdateSugarInventory() throws InventoryException {\r\n coffeeMaker.addInventory(\"0\", \"0\", \"5\", \"0\");\r\n String updatedInventory = \"Coffee: 15\\nMilk: 15\\nSugar: 20\\nChocolate: 15\\n\";\r\n assertEquals(updatedInventory, coffeeMaker.checkInventory());\r\n }", "@Test\n\tpublic void testProcessInventoryUpdateOrderPlaced() {\n\t\tfinal Inventory inventory = new InventoryImpl();\n\t\tinventory.setUidPk(INVENTORY_UID_1000);\n\t\tinventory.setQuantityOnHand(QUANTITY_ONHAND);\n\t\tinventory.setWarehouseUid(WAREHOUSE_UID);\n\n\t\tfinal ProductSku productSku = new ProductSkuImpl();\n\t\tproductSku.setSkuCode(SKU_CODE);\n\t\tfinal ProductImpl product = new ProductImpl();\n\t\tproduct.setAvailabilityCriteria(AvailabilityCriteria.AVAILABLE_WHEN_IN_STOCK);\n\t\tproductSku.setProduct(product);\n\t\tinventory.setSkuCode(productSku.getSkuCode());\n\n\t\tfinal Order order = new OrderImpl();\n\t\torder.setUidPk(ORDER_UID_2000);\n\n\t\tfinal InventoryJournalRollupImpl ijRollup = new InventoryJournalRollupImpl();\n\t\tijRollup.setAllocatedQuantityDelta(QUANTITY_10);\n\n\t\tcontext.checking(new Expectations() {\n\t\t\t{\n\t\t\t\tInventoryJournalImpl inventoryJournal = new InventoryJournalImpl();\n\t\t\t\tallowing(beanFactory).getBean(EXECUTION_RESULT); will(returnValue(new InventoryExecutionResultImpl()));\n\t\t\t\tallowing(beanFactory).getBean(INVENTORY_JOURNAL);\n\t\t\t\twill(returnValue(inventoryJournal));\n\t\t\t\tallowing(inventoryDao).getInventory(SKU_CODE, WAREHOUSE_UID); will(returnValue(inventory));\n\t\t\t\tallowing(inventoryJournalDao).getRollup(inventoryKey); will(returnValue(ijRollup));\n\n\t\t\t\toneOf(inventoryJournalDao).saveOrUpdate(inventoryJournal); will(returnValue(new InventoryJournalImpl()));\n\t\t\t}\n\t\t});\n\n\n\n\t\tproductInventoryManagementService.processInventoryUpdate(\n\t\t\t\tproductSku, WAREHOUSE_UID,\tInventoryEventType.STOCK_ALLOCATE, EVENT_ORIGINATOR_TESTER, QUANTITY_10, order, null);\n\n\t\t// WE SHALL CHECK THE RESULT FROM processInventoryUpdate()\n\t\tInventoryDto inventoryDto = productInventoryManagementService.getInventory(inventory.getSkuCode(), inventory.getWarehouseUid());\n\t\tassertEquals(inventoryDto.getQuantityOnHand(), QUANTITY_ONHAND);\n\t\tassertEquals(inventoryDto.getAvailableQuantityInStock(), QUANTITY_ONHAND - QUANTITY_10);\n\t\tassertEquals(inventoryDto.getAllocatedQuantity(), QUANTITY_10);\n\t}", "@Override\n\tpublic boolean updateProductReceiveTimeStamp(RetailerInventoryDTO queryArguments) throws RetailerException, ConnectException {\n\t\tboolean receiveTimestampUpdated = false;\n\t\t/*\n\t\t * required arguments in `queryArguments`\n\t\t * productUIN, productRecieveTime\n\t\t * \n\t\t * un-required\n\t\t * productDispatchTime, productShelfTimeOut, productCategory, retailerUserId\n\t\t */\n\t\tRetailerInventoryEntity newItem = new RetailerInventoryEntity();\n\t\tnewItem.setProductUniqueId(queryArguments.getProductUIN());\n\t\tnewItem.setProductReceiveTimestamp(queryArguments.getProductRecieveTime());\n\t\t\n\t\tTransaction transaction = null;\n Session session = HibernateUtil.getSessionFactory().openSession();\n try {\n transaction = session.beginTransaction();\n List<RetailerInventoryEntity> itemList = session.createQuery(\"from RetailerInventoryEntity\", RetailerInventoryEntity.class).list();\n boolean productNotFound = true;\n for (RetailerInventoryEntity item : itemList) {\n \tif (item.getProductUniqueId().equals(newItem.getProductUniqueId())) {\n \t\tnewItem.setRetailerId(item.getRetailerId());\n \t\tnewItem.setProductCategory(item.getProductCategory());\n \t\tnewItem.setProductDispatchTimestamp(item.getProductDispatchTimestamp());\n \t\tproductNotFound = false;\n \t\tbreak;\n \t}\n }\n if (productNotFound) {\n \tGoLog.logger.error(\"Product is not a part of the Inventory\");\n \tthrow new RetailerException (\"Product is not a part of the Inventory\");\n } else {\n \tsession.merge(newItem);\n }\n transaction.commit();\n } catch (IllegalStateException error) {\n \tGoLog.logger.error(error.getMessage());\n \tthrow new RetailerException (\"Method has been invoked at an illegal or inappropriate time\");\n } catch (RollbackException error) {\n \tGoLog.logger.error(error.getMessage());\n \tthrow new RetailerException (\"Could not Commit changes to Retailer Inventory\");\n } catch (PersistenceException error) {\n \tGoLog.logger.error(error.getMessage());\n \tthrow new RetailerException (\"The item is already present in the inventory\");\n } finally {\n \tsession.close();\n }\n receiveTimestampUpdated = true;\n\t\treturn receiveTimestampUpdated;\n\t}", "void saveItemMove(int fromPosition, int toPosition) {\n int fromItemPos = mItems.get(toPosition).getPosition();\n int toItemPos;\n\n if (fromPosition < toPosition) {\n // moved down\n toItemPos = mItems.get(toPosition - 1).getPosition();\n } else {\n // moved up\n toItemPos = mItems.get(toPosition + 1).getPosition();\n }\n\n mDisposable.add(mViewModel.movePositions(fromItemPos, toItemPos)\n .subscribeOn(Schedulers.io())\n .observeOn(AndroidSchedulers.mainThread())\n .subscribe());\n }", "public void combat(Soldat s1, Soldat s2) throws WargameException;", "@Test\n public void destiny2EquipItemsTest() {\n InlineResponse20044 response = api.destiny2EquipItems();\n\n // TODO: test validations\n }", "@Test\r\n public void testUpdateMilkInventory() throws InventoryException {\r\n coffeeMaker.addInventory(\"0\", \"5\", \"0\", \"0\");\r\n String updatedInventory = \"Coffee: 15\\nMilk: 20\\nSugar: 15\\nChocolate: 15\\n\";\r\n assertEquals(updatedInventory, coffeeMaker.checkInventory());\r\n }", "@Test\n public void testUpdateByImport() throws Exception {\n\n // create collection of things in first application, export them to S3\n\n final UUID targetAppId = setup.getMgmtSvc().createApplication(\n organization.getUuid(), \"target\" + RandomStringUtils.randomAlphanumeric(10)).getId();\n\n final EntityManager emApp1 = setup.getEmf().getEntityManager( targetAppId );\n\n Map<UUID, Entity> thingsMap = new HashMap<>();\n List<Entity> things = new ArrayList<>();\n createTestEntities(emApp1, thingsMap, things, \"thing\");\n\n deleteBucket();\n\n try {\n exportCollection(emApp1, \"things\");\n\n // create new second application and import those things from S3\n\n final UUID appId2 = setup.getMgmtSvc().createApplication(\n organization.getUuid(), \"second\" + RandomStringUtils.randomAlphanumeric(10)).getId();\n\n final EntityManager emApp2 = setup.getEmf().getEntityManager(appId2);\n importCollections(emApp2);\n\n\n // update the things in the second application, export to S3\n\n for (UUID uuid : thingsMap.keySet()) {\n Entity entity = emApp2.get(uuid);\n entity.setProperty(\"fuel_source\", \"Hydrogen\");\n emApp2.update(entity);\n }\n\n deleteBucket();\n exportCollection(emApp2, \"things\");\n\n\n // import the updated things back into the first application, check that they've been updated\n\n importCollections(emApp1);\n\n for (UUID uuid : thingsMap.keySet()) {\n Entity entity = emApp1.get(uuid);\n Assert.assertEquals(\"Hydrogen\", entity.getProperty(\"fuel_source\"));\n }\n\n } finally {\n deleteBucket();\n }\n }", "public void doShopping(IBasket basket,IArchiveBasket archiveBasket);", "public boolean updateQuantity(Scanner scanner, boolean buyOrSell){\n if(inventory[0]==null){\n System.out.println(\"Error...could not buy item\");\n return false;\n }\n FoodItem foodItem = new FoodItem();\n boolean valid = false;\n int sellQuantity = 0;\n foodItem.inputCode(scanner);\n int var = alreadyExists(foodItem);\n System.out.println(var);\n if(buyOrSell){\n if(var == -1) {\n System.out.println(\"Error...could not buy item\");\n return false;\n }\n } else{\n if(var == -1) {\n System.out.println(\"Error...could not sell item\");\n return false;\n }\n }\n\n do{\n try {\n if(buyOrSell){\n System.out.print(\"Enter valid quantity to buy: \");\n }else{\n System.out.print(\"Enter valid quantity to sell: \");\n }\n sellQuantity = scanner.nextInt();\n System.out.println(sellQuantity);\n valid = true;\n } catch (InputMismatchException e) {\n System.out.println(\"Invalid entry\");\n scanner.next();\n }\n }while(!valid);\n if(buyOrSell){\n if(sellQuantity > inventory[var].itemQuantityInStock){\n System.out.println(\"Error...could not buy item\");\n return false;\n }else {\n inventory[var].updateItem(sellQuantity);\n }\n }else{\n if(sellQuantity > inventory[var].itemQuantityInStock){\n System.out.println(\"Error...could not sell item\");\n return false;\n }else{\n inventory[var].updateItem(-sellQuantity);\n }\n }\n return true;\n }", "public void setInventorySlotContents(int par1, ItemStack par2ItemStack)\n {\n this.furnaceItemStacks[par1] = par2ItemStack;\n\n if (par2ItemStack != null && par2ItemStack.stackSize > this.getInventoryStackLimit())\n {\n par2ItemStack.stackSize = this.getInventoryStackLimit();\n }\n }", "public void markProductsUnavailableInStock(long storeID, \r\n\t\t\tProductMovementTO movedProductAmounts\r\n\t\t\t) throws ProductOutOfStockException, UpdateException;", "@Test\n public void testMultipleRollbackAvailable() throws Exception {\n try {\n RollbackTestUtils.adoptShellPermissionIdentity(\n Manifest.permission.INSTALL_PACKAGES,\n Manifest.permission.DELETE_PACKAGES,\n Manifest.permission.TEST_MANAGE_ROLLBACKS);\n RollbackManager rm = RollbackTestUtils.getRollbackManager();\n\n // Prep installation of the test apps.\n RollbackTestUtils.uninstall(TEST_APP_A);\n RollbackTestUtils.install(\"RollbackTestAppAv1.apk\", false);\n RollbackTestUtils.install(\"RollbackTestAppAv2.apk\", true);\n assertEquals(2, RollbackTestUtils.getInstalledVersion(TEST_APP_A));\n\n RollbackTestUtils.uninstall(TEST_APP_B);\n RollbackTestUtils.install(\"RollbackTestAppBv1.apk\", false);\n RollbackTestUtils.install(\"RollbackTestAppBv2.apk\", true);\n assertEquals(2, RollbackTestUtils.getInstalledVersion(TEST_APP_B));\n\n // Both test apps should now be available for rollback, and the\n // RollbackInfo returned for the rollbacks should be correct.\n RollbackInfo rollbackA = getUniqueRollbackInfoForPackage(\n rm.getAvailableRollbacks(), TEST_APP_A);\n assertRollbackInfoEquals(TEST_APP_A, 2, 1, rollbackA);\n\n RollbackInfo rollbackB = getUniqueRollbackInfoForPackage(\n rm.getAvailableRollbacks(), TEST_APP_B);\n assertRollbackInfoEquals(TEST_APP_B, 2, 1, rollbackB);\n\n // Executing rollback should roll back the correct package.\n RollbackTestUtils.rollback(rollbackA.getRollbackId());\n assertEquals(1, RollbackTestUtils.getInstalledVersion(TEST_APP_A));\n assertEquals(2, RollbackTestUtils.getInstalledVersion(TEST_APP_B));\n\n RollbackTestUtils.uninstall(TEST_APP_A);\n RollbackTestUtils.install(\"RollbackTestAppAv1.apk\", false);\n RollbackTestUtils.install(\"RollbackTestAppAv2.apk\", true);\n assertEquals(2, RollbackTestUtils.getInstalledVersion(TEST_APP_A));\n\n RollbackTestUtils.rollback(rollbackB.getRollbackId());\n assertEquals(2, RollbackTestUtils.getInstalledVersion(TEST_APP_A));\n assertEquals(1, RollbackTestUtils.getInstalledVersion(TEST_APP_B));\n } finally {\n RollbackTestUtils.dropShellPermissionIdentity();\n }\n }", "@Override\n\tpublic int updateInventory(int tranNo, int amount) throws Exception {\n\t\treturn 0;\n\t}", "public void ExecuteSellOrder() throws SQLException, InvalidOrderException, InvalidAssetException, NegativePriceException, UnitException {\n // Current asset instance\n Asset currentAsset = Asset.findAsset(this.assetID);\n\n // Check if just ordered asset has corresponding order\n\n // Find buy orders of same asset\n Statement smt = connection.createStatement();\n String sqlFindOrder\n = \"SELECT * FROM orders WHERE assetID = '\" + assetID + \"' and orderType = 'BUY' \" +\n \"and orderStatus = 'INCOMPLETE' and unitID != '\" + this.unitID + \"' \" +\n \"ORDER BY orderTime;\";\n ResultSet buyOrders = smt.executeQuery(sqlFindOrder);\n\n // List to store corresponding buy orders of the same asset\n ArrayList<Order> matchingOrders = new ArrayList<>();\n\n // Add queried rows as new Buy Orders in list\n while (buyOrders.next()) {\n matchingOrders.add(\n new BuyOrder(\n buyOrders.getString(\"orderID\"),\n buyOrders.getString(\"userID\"),\n buyOrders.getString(\"unitID\"),\n buyOrders.getString(\"assetID\"),\n buyOrders.getString(\"orderTime\").substring(0,19),\n OrderStatus.valueOf(buyOrders.getString(\"orderStatus\")),\n OrderType.valueOf(buyOrders.getString(\"orderType\")),\n buyOrders.getDouble(\"orderPrice\"),\n buyOrders.getInt(\"orderQuantity\"),\n buyOrders.getInt(\"quantFilled\"),\n buyOrders.getInt(\"quantRemain\")\n )\n );\n }\n\n // Remove orders if the buy bid is less than the sell ask\n matchingOrders.removeIf(buys -> (buys.orderPrice < this.orderPrice));\n\n // List to store required orders that can fully/partially or completely not fill order\n ArrayList<Order> requiredOrders = new ArrayList<>();\n\n // Required asset amount to facilitate quantity of this order\n int requiredQuant = this.quantRemain;\n\n // Loop through orders matching conditions and append as many orders possible to\n // fully/partially facilitate this order\n for (int i = 0; i < matchingOrders.size(); i++) {\n // Stores quantity of current order in matchingOrders list\n int quantity = matchingOrders.get(i).quantRemain;\n if (requiredQuant > 0) {\n requiredOrders.add(matchingOrders.get(i));\n requiredQuant -= quantity;\n } else if (requiredQuant <= 0) {\n break;\n }\n }\n\n // If requiredOrders is filled it can either\n // - Have enough buy orders to fully facilitate the sell order\n // * Complete sell order (set COMPLETE flag, 0 quant remain, max quant fill)\n // * Update buyer and seller inventory numbers\n // * Change buy order (INCOMPLETE, quantFilled, quantRemain)\n // - Have enough buy orders to partially fill the sell order\n // * Complete the corresponding buy order/s (set COMPLETE flag, 0 quant remain, max quant fill)\n // * Change sell order (INCOMPLETE, change quant remain, change quant filled)\n // * Add inventory entry and update corresponding inventory numbers\n\n for (int i = 0; i < requiredOrders.size(); i++) {\n // How much this order has remaining to fill\n int sellQuant = this.quantRemain;\n // How much can this corresponding order faciliate of this order\n int buyQuant = requiredOrders.get(i).quantRemain;\n\n // Track executed quantity\n int executed = 0;\n\n if (buyQuant > sellQuant) {\n // When this order has more than the quantity required to fill remaining units\n\n // Stores how many more units the buy order has over this sell order\n this.quantFilled += sellQuant;\n this.quantRemain -= sellQuant;\n\n // Deduct the amount remaining of the sell order from the quantity remaining in the buy order\n requiredOrders.get(i).quantRemain -= sellQuant;\n requiredOrders.get(i).quantFilled += sellQuant;\n executed = sellQuant;\n\n // Change quantities in database\n ChangeQuantRemainFilled(this.quantRemain, this.quantFilled);\n requiredOrders.get(i).ChangeQuantRemainFilled(requiredOrders.get(i).quantRemain, requiredOrders.get(i).quantFilled);\n\n // Set complete status of this order\n this.ChangeStatus(OrderStatus.COMPLETE);\n\n } else if (buyQuant == sellQuant) {\n // When this order has exactly the same amount required to fill remaining units\n\n // Stores how many more units the buy order has over this sell order\n this.quantFilled += sellQuant;\n this.quantRemain -= sellQuant;\n\n // Deduct the amount remaining of the sell order from the quantity remaining in the buy order\n requiredOrders.get(i).quantRemain -= sellQuant;\n requiredOrders.get(i).quantFilled += sellQuant;\n executed = sellQuant;\n\n assert requiredOrders.get(i).quantRemain == 0;\n assert requiredOrders.get(i).quantFilled == requiredOrders.get(i).orderQuant;\n\n // Change quantities in database\n this.ChangeQuantRemainFilled(this.quantRemain, this.quantFilled);\n requiredOrders.get(i).ChangeQuantRemainFilled(requiredOrders.get(i).quantRemain, requiredOrders.get(i).quantFilled);\n\n // Set complete status of this order\n this.ChangeStatus(OrderStatus.COMPLETE);\n requiredOrders.get(i).ChangeStatus(OrderStatus.COMPLETE);\n\n } else {\n // When this order has less than required amount to fill remaining units\n\n // Stores how many more units the buy order has over this sell order\n this.quantFilled += requiredOrders.get(i).quantRemain;\n this.quantRemain -= requiredOrders.get(i).quantRemain;\n\n assert this.quantRemain + this.quantFilled == this.orderQuant;\n\n // Deduct the amount remaining of the sell order from the quantity remaining in the buy order\n requiredOrders.get(i).quantRemain -= buyQuant;\n requiredOrders.get(i).quantFilled += buyQuant;\n executed = buyQuant;\n\n assert requiredOrders.get(i).quantRemain == 0;\n assert requiredOrders.get(i).quantFilled == requiredOrders.get(i).orderQuant;\n\n // Change quantities in database\n ChangeQuantRemainFilled(this.quantRemain, this.quantFilled);\n requiredOrders.get(i).ChangeQuantRemainFilled(requiredOrders.get(i).quantRemain, requiredOrders.get(i).quantFilled);\n\n // Set complete status of this order\n ChangeStatus(OrderStatus.INCOMPLETE);\n requiredOrders.get(i).ChangeStatus(OrderStatus.COMPLETE);\n\n }\n\n // Change asset price\n currentAsset.SetPrice(requiredOrders.get(i).orderPrice);\n\n // Change inventory amounts\n new InventoryItem(this.unitID, this.assetID, requiredOrders.get(i).orderPrice, -executed, this.orderID);\n new InventoryItem(requiredOrders.get(i).unitID, requiredOrders.get(i).assetID, requiredOrders.get(i).orderPrice, executed, requiredOrders.get(i).orderID);\n\n // Set credit balance of units\n Unit sellerUnit = Unit.getUnit(this.unitID);\n sellerUnit.ChangeUnitBalance(this.unitID, requiredOrders.get(i).orderPrice * executed);\n Unit buyerUnit = Unit.getUnit(requiredOrders.get(i).unitID);\n buyerUnit.ChangeUnitBalance(requiredOrders.get(i).unitID, -requiredOrders.get(i).orderPrice * executed);\n }\n\n // If requiredOrders is empty, no current buy orders are able to facilitate sell order\n\n // Modify watchlist balances\n\n }", "@Override\r\n public ItemStack transferStackInSlot(EntityPlayer par1EntityPlayer, int par2)\r\n {\r\n\t\tItemStack stack = null;\r\n Slot slot = (Slot)this.inventorySlots.get(par2);\r\n\r\n if (slot != null && slot.getHasStack()) {\r\n ItemStack stack1 = slot.getStack();\r\n stack = stack1.copy();\r\n\r\n if (par2 == 0) {\r\n if (!this.mergeItemStack(stack1, 10, 46, true)) {\r\n return null;\r\n }\r\n slot.onSlotChange(stack1, stack);\r\n }\r\n else if (par2 >= 10 && par2 < 37) {\r\n if (!this.mergeItemStack(stack1, 37, 46, false)) {\r\n return null;\r\n }\r\n }\r\n else if (par2 >= 37 && par2 < 46) {\r\n if (!this.mergeItemStack(stack1, 10, 37, false)) {\r\n return null;\r\n }\r\n }\r\n else if (!this.mergeItemStack(stack1, 10, 46, false)) {\r\n return null;\r\n }\r\n\r\n if (stack1.stackSize == 0) {\r\n slot.putStack((ItemStack)null);\r\n }\r\n else {\r\n slot.onSlotChanged();\r\n }\r\n\r\n if (stack1.stackSize == stack.stackSize) {\r\n return null;\r\n }\r\n\r\n slot.onPickupFromSlot(par1EntityPlayer, stack1);\r\n }\r\n\r\n return stack;\r\n }", "public final boolean dispatchTransaction(int i, Parcel parcel, Parcel parcel2, int i2) throws RemoteException {\n C3810fw fwVar;\n switch (i) {\n case 1:\n mo14937a();\n break;\n case 2:\n mo14940b();\n break;\n case 3:\n mo14941c();\n break;\n case 4:\n mo14942d();\n break;\n case 5:\n IBinder readStrongBinder = parcel.readStrongBinder();\n if (readStrongBinder == null) {\n fwVar = null;\n } else {\n IInterface queryLocalInterface = readStrongBinder.queryLocalInterface(\"com.google.android.gms.ads.internal.reward.client.IRewardItem\");\n fwVar = queryLocalInterface instanceof C3810fw ? (C3810fw) queryLocalInterface : new C3812fy(readStrongBinder);\n }\n mo14939a(fwVar);\n break;\n case 6:\n mo14943e();\n break;\n case 7:\n mo14938a(parcel.readInt());\n break;\n case 8:\n mo14944f();\n break;\n default:\n return false;\n }\n parcel2.writeNoException();\n return true;\n }", "private void swap(int pos1, int pos2) {\n\t\tE temp = apq.get(pos1);\n\t\tapq.set(pos1, apq.get(pos2));\n\t\tapq.set(pos2, temp);\n\n\t\tlocator.set(apq.get(pos1), pos1);\n\t\tlocator.set(apq.get(pos2), pos2);\n\t}", "@Override\n public void matchOrders() throws IOException, MissingEntityException, InvalidEntityException {\n List<Order> buyOrders = getOrdersBySideAndStatus(true, ACTIVE);\n List<Order> sellOrders = getOrdersBySideAndStatus(false, ACTIVE);\n for (Order buyOrder : buyOrders) {\n for (Order sellOrder : sellOrders) {\n checkForMatch(buyOrder, sellOrder);\n }\n }\n }", "void rollback(Transaction transaction);", "protected void handleAutoInsertAsIndividualActions(Player viewer, InventoryState inventoryState, GUISession session, Inventory destInv, InventoryClickEvent shiftClickEvent){\n shiftClickEvent.setCancelled(true); //Cancel the event\n boolean destIsTopInv = shiftClickEvent.getView().getTopInventory().equals(destInv);\n //find an empty slot and try and place it there\n ItemStack toMove = shiftClickEvent.getCurrentItem().clone();\n int totalToMove = toMove.getAmount(); //The total amount trying to be moved\n if(toMove == null || toMove.getType().equals(Material.AIR) || toMove.getAmount() < 1){\n return; //No item to move\n }\n int destSlotNum = -1;\n int moveAmount = toMove.getAmount(); //The amount we can move\n for(int i=0;i<destInv.getSize();i++){ //First try and find a slot that we can stack with\n if(!destIsTopInv && i > 35){ //Moving to bottom (Always Player) inventory, slots outside of 35 are not allowed to be auto-inserted into\n break;\n }\n ItemStack it = destInv.getItem(i);\n if(it != null && !it.getType().equals(Material.AIR)){ //Slot isn't empty, let's try and place it here\n GUIElement inSlot = !destIsTopInv ? null : inventoryState.getElementInSlot(i); //The GUIElement in this slot if dest is the GUI\n if(inSlot == null || inSlot.canAutoInsertIntoSlot(viewer, session)) { //Slot is able to be auto inserted into\n if(it.getAmount() < it.getMaxStackSize() && StackCompatibilityUtil.canStack(it, toMove)){ //They can be stacked together and it's not a full stack\n destSlotNum = i;\n moveAmount = Math.min(moveAmount, it.getMaxStackSize() - it.getAmount()); //Reduce the number to move if moving the current amount would overflow the stack\n break;\n }\n }\n }\n }\n if(destSlotNum == -1){ //If still not found a slot\n for(int i=0;i<destInv.getSize();i++){ //Second try and find an allowed empty slot to try and place into\n if(!destIsTopInv && i > 35){ //Moving to bottom (Always Player) inventory, slots outside of 35 are not allowed to be auto-inserted into\n break;\n }\n ItemStack it = destInv.getItem(i);\n if(it == null || it.getType().equals(Material.AIR)){ //Slot is empty, let's try and place it here\n GUIElement inSlot = !destIsTopInv ? null : inventoryState.getElementInSlot(i); //The GUIElement in this slot if dest is the GUI\n if(inSlot == null || inSlot.canAutoInsertIntoSlot(viewer, session)) {\n destSlotNum = i;\n break;\n }\n }\n }\n }\n toMove.setAmount(moveAmount);\n\n if(destSlotNum >= 0) { //If we have found a destination slot\n //Simulate a place event for here\n ItemStack cursor = shiftClickEvent.getView().getCursor();\n\n if(destIsTopInv) { //If destination is GUI, then simulate placing it\n shiftClickEvent.getView().setCursor(toMove);\n InventoryClickEvent placeEvent = new InventoryClickEvent(shiftClickEvent.getView(), InventoryType.SlotType.CONTAINER, destSlotNum, ClickType.LEFT, InventoryAction.PLACE_ALL);\n handleBukkitEvent(placeEvent, session);\n boolean placed = !placeEvent.isCancelled() || shiftClickEvent.getView().getCursor() == null\n || shiftClickEvent.getView().getCursor().getType().equals(Material.AIR); //If cursor is now cleared or event not cancelled, then item was/should be moved\n shiftClickEvent.getView().setCursor(cursor); //Reset cursor to how it was before we did the shift click\n if(!placeEvent.isCancelled()){\n //Move item as it not being cancelled means it's expected to happen\n destInv.setItem(destSlotNum, toMove); //Make the slot contain the item to move\n }\n if(placed){ //Has been placed into the destination slot, so now clear the source slot of the items we moved\n int newAmount = totalToMove - moveAmount; //Figure out how many are left\n ItemStack remainder = toMove.clone(); //Get the item stack that was moved\n remainder.setAmount(newAmount); //Set the amount to be how many are left\n shiftClickEvent.getView().setItem(shiftClickEvent.getRawSlot(), newAmount < 1 ? null : remainder); //Update in inventory\n }\n }\n else { //Source is GUI, so simulate picking it up\n shiftClickEvent.getView().setCursor(null); //Set the current cursor to nothing, so we can pickup everything available\n //Pickup all the items in the slot\n InventoryClickEvent pickupEvent = new InventoryClickEvent(shiftClickEvent.getView(), shiftClickEvent.getSlotType(), shiftClickEvent.getRawSlot(), ClickType.LEFT, InventoryAction.PICKUP_ALL);\n handleBukkitEvent(pickupEvent, session);\n boolean pickedUp = !pickupEvent.isCancelled() || (shiftClickEvent.getView().getCursor() != null\n && !shiftClickEvent.getView().getCursor().getType().equals(Material.AIR)); //If all the items were picked up\n if(!pickupEvent.isCancelled()){ //If not cancelled we actually have to do the action\n shiftClickEvent.getView().setItem(shiftClickEvent.getRawSlot(), null);\n }\n if(pickedUp){\n //We picked up too much, so put back any needed\n int amtPickedUp = shiftClickEvent.getView().getCursor() == null ? 0 : shiftClickEvent.getView().getCursor().getAmount();\n int toPutBack = amtPickedUp - moveAmount;\n if(toPutBack > 0){ //Put back the extra\n ItemStack toReturn = toMove.clone();\n toReturn.setAmount(toPutBack);\n shiftClickEvent.getView().setCursor(toReturn);\n InventoryClickEvent placeEvent = new InventoryClickEvent(shiftClickEvent.getView(), shiftClickEvent.getSlotType(), shiftClickEvent.getRawSlot(), ClickType.LEFT, InventoryAction.PLACE_ALL);\n handleBukkitEvent(placeEvent, session);\n if(!placeEvent.isCancelled()){\n //Change item as it not being cancelled means it's expected to happen\n shiftClickEvent.getView().setItem(shiftClickEvent.getRawSlot(), toReturn);\n }\n }\n\n //Put the 'picked up' items into the destination inventory\n ItemStack currentItem = destInv.getItem(destSlotNum);\n int currentAmt = currentItem == null || !StackCompatibilityUtil.canStack(toMove, currentItem) ? 0 : currentItem.getAmount();\n int amt = currentAmt + moveAmount; //Add the existing amount and the amount to add\n toMove.setAmount(amt);\n destInv.setItem(destSlotNum, toMove);\n }\n shiftClickEvent.getView().setCursor(cursor); //Reset cursor to how it was before we did the shift click\n }\n\n if(totalToMove > moveAmount){ //If not all of the stack was moved into the GUI, call recursively to try and move the remainder\n InventoryClickEvent newShiftClickEvent = new InventoryClickEvent(shiftClickEvent.getView(), shiftClickEvent.getSlotType(),\n shiftClickEvent.getRawSlot(), shiftClickEvent.getClick(), InventoryAction.MOVE_TO_OTHER_INVENTORY);\n //Call self recursively to move the remainder somewhere\n handleAutoInsertAsIndividualActions(viewer, inventoryState, session, destInv, newShiftClickEvent);\n }\n }\n return;\n }", "public List<ItemBO> checkInventory(final String masterOrderNumber, final List<ItemBO> itemList, final AccountBO billToAcct,\n\t\t\tfinal AccountBO shipToAcct, final CustomerSalesOrgBO salesOrg, final OrderType orderType, final OrderSource orderSource,\n\t\t\tboolean bypassMultipleInventoryLocationsProblem\n\t\t /*\n\t\t * ,\n\t\t\t * String\n\t\t\t * paymentMethod\n\t\t\t */)\n\t\t\tthrows WOMBusinessDataException, WOMExternalSystemException, WOMTransactionException, WOMValidationException\n\t{\n\n\t\tlogger.info(\"checkInventory(...): bypassMultipleInventoryLocationsProblem: \" + bypassMultipleInventoryLocationsProblem);\n\t\tfinal List<ItemBO> nabsList = new ArrayList<ItemBO>();\n\t\tfinal List<ItemBO> sapList = new ArrayList<ItemBO>();\n\n\t\t// for the given input list, put the ones that do not have problems into the appropriate external system list.\n\t\tfor (final ItemBO lineItem : itemList)\n\t\t{\n\t\t\t// no need to check it if we can't process it\n\t\t\tif (lineItem.canProcessItem())\n\t\t\t{\n\t\t\t\tif (lineItem.getExternalSystem() == ExternalSystem.NABS)\n\t\t\t\t{\n\t\t\t\t\tnabsList.add(lineItem);\n\t\t\t\t}\n\t\t\t\telse if (lineItem.getExternalSystem() == ExternalSystem.EVRST)\n\t\t\t\t{\n\t\t\t\t\tsapList.add(lineItem);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfinal String billToAcctCode = billToAcct != null ? billToAcct.getAccountCode() : null;\n\t\tString shipToAcctCode = shipToAcct != null ? shipToAcct.getAccountCode() : null;\n\t\t// call NABS check inventory\n\t\tif (nabsList.size() > 0)\n\t\t{\n\t\t\tnabsService.checkInventory(masterOrderNumber, nabsList, billToAcctCode, shipToAcctCode, orderType);\n\t\t}\n\t\tfinal SapAcctBO sapAcct = billToAcct != null ? billToAcct.getSapAccount() : null;\n\t\tfinal String sapAccoutCode = sapAcct != null ? sapAcct.getSapAccountCode() : null;\n\n\t\t//For ShipToAcctCode\n\t\tfinal SapAcctBO sapShipToAcct = shipToAcct != null ? shipToAcct.getSapAccount() : null;\n\t\tfinal String sapShipToAccoutCode = sapShipToAcct != null ? sapShipToAcct.getSapAccountCode() : null;\n\t\tshipToAcctCode = sapShipToAccoutCode != null ? sapShipToAccoutCode : shipToAcctCode;\n\n\t\t// Call SAP check Inventory\n\t\tSAPService.checkInventory(sapList, sapAccoutCode, shipToAcctCode, salesOrg, orderType.getEconCode(),\n\t\t\t\torderSource.getOrderSource()/* ,paymentMethod */);\n\n\t\tif (sapList != null && sapList.size() > 0 && sapList.get(0).getInventory() != null) {\n\t\t\tlogger.debug(\"checkInventory(...): sapList.get(0).getInventory().size(): \" + sapList.get(0).getInventory().size());\n\t\t}\n\n\t\tif (itemList != null && itemList.size() > 0 && itemList.get(0).getInventory() != null) {\n\t\t\tlogger.debug(\"checkInventory(...): itemList.get(0).getInventory().size() (BEFORE setInventoryProblem(...)): \" + itemList.get(0).getInventory().size());\n\t\t}\n\n\t\t// Go through Item list, find out no inventory, no sufficient inventory\n\t\t// problem\n\t\tif (bypassMultipleInventoryLocationsProblem) {\n\t\t\tsetInventoryProblem(itemList, orderSource, bypassMultipleInventoryLocationsProblem);\n\t\t} else {\n\t\t\tsetInventoryProblem(itemList, orderSource);\n\t\t}\n\t\tif (itemList != null && itemList.size() > 0 && itemList.get(0).getInventory() != null) {\n\t\t\tlogger.debug(\"checkInventory(...): itemList.get(0).getInventory().size() (AFTER setInventoryProblem(...)): \" + itemList.get(0).getInventory().size());\n\t\t}\n\n\t\treturn itemList;\n\t}", "@When(\"^I push another item into the stack$\")\n\tpublic void i_push_another_item_into_the_stack() throws Throwable {\n\t throw new PendingException();\n\t}", "public void dropItems() {\n\t\tlocation.getChunk().load();\n\t\tArrays.stream(inventory.getContents())\n\t\t\t.filter(ItemStackUtils::isValid)\n\t\t\t.forEach((item) -> location.getWorld().dropItemNaturally(location, item));\n\t\tinventory.clear();\n\t}", "public void loadInitialData() {\n\t\t\texecuteTransaction(new Transaction<Boolean>() {\n\t\t\t\t@Override\n\t\t\t\tpublic Boolean execute(Connection conn) throws SQLException {\n\t\t\t\t\tList<Item> inventory;\n\t\t\t\t\tList<Location> locationList;\n\t\t\t\t\tList<User> userList;\n\t\t\t\t\tList<JointLocations> jointLocationsList;\n\t\t\t\t\t//List<Description> descriptionList; \n\t\t\t\t\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\tinventory = InitialData.getInventory();\n\t\t\t\t\t\tlocationList = InitialData.getLocations(); \n\t\t\t\t\t\tuserList = InitialData.getUsers();\n\t\t\t\t\t\tjointLocationsList = InitialData.getJointLocations();\n\t\t\t\t\t\t//descriptionList = //InitialData.getDescriptions();\n\t\t\t\t\t\t\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\tthrow new SQLException(\"Couldn't read initial data\", e);\n\t\t\t\t\t}\n\n\t\t\t\t\tPreparedStatement insertItem = null;\n\t\t\t\t\tPreparedStatement insertLocation = null; \n\t\t\t\t\tPreparedStatement insertUser = null;\n\t\t\t\t\tPreparedStatement insertJointLocations = null;\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\t// AD: populate locations first since location_id is foreign key in inventory table\n\t\t\t\t\t\tinsertLocation = conn.prepareStatement(\"insert into locations (description_short, description_long) values (?, ?)\" );\n\t\t\t\t\t\tfor (Location location : locationList)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tinsertLocation.setString(1, location.getShortDescription());\n\t\t\t\t\t\t\tinsertLocation.setString(2, location.getLongDescription());\n\t\t\t\t\t\t\tinsertLocation.addBatch();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tinsertLocation.executeBatch(); \n\t\t\t\t\t\t\n\t\t\t\t\t\tinsertJointLocations = conn.prepareStatement(\"insert into jointLocations (fk_location_id, location_north, location_south, location_east, location_west) values (?, ?, ?, ?, ?)\" );\n\t\t\t\t\t\tfor (JointLocations jointLocations: jointLocationsList)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tinsertJointLocations.setInt(1, jointLocations.getLocationID());\n\t\t\t\t\t\t\tinsertJointLocations.setInt(2, jointLocations.getLocationNorth());\n\t\t\t\t\t\t\tinsertJointLocations.setInt(3, jointLocations.getLocationSouth());\n\t\t\t\t\t\t\tinsertJointLocations.setInt(4, jointLocations.getLocationEast());\n\t\t\t\t\t\t\tinsertJointLocations.setInt(5, jointLocations.getLocationWest());\n\t\t\t\t\t\t\tinsertJointLocations.addBatch();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tinsertJointLocations.executeBatch();\n\t\t\t\t\t\t\n\t\t\t\t\t\tinsertItem = conn.prepareStatement(\"insert into inventory (location_id, item_name) values (?, ?)\");\n\t\t\t\t\t\tfor (Item item : inventory) \n\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t// Auto generate itemID\n\t\t\t\t\t\t\tinsertItem.setInt(1, item.getLocationID());\n\t\t\t\t\t\t\tinsertItem.setString(2, item.getName());\n\t\t\t\t\t\t\tinsertItem.addBatch();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tinsertItem.executeBatch();\n\t\t\t\t\t\t\n\t\t\t\t\t\tinsertUser = conn.prepareStatement(\"insert into users (username, password) values (?, ?)\");\n\t\t\t\t\t\tfor(User user: userList) {\n\t\t\t\t\t\t\tinsertUser.setString(1, user.getUsername());\n\t\t\t\t\t\t\tinsertUser.setString(2, user.getPassword());\n\t\t\t\t\t\t\tinsertUser.addBatch();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tinsertUser.executeBatch();\n\t\t\t\t\t\t\n\t\t\t\t\t\tSystem.out.println(\"Tables populated\");\n\t\t\t\t\t\t\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tDBUtil.closeQuietly(insertLocation);\t\n\t\t\t\t\t\tDBUtil.closeQuietly(insertItem);\n\t\t\t\t\t\tDBUtil.closeQuietly(insertUser);\n\t\t\t\t\t}\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t});\n\t\t}", "private void swapTiles(Tile tile1, Tile tile2) {\n\n\t\tint temp = tile2.getValue();\n\t\ttile2.setValue(tile1.getValue());\n\t\ttile1.setValue(temp);\n\t}", "private void assertSameTask(ReadOnlyTask task1, ReadOnlyTask task2) {\n if (task1 == null && task2 == null) {\n // both null\n return;\n }\n\n if (task1 == null) {\n fail(\"task1 is null but task2 is NOT null\");\n }\n\n if (task2 == null) {\n fail(\"task1 is NOT null but task2 is null\");\n }\n\n assertTrue(\"Expected: <\" + task1 + \"> but was <\" + task2 + \">\", task1.isSameStateAs(task2));\n }", "public void useItem(OutputStreamWriter out, InputStreamReader newIn) {\r\n InputStreamReader instream = newIn;\r\n BufferedReader in = new BufferedReader(instream);\r\n boolean equipped = false;\r\n if (this.player.getInventory().isEmpty()) {\r\n try {\r\n out.write(\"You have nothing in your inventory you can use..\" + System.lineSeparator());\r\n } catch (IOException ex) {\r\n Logger.getLogger(Game.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n } else {\r\n while (!equipped) {\r\n try {\r\n out.write(this.getPlayerInventory());\r\n out.write(System.getProperty(\"line.separator\"));\r\n out.write(\"Choose an item by pressing a number: \");\r\n out.write(System.getProperty(\"line.separator\"));\r\n out.flush();\r\n try {\r\n int itemNumber = Integer.parseInt(in.readLine());\r\n if (itemNumber >= player.getInventory().size() || itemNumber < 0) {\r\n out.write(\"You do not have that item...\");\r\n out.write(System.getProperty(\"line.separator\"));\r\n out.flush();\r\n } else {\r\n if (player.getInventory().get(itemNumber).getItemType() == 3 || player.getInventory().get(itemNumber).getItemType() == 4) {\r\n out.write(player.useItem(itemNumber));\r\n equipped = true;\r\n out.write(System.getProperty(\"line.separator\"));\r\n out.flush();\r\n } else {\r\n out.write(\"Choose between slot 1 and slot 2 by pressing 1 or 2: \");\r\n out.write(System.getProperty(\"line.separator\"));\r\n out.flush();\r\n int slotNumber = Integer.parseInt(in.readLine());\r\n while (slotNumber != 1 && slotNumber != 2) {\r\n out.write(\"You have to choose between slot 1 and slot 2\" + System.lineSeparator());\r\n out.flush();\r\n slotNumber = Integer.parseInt(in.readLine());\r\n }\r\n out.write(player.equip(itemNumber, slotNumber));\r\n equipped = true;\r\n out.write(System.getProperty(\"line.separator\"));\r\n out.flush();\r\n }\r\n }\r\n } catch (NumberFormatException ex) {\r\n out.write(\"You have to enter a number. Please try again!\" + System.lineSeparator());\r\n out.write(System.getProperty(\"line.separator\"));\r\n out.flush();\r\n equipped = true;\r\n }\r\n } catch (IOException ex) {\r\n Logger.getLogger(Game.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n }\r\n }", "private void updateEISAndEAS(){\n eas.registerPayment(paymentDTO);\n eis.updateInventory(saleDTO);\n }", "protected void doItemDrop(Location loc, Player player, ItemStack itemStack) {\n // To avoid drops occasionally spawning in a block and warping up to the\n // surface, wait for the next tick and check whether the block is\n // actually unobstructed. We don't attempt to save the drop if e.g.\n // a mob is standing in lava, however.\n Bukkit.getScheduler().scheduleSyncDelayedTask(BeastMaster.PLUGIN, () -> {\n Block block = loc.getBlock();\n Location revisedLoc = (block != null &&\n !canAccomodateItemDrop(block) &&\n player != null) ? player.getLocation()\n : loc;\n org.bukkit.entity.Item item = revisedLoc.getWorld().dropItem(revisedLoc, itemStack);\n item.setInvulnerable(isInvulnerable());\n item.setGlowing(isGlowing());\n }, 1);\n }", "public boolean insertarItem53(Mgestion_resul dts) {\n \n Item53 = \"update item set cumple=?, justifi=?, aplica=? where idItem=53\";\n Ver84 = \"update verificacion set cumplimiento=? where idverificacion=84\";\n \n \n try {\n\n PreparedStatement pst = cn.prepareStatement(Item53);\n PreparedStatement pst2 = cn.prepareStatement(Ver84);\n \n \n\n pst.setString(1, dts.getI531());\n pst.setString(2, dts.getJ531());\n pst.setString(3, dts.getA531());\n \n pst2.setString(1, dts.getV531());\n \n \n int n = pst.executeUpdate();\n\n if (n != 0) {\n int n2 = pst2.executeUpdate();\n\n if (n2 != 0) {\n return true; \n\n } else {\n return false;\n }\n\n } else {\n return false;\n }\n\n } catch (Exception e) {\n JOptionPane.showConfirmDialog(null, e);\n return false;\n }\n \n}", "public void trade(Drop myDrop, User receiver) {\n getInventory().removeDrop(myDrop);\n receiver.getInventory().addDrop(myDrop);\n }", "private void sendEquipmentPackets_Old(int entityId, Map<String, ItemStack> newItems) { \n // For each of the new items, make a packet and send it \n for(Map.Entry<String, ItemStack> entry : newItems.entrySet()) { \n Object packet = ReflectUtils.newInstance(\"PacketPlayOutEntityEquipment\");\n // Set the entity ID, slot and item\n ReflectUtils.setField(packet, \"a\", entityId);\n ReflectUtils.setField(packet, \"b\", getNMSItemSlot(entry.getKey()));\n ReflectUtils.setField(packet, \"c\", getNMSItemStack(entry.getValue()));\n sendPacket(packet);\n }\n }", "public static double beginInventoryCalls(CS145LinkedList<BookData> inventory,\n File OrderCalls) {\n\n // Only begin transactions if inventory has BookData Objects\n if (!inventory.isEmpty()) {\n Scanner input = null;\n\n // Try opening file object for initial listing of inventory\n try {\n input = new Scanner(OrderCalls);\n\n // If failure occurs throw exception\n } catch (FileNotFoundException ex) {\n System.out.println(\"Error: File \" + OrderCalls.getName()\n + \"not found. Terminating Program.\");\n }\n\n double salesToDate = 0.0;\n // Otherwise begin reading file\n while (input.hasNextLine()) {\n String line = input.nextLine();\n Scanner lineScanner = new Scanner(line);\n\n // Expectation:\n // first token is one of three Strings, either SHOW, STOCK, or ORDER\n String command = lineScanner.next();\n\n // If command is SHOW, print to screen a statement displaying data\n // of a BookData object for every BookData object in the list\n if (command.equals(\"SHOW\")) {\n SHOW(inventory);\n\n // Else if STOCK or ORDER is called, read the following tokens\n } else if (command.equals(\"STOCK\") || command.equals(\"ORDER\")) {\n\n // Try reading ISBN, additional books, and in the case of an order,\n // customer ID number, a certain BookData Object\n\n // If tokens are successfully stored either SHOW, ORDER, or STOCK\n // should be called\n try {\n String ISBNofBook = lineScanner.next();\n int numBooks = lineScanner.nextInt();\n\n BookData currentBKD;\n boolean bookFound = false;\n\n // Iterate through all the BookData Objects in inventory until\n // BookData object with matching ISBN is found\n Iterator<BookData> itr = inventory.iterator();\n while (itr.hasNext()) {\n currentBKD = itr.next();\n\n // If ISBN of Book Object inside BookData object currentBKD\n // has the same ISBN, update stock of book\n if (currentBKD.getISBNofBook().equals(ISBNofBook)) {\n bookFound = true;\n // Else, if command is STOCK, resolve as many backorders\n // as possible if there are any, then add any remaining\n // stock to BookData object\n if (command.equals(\"STOCK\")) {\n salesToDate += STOCK(numBooks, currentBKD);\n\n // Else, if command is ORDER, take books out of\n // inventory and complete orders till order is\n // satisfied or back order is incurred\n } else {\n // Read the ID number of prospective customer\n String customerNum = lineScanner.next();\n\n // If tokens are successfully stored, call ORDER\n salesToDate += ORDER(numBooks, currentBKD,\n customerNum);\n }\n }\n }\n\n // If there is no book in inventory with the same ISBN\n // Output message to screen\n if(!bookFound){\n System.out.println(\"Book with ISBN \" + ISBNofBook +\n \" not found in inventory\");\n }\n\n // If failure occurs trying to save tokens in given way occurs,\n // throw InputMismatchException\n } catch (InputMismatchException ex) {\n System.out.println(\"Line : \" + line);\n System.out.println(\"Mismatched Token\" + lineScanner.next());\n }\n\n // At this point we know the file being read must be an improper file\n } else {\n throw new ImproperFilePassed(\"second commandline argument\" +\n \" must be Transactions.txt, Transactions1.txt,\" +\n \" or comparable file\");\n }\n }\n // Return all revenue accrued from sales during transactions iteration\n return salesToDate;\n\n // At this point we know inventory was an empty inventory\n } else {\n throw new IllegalArgumentException();\n }\n }", "@Test\n public void testGivenCharacterAndOutfitWhenEquippingOutfitThenVerifyEntitiesUpdated() throws InvalidActionException {\n Clan clan = new Clan();\n clan.setId(1);\n clan.setName(\"Dragons\");\n\n Character character = new Character();\n character.setId(2);\n character.setName(\"Rusty Nick\");\n character.setClan(clan);\n character.setState(CharacterState.READY);\n\n ItemDetails outfitDetails = new ItemDetails();\n outfitDetails.setItemType(ItemType.OUTFIT);\n\n Item outfit = new Item();\n outfit.setId(3);\n outfit.setDetails(outfitDetails);\n outfit.setClan(clan);\n\n Set<Item> outfits = new HashSet<>();\n outfits.add(outfit);\n clan.setItems(outfits);\n\n // when equipping outfit\n Mockito.when(itemRepository.getOne(3)).thenReturn(outfit);\n Mockito.when(characterRepository.getOne(2)).thenReturn(character);\n\n itemService.equipItem(3,2, 1);\n\n // then verify entities updated\n assertEquals(character, outfit.getCharacter());\n assertNull(outfit.getClan());\n assertEquals(outfit, character.getOutfit());\n assertEquals(0, clan.getItems().size());\n }", "@Test\r\n public void testUpdateChocolateInventory() throws InventoryException {\r\n coffeeMaker.addInventory(\"0\", \"0\", \"0\", \"5\");\r\n String updatedInventory = \"Coffee: 15\\nMilk: 15\\nSugar: 15\\nChocolate: 20\\n\";\r\n assertEquals(updatedInventory, coffeeMaker.checkInventory());\r\n }", "public void handleCrafting() {\n if(input.getStackInSlot(0).getItem() != input.getStackInSlot(1).getItem() && !input.getStackInSlot(0).isEmpty() && !input.getStackInSlot(1).isEmpty()) {\n isRecipeInvalid = true;\n }\n // Handles two compatible items\n else if(input.getStackInSlot(0).getMaxDamage() > 1 && input.getStackInSlot(0).getMaxStackSize() == 1 && input.getStackInSlot(0).getItem() == input.getStackInSlot(1).getItem()) {\n isRecipeInvalid = false;\n ItemStack stack = input.getStackInSlot(0);\n int sum = (stack.getMaxDamage() - stack.getItemDamage()) + (stack.getMaxDamage() - input.getStackInSlot(1).getItemDamage());\n\n sum = sum + (int)(sum * 0.2);\n if(sum > stack.getMaxDamage()) {\n sum = stack.getMaxDamage();\n }\n\n output.setStackInSlot(0, new ItemStack(stack.getItem(), 1, stack.getMaxDamage() - sum));\n }\n // Resets the grid when the two items are incompatible\n if(input.getStackInSlot(0).getItem() != input.getStackInSlot(1).getItem() && !output.getStackInSlot(0).isEmpty()) {\n output.setStackInSlot(0, ItemStack.EMPTY);\n }\n }", "@Override\n\n\t public ItemStack transferStackInSlot(EntityPlayer par1EntityPlayer, int par2)\n\t {\n\t ItemStack itemstack = null;\n\t Slot slot = (Slot)this.inventorySlots.get(par2);\n\n\t if (slot != null && slot.getHasStack())\n\t {\n\t ItemStack itemstack1 = slot.getStack();\n\t itemstack = itemstack1.copy();\n\n\t if (par2 < this.giftBoxEntity.getSizeInventory())\n\t {\n\t if (!this.mergeItemStack(itemstack1, this.giftBoxEntity.getSizeInventory(), this.inventorySlots.size(), true))\n\t {\n\t return null;\n\t }\n\t }\n\t else if (!this.mergeItemStack(itemstack1, 0, this.giftBoxEntity.getSizeInventory(), false))\n\t {\n\t return null;\n\t }\n\n\t if (itemstack1.stackSize == 0)\n\t {\n\t slot.putStack((ItemStack)null);\n\t }\n\t else\n\t {\n\t slot.onSlotChanged();\n\t }\n\t }\n\n\t return itemstack;\n\t }", "@Override\r\n\tpublic void saveItems(final List<Item> addedItems, final List<Item> modifiedItems, final List<Item> removedItems) {\r\n if (applicationTransactionManagement) {\r\n entityManager.getTransaction().begin();\r\n }\r\n try {\r\n for (Item item : addedItems) {\r\n if (!removedItems.contains(item)) {\r\n entityManager.persist(fromItem(item));\r\n }\r\n }\r\n for (Item item : modifiedItems) {\r\n if (!removedItems.contains(item)) {\r\n Object entity = fromItem(item);\r\n if (queryDefinition.isDetachedEntities()) {\r\n entity = entityManager.merge(entity);\r\n }\r\n entityManager.persist(entity);\r\n }\r\n }\r\n for (Item item : removedItems) {\r\n if (!addedItems.contains(item)) {\r\n Object entity = fromItem(item);\r\n if (queryDefinition.isDetachedEntities()) {\r\n entity = entityManager.merge(entity);\r\n }\r\n entityManager.remove(entity);\r\n }\r\n }\r\n if (applicationTransactionManagement) {\r\n entityManager.getTransaction().commit();\r\n }\r\n } catch (Exception e) {\r\n if (applicationTransactionManagement) {\r\n if (entityManager.getTransaction().isActive()) {\r\n entityManager.getTransaction().rollback();\r\n }\r\n }\r\n throw new RuntimeException(e); \r\n }\r\n \r\n // invalidate the query size\r\n setQuerySize(-1);\r\n }", "public void moveQueueItem(int index1, int index2) {\n\t\tsynchronized (this) {\n\t\t\tif (index1 >= mPlayListLen) {\n\t\t\t\tindex1 = mPlayListLen - 1;\n\t\t\t}\n\t\t\tif (index2 >= mPlayListLen) {\n\t\t\t\tindex2 = mPlayListLen - 1;\n\t\t\t}\n\t\t\tif (index1 < index2) {\n\t\t\t\tSong tmp = mPlayList[index1];\n\t\t\t\tfor (int i = index1; i < index2; i++) {\n\t\t\t\t\tmPlayList[i] = mPlayList[i + 1];\n\t\t\t\t}\n\t\t\t\tmPlayList[index2] = tmp;\n\t\t\t\tif (mPlayPos == index1) {\n\t\t\t\t\tmPlayPos = index2;\n\t\t\t\t} else if (mPlayPos >= index1 && mPlayPos <= index2) {\n\t\t\t\t\tmPlayPos--;\n\t\t\t\t}\n\t\t\t} else if (index2 < index1) {\n\t\t\t\tSong tmp = mPlayList[index1];\n\t\t\t\tfor (int i = index1; i > index2; i--) {\n\t\t\t\t\tmPlayList[i] = mPlayList[i - 1];\n\t\t\t\t}\n\t\t\t\tmPlayList[index2] = tmp;\n\t\t\t\tif (mPlayPos == index1) {\n\t\t\t\t\tmPlayPos = index2;\n\t\t\t\t} else if (mPlayPos >= index2 && mPlayPos <= index1) {\n\t\t\t\t\tmPlayPos++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tnotifyChange(EVENT_QUEUE_CHANGED);\n\t\t}\n\t}", "@Override\n public boolean onItemMove(int fromPosition, int toPosition) {\n if (fromPosition < toPosition){\n for(int i = fromPosition;i<toPosition;i++){\n Collections.swap(cartList, i, i+1);\n }\n }else{\n for (int i = fromPosition; i > toPosition; i--){\n Collections.swap(cartList, i, i-1);\n }\n }\n notifyItemMoved(fromPosition,toPosition);\n return true;\n }", "@Test\n public void testGivenCharacterAndOutfitWhenUnequippingOutfitThenVerifyEntitiesUpdated() throws InvalidActionException {\n Clan clan = new Clan();\n clan.setId(1);\n clan.setName(\"Dragons\");\n\n Character character = new Character();\n character.setId(2);\n character.setName(\"Rusty Nick\");\n character.setState(CharacterState.READY);\n character.setClan(clan);\n\n ItemDetails outfitDetails = new ItemDetails();\n outfitDetails.setItemType(ItemType.OUTFIT);\n\n Item outfit = new Item();\n outfit.setId(3);\n outfit.setDetails(outfitDetails);\n outfit.setClan(null);\n outfit.setCharacter(character);\n character.getItems().add(outfit);\n\n Set<Item> outfits = new HashSet<>();\n clan.setItems(outfits);\n\n // when unequipping outfit\n Mockito.when(characterRepository.getOne(2)).thenReturn(character);\n Mockito.when(itemRepository.getOne(3)).thenReturn(outfit);\n\n itemService.unequipItem(3,2, 1);\n\n // then verify entities updated\n assertNull(outfit.getCharacter());\n assertEquals(clan, outfit.getClan());\n assertNull(character.getOutfit());\n assertEquals(outfit, clan.getItems().iterator().next());\n }", "private void swap(byte[] bytes, int pos1, int pos2) {\n \t\tbyte temp = bytes[pos1];\n \t\tbytes[pos1] = bytes[pos2];\n \t\tbytes[pos2] = temp;\n \t}", "@Test\n\tpublic void testProcessInventoryUpdateOrderShipmentRelease() {\n\t\tfinal Inventory inventory = new InventoryImpl();\n\t\tinventory.setUidPk(INVENTORY_UID_1000);\n\t\tinventory.setQuantityOnHand(QUANTITY_ONHAND);\n\t\tinventory.setWarehouseUid(WAREHOUSE_UID);\n\t\tfinal ProductSku productSku = new ProductSkuImpl();\n\t\tfinal String skuCode = SKU_CODE;\n\t\tproductSku.setSkuCode(skuCode);\n\t\tfinal ProductImpl product = new ProductImpl();\n\t\tproduct.setAvailabilityCriteria(AvailabilityCriteria.AVAILABLE_WHEN_IN_STOCK);\n\t\tproductSku.setProduct(product);\n\n\t\tinventory.setSkuCode(productSku.getSkuCode());\n\n\t\tfinal Order order = new OrderImpl();\n\t\torder.setUidPk(ORDER_UID_2000);\n\n\t\tfinal InventoryJournalRollupImpl ijRollup = new InventoryJournalRollupImpl();\n\t\tijRollup.setAllocatedQuantityDelta(QUANTITY_10);\n\n\t\tcontext.checking(new Expectations() {\n\t\t\t{\n\t\t\t\tInventoryJournalImpl inventoryJournal = new InventoryJournalImpl();\n\t\t\t\toneOf(beanFactory).getBean(INVENTORY_JOURNAL); will(returnValue(inventoryJournal));\n\t\t\t\toneOf(beanFactory).getBean(EXECUTION_RESULT); will(returnValue(new InventoryExecutionResultImpl()));\n\n\t\t\t\tatLeast(1).of(inventoryDao).getInventory(skuCode, WAREHOUSE_UID); will(returnValue(inventory));\n\t\t\t\tatLeast(1).of(inventoryJournalDao).getRollup(inventoryKey); will(returnValue(ijRollup));\n\t\t\t\toneOf(inventoryJournalDao).saveOrUpdate(inventoryJournal); will(returnValue(new InventoryJournalImpl()));\n\t\t\t}\n\t\t});\n\n\t\tproductInventoryManagementService.processInventoryUpdate(\n\t\t\t\tproductSku, 1,\tInventoryEventType.STOCK_ALLOCATE, EVENT_ORIGINATOR_TESTER, QUANTITY_10, order, null);\n\t\tInventoryDto inventoryDto = productInventoryManagementService.getInventory(inventory.getSkuCode(), inventory.getWarehouseUid());\n\t\tassertEquals(QUANTITY_ONHAND, inventoryDto.getQuantityOnHand());\n\t\tassertEquals(QUANTITY_ONHAND - QUANTITY_10, inventoryDto.getAvailableQuantityInStock());\n\t\tassertEquals(QUANTITY_10, inventoryDto.getAllocatedQuantity());\n\n\t\tcontext.checking(new Expectations() {\n\t\t\t{\n\t\t\t\toneOf(beanFactory).getBean(EXECUTION_RESULT); will(returnValue(new InventoryExecutionResultImpl()));\n\t\t\t}\n\t\t});\n\n\t\tfinal Inventory inventory2 = assembler.assembleDomainFromDto(inventoryDto);\n\n\t\tfinal InventoryDao inventoryDao2 = context.mock(InventoryDao.class, INVENTORY_DAO2);\n\t\tfinal InventoryJournalDao inventoryJournalDao2 = context.mock(InventoryJournalDao.class, INVENTORY_JOURNAL_DAO2);\n\t\tjournalingInventoryStrategy.setInventoryDao(inventoryDao2);\n\t\tjournalingInventoryStrategy.setInventoryJournalDao(inventoryJournalDao2);\n\n\t\tfinal InventoryJournalRollupImpl ijRollup2 = new InventoryJournalRollupImpl();\n\t\tijRollup2.setAllocatedQuantityDelta(QUANTITY_NEG_10);\n\t\tijRollup2.setQuantityOnHandDelta(QUANTITY_NEG_10);\n\n\t\tcontext.checking(new Expectations() {\n\t\t\t{\n\t\t\t\tInventoryJournalImpl inventoryJournal = new InventoryJournalImpl();\n\t\t\t\toneOf(beanFactory).getBean(INVENTORY_JOURNAL); will(returnValue(inventoryJournal));\n\t\t\t\tatLeast(1).of(inventoryDao2).getInventory(skuCode, WAREHOUSE_UID); will(returnValue(inventory2));\n\t\t\t\tatLeast(1).of(inventoryJournalDao2).saveOrUpdate(inventoryJournal); will(returnValue(new InventoryJournalImpl()));\n\t\t\t\tatLeast(1).of(inventoryJournalDao2).getRollup(inventoryKey); will(returnValue(ijRollup2));\n\t\t\t}\n\t\t});\n\n\t\tproductInventoryManagementService.processInventoryUpdate(\n\t\t\t\tproductSku, WAREHOUSE_UID,\tInventoryEventType.STOCK_RELEASE, EVENT_ORIGINATOR_TESTER, QUANTITY_10, order, null);\n\t\tinventoryDto = productInventoryManagementService.getInventory(inventory.getSkuCode(), inventory.getWarehouseUid());\n\t\tassertEquals(QUANTITY_ONHAND - QUANTITY_10, inventoryDto.getQuantityOnHand());\n\t\tassertEquals(QUANTITY_ONHAND - QUANTITY_10, inventoryDto.getAvailableQuantityInStock());\n\t\tassertEquals(QUANTITY_0, inventoryDto.getAllocatedQuantity());\n\t}", "@Test\n\t@Transactional\n\t@DirtiesContext\n\tpublic void testRollbackAndRestart() throws Exception {\n\n\t\tgetAsItemStream(reader).open(executionContext);\n\t\t\n\t\tFoo foo1 = reader.read();\n\n\t\tgetAsItemStream(reader).update(executionContext);\n\n\t\tFoo foo2 = reader.read();\n\t\tassertTrue(!foo2.equals(foo1));\n\n\t\tFoo foo3 = reader.read();\n\t\tassertTrue(!foo2.equals(foo3));\n\t\n\t\tgetAsItemStream(reader).close();\n\n\t\t// create new input source\n\t\treader = createItemReader();\n\n\t\tgetAsItemStream(reader).open(executionContext);\n\n\t\tassertEquals(foo2, reader.read());\n\t\tassertEquals(foo3, reader.read());\n\t}", "public static void addOrderedItem() {\n\t\tSystem.out.print(\"\\t\\t\");\n\t\tSystem.out.println(\"************Adding ordered item************\");\n\t\tOrderManager orderManager = new OrderManager();\n\t\tList listOfOrders = orderManager.viewOrder();\n\n\t\tOrderedItemManager orderedItemManager = new OrderedItemManager();\n\t\tList listOfOrderedItems = null;\n\n\t\tItemManager itemManager = new ItemManager();\n\t\tList listOfItems = itemManager.onStartUp();\n\n\t\tint i = 0;\n\t\tint choice = 0;\n\t\tOrder order = null;\n\t\tItem item = null;\n\t\tOrderedItem orderedItem = null;\n\t\tboolean check = false;\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tif (listOfOrders.size() == 0) {\n\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\tSystem.out.println(\"There is no orders!\");\n\t\t\treturn;\n\t\t}\n\n\t\tif (listOfItems.size() == 0) {\n\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\tSystem.out.println(\"There is no items!\");\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\tSystem.out.println();\n\t\t\t// print the list of orders for the user to select from.\n\t\t\tfor (i = 0; i < listOfOrders.size(); i++) {\n\t\t\t\torder = (Order) listOfOrders.get(i);\n\t\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\t\tSystem.out.println((i + 1) + \") Order: \" + order.getId()\n\t\t\t\t\t\t+ \" | Table: \" + order.getTable().getId());\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\tSystem.out.print(\"Select an order to add the item ordered: \");\n\t\t\tchoice = Integer.parseInt(sc.nextLine());\n\n\t\t\torder = (Order) listOfOrders.get(choice - 1);\n\n\t\t\tdo {\n\t\t\t\tfor (i = 0; i < listOfItems.size(); i++) {\n\t\t\t\t\titem = (Item) listOfItems.get(i);\n\t\t\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\t\t\tSystem.out.println((i + 1) + \") ID: \" + item.getId()\n\t\t\t\t\t\t\t+ \" | Name: \" + item.getName() + \" | Price: $\"\n\t\t\t\t\t\t\t+ item.getPrice());\n\t\t\t\t}\n\t\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\t\tSystem.out.println((i + 1) + \") Done\");\n\t\t\t\tSystem.out.println();\n\t\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\t\tSystem.out.print(\"Select an item to add into order: \");\n\t\t\t\tchoice = Integer.parseInt(sc.nextLine());\n\n\t\t\t\tif (choice != (i + 1)) {\n\t\t\t\t\titem = (Item) listOfItems.get(choice - 1);\n\n\t\t\t\t\torderedItem = new OrderedItem();\n\t\t\t\t\torderedItem.setItem(item);\n\t\t\t\t\torderedItem.setOrder(order);\n\t\t\t\t\torderedItem.setPrice(item.getPrice());\n\n\t\t\t\t\torder.addOrderedItem(orderedItem);\n\n\t\t\t\t\tcheck = orderedItemManager.createOrderedItem(orderedItem);\n\n\t\t\t\t\tif (check) {\n\t\t\t\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\t\t\t\tSystem.out.format(\"%-25s:\", \"TASK UPDATE\");\n\t\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t\t.println(\"Item added into order successfully!\");\n\t\t\t\t\t}\n\n\t\t\t\t\telse {\n\t\t\t\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\t\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\t\t\t\tSystem.out.println(\"Failed to add item into order!\");\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t} while (choice != (i + 1));\n\n\t\t}\n\n\t\tcatch (Exception e) {\n\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\tSystem.out.println(\"Invalid Input!\");\n\t\t}\n\t\tSystem.out.print(\"\\t\\t\");\n\t\tSystem.out.println(\"************End of adding items************\");\n\t}", "@Override\n\t@RequestMapping(value=\"/rest/item/reshelf\")\n\tpublic ZuelResult upItem2(Long[] ids) throws ServiceException {\n\t\treturn service.upItem2(ids);\n\t}", "void rollbackTransaction();", "public void transferFunds(BankAccount account1, BankAccount account2, double amount){\n if(account1.checkAccountOpen()&&account2.checkAccountOpen()){\n if((account1.getCurrentBalance()-amount)>0) {\n if (isSameAccount(account1, account2)) {\n account1.subtractCreditTransaction(amount);\n account2.addDebitTransaction(amount);\n } else {\n System.out.println(\"This transaction could not be processed. BankAccount owners are not the same.\");\n }\n }\n else {\n System.out.println(\"Appropriate funds not found. Please check your current balance.\");\n }\n\n\n }\n }", "@Override\r\n public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_)\r\n {\r\n ItemStack itemstack = null;\r\n Slot slot = (Slot)this.inventorySlots.get(p_82846_2_);\r\n\r\n if (slot != null && slot.getHasStack())\r\n {\r\n ItemStack itemstack1 = slot.getStack();\r\n itemstack = itemstack1.copy();\r\n\r\n if (p_82846_2_ == 2 ||p_82846_2_ == 3 )\r\n {\r\n if (!this.mergeItemStack(itemstack1, 4, 40, true))\r\n {\r\n return null;\r\n }\r\n\r\n slot.onSlotChange(itemstack1, itemstack);\r\n }\r\n else if (p_82846_2_ != 1 && p_82846_2_ != 0)\r\n {\r\n \r\n if (p_82846_2_ >= 4 && p_82846_2_ < 31)\r\n {\r\n if (!this.mergeItemStack(itemstack1, 31, 40, false))\r\n {\r\n return null;\r\n }\r\n }\r\n else if (p_82846_2_ >= 31 && p_82846_2_ < 40 && !this.mergeItemStack(itemstack1, 4, 31, false))\r\n {\r\n return null;\r\n }\r\n }\r\n else if (!this.mergeItemStack(itemstack1, 4, 40, false))\r\n {\r\n return null;\r\n }\r\n\r\n if (itemstack1.stackSize == 0)\r\n {\r\n slot.putStack((ItemStack)null);\r\n }\r\n else\r\n {\r\n slot.onSlotChanged();\r\n }\r\n\r\n if (itemstack1.stackSize == itemstack.stackSize)\r\n {\r\n return null;\r\n }\r\n\r\n slot.onPickupFromSlot(p_82846_1_, itemstack1);\r\n }\r\n\r\n return itemstack;\r\n }", "@Test\n\tpublic void testProcessInventoryUpdateOrderAdjustmentChangeQty() {\n\t\tfinal Inventory inventory = new InventoryImpl();\n\t\tinventory.setUidPk(INVENTORY_UID_1000);\n\t\tinventory.setQuantityOnHand(QUANTITY_ONHAND);\n\t\tfinal long warehouseUid = WAREHOUSE_UID;\n\t\tinventory.setWarehouseUid(warehouseUid);\n\t\tfinal ProductSku productSku = new ProductSkuImpl();\n\t\tfinal String skuCode = SKU_CODE;\n\t\tproductSku.setSkuCode(skuCode);\n\t\tfinal ProductImpl product = new ProductImpl();\n\t\tproduct.setAvailabilityCriteria(AvailabilityCriteria.AVAILABLE_WHEN_IN_STOCK);\n\t\tproduct.setGuid(PRODUCT);\n\t\tproductSku.setProduct(product);\n\n\t\tinventory.setSkuCode(productSku.getSkuCode());\n\n\t\tfinal Order order = new OrderImpl();\n\t\torder.setUidPk(ORDER_UID_2000);\n\t\torder.setStoreCode(store.getCode());\n\t\tfinal PhysicalOrderShipmentImpl shipment = getMockPhysicalOrderShipment();\n\t\tfinal OrderSku orderSku = new OrderSkuImpl();\n\t\torderSku.setProductSku(productSku);\n\t\tshipment.addShipmentOrderSku(orderSku);\n\t\torder.addShipment(shipment);\n\n\t\tfinal InventoryJournalRollupImpl ijRollup = new InventoryJournalRollupImpl();\n\t\tijRollup.setAllocatedQuantityDelta(QUANTITY_10);\n\n\t\tcontext.checking(new Expectations() {\n\t\t\t{\n\t\t\t\tInventoryJournalImpl inventoryJournal = new InventoryJournalImpl();\n\t\t\t\toneOf(beanFactory).getBean(INVENTORY_JOURNAL); will(returnValue(inventoryJournal));\n\t\t\t\toneOf(beanFactory).getBean(ALLOCATION_RESULT); will(returnValue(new AllocationResultImpl()));\n\t\t\t\toneOf(beanFactory).getBean(EXECUTION_RESULT); will(returnValue(new InventoryExecutionResultImpl()));\n\n\t\t\t\tallowing(inventoryDao).getInventory(skuCode, warehouseUid); will(returnValue(inventory));\n\t\t\t\tallowing(inventoryJournalDao).getRollup(inventoryKey); will(returnValue(ijRollup));\n\t\t\t\toneOf(inventoryJournalDao).saveOrUpdate(inventoryJournal); will(returnValue(new InventoryJournalImpl()));\n\t\t\t}\n\t\t});\n\n\t\tproductInventoryManagementService.processInventoryUpdate(\n\t\t\t\tproductSku, 1,\tInventoryEventType.STOCK_ALLOCATE, EVENT_ORIGINATOR_TESTER, QUANTITY_10, order, null);\n\t\tInventoryDto inventoryDto = productInventoryManagementService.getInventory(inventory.getSkuCode(), inventory.getWarehouseUid());\n\t\tassertEquals(QUANTITY_ONHAND, inventoryDto.getQuantityOnHand());\n\t\tassertEquals(QUANTITY_ONHAND - QUANTITY_10, inventoryDto.getAvailableQuantityInStock());\n\t\tassertEquals(QUANTITY_10, inventoryDto.getAllocatedQuantity());\n\n\t\tcontext.checking(new Expectations() {\n\t\t\t{\n\t\t\t\toneOf(beanFactory).getBean(EXECUTION_RESULT); will(returnValue(new InventoryExecutionResultImpl()));\n\t\t\t}\n\t\t});\n\n\t\tfinal Inventory inventory2 = assembler.assembleDomainFromDto(inventoryDto);\n\n\t\tfinal InventoryDao inventoryDao2 = context.mock(InventoryDao.class, INVENTORY_DAO2);\n\n\t\tjournalingInventoryStrategy.setInventoryDao(inventoryDao2);\n\n\t\tcontext.checking(new Expectations() {\n\t\t\t{\n\t\t\t\tInventoryJournalImpl inventoryJournal = new InventoryJournalImpl();\n\t\t\t\toneOf(beanFactory).getBean(INVENTORY_JOURNAL); will(returnValue(inventoryJournal));\n\t\t\t\tallowing(inventoryDao2).getInventory(skuCode, warehouseUid); will(returnValue(inventory2));\n\t\t\t\toneOf(inventoryJournalDao).saveOrUpdate(inventoryJournal); will(returnValue(new InventoryJournalImpl()));\n\t\t\t}\n\t\t});\n\n\t\tallocationService.processAllocationEvent(\n\t\t\t\torderSku, AllocationEventType.ORDER_ADJUSTMENT_CHANGEQTY, EVENT_ORIGINATOR_TESTER, QUANTITY_10, null);\n\n\t\tinventoryDto = productInventoryManagementService.getInventory(inventory.getSkuCode(), inventory.getWarehouseUid());\n\n\t\tassertEquals(QUANTITY_ONHAND, inventoryDto.getQuantityOnHand());\n\t\tassertEquals(QUANTITY_ONHAND - QUANTITY_10 - QUANTITY_10, inventoryDto.getAvailableQuantityInStock());\n\t\tassertEquals(QUANTITY_10 + QUANTITY_10, inventoryDto.getAllocatedQuantity());\n\t}", "@Override\r\n\tpublic void insertEncoreItem2(Item item) {\n\t\tint i = sqlSession.insert(ns+\".insertEncoreItem2\", item);\r\n\t\tif(i>0) System.out.println(\"insert Encore item2\");\r\n\t}", "@Test\n\tpublic void testMultipleSkuAllocation() {\n\t\tfinal int skuQty = 2;\n\t\tfinal int stockReductionQty = 1;\n\n\t\tinventoryDto.setQuantityOnHand(skuQty * 2);\n\t\tassertEquals(AVAILABLE_QUANTITY_SHOULD_BE_MESSAGE + skuQty * 2, skuQty * 2, inventoryDto.getAvailableQuantityInStock());\n\n\t\torderSku1.setQuantity(skuQty);\n\t\tassertEquals(AVAILABLE_QUANTITY_SHOULD_BE_MESSAGE + (skuQty * 2 - skuQty), skuQty * 2 - skuQty, inventoryDto.getAvailableQuantityInStock());\n\t\torderSku2.setQuantity(skuQty);\n\t\tassertEquals(AVAILABLE_QUANTITY_SHOULD_BE_MESSAGE + 0, 0, inventoryDto.getAvailableQuantityInStock());\n\n\t\t//stock reduction, but it doesn't affect allocation\n\t\tinventoryDto.setQuantityOnHand(inventoryDto.getQuantityOnHand() - stockReductionQty);\n\n\t\tassertEquals(\"Quantity on Hand should be \" + (skuQty * 2 - stockReductionQty),\n\t\t\t\tskuQty * 2 - stockReductionQty, inventoryDto.getQuantityOnHand());\n\n\t\tinventoryDto.getAvailableQuantityInStock();\n\n\t\tassertTrue(\"There should be enough allocation for this sku\", productInventoryManagementService1.isSelfAllocationSufficient(orderSku1, 0));\n\n\t\tinventoryDto.setAllocatedQuantity(inventoryDto.getAllocatedQuantity() - skuQty);\n\t\tinventoryDto.setQuantityOnHand(inventoryDto.getQuantityOnHand() - skuQty);\n\n\t\tassertEquals(AVAILABLE_QUANTITY_SHOULD_BE_MESSAGE + (inventoryDto.getQuantityOnHand() - inventoryDto.getAllocatedQuantity()),\n\t\t\t\tinventoryDto.getQuantityOnHand() - inventoryDto.getAllocatedQuantity(), inventoryDto.getAvailableQuantityInStock());\n\t\tassertFalse(\"There should NOT be enough allocation for this sku\",\n\t\t\t\tproductInventoryManagementService1.isSelfAllocationSufficient(orderSku2, 0));\n\t}", "@Override\r\n\tpublic ItemStack transferStackInSlot(EntityPlayer playerIn, int index)\r\n {\r\n ItemStack itemstack = ItemStackTools.getEmptyStack();\r\n Slot slot = this.inventorySlots.get(index);\r\n\r\n if (slot != null && slot.getHasStack())\r\n {\r\n ItemStack itemstack1 = slot.getStack();\r\n itemstack = itemstack1.copy();\r\n\r\n if (index == 0)\r\n {\r\n if (!this.mergeItemStack(itemstack1, 10, 46, false))\r\n {\r\n return ItemStackTools.getEmptyStack();\r\n }\r\n\r\n slot.onSlotChange(itemstack1, itemstack);\r\n }\r\n else if (index >= 10 && index < 37)\r\n {\r\n if (!this.mergeItemStack(itemstack1, 37, 46, false))\r\n {\r\n return ItemStackTools.getEmptyStack();\r\n }\r\n }\r\n else if (index >= 37 && index < 46)\r\n {\r\n if (!this.mergeItemStack(itemstack1, 10, 37, false))\r\n {\r\n return ItemStackTools.getEmptyStack();\r\n }\r\n }\r\n else if (!this.mergeItemStack(itemstack1, 10, 46, false))\r\n {\r\n return ItemStackTools.getEmptyStack();\r\n }\r\n\r\n if (ItemStackTools.isEmpty(itemstack1))\r\n {\r\n slot.putStack(ItemStackTools.getEmptyStack());\r\n }\r\n else\r\n {\r\n slot.onSlotChanged();\r\n }\r\n\r\n if (ItemStackTools.getStackSize(itemstack1) == ItemStackTools.getStackSize(itemstack))\r\n {\r\n return ItemStackTools.getEmptyStack();\r\n }\r\n\r\n slot.onTake(playerIn, itemstack1);\r\n }\r\n\r\n return itemstack;\r\n }", "public static void assertTransitionsEquals(Transition expectedTransitions[],Transition actualTransitions[]){\n\t\t\n\t\tArrayList<String> expectedToString = new ArrayList<String>();\n\t\tArrayList<String> actualToString = new ArrayList<String>();\n\t\n\t\t\n\t\t//populate\n\t\tfor ( Transition expected : expectedTransitions ){\n\t\t\texpectedToString.add(getTransitionString(expected));\n\t\t}\n\n\t\tfor ( Transition actual : actualTransitions ){\n\t\t\tactualToString.add(getTransitionString(actual));\n\t\t}\n\t\t\n\t\t\n\t\t//double check\n\t\tfor ( String expected : expectedToString ){\n\t\t\tif ( ! actualToString.contains(expected) ){\n\t\t\t\tfail(\"Transition \"+expected+\" not found\");\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor ( String actual : actualToString ){\n\t\t\tif ( ! actualToString.contains(actual) ){\n\t\t\t\tfail(\"Transition \"+actual+\" not expected\");\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t}", "@Test\n public void testUpdateItem() throws Exception {\n\n Tracker tracker = new Tracker();\n\n String action = \"0\";\n String yes = \"y\";\n String no = \"n\";\n\n // add first item\n\n String name1 = \"task1\";\n String desc1 = \"desc1\";\n String create1 = \"3724\";\n\n Input input1 = new StubInput(new String[]{action, name1, desc1, create1, yes});\n new StartUI(input1).init(tracker);\n\n // add second item\n\n String name2 = \"task2\";\n String desc2 = \"desc2\";\n String create2 = \"97689\";\n\n Input input2 = new StubInput(new String[]{action, name2, desc2, create2, yes});\n new StartUI(input2).init(tracker);\n\n // get first item id\n\n String id = \"\";\n\n Filter filter = new FilterByName(name1);\n Item[] result = tracker.findBy(filter);\n for (Item item : result) {\n if(item != null && item.getName().equals(name1)) {\n id = item.getId();\n break;\n }\n }\n\n // update first item\n\n String action2 = \"1\";\n\n String name3 = \"updated task\";\n String desc3 = \"updated desc\";\n String create3 = \"46754\";\n\n Input input3 = new StubInput(new String[]{action2, id, name3, desc3, create3, yes});\n new StartUI(input3).init(tracker);\n\n Item foundedItem = tracker.findById(id);\n\n Assert.assertEquals(name3, foundedItem.getName());\n\n }", "public static void anothertransaction(){\n\t\tSystem.out.println(\"Do you want to Continue ?Press \\n1 for another transaction\\n5 To exit\");\n\t\tanothertransaction=in.nextInt();\n\t\tif(anothertransaction == 1){\n transaction(); // call transaction method\n } else if(anothertransaction == 5){\n System.out.println(\"Thanks for choosing us. Good Bye!\");\n } else {\n System.out.println(\"Invalid choice\\n\\n\");\n anothertransaction();\n }\n }", "@Then(\"^the stack contains two items$\")\n\tpublic void the_stack_contains_two_items() throws Throwable {\n\t throw new PendingException();\n\t}", "@Test\n public void processTestB()\n {\n acc_db.addAccount(acc);\n acc_db.addAccount(acc2);\n\n //failed transaction\n trans = new Transaction(acc_db,acc.get_Account_Number(),acc2.get_Account_Number(),2000);\n\n Assert.assertEquals(false,trans.process());\n }", "@Test\n\tpublic void orderingItemsIncreasesCumulativeOrders() {\n\t\tItemQuantity itemQ1 = new ItemQuantity(101, 5);\n\t\tItemQuantity itemQ2 = new ItemQuantity(102, 10);\n\t\tList<ItemQuantity> itemQuantities = new ArrayList<ItemQuantity>();\n\t\titemQuantities.add(itemQ1);\n\t\titemQuantities.add(itemQ2);\n\t\tOrderStep step = new OrderStep(1, itemQuantities);\n\t\t\n\t\ttry {\n\t\t\titemSupplier.executeStep(step);\n\t\t} catch (OrderProcessingException e) {\n\t\t\te.printStackTrace();\n\t\t\tfail();\n\t\t}\n\t\t\n\t\tList<ItemQuantity> ordersPerItem = null;\n\t\ttry {\n\t\t\tordersPerItem = itemSupplier.getOrdersPerItem(supplierItemIds);\n\t\t} catch (InvalidItemException e) {\n\t\t\te.printStackTrace();\n\t\t\tfail();\n\t\t}\n\t\t\n\t\tfor (ItemQuantity itemQ : ordersPerItem) {\n\t\t\tif (itemQ.getItemId() == 101)\n\t\t\t\tassertEquals(5, itemQ.getQuantity());\n\t\t\tif (itemQ.getItemId() == 102)\n\t\t\t\tassertEquals(10, itemQ.getQuantity());\n\t\t\tif (itemQ.getItemId() == 103)\n\t\t\t\tassertEquals(0, itemQ.getQuantity());\n\t\t}\n\t\t\n\t\t/*\n\t\t * Place another order\n\t\t */\n\t\titemQ1 = new ItemQuantity(101, 10);\n\t\titemQ2 = new ItemQuantity(103, 3);\n\t\titemQuantities = new ArrayList<ItemQuantity>();\n\t\titemQuantities.add(itemQ1);\n\t\titemQuantities.add(itemQ2);\n\t\tstep = new OrderStep(1, itemQuantities);\n\t\t\n\t\ttry {\n\t\t\titemSupplier.executeStep(step);\n\t\t} catch (OrderProcessingException e) {\n\t\t\te.printStackTrace();\n\t\t\tfail();\n\t\t}\n\t\t\n\t\tordersPerItem = null;\n\t\ttry {\n\t\t\tordersPerItem = itemSupplier.getOrdersPerItem(supplierItemIds);\n\t\t} catch (InvalidItemException e) {\n\t\t\te.printStackTrace();\n\t\t\tfail();\n\t\t}\n\t\t\n\t\tfor (ItemQuantity itemQ : ordersPerItem) {\n\t\t\tif (itemQ.getItemId() == 101)\n\t\t\t\tassertEquals(15, itemQ.getQuantity());\n\t\t\tif (itemQ.getItemId() == 102)\n\t\t\t\tassertEquals(10, itemQ.getQuantity());\n\t\t\tif (itemQ.getItemId() == 103)\n\t\t\t\tassertEquals(3, itemQ.getQuantity());\n\t\t}\n\t}", "public void testRollback() throws Exception{\n \t\tsource.open(executionContext);\n \t\t// rollback between deserializing records\n \t\tList first = (List) source.read();\n \t\tsource.mark();\n \t\tList second = (List) source.read();\n \t\tassertFalse(first.equals(second));\n \t\tsource.reset();\n \n \t\tassertEquals(second, source.read());\n \n \t}", "public void sellProduct(){\n if(quantity > 0)\n this.quantity -= 1;\n else\n throw new IllegalArgumentException(\"Cannot sell \"+ this.model +\" with no inventory\");\n\n }", "boolean transfer(UUID from, UUID to, double amount);", "public boolean accept(Droppable dropSource, Draggable dragged, Droppable dropTarget) {\n\t\ttry{\n\t\t\t//assess the item and route to appropriate helper method\n\t\t\tif (!currentElementId.startsWith(\"ItemVal\")) return false;\n\t\t\tString target = dropTarget.getId();\n\t\t\tItem swapItem = fullSearch(target);\n\n\t\t\t//Within the inventory\n\t\t\tItem inventItem = findItemById(currentElementId.substring(7),screenManager.getInventoryManager().getPlayer().getContainerInventory());\n\t\t\tif (inventItem != null){\n\t\t\t\tString source = inventItem.getInventoryPosition();\n\t\t\t\tif (checkInception(inventItem,target))return false;\n\t\t\t\treturn (processInventDrop(source, target, inventItem, swapItem));\n\t\t\t}\n\n\t\t\t//Within a chest\n\t\t\tinventItem = findItemById(currentElementId.substring(7),screenManager.getInventoryManager().getOpenWorldChest());\n\t\t\tif (inventItem != null ){\n\t\t\t\tString source = inventItem.getInventoryPosition();\n\t\t\t\tif (checkInception(inventItem,target))return false;\n\t\t\t\treturn (processChestDrop(\"Chest\",\"Invent\",screenManager.getInventoryManager().getOpenWorldChest(),\n\t\t\t\t\t\tscreenManager.getInventoryManager().getPlayer().getContainerInventory(),source, target, inventItem, swapItem));\n\t\t\t}\n\n\t\t\t//Within a container\n\t\t\tinventItem = findItemById(currentElementId.substring(7),((AbstractContainerItem)openContainer).getContainerInventory());\n\t\t\tif (inventItem == null)return false;\n\t\t\tif (inventItem.getWeight()>30){\n\t\t\t\tdisplayMessage(\"Item too heavy to be placed in that container\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tString source = inventItem.getInventoryPosition();\n\t\t\tif (checkInception(inventItem,target))return false;\n\t\t\treturn (processChestDrop(\"ContPos\",\"Invent\",inventItem.getInventory(),\n\t\t\t\t\tscreenManager.getInventoryManager().getPlayer().getContainerInventory(),source, target, inventItem, swapItem));\n\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn false;\n\t}", "public boolean itemInteractionForEntity(ItemStack par1ItemStack, EntityLiving par2EntityLiving) {\n if (mobID == null && par2EntityLiving.getHealth() <= 2) {\n captureEntity(par2EntityLiving);\n return true;\n } else {\n return false;\n }\n\n }", "public void execute(int borrowerId, int lenderId, int borrowItemId, int lendItemId, String tradeType,\n String tradeDuration, LocalDate meetingDate,\n String meetingLocation, String meetingLocation2) throws\n TooManyItemListsException, MeetingException, IOException {\n\n int transactionId = transactionManager.buildTransaction(borrowerId, lenderId, borrowItemId, lendItemId,\n tradeType, tradeDuration, meetingDate, meetingLocation, meetingLocation2);\n\n History history = new History();\n history.addData(\"transactionId\", transactionId);\n history.addData(\"borrowerId\", borrowerId);\n history.addData(\"lenderId\", lenderId);\n history.addData(\"borrowItemId\", borrowItemId);\n history.addData(\"lendItemId\", lendItemId);\n history.addData(\"tradeType\", tradeType);\n history.addData(\"tradeDuration\", tradeDuration);\n history.addData(\"meetingDate\", meetingDate);\n history.addData(\"meetingLocation\", meetingLocation);\n history.addData(\"meetingLocation2\", meetingLocation2);\n history.setActionName(this.getClass().getName());\n history.setDisplayString(\"Borrower with id \" + borrowerId + \" initiates a transaction with lender with id \"\n + lenderId + \" involving borrow item with id \" + borrowItemId + \" and lend item with id \" + lendItemId);\n gateway.create(history, History.class);\n }" ]
[ "0.62253386", "0.56192875", "0.55810654", "0.55585414", "0.55552375", "0.53128433", "0.519307", "0.51704645", "0.5150922", "0.51459515", "0.51220196", "0.50949824", "0.50724655", "0.5046526", "0.5022872", "0.50227535", "0.49831626", "0.49595097", "0.49574062", "0.48358166", "0.48340735", "0.48055056", "0.4805227", "0.4789456", "0.47384006", "0.4721768", "0.47214013", "0.46825117", "0.4647622", "0.4634778", "0.4622383", "0.46204504", "0.46171632", "0.46107492", "0.4608183", "0.4603929", "0.4589841", "0.45880076", "0.45750612", "0.45694405", "0.45454875", "0.45339516", "0.4529681", "0.45256716", "0.45168826", "0.45163468", "0.45129055", "0.45118544", "0.4500464", "0.44992214", "0.44914493", "0.44883463", "0.4487118", "0.44848022", "0.4483722", "0.44805714", "0.44755635", "0.4474484", "0.4466234", "0.44590816", "0.444555", "0.44451246", "0.44441262", "0.444354", "0.44391757", "0.44363528", "0.44272578", "0.44221687", "0.4411222", "0.4410273", "0.44101068", "0.44075826", "0.44019452", "0.439321", "0.43925714", "0.43856654", "0.4382858", "0.4380571", "0.4378409", "0.43677267", "0.4363636", "0.4353048", "0.43490604", "0.43424273", "0.434118", "0.4337655", "0.4333395", "0.4332171", "0.43221733", "0.43210375", "0.43162146", "0.43134087", "0.4311922", "0.43037188", "0.42965683", "0.42920342", "0.4291068", "0.4288947", "0.42859805", "0.42831016" ]
0.7829067
0
TODO Autogenerated method stub
@Override public void frases() { this.frase.add("Não há que ser forte. Há que ser flexível."); this.frase.add("Gente todo dia arruma os cabelos, por que não o coração?"); this.frase.add("Há três coisas que jamais voltam; a flecha lançada, a palavra dita e a oportunidade perdida."); this.frase.add("Melhor pensar alto do que não pensar nada."); this.frase.add("A juventude não é uma época da vida, é um estado de espírito."); this.frase.add(" Podemos escolher o que semear, mas somos obrigados a colher o que plantamos."); this.frase.add("Dê toda a atenção para a formação dos teus filhos, sobretudo por exemplos de tua própria vida."); }
{ "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
A constructor that takes in an int[] and creates HuffmanNodes and places the nodes in a priority queue according to their frequency.
public HuffmanCode(int[] frequencies) { Queue<HuffmanNode> nodeFrequencies = new PriorityQueue<HuffmanNode>(); for (int i = 0; i < frequencies.length; i++) { if (frequencies[i] > 0) { nodeFrequencies.add(new HuffmanNode(frequencies[i], (char) i)); } } nodeFrequencies = ArrayHuffmanCodeCreator(nodeFrequencies); this.front = nodeFrequencies.peek(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Queue<HuffmanNode> ArrayHuffmanCodeCreator(Queue<HuffmanNode> frequencies) {\n while (frequencies.size() > 1) {\n HuffmanNode first = frequencies.poll();\n HuffmanNode second = frequencies.poll();\n HuffmanNode tempNode = new \n HuffmanNode(first.getFrequency() + second.getFrequency());\n tempNode.left = first;\n tempNode.right = second;\n frequencies.add(tempNode);\n }\n return frequencies;\n }", "public HuffmanNode(int freq){\r\n this(freq, null, null);\r\n }", "public HuffmanCodes() {\n\t\thuffBuilder = new PriorityQueue<CS232LinkedBinaryTree<Integer, Character>>();\n\t\tfileData = new ArrayList<char[]>();\n\t\tfrequencyCount = new int[127];\n\t\thuffCodeVals = new String[127];\n\t}", "public static HuffmanNode[] createNodes(int[] freqNums){\n HuffmanNode[] nodeArr = new HuffmanNode[94];\n for(int i = 0; i < freqNums.length; i++){\n nodeArr[i] = new HuffmanNode((char)(i+32), freqNums[i], null, null);\n }\n return nodeArr;\n }", "public HuffmanNode(int freq, int ascii){\r\n this.freq = freq;\r\n this.ascii = ascii;\r\n }", "public HuffmanCoding(String text) {\n\t\t// TODO fill this in.\n\t\tMap<Character, Integer> frequencyMap = new HashMap<>();\n\t\tint textLength = text.length();\n\n\t\tfor (int i = 0; i < textLength; i++) {\n\t\t\tchar character = text.charAt(i);\n\t\t\tif (!frequencyMap.containsKey(character)) {\n\t\t\t\tfrequencyMap.put(character, 1);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tint newFreq = frequencyMap.get(character) + 1;\n\t\t\t\tfrequencyMap.replace(character, newFreq);\n\t\t\t}\n\t\t}\n\n\t\tPriorityQueue<Node> queue = new PriorityQueue<>();\n\n\t\tIterator iterator = frequencyMap.entrySet().iterator();\n\t\twhile (iterator.hasNext()) {\n\t\t\tMap.Entry<Character, Integer> pair = (Map.Entry<Character, Integer>) iterator.next();\n\t\t\tNode node = new Node(null, null, pair.getKey(), pair.getValue());\n\t\t\tqueue.add(node);\n\t\t}\n\n\t\twhile (queue.size() > 1) {\n\t\t\tNode node1 = queue.poll();\n\t\t\tNode node2 = queue.poll();\n\t\t\tNode parent = new Node(node1, node2, '\\t', node1.getFrequency() + node2.getFrequency());\n\t\t\tqueue.add(parent);\n\t\t}\n\t\thuffmanTree = queue.poll();\n\t\tSystem.out.println(\"firstNode: \"+ huffmanTree);\n\t\tcodeTable(huffmanTree);\n\n\t\t//Iterator iterator1 = encodingTable.entrySet().iterator();\n\n\t\t/*\n\t\twhile (iterator1.hasNext()) {\n\t\t\tMap.Entry<Character, String> pair = (Map.Entry<Character, String>) iterator1.next();\n\t\t\tSystem.out.println(pair.getKey() + \" : \" + pair.getValue() + \"\\n\");\n\t\t}\n\t\t*/\n\n\t\t//System.out.println(\"Hashmap.size() : \" + frequencyMap.size());\n\n\t}", "public void constructTree(){\n PriorityQueue<HCNode> queue=new PriorityQueue<HCNode>();\n \n for(int i=0;i<MAXSIZE;i++){\n if(NOZERO){\n if(occTable[i]!=0){\n HCNode nnode=new HCNode(\"\"+(char)(i-DIFF),occTable[i], null);\n queue.add(nnode);\n }\n }else{\n HCNode nnode=new HCNode(\"\"+(char)(i-DIFF),occTable[i], null);\n queue.add(nnode);\n }\n }\n //constructing the Huffman Tree\n HCNode n1=null,n2=null;\n while(((n2=queue.poll())!=null) && ((n1=queue.poll())!=null)){\n HCNode nnode=new HCNode(n1.str+n2.str,n1.occ+n2.occ, null);\n nnode.left=n1;nnode.right=n2;\n n1.parent=nnode;n2.parent=nnode;\n queue.add(nnode);\n }\n if(n1==null&&n2==null){\n System.out.println(\"oops\");\n }\n if(n1!=null)\n root=n1;\n else\n root=n2;\n }", "public HuffmanCompressor(){\n charList = new ArrayList<HuffmanNode>();\n }", "private HuffmanTreeNode[] heapify(int freq[][]) {\n\t\tHuffmanTreeNode[] heap = new HuffmanTreeNode[freq.length];\n\t\tfor (int i = 0; i < freq.length; i++)\n\t\t{\n\t\t\theap[i] = new HuffmanTreeNode(freq[i][1], freq[i][0], null, null);\n\t\t}\n\t\t\n\t\theap = heapSort(heap);\n\n\t\treturn heap;\n\t}", "public HuffmanTree() {\r\n\t\tsuper();\r\n\t}", "public void createHuffmanTree() {\n\t\twhile (pq.getSize() > 1) {\n\t\t\tBinaryTreeInterface<HuffmanData> b1 = pq.removeMin();\n\t\t\tBinaryTreeInterface<HuffmanData> b2 = pq.removeMin();\n\t\t\tHuffmanData newRootData =\n\t\t\t\t\t\t\tnew HuffmanData(b1.getRootData().getFrequency() +\n\t\t\t\t\t\t\t\t\t\t\tb2.getRootData().getFrequency());\n\t\t\tBinaryTreeInterface<HuffmanData> newB =\n\t\t\t\t\t\t\tnew BinaryTree<HuffmanData>(newRootData,\n\t\t\t\t\t\t\t\t\t\t\t(BinaryTree) b1,\n\t\t\t\t\t\t\t\t\t\t\t(BinaryTree) b2);\n\t\t\tpq.add(newB);\n\t\t}\n\t\thuffmanTree = pq.getMin();\n\t}", "public Huffman(String input) {\n\t\t\n\t\tthis.input = input;\n\t\tmapping = new HashMap<>();\n\t\t\n\t\t//first, we create a map from the letters in our string to their frequencies\n\t\tMap<Character, Integer> freqMap = getFreqs(input);\n\n\t\t//we'll be using a priority queue to store each node with its frequency,\n\t\t//as we need to continually find and merge the nodes with smallest frequency\n\t\tPriorityQueue<Node> huffman = new PriorityQueue<>();\n\t\t\n\t\t/*\n\t\t * TODO:\n\t\t * 1) add all nodes to the priority queue\n\t\t * 2) continually merge the two lowest-frequency nodes until only one tree remains in the queue\n\t\t * 3) Use this tree to create a mapping from characters (the leaves)\n\t\t * to their binary strings (the path along the tree to that leaf)\n\t\t * \n\t\t * Remember to store the final tree as a global variable, as you will need it\n\t\t * to decode your encrypted string\n\t\t */\n\t\t\n\t\tfor (Character key: freqMap.keySet()) {\n\t\t\tNode thisNode = new Node(key, freqMap.get(key), null, null);\n\t\t\thuffman.add(thisNode);\n\t\t}\n\t\t\n\t\twhile (huffman.size() > 1) {\n\t\t\tNode leftNode = huffman.poll();\n\t\t\tNode rightNode = huffman.poll();\n\t\t\tint parentFreq = rightNode.freq + leftNode.freq;\n\t\t\tNode parent = new Node(null, parentFreq, leftNode, rightNode);\n\t\t\thuffman.add(parent);\n\t\t}\n\t\t\n\t\tthis.huffmanTree = huffman.poll();\n\t\twalkTree();\n\t}", "public static HuffmanNode createTree(HuffmanNode[] nodeArr){\n HuffmanNode[] garbageArr = nodeArr;\n while(garbageArr.length != 1){\n HuffmanNode[] tempArr = new HuffmanNode[garbageArr.length-1];\n tempArr[0] = combineNodes(garbageArr[0], garbageArr[1]);\n for(int i = 1; i < garbageArr.length-1; i++){\n tempArr[i] = garbageArr[i+1];\n }\n garbageArr = freqSort(tempArr);\n }\n return garbageArr[0];\n }", "public HuffmanNode(int freq, HuffmanNode left, HuffmanNode right){\r\n this.freq = freq;\r\n this.left = left;\r\n this.right = right;\r\n }", "public void loadInitQueue() {\n\t\t// go through every character\n\t\tfor (int i = 0; i < frequencyCount.length; i++) { \n\t\t\t// check to see if it has appeared at least once.\n\t\t\tif (frequencyCount[i] != 0) { \n\t\t\t\t// if so, make a tree for it and add it to the priority queue.\n\t\t\t\tCS232LinkedBinaryTree<Integer, Character> curTree = new CS232LinkedBinaryTree<Integer, Character>();\n\t\t\t\tcurTree.add(frequencyCount[i], (char) i);\n\t\t\t\thuffBuilder.add(curTree);\n\t\t\t}\n\t\t}\n\t}", "private HuffmanNode buildTree(int n) {\r\n \tfor (int i = 1; i <= n; i++) {\r\n \t\tHuffmanNode node = new HuffmanNode();\r\n \t\tnode.left = pQueue.poll();\r\n \t\tnode.right = pQueue.poll();\r\n \t\tnode.frequency = node.left.frequency + node.right.frequency;\r\n \t\tpQueue.add(node);\r\n \t}\r\n return pQueue.poll();\r\n }", "public Node createHuffmanTree(File f) throws FileNotFoundException {\r\n File file = f;\r\n FileInputStream fi = new FileInputStream(file);\r\n List<Node> nodes = new LinkedList<>();\r\n\r\n// Creating a map, where the key is characters and the values are the number of characters in the file\r\n Map<Character, Integer> charsMap = new LinkedHashMap<>();\r\n try (Reader reader = new InputStreamReader(fi);) {\r\n int r;\r\n while ((r = reader.read()) != -1) {\r\n char nextChar = (char) r;\r\n\r\n if (charsMap.containsKey(nextChar))\r\n charsMap.compute(nextChar, (k, v) -> v + 1);\r\n else\r\n charsMap.put(nextChar, 1);\r\n }\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n//// Sort the map by value and create a list\r\n// charsMap = charsMap.entrySet().stream().sorted(Map.Entry.comparingByValue(Comparator.reverseOrder())).collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (e1, e2) -> e1, LinkedHashMap::new));\r\n\r\n// Creating a list of Nodes from a map\r\n for (Character ch : charsMap.keySet()) {\r\n nodes.add(new Node(ch, charsMap.get(ch), null, null));\r\n }\r\n\r\n// Creating a Huffman tree\r\n while (nodes.size() > 1) {\r\n Node firstMin = nodes.stream().min(Comparator.comparingInt(n -> n.count)).get();\r\n nodes.remove(firstMin);\r\n Node secondMin = nodes.stream().min(Comparator.comparingInt(n -> n.count)).get();\r\n nodes.remove(secondMin);\r\n\r\n Node newNode = new Node(null, firstMin.count + secondMin.count, firstMin, secondMin);\r\n newNode.left.count = null;\r\n newNode.right.count = null;\r\n nodes.add(newNode);\r\n nodes.remove(firstMin);\r\n nodes.remove(secondMin);\r\n }\r\n\r\n// Why first? See algorithm!\r\n nodes.get(0).count = null;\r\n return nodes.get(0);\r\n }", "public HuffmanCoding(String text) {\n\t\t// TODO fill this in.\n\t\ttextArray = text.toCharArray();\n\n\t\tPriorityQueue<Leaf> queue = new PriorityQueue<>(new Comparator<Leaf>() {\n\t\t\t@Override\n\t\t\tpublic int compare(Leaf a, Leaf b) {\n\t\t\t\tif (a.frequency > b.frequency) {\n\t\t\t\t\treturn 1;\n\t\t\t\t} else if (a.frequency < b.frequency) {\n\t\t\t\t\treturn -1;\n\t\t\t\t} else {\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tfor (char c : textArray) {\n\t\t\tif (chars.containsKey(c)) {\n\t\t\t\tint freq = chars.get(c);\n\t\t\t\tfreq = freq + 1;\n\t\t\t\tchars.remove(c);\n\t\t\t\tchars.put(c, freq);\n\t\t\t} else {\n\t\t\t\tchars.put(c, 1);\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(\"tree print\");\t\t\t\t\t\t\t\t// print method begin\n\n\t\tfor(char c : chars.keySet()){\n\t\t\tint freq = chars.get(c);\n\t\t\tSystem.out.println(c + \" \" + freq);\n\t\t}\n\n\t\tint total = 0;\n\t\tfor(char c : chars.keySet()){\n\t\t\ttotal = total + chars.get(c);\n\t\t}\n\t\tSystem.out.println(\"total \" + total);\t\t\t\t\t\t\t// ends\n\n\t\tfor (char c : chars.keySet()) {\n\t\t\tLeaf l = new Leaf(c, chars.get(c), null, null);\n\t\t\tqueue.offer(l);\n\t\t}\n\n\t\twhile (queue.size() > 1) {\n\t\t\tLeaf a = queue.poll();\n\t\t\tLeaf b = queue.poll();\n\n\t\t\tint frequency = a.frequency + b.frequency;\n\n\t\t\tLeaf leaf = new Leaf('\\0', frequency, a, b);\n\n\t\t\tqueue.offer(leaf);\n\t\t}\n\n\t\tif(queue.size() == 1){\n\t\t\tthis.root = queue.peek();\n\t\t}\n\t}", "public Node buildTree(int[] frequency)\n {\n /* Initialize the priority queue */\n pq=new PriorityQueue<Node>(c.size(),comp); \n p=new PriorityQueue<Node>(c.size(),comp); \n /* Create leaf node for each unique character in the string */\n for(int i = 0; i < c.size(); i++)\n { \n pq.offer(new Node(c.get(i), frequency[i], null, null));\n } \n createCopy(pq); \n /* Until there is only one node in the priority queue */\n while(pq.size() > 1)\n { \n /* Minimum frequency is kept in the left */\n Node left = pq.poll();\n /* Next minimum frequency is kept in the right */\n Node right = pq.poll();\n /* Create a new internal node as the parent of left and right */\n pq.offer(new Node('\\0', left.frequency+right.frequency, left, right)); \n } \n /* Return the only node which is the root */\n return pq.poll();\n }", "public HuffmanCoding(String text) {\n\t\t// TODO fill this in.\n\t\tif (text.length() <= 1)\n\t\t\treturn;\n\n\t\t//Create a the frequency huffman table\n\t\tHashMap<Character, huffmanNode> countsMap = new HashMap<>();\n\t\tfor (int i = 0; i < text.length(); i++) {\n\t\t\tchar c = text.charAt(i);\n\t\t\tif (countsMap.containsKey(c))\n\t\t\t\tcountsMap.get(c).huffmanFrequency++;\n\t\t\telse\n\t\t\t\tcountsMap.put(c, new huffmanNode(c, 1));\n\t\t}\n\n\t\t//Build the frequency tree\n\t\tPriorityQueue<huffmanNode> countQueue = new PriorityQueue<>(countsMap.values());\n\t\twhile (countQueue.size() > 1) {\n\t\t\thuffmanNode left = countQueue.poll();\n\t\t\thuffmanNode right = countQueue.poll();\n\t\t\thuffmanNode parent = new huffmanNode('\\0', left.huffmanFrequency + right.huffmanFrequency);\n\t\t\tparent.leftNode = left;\n\t\t\tparent.rightNode = right;\n\n\t\t\tcountQueue.offer(parent);\n\t\t}\n\n\t\thuffmanNode rootNode = countQueue.poll();\n\n\t\t//Assign the codes to each node in the tree\n\t\tStack<huffmanNode> huffmanNodeStack = new Stack<>();\n\t\thuffmanNodeStack.add(rootNode);\n\t\twhile (!huffmanNodeStack.empty()) {\n\t\t\thuffmanNode huffmanNode = huffmanNodeStack.pop();\n\n\t\t\tif (huffmanNode.huffmanValue != '\\0') {\n\t\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\t\thuffmanNode.codeRecord.forEach(sb::append);\n\t\t\t\tString codeSb = sb.toString();\n\n\t\t\t\tencodingTable.put(huffmanNode.huffmanValue, codeSb);\n\t\t\t\tdecodingTable.put(codeSb, huffmanNode.huffmanValue);\n\t\t\t}\n\t\t\telse {\n\t\t\t\thuffmanNode.leftNode.codeRecord.addAll(huffmanNode.codeRecord);\n\t\t\t\thuffmanNode.leftNode.codeRecord.add('0');\n\t\t\t\thuffmanNode.rightNode.codeRecord.addAll(huffmanNode.codeRecord);\n\t\t\t\thuffmanNode.rightNode.codeRecord.add('1');\n\t\t\t}\n\n\t\t\tif (huffmanNode.leftNode != null)\n\t\t\t\thuffmanNodeStack.add(huffmanNode.leftNode);\n\n\t\t\tif (huffmanNode.rightNode != null)\n\t\t\t\thuffmanNodeStack.add(huffmanNode.rightNode);\n\t\t}\n\t}", "public HuffmanNode(String key, int value)\n\t{\n\t\tcharacters = key;\n\t\tfrequency = value;\n\t\t\n\t\tleft = null;\n\t\tright = null;\n\t\tparent = null;\n\t\tchecked = false;\n\t}", "public void makeTree(){\n //convert Hashmap into charList\n for(Map.Entry<Character,Integer> entry : freqTable.entrySet()){\n HuffmanNode newNode = new HuffmanNode(entry.getKey(),entry.getValue());\n charList.add(newNode);\n }\n \n if(charList.size()==0)\n return;\n \n if(charList.size()==1){\n HuffmanNode onlyNode = charList.get(0);\n root = new HuffmanNode(null,onlyNode.getFrequency());\n root.setLeft(onlyNode);\n return;\n }\n \n Sort heap = new Sort(charList);\n heap.heapSort();\n \n while(heap.size()>1){\n \n HuffmanNode leftNode = heap.remove(0);\n HuffmanNode rightNode = heap.remove(0);\n \n HuffmanNode newNode = merge(leftNode,rightNode);\n heap.insert(newNode);\n heap.heapSort();\n }\n \n charList = heap.getList();\n root = charList.get(0);\n }", "public void HuffmanCode()\n {\n String text=message;\n /* Count the frequency of each character in the string */\n //if the character does not exist in the list add it\n for(int i=0;i<text.length();i++)\n {\n if(!(c.contains(text.charAt(i))))\n c.add(text.charAt(i));\n } \n int[] freq=new int[c.size()];\n //counting the frequency of each character in the text\n for(int i=0;i<c.size();i++)\n for(int j=0;j<text.length();j++)\n if(c.get(i)==text.charAt(j))\n freq[i]++;\n /* Build the huffman tree */\n \n root= buildTree(freq); \n \n }", "public Huffman(Collection<? extends SequenceElement> words, int CODE_LENGTH) {\n this.MAX_CODE_LENGTH = CODE_LENGTH;\n this.words = new ArrayList<>(words);\n Collections.sort(this.words, new Comparator<SequenceElement>() {\n @Override\n public int compare(SequenceElement o1, SequenceElement o2) {\n return Double.compare(o2.getElementFrequency(), o1.getElementFrequency());\n }\n\n });\n }", "private PQHeap makeQueue(){\n \tPQHeap queue = new PQHeap(frequency.length);\n \tfor (int i = 0; i < frequency.length; i++) {\n \t\tqueue.insert(new Element(frequency[i], new HuffmanTempTree(i)));\n \t}\n \treturn queue;\n \t}", "public void setPriorityQueue() {\n\t\tfor (int i = 0; i < 7; i++) {\n\t\t\tif (leafEntries[i].getFrequency() > 0)\n\t\t\t\tpq.add(new BinaryTree<HuffmanData>(leafEntries[i]));\n\t\t}\n\t}", "public void setFrequencies() {\n\t\tleafEntries[0] = new HuffmanData(5000, 'a');\n\t\tleafEntries[1] = new HuffmanData(2000, 'b');\n\t\tleafEntries[2] = new HuffmanData(10000, 'c');\n\t\tleafEntries[3] = new HuffmanData(8000, 'd');\n\t\tleafEntries[4] = new HuffmanData(22000, 'e');\n\t\tleafEntries[5] = new HuffmanData(49000, 'f');\n\t\tleafEntries[6] = new HuffmanData(4000, 'g');\n\t}", "public static void main(String[] args) throws FileNotFoundException, IOException {\n\t\tString input = \"\";\r\n\r\n\t\t//읽어올 파일 경로\r\n\t\tString filePath = \"C:/Users/user/Desktop/data13_huffman.txt\";\r\n\r\n\t\t//파일에서 읽어옴\r\n\t\ttry(FileInputStream fStream = new FileInputStream(filePath);){\r\n\t\t\tbyte[] readByte = new byte[fStream.available()];\r\n\t\t\twhile(fStream.read(readByte) != -1);\r\n\t\t\tfStream.close();\r\n\t\t\tinput = new String(readByte);\r\n\t\t}\r\n\r\n\t\t//빈도수 측정 해시맵 생성\r\n\t\tHashMap<Character, Integer> frequency = new HashMap<>();\r\n\t\t//최소힙 생성\r\n\t\tList<Node> nodes = new ArrayList<>();\r\n\t\t//테이블 생성 해시맵\r\n\t\tHashMap<Character, String> table = new HashMap<>();\r\n\r\n\t\t//노드와 빈도수 측정\r\n\t\tfor(int i = 0; i < input.length(); i++) {\r\n\t\t\tif(frequency.containsKey(input.charAt(i))) {\r\n\t\t\t\t//이미 있는 값일 경우 빈도수를 1 증가\r\n\t\t\t\tchar currentChar = input.charAt(i);\r\n\t\t\t\tfrequency.put(currentChar, frequency.get(currentChar) + 1);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t//키를 생성해서 넣어줌\r\n\t\t\t\tfrequency.put(input.charAt(i), 1);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//최소 힙에 저장\r\n\t\tfor(Character key : frequency.keySet()) \r\n\t\t\tnodes.add(new Node(key, frequency.get(key), null, null));\r\n\t\t\t\t\r\n\t\t//최소힙으로 정렬\r\n\t\tbuildMinHeap(nodes);\r\n\r\n\t\t//huffman tree를 만드는 함수 실행\r\n\t\tNode resultNode = huffman(nodes);\r\n\r\n\t\t//파일에 씀 (table)\r\n\t\ttry(FileWriter fw = new FileWriter(\"201702034_table.txt\")){\r\n\t\t\tmakeTable(table, resultNode, \"\");\r\n\t\t\tfor(Character key : table.keySet()) {\r\n\t\t\t\t//System.out.println(key + \" : \" + table.get(key));\r\n\t\t\t\tfw.write(key + \" : \" + table.get(key) + \"\\n\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//파일에 씀 (encoded code)\r\n\t\ttry(FileWriter fw = new FileWriter(\"201702034_encoded.txt\")){\r\n\t\t\tString allString = \"\";\r\n\t\t\t\r\n\t\t\tfor(int i = 0; i < input.length(); i++)\r\n\t\t\t\tallString += table.get(input.charAt(i));\r\n\r\n\t\t\t//System.out.println(allString);\r\n\t\t\tfw.write(allString);\r\n\t\t}\r\n\t}", "private static void generateHuffmanTree(){\n try (BufferedReader br = new BufferedReader(new FileReader(_codeTableFile))) {\n String line;\n while ((line = br.readLine()) != null) {\n // process the line.\n if(!line.isEmpty() && line!=null){\n int numberData = Integer.parseInt(line.split(\" \")[0]);\n String code = line.split(\" \")[1];\n Node traverser = root;\n for (int i = 0; i < code.length() - 1; i++){\n char c = code.charAt(i); \n if (c == '0'){\n //bit is 0\n if(traverser.getLeftPtr() == null){\n traverser.setLeftPtr(new BranchNode(999999, null, null));\n }\n traverser = traverser.getLeftPtr();\n }\n else{\n //bit is 1\n if(traverser.getRightPtr() == null){\n traverser.setRightPtr(new BranchNode(999999, null, null));\n }\n traverser = traverser.getRightPtr();\n }\n }\n //Put data in the last node by creating a new leafNode\n char c = code.charAt(code.length() - 1);\n if(c == '0'){\n traverser.setLeftPtr(new LeafNode(9999999, numberData, null, null));\n }\n else{\n traverser.setRightPtr(new LeafNode(9999999, numberData, null, null));\n }\n }\n }\n } \n catch (IOException ex) {\n Logger.getLogger(FrequencyTableBuilder.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public static ArrayList<HuffmanNode> nodeGenerator(String inputName, String outputName) throws IOException {\r\n\t\tFileReader input = new FileReader(inputName);\r\n\t\tBufferedReader reader = new BufferedReader(input);\r\n\t\t\r\n\t\tint data;\r\n\t\t\r\n\t\twhile((data = reader.read()) != -1) {\r\n\t\t\tif(data < 256) {\r\n\t\t\t\tif(freqArr[data] != null) {\r\n\t\t\t\t\tfreqArr[data].frequency++;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tfreqArr[data] = new FreqData((char) data, 0);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treader.close();\r\n\t\t\t\t\r\n\t\tfor(int x = 0; x < freqArr.length; x++) {\r\n\t\t\tif(freqArr[x] != null) {\r\n\t\t\t\tnodeArrList.add(new HuffmanNode(freqArr[x].data, freqArr[x].frequency));\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tbubbleSort();\r\n\t\t\r\n\t\treturn nodeArrList;\r\n\t}", "public HuffmanTree(Queue<Node> queue) {\r\n while (queue.size() > 1) {\r\n Node left = queue.poll();\r\n Node right = queue.poll();\r\n Node node = new Node('-', left.f + right.f, left, right);\r\n queue.add(node);\r\n }\r\n this.root = queue.peek();\r\n\r\n //initial two maps\r\n this.initialTable(this.root, \"\");\r\n\r\n }", "public static Node make_huffmann_tree(List li){\n //Sorting list in increasing order of its letter frequency \n li.sort(new comp());\n Node temp=null;\n Iterator it=li.iterator();\n //System.out.println(li.size());\n //Loop for making huffman tree till only single node remains in list\n while(true){\n temp=new Node();\n //a and b are Node which are to be combine to make its parent\n Node a=new Node(),b=new Node();\n a=null;b=null;\n //checking if list is eligible for combining or not\n //here first assignment of it.next in a will always be true as list till end will\n //must have atleast one node\n a=(Node)it.next();\n //Below condition is to check either list has 2nd node or not to combine \n //If this condition will be false, then it means construction of huffman tree is completed\n if(it.hasNext()){b=(Node)it.next();}\n //Combining first two smallest nodes in list to make its parent whose frequncy \n //will be equals to sum of frequency of these two nodes \n if(b!=null){\n temp.freq=a.freq+b.freq;a.data=0;b.data=1;//assigining 0 and 1 to left and right nodes\n temp.left=a;temp.right=b;\n //after combing, removing first two nodes in list which are already combined\n li.remove(0);//removes first element which is now combined -step1\n li.remove(0);//removes 2nd element which comes on 1st position after deleting first in step1\n li.add(temp);//adding new combined node to list\n //print_list(li); //For visualizing each combination step\n }\n //Sorting after combining to again repeat above on sorted frequency list\n li.sort(new comp()); \n it=li.iterator();//resetting list pointer to first node (head/root of tree)\n if(li.size()==1){return (Node)it.next();} //base condition ,returning root of huffman tree \n }\n}", "public static HuffmanNode[] freqSort(HuffmanNode[] nodeArr){\n Arrays.sort(nodeArr);\n return nodeArr;\n }", "public static void createTree(ArrayList<HuffmanNode> tree) {\n\t\n\t\t//loops through until the tree.\n\t\twhile(tree.size() > 1) {\n\t\t\tCollections.sort(tree);\n\t\t\tHuffmanNode left = tree.get(0);\n\t\t\tHuffmanNode right = tree.get(1);\n\t\t\t\n\t\t\t/*creates the new node and adds it to the arrayList, and removes the two lowest frequency nodes\n\t\t\t * then recursively calls the create method again\n\t\t\t */\n\t\t\ttree.add(new HuffmanNode((right.frequency + left.frequency), left, right));\n\t\t\ttree.remove(0);\n\t\t\ttree.remove(0);\n\t\t\tcreateTree(tree);\n\t\t}\n\t}", "private HuffmanTempTree makeTree() {\n \tPQHeap queue = makeQueue();\n \tfor (int i = 0; i < frequency.length - 1; i++) {\n \t\tHuffmanTempTree zTree = new HuffmanTempTree(0);\n \t\tElement x = queue.extractMin();\n \t\tElement y = queue.extractMin();\n \t\tint zFreq = x.key + y.key;\n \t\tzTree.merge((HuffmanTempTree) x.data, (HuffmanTempTree) y.data);\n \t\tqueue.insert(new Element(zFreq, zTree));\n \t}\n \treturn (HuffmanTempTree) queue.extractMin().data;\n \t}", "public void buildTree(HuffData[] symbols) {\n //Create a new priorityqueue of type BinaryTree<HuffData> the size of \n //the number of symbols passed in\n Queue<BinaryTree<HuffData>> theQueue = new PriorityQueue<BinaryTree<HuffData>>(symbols.length, new CompareHuffmanTrees());\n //For each symbol in the symbols array\n for (HuffData nextSymbol : symbols) {\n //Create a new binary tree with the symbol\n BinaryTree<HuffData> aBinaryTree = new BinaryTree<HuffData>(nextSymbol, null, null);\n //Offer the new binary tree to the queue\n theQueue.offer(aBinaryTree);\n }\n //While there are still more than one items in the queue\n while(theQueue.size() > 1) {\n BinaryTree<HuffData> left = theQueue.poll(); //Take the top off the queue\n BinaryTree<HuffData> right = theQueue.poll(); //Take the new top off the queue\n int wl = left.getData().weight; //Get the weight of the left BinaryTree\n int wr = left.getData().weight; //Get the weight of the right BinaryTree\n //Create a new HuffData object with the weight as the sum of the left\n //and right and a null symbol\n HuffData sum = new HuffData(wl + wr, null); \n //Create a new BinaryTree with the sum HuffData and the left and right\n //as the left and right children\n BinaryTree<HuffData> newTree = new BinaryTree<HuffData>(sum, left, right);\n //Offer the sum binarytree back to the queue\n theQueue.offer(newTree);\n }\n //Take the last item off the queue\n huffTree = theQueue.poll();\n \n //Initalize the EncodeData array to be the same length as the passed in symbols\n encodings = new EncodeData[symbols.length];\n }", "public static void main(String args[])\n {\n Scanner s = new Scanner(System.in).useDelimiter(\"\");\n List<node> freq = new SinglyLinkedList<node>();\n \n // read data from input\n while (s.hasNext())\n {\n // s.next() returns string; we're interested in first char\n char c = s.next().charAt(0);\n if (c == '\\n') continue;\n // look up character in frequency list\n node query = new node(c);\n node item = freq.remove(query);\n if (item == null)\n { // not found, add new node\n freq.addFirst(query);\n } else { // found, increment node\n item.frequency++;\n freq.addFirst(item);\n }\n }\n \n // insert each character into a Huffman tree\n OrderedList<huffmanTree> trees = new OrderedList<huffmanTree>();\n for (node n : freq)\n {\n trees.add(new huffmanTree(n));\n }\n \n // merge trees in pairs until one remains\n Iterator ti = trees.iterator();\n while (trees.size() > 1)\n {\n // construct a new iterator\n ti = trees.iterator();\n // grab two smallest values\n huffmanTree smallest = (huffmanTree)ti.next();\n huffmanTree small = (huffmanTree)ti.next();\n // remove them\n trees.remove(smallest);\n trees.remove(small);\n // add bigger tree containing both\n trees.add(new huffmanTree(smallest,small));\n }\n // print only tree in list\n ti = trees.iterator();\n Assert.condition(ti.hasNext(),\"Huffman tree exists.\");\n huffmanTree encoding = (huffmanTree)ti.next();\n encoding.print();\n }", "public static HuffmanNode huffmanAlgo() {\r\n\t\tHuffmanNode root;\r\n\t\t\r\n\t\twhile(nodeArrList.size() > 1) {\r\n\t\t\tif(nodeArrList.get(0).frequency == 0) {\r\n\t\t\t\tnodeArrList.remove(0);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tHuffmanNode left = nodeArrList.remove(0);\r\n\t\t\t\tHuffmanNode right = nodeArrList.remove(0);\r\n\t\t\t\tHuffmanNode replacement = new HuffmanNode(null, left.frequency + right.frequency);\r\n\t\t\t\treplacement.left = left;\r\n\t\t\t\treplacement.right = right;\r\n\t\t\t\tnodeArrList.add(replacement);\r\n\t\t\t}\r\n\t\t}\r\n\t\troot = nodeArrList.get(0);\r\n\t\treturn root;\r\n\t}", "public HuffmanNode(String v, int f)\n\t{\n\t\tfrequency = f;\n\t\tvalue = v;\n\t\tleft = null;\n\t\tright = null;\n\t}", "private void buildBinaryTree() {\n log.info(\"Constructing priority queue\");\n Huffman huffman = new Huffman(cache.vocabWords());\n huffman.build();\n\n log.info(\"Built tree\");\n\n }", "public static void main(String[] args)\n {\n\t\t\tHuffman tree= new Huffman();\n \t \t Scanner sc=new Scanner(System.in);\n\t\t\tnoOfFrequencies=sc.nextInt();\n\t\t\t// It adds all the user input values in the tree.\n\t\t\tfor(int i=1;i<=noOfFrequencies;i++)\n\t\t\t{\n\t\t\t\tString temp=sc.next();\n\t\t\t\ttree.add(temp,sc.next());\n\t\t\t}\n\t\tint lengthToDecode=sc.nextInt();\n\t\tString encodedValue=sc.next();\n\t\t// This statement decodes the encoded values.\n\t\ttree.getDecodedMessage(encodedValue);\n\t\tSystem.out.println();\n\t\t}", "public static void main(String[] args) {\n Scanner teclado = new Scanner(System.in);\r\n String mensajeUsuario;\r\n System.out.println(\"Ingrese su mensaje:\");\r\n mensajeUsuario = teclado.nextLine();\r\n \r\n ArrayList inicial = new ArrayList<Nodo>();\r\n \r\n boolean valido = true;\r\n int contador = 0;\r\n //Se convierte el mensaje a una array de chars\r\n char [] arrayMensaje = mensajeUsuario.toCharArray();\r\n //Se cuenta la frecuencia de cada elemento\r\n for(char i: arrayMensaje){\r\n valido = true;\r\n Iterator itr = inicial.iterator();\r\n //Si el elemento que le toca no fue contado ya, es valido contar su frecuencia\r\n while (itr.hasNext()&&valido){\r\n Nodo element = (Nodo) itr.next();\r\n if (i==element.getCh()){\r\n valido = false;\r\n }\r\n }\r\n //Contar la frecuencia del elemento\r\n if (valido== true){\r\n Nodo temp = new Nodo();\r\n temp.setCh(i);\r\n for (char j:arrayMensaje){\r\n if (j==i){\r\n contador++;\r\n }\r\n }\r\n temp.setFreq(contador);\r\n inicial.add(temp);\r\n contador = 0;\r\n \r\n }\r\n }\r\n //Se recorre la lista generada de nodos para mostrar la frecuencia de cada elemento ene el orden en que aparecen\r\n System.out.println(\"elemento | frecuencia\");\r\n Iterator itr = inicial.iterator();\r\n while (itr.hasNext()){\r\n Nodo element = (Nodo)itr.next();\r\n System.out.println(element.getCh() + \" \"+ element.getFreq());\r\n }\r\n \r\n HuffmanTree huff = new HuffmanTree();\r\n huff.createTree(inicial);\r\n //System.out.println(huff.getRoot().getCh()+\" \"+huff.getRoot().getFreq());\r\n \r\n huff.codificar();\r\n System.out.println(\"elemento | frecuencia | codigo\");\r\n Iterator itrf= huff.getListaH().iterator();\r\n while(itrf.hasNext()){\r\n Nodo pivotal = (Nodo)itrf.next();\r\n System.out.println(pivotal.getCh() + \" \"+ pivotal.getFreq()+ \" \"+ pivotal.getCadena()); \r\n }\r\n \r\n System.out.println(\"Ingrese un codigo en base a la tabla anterior, separando por espacios cada nuevo caracter\");\r\n mensajeUsuario = teclado.nextLine();\r\n mensajeUsuario.indexOf(\" \");\r\n String mensajeFinal = \"\";\r\n String letra = \" \";\r\n String[] arrayDecode = mensajeUsuario.split(\" \");\r\n boolean codigoValido = true;\r\n for (String i: arrayDecode){\r\n if (codigoValido){\r\n letra = huff.decodificar(i);\r\n }\r\n if (letra.length()>5){\r\n codigoValido = false;\r\n }\r\n else {\r\n mensajeFinal = mensajeFinal.concat(letra);\r\n }\r\n }\r\n \r\n if (codigoValido){\r\n System.out.println(mensajeFinal);\r\n }\r\n else {\r\n System.out.println(\"El codigo ingresado no es valido\");\r\n }\r\n \r\n \r\n }", "public static void main(String[] args) {\n int[] freqNums = scanFile(args[0]);\n HuffmanNode[] nodeArr = createNodes(freqNums);\n nodeArr = freqSort(nodeArr);\n HuffmanNode top = createTree(nodeArr);\n String empty = \"\";\n String[] encodings = new String[94];\n encodings = getCodes(top, empty, false, encodings, true);\n printEncoding(encodings, freqNums);\n writeFile(args[0], args[1], encodings);\n }", "public HuffmanNode (HuffmanNode left, HuffmanNode right) {\n \ttotalFrequency = left.totalFrequency + right.totalFrequency;\n \ttokens = new ArrayList<HuffmanToken>();\n \ttokens.addAll(left.tokens);\n \ttokens.addAll(right.tokens);\n \tfor(HuffmanToken node: left.tokens)\n \t\tnode.prependBitToCode(false);\n \tfor(HuffmanToken node: right.tokens)\n \t\tnode.prependBitToCode(true);\n \tthis.left = left;\n \tthis.right = right;\n \tCollections.sort(tokens, new HuffmanTokenComparator());\n }", "public HuffmanTree(ArrayOrderedList<HuffmanPair> pairsList) {\r\n\r\n\t\t\t\r\n\t\tArrayOrderedList<HuffmanTree> buildList = new ArrayOrderedList<HuffmanTree>();\r\n\t\tIterator<HuffmanPair> iterator = pairsList.iterator();\r\n\t\t\twhile (iterator.hasNext()) {\r\n\t\t\t\tbuildList.add(new HuffmanTree(iterator.next()));\r\n//\t\t\t\tif(buildList.first().getRoot().getElement().getCharacter() == iterator.next().getCharacter())i++;\r\n\t\t\t}\r\n//\t\t\tif (i == buildList.size()) {\r\n//\t\t\t\tArrayOrderedList<HuffmanTree> new_buildList = new ArrayOrderedList<HuffmanTree>();\r\n//\t\t\t\tnew_buildList.add(buildList.first());\r\n//\t\t\t\tbuildList = new_buildList;\r\n//\t\t\t}\r\n//\t\t\telse {\t\r\n\t\t\twhile (buildList.size() > 1) {\r\n\t\t\t\tHuffmanTree lefttree = buildList.removeFirst(); HuffmanTree righttree = buildList.removeFirst();\r\n\t\t\t\t//totalFre = the total weights of both trees.\r\n\t\t\t\tint totalFre = lefttree.getRoot().getElement().getFrequency() + righttree.getRoot().getElement().getFrequency();\r\n\t\t\t\tHuffmanPair root = new HuffmanPair(totalFre);\r\n\t\t\t\tbuildList.add(new HuffmanTree(root, lefttree, righttree));\r\n\t\t\t}\r\n\t\tthis.setRoot(buildList.first().getRoot());\r\n\t}", "public void buildHuffmanList(File inputFile){\n try{\n Scanner sc = new Scanner(inputFile);\n while(sc.hasNextLine()){\n\n String line = sc.nextLine();\n for(int i =0;i<line.length();i++){\n \n if(freqTable.isEmpty())\n freqTable.put(line.charAt(i),1);\n else{\n if(freqTable.containsKey(line.charAt(i)) == false)\n freqTable.put(line.charAt(i),1);\n else{\n int oldValue = freqTable.get(line.charAt(i));\n freqTable.replace(line.charAt(i),oldValue+1);\n }\n }\n }\n }\n }\n catch(FileNotFoundException e){\n System.out.println(\"Can't find the file\");\n }\n }", "public Http2PriorityTree() {\n this.rootNode = new Http2PriorityNode(0, 0);\n nodesByID.put(0, this.rootNode);\n this.evictionQueue = new int[10]; //todo: make this size customisable\n }", "public HuffmanCode(Scanner input) {\n this.front = new HuffmanNode();\n while (input.hasNextLine()) {\n int character = Integer.parseInt(input.nextLine());\n String location = input.nextLine();\n ScannerHuffmanCodeCreator(this.front, location, (char) character);\n }\n }", "public static void HuffmanTree(String input, String output) throws Exception {\n\t\tFileReader inputFile = new FileReader(input);\n\t\tArrayList<HuffmanNode> tree = new ArrayList<HuffmanNode>(200);\n\t\tchar current;\n\t\t\n\t\t// loops through the file and creates the nodes containing all present characters and frequencies\n\t\twhile((current = (char)(inputFile.read())) != (char)-1) {\n\t\t\tint search = 0;\n\t\t\tboolean found = false;\n\t\t\twhile(search < tree.size() && found != true) {\n\t\t\t\tif(tree.get(search).inChar == (char)current) {\n\t\t\t\t\ttree.get(search).frequency++; \n\t\t\t\t\tfound = true;\n\t\t\t\t}\n\t\t\t\tsearch++;\n\t\t\t}\n\t\t\tif(found == false) {\n\t\t\t\ttree.add(new HuffmanNode(current));\n\t\t\t}\n\t\t}\n\t\tinputFile.close();\n\t\t\n\t\t//creates the huffman tree\n\t\tcreateTree(tree);\n\t\t\n\t\t//the huffman tree\n\t\tHuffmanNode sortedTree = tree.get(0);\n\t\t\n\t\t//prints out the statistics of the input file and the space saved\n\t\tFileWriter newVersion = new FileWriter(\"C:\\\\Users\\\\Chris\\\\workspace\\\\P2\\\\src\\\\P2_cxt240_Tsuei_statistics.txt\");\n\t\tprintTree(sortedTree, \"\", newVersion);\n\t\tspaceSaver(newVersion);\n\t\tnewVersion.close();\n\t\t\n\t\t// codes the file using huffman encoding\n\t\tFileWriter outputFile = new FileWriter(output);\n\t\ttranslate(input, outputFile);\n\t}", "public HeapIntPriorityQueue() {\n elementData = new int[10];\n size = 0;\n }", "public static void main(String[] args) throws IOException {\n\t\tString fname;\n\t\tFile file;\n\t\tScanner keyboard = new Scanner(System.in);\n\t\tScanner inFile;\n\n\t\tString line, word;\n\t\tStringTokenizer token;\n\t\tint[] freqTable = new int[256];\n\n\t\tSystem.out.println (\"Enter the complete path of the file to read from: \");\n\n\t\tfname = keyboard.nextLine();\n\t\tfile = new File(fname);\n\t\tinFile = new Scanner(file);\n\n\t\twhile (inFile.hasNext()) {\n\t\t\tline = inFile.nextLine();\n\t\t\ttoken = new StringTokenizer(line, \" \");\n\t\t\twhile (token.hasMoreTokens()) {\n\t\t\t\tword = token.nextToken();\n\t\t\t\tfreqTable = updateFrequencyTable(freqTable, word);\n\t\t\t}\n\t\t}\n\n\t\t//print frequency table\n\n\t\tSystem.out.println(\"Table of frequencies\");\n\t\tSystem.out.println(\"Character \\t Frequency \\n\");\n\n\t\tfor(int i=0; i<256; i++) {\n\t\t\tif (freqTable[i]>0)\n\t\t\t\tSystem.out.println(((char)i) + \"\\t\" + freqTable[i]);\n\t\t\t}\n\n\t\tQueue<BinaryTree<Pair>> S = buildQueue(freqTable);\n\n\t\tQueue<BinaryTree<Pair>> T = new Queue<BinaryTree<Pair>>();\n\n\t\tBinaryTree<Pair> huffmanTree = createTree(S, T);\n\n\t\tString[] encodingTable = findEncoding(huffmanTree);\n\n\t\tSystem.out.println(\"Encoding Table\");\n\t\tfor(int i=0; i<256; i++) {\n\t\t\tif (encodingTable[i]!=null)\n\t\t\t\tSystem.out.println(((char)i) + \"\\t\" + encodingTable[i]);\n\t\t}\n\t\tinFile.close();\n\t}", "public YFastTrie() {\n \n this.w = 30;\n \n maxC = (1 << w) - 1;\n \n binSz = w;\n \n nBins = (int)Math.ceil((double)maxC/(double)binSz);\n \n //System.out.println(\"nBins=\" + nBins + \" rt of ops=\" +\n // (Math.log(binSz)/Math.log(2)));\n \n rbs = new TIntObjectHashMap<TreeMap<Integer, Integer>>();\n \n XFastTrieNode<Integer> clsNode = new XFastTrieNode<Integer>();\n Integerizer<Integer> it = new Integerizer<Integer>() {\n @Override\n public int intValue(Integer x) {\n return x;\n }\n };\n \n xft = new XFastTrie<XFastTrieNode<Integer>, Integer>(clsNode, it, w);\n }", "public HuffmanTree(HuffmanPair element) {\r\n\t\tsuper(element);\r\n\t}", "public static void main(String[] args){\n huffmanCoder(args[0],args[1]);\n }", "private void makePrioQ()\n\t{\n\t\tprioQ = new PrioQ();\n\t\t\n\t\tfor(int i = 0; i < canonLengths.length; i++)\n\t\t{\n\t\t\tif(canonLengths[i] == 0)\n\t\t\t\tcontinue;\n\t\t\tNode node = new Node(i, canonLengths[i]);\n\t\t\tprioQ.insert(node);\n\t\t}\n\t}", "public Priority()\r\n\t{\r\n\t\tsouthQueue = new State[50];\r\n\t\tsouthElem = 0;\r\n southFront = 0; \r\n southRear = -1;\r\n\t\t\r\n\t\twestQueue = new State[50];\r\n\t\twestElem = 0;\r\n westFront = 0;\r\n westRear = -1;\r\n\t\t\r\n\t\tmidwestQueue = new State[50];\r\n\t\tmidwestElem = 0;\r\n midwestFront = 0;\r\n midwestRear = -1;\r\n }", "public PriorityQueue()\r\n\t{\r\n\t\tcurrentSize = 0;\r\n\t\tlowestCurrentPriority = Integer.MAX_VALUE;\r\n\t\tpq = new DLL[MAXIMUM_PRIORITY + 1];\r\n\t\tfor (int i = 0; i < pq.length; i++)\r\n\t\t{\r\n\t\t\tpq[i] = new DLL();\r\n\t\t}\r\n\t}", "public PriorityQueue()\n {\n // initialise instance variables\n heap = new PriorityCustomer[100];\n size = 0;\n }", "public HuffmanNode (HuffmanToken token) {\n \ttotalFrequency = token.getFrequency();\n \ttokens = new ArrayList<HuffmanToken>();\n \ttokens.add(token);\n \tleft = null;\n \tright = null;\n }", "public HuffmanNode(String key, int value, HuffmanNode leftNode, HuffmanNode rightNode)\n\t{\n\t\tthis(key,value);\n\t\tleft = leftNode;\n\t\tright = rightNode;\n\t}", "public static String huffmanCoder(String inputFileName, String outputFileName){\n File inputFile = new File(inputFileName+\".txt\");\n File outputFile = new File(outputFileName+\".txt\");\n File encodedFile = new File(\"encodedTable.txt\");\n File savingFile = new File(\"Saving.txt\");\n HuffmanCompressor run = new HuffmanCompressor();\n \n run.buildHuffmanList(inputFile);\n run.makeTree();\n run.encodeTree();\n run.computeSaving(inputFile,outputFile);\n run.printEncodedTable(encodedFile);\n run.printSaving(savingFile);\n return \"Done!\";\n }", "public FrequencyBag() {\n\t\tfirstNode = null;\n\t\tnumEntries = 0;\n\t}", "public PriorityQueue(int N) {\r\n\t\tthis.arr = new Node[N];\r\n\t\tthis.MAX_LENGTH = N;\r\n\t}", "public static void main(String[] args) {\n Huffman huffman=new Huffman(\"Shevchenko Vladimir Vladimirovich\");\n System.out.println(huffman.getCodeText());//\n //answer:110100001001101011000001001110111110110101100110110001001110101111100011101000011011000100111010111110001110100101110101111100000\n\n huffman.getSizeBits();//размер в битах\n ;//кол-во символов\n System.out.println((double) huffman.getSizeBits()/(huffman.getValueOfCharactersOfText()*8)); //коэффициент сжатия относительно aski кодов\n System.out.println((double) huffman.getSizeBits()/(huffman.getValueOfCharactersOfText()*\n (Math.pow(huffman.getValueOfCharactersOfText(),0.5)))); //коэффициент сжатия относительно равномерного кода. Не учитывается размер таблицы\n System.out.println(huffman.getMediumLenght());//средняя длина кодового слова\n System.out.println(huffman.getDisper());//дисперсия\n\n\n }", "public Hashtable<Character,Code> getHuffmanCodes(int numberOfCodes,Hashtable<String,Character> revCodes) throws IOException {\r\n\t\tbyte[] b;\r\n\t\tHashtable<Character,Code> codes = new Hashtable<>();\r\n\t\t for (int i = 0 ; i < numberOfCodes ; i++) {\r\n\t\t\t System.out.println(\"i = \" + i);\r\n\t\t\t // i create a stringBuilder that will hold the code for each character\r\n\t\t\t StringBuilder c = new StringBuilder();\r\n\t\t\t // read the integer (4 bytes)\r\n\t\t\t b = new byte[4];\r\n\t\t\t in.read(b);\r\n\t\t\t // will hold the 4 bytes\r\n\t\t\t int code = 0;\r\n\t\t\t \r\n\t\t\t /* beacuse we wrote the integer reversed in the head\r\n\t\t\t * so the first 2 bytes from the left will hold the huffman's code\r\n\t\t\t * we get the second one then stick it to the (code) value we shift it to the left \r\n\t\t\t * then we get the first one and stick it to the (code) without shifting it\r\n\t\t\t * so actually we swipe the first 2 bytes because they are reversed\r\n\t\t\t */\r\n\t\t\t code |= (b[1] & 0xFF);\r\n\t\t\t code <<= 8;\r\n\t\t\t code |= (b[0] & 0xFF);\r\n\t\t\t \r\n\t\t\t // this loop go throw the (code) n bits where n is the length of the huff code that stored in the 2nd index of the array\r\n\t\t\t for (int j = 0 ; j < (b[2] & 0xFF) ; j++) {\r\n\t\t\t\t /*\r\n\t\t\t\t * each loop we compare the first bit from the right using & operation ans if it 1 so insert 1 to he first of the (c) which hold the huff it self\r\n\t\t\t\t * and if it zero we will insert zero as a string for both zero or 1\r\n\t\t\t\t */\r\n\t\t\t\t if ((code & 1) == 1) {\r\n\t\t\t\t\t c.insert(0, \"1\");\r\n\t\t\t\t } else \r\n\t\t\t\t\t c.insert(0, \"0\");\r\n\t\t\t\t code >>>= 1;\r\n\t\t\t }\r\n\t\t\t \r\n\t\t\t// codes.put((char)(b[3] & 0xFF), new Code((char)(b[3] & 0xFF),c.toString(),rep2[b[0] & 0xFF]));\r\n\t\t\t System.out.println(\"c = \" + c);\r\n\t\t\t \r\n\t\t\t // we store the huff code as a key in the hash and its value will be the character that in the index 3\r\n\t\t\t revCodes.put(c.toString(), (char)(b[3] & 0xFF));\r\n\t\t\t \r\n\t\t }\r\n\t\t return codes;\r\n\t}", "public PriorityQueue(final int theLength) {\r\n super(theLength);\r\n }", "public IntPriorityQueue(int size) {\n initialize(size);\n }", "PriorityQueueUsingArray(int size) {\n\t\tthis.array = new Nodes[size + 1];\n\t}", "public HashSet(int bucketsLength)\n {\n buckets = new Node[bucketsLength];\n currentSize = 0;\n }", "public static void main(String args[]) {\n\t\t\r\n\t\tnew HuffmanEncode(\"book3.txt\", \"book3Comp.txt\");\r\n\t\t//do not add anything here\r\n\t}", "public static void main(String[] args) {\n\t\tHuffmanCodes MyHuffmanCodes = new HuffmanCodes();\n\t\tMyHuffmanCodes.run();\n\t}", "@SuppressWarnings(\"unchecked\")\n\tpublic PriorityQueue(){\n\n\t\tcurrentSize = 0;\n\t\tcmp = null;\n\t\tarray = (AnyType[]) new Object[10]; // safe to ignore warning\n\t}", "public FreqNode(String key, int value) {\n this.key = key;//sets key \n this.value = value;//sets value \n }", "public static void main(String[] args) {\n\r\n\t\tint arr[]={2, 3, 2, 4, 5, 12, 2, 3, 3, 3, 12};\r\n\t\tMap<Integer,Data> map = new HashMap<>();\r\n\t\tfor(int a :arr)\r\n\t\t{\r\n\t\t\tif(map.containsKey(a))\r\n\t\t\t{\r\n\t\t\t\tmap.get(a).incrementFrequency();\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tmap.put(a, new Data(a));\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tSet<Data> sortedData = new TreeSet<>(map.values());\r\n\t\tList<Integer> result = new ArrayList<>();\r\n\t\tfor(Data d : sortedData)\r\n\t\t{\r\n\t\t\tfor(int i=0;i<d.frequency;i++)\r\n\t\t\t\tresult.add(d.number);\r\n\t\t}\r\n\t\tSystem.out.println(result);\r\n\t}", "public PriorityQueue(int capacity) { \r\n this.capacity=capacity;\r\n this.currentSize=0;\r\n this.queue=new NodeBase[capacity];\r\n }", "public static void bubbleSort() {\r\n\t\tfor(int i = nodeArrList.size() -1; i > 0; i--) {\r\n\t\t\tfor(int j = 0; j < i; j++) {\r\n\t\t\t\tif(nodeArrList.get(j).frequency > nodeArrList.get(j +1).frequency) {\r\n\t\t\t\t\tHuffmanNode temp = nodeArrList.get(j);\r\n\t\t\t\t\tnodeArrList.set(j, nodeArrList.get(j + 1));\r\n\t\t\t\t\tnodeArrList.set(j + 1, temp);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public Node(int data) {\n payload = data;\n priority = 0;\n }", "public PriorityQueue(int size) {\n nodes = new Vector(size);\n }", "public void encode(File file) throws FileNotFoundException {\r\n HuffmanTreeCreator huffmanTreeCreator = new HuffmanTreeCreator();\r\n this.file = file;\r\n this.codesMap = huffmanTreeCreator.createCodesMap(huffmanTreeCreator.createHuffmanTree(file));\r\n this.charsQueue = new BlockingCharQueue(charQueueMaxLength);\r\n this.boolQueue = new BlockingBoolQueue(boolQueueMaxLength);\r\n\r\n fileRead = false;\r\n boolRead = false;\r\n charsQueue.setStopThread(false);\r\n boolQueue.setStopThread(false);\r\n\r\n\r\n CharReader charWriter = new CharReader();\r\n BoolReader bollWriter = new BoolReader();\r\n BitWriter bitWriter = new BitWriter();\r\n charWriter.start();\r\n bollWriter.start();\r\n bitWriter.start();\r\n\r\n// try {\r\n// Thread.sleep(4000);\r\n// } catch (InterruptedException e) {\r\n// e.printStackTrace();\r\n// }\r\n// System.out.println(\"Char writer is alive: \" + charWriter.isAlive());\r\n// System.out.println(\"Bool writer is alive: \" + bollWriter.isAlive());\r\n// System.out.println(\"Bit writer is alive: \" + bitWriter.isAlive());\r\n// System.out.println(codesMap);\r\n\r\n try {\r\n charWriter.join();\r\n bollWriter.join();\r\n bitWriter.join();\r\n } catch (InterruptedException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n }", "public Tree(int x[]){\n\t\tint n = x.length;\n\t\tif(n == 0)\n\t\t\treturn;\n\t\tTreeNode nodes[] = new TreeNode[n];\n\t\tfor(int i=0; i < n; i++)\n\t\t\tnodes[i] = x[i] != -10 ? (new TreeNode(x[i])) : null;\n\t\troot = nodes[0];\n\t\tfor(int i=0; i < n; i++){\n\t\t\tTreeNode curr = nodes[i];\n\t\t\tif(curr == null)\n\t\t\t\tcontinue;\n\t\t\tint lc = 2*i+1;\n\t\t\tint rc = 2*i+2;\n\t\t\tif(lc < n)\n\t\t\t\tcurr.left = nodes[lc];\n\t\t\tif(rc < n)\n\t\t\t\tcurr.right = nodes[rc];\n\t\t}\n\t}", "public TreeNode(TreeNode left, TreeNode right, int freq){\n\t\tleftChild = left;\n\t\trightChild = right;\n\t\tfrequency = freq;\n\t\tkey = '\\0';\n\t}", "public static Node buildHuffManTree(PriorityQueue<Node> queue) {\n\t\t\n\t\twhile(queue.size()>1) {\n\t\t\t\n\t\t\tNode left = queue.poll();\n\t\t\tNode right = queue.poll();\n\t\t\t\n\t\t\tNode root = new Node(left.frequency + right.frequency);\n\t\t\troot.left = left;\n\t\t\troot.right = right;\n\t\t\t\n\t\t\tqueue.add(root);\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\treturn queue.poll();\n\t\t\n\t}", "@Override\r\n public void run() {\n File huffmanFolder = newDirectoryEncodedFiles(file, encodedFilesDirectoryName);\r\n File huffmanTextFile = new File(huffmanFolder.getPath() + \"\\\\text.huff\");\r\n File huffmanTreeFile = new File(huffmanFolder.getPath() + \"\\\\tree.huff\");\r\n\r\n\r\n try (FileOutputStream textCodeOS = new FileOutputStream(huffmanTextFile);\r\n FileOutputStream treeCodeOS = new FileOutputStream(huffmanTreeFile)) {\r\n\r\n\r\n// Writing text bits to file text.huff\r\n StringBuilder byteStr;\r\n while (boolQueue.size() > 0 | !boolRead) {\r\n while (boolQueue.size() > 8) {\r\n byteStr = new StringBuilder();\r\n\r\n for (int i = 0; i < 8; i++) {\r\n String s = boolQueue.get() ? \"1\" : \"0\";\r\n byteStr.append(s);\r\n }\r\n\r\n if (isInterrupted())\r\n break;\r\n\r\n byte b = parser.parseStringToByte(byteStr.toString());\r\n textCodeOS.write(b);\r\n }\r\n\r\n if (fileRead && boolQueue.size() > 0) {\r\n lastBitsCount = boolQueue.size();\r\n byteStr = new StringBuilder();\r\n for (int i = 0; i < lastBitsCount; i++) {\r\n String bitStr = boolQueue.get() ? \"1\" : \"0\";\r\n byteStr.append(bitStr);\r\n }\r\n\r\n for (int i = 0; i < 8 - lastBitsCount; i++) {\r\n byteStr.append(\"0\");\r\n }\r\n\r\n byte b = parser.parseStringToByte(byteStr.toString());\r\n textCodeOS.write(b);\r\n }\r\n }\r\n\r\n\r\n// Writing the info for decoding to tree.huff\r\n// Writing last bits count to tree.huff\r\n treeCodeOS.write((byte)lastBitsCount);\r\n\r\n// Writing info for Huffman tree to tree.huff\r\n StringBuilder treeBitsArray = new StringBuilder();\r\n treeBitsArray.append(\r\n parser.parseByteToBinaryString(\r\n (byte) codesMap.size()));\r\n\r\n codesMap.keySet().forEach(key -> {\r\n String keyBits = parser.parseByteToBinaryString((byte) (char) key);\r\n String valCountBits = parser.parseByteToBinaryString((byte) codesMap.get(key).length());\r\n\r\n treeBitsArray.append(keyBits);\r\n treeBitsArray.append(valCountBits);\r\n treeBitsArray.append(codesMap.get(key));\r\n });\r\n if ((treeBitsArray.length() / 8) != 0) {\r\n int lastBitsCount = boolQueue.size() / 8;\r\n for (int i = 0; i < 7 - lastBitsCount; i++) {\r\n treeBitsArray.append(\"0\");\r\n }\r\n }\r\n\r\n for (int i = 0; i < treeBitsArray.length() / 8; i++) {\r\n treeCodeOS.write(parser.parseStringToByte(\r\n treeBitsArray.substring(8 * i, 8 * (i + 1))));\r\n }\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }", "public PriorityQueue() {\n\t\theap = new ArrayList<Pair<Integer, Integer>>();\n\t\tlocation = new HashMap<Integer, Integer>();\n\t}", "public HeapPriorityQueue () \n\t{\n\t\tthis(DEFAULT_SIZE);\n\t}", "public BTreeNode(int t){\n T = t;\n isLeaf = true;\n key = new int[2*T-1];\n c = new BTreeNode[2*T];\n n=0; \n }", "private void buildTree() {\n\t\tfinal TreeSet<Tree> treeSet = new TreeSet<Tree>();\n\t\tfor (char i = 0; i < 256; i++) {\n\t\t\tif (characterCount[i] > 0) {\n\t\t\t\ttreeSet.add(new Tree(i, characterCount[i]));\n\t\t\t}\n\t\t}\n\n\t\t// Merge the trees to one Tree\n\t\tTree left;\n\t\tTree right;\n\t\twhile (treeSet.size() > 1) {\n\t\t\tleft = treeSet.pollFirst();\n\t\t\tright = treeSet.pollFirst();\n\t\t\ttreeSet.add(new Tree(left, right));\n\t\t}\n\n\t\t// There is only our final tree left\n\t\thuffmanTree = treeSet.pollFirst();\n\t}", "public void encodeData() {\n frequencyTable = new FrequencyTableBuilder(inputPath).buildFrequencyTable();\n huffmanTree = new Tree(new HuffmanTreeBuilder(new FrequencyTableBuilder(inputPath).buildFrequencyTable()).buildTree());\n codeTable = new CodeTableBuilder(huffmanTree).buildCodeTable();\n encodeMessage();\n print();\n }", "public Weight( int[] init )\n {\n // Construct the array the same length\n // as that referenced by init.\n data = new int[init.length];\n\n // Copy values from the\n // input data to data.\n for ( int j = 0; j < init.length; j++ )\n {\n data[j] = init[j];\n }\n }", "public static void main(String[] args)\r\n {\r\n Map<Character, Integer> myMap = new TreeMap<>(); //initializes the map\r\n secondMap = new TreeMap<>(); //initializes the second map\r\n List<Character> myList = new ArrayList<>(); //creates the list\r\n\r\n //input validation loop to force the users to input an extension with .txt, also extracts the directoryPath\r\n //from the file path extension\r\n String filePath = \"\";\r\n String directoryPath = \"\";\r\n boolean keepRunning = true;\r\n Scanner myScanner = new Scanner(System.in);\r\n\r\n while (keepRunning)\r\n {\r\n System.out.println(\"Please provide the filepath to the file and make sure to include the '.txt' extension\");\r\n String z = myScanner.nextLine();\r\n\r\n //uses a substring to check the extension\r\n if (z.substring((z.length() - 4)).equalsIgnoreCase(\".txt\"))\r\n {\r\n filePath = z;\r\n\r\n for (int i = z.length()-1; i >= 0; i--)\r\n {\r\n if (z.charAt(i) == '\\\\')\r\n {\r\n directoryPath = z.substring(0, i);\r\n i = -1;\r\n }\r\n }\r\n\r\n //terminates the loop\r\n keepRunning = false;\r\n }\r\n else\r\n {\r\n System.out.print(\"Invalid Input! \");\r\n }\r\n }\r\n\r\n try\r\n {\r\n //makes the file\r\n File myFile = new File(filePath);\r\n FileInputStream x = new FileInputStream(myFile);\r\n\r\n //reads in from the file character by character\r\n while (x.available() > 0)\r\n {\r\n Character c = (char) x.read();\r\n myList.add(c);\r\n }\r\n\r\n } catch (IOException e)\r\n {\r\n e.printStackTrace();\r\n }\r\n\r\n //loads all of the characters into a map with their respective frequency\r\n for (Character a : myList)\r\n {\r\n Integer value = myMap.get(a);\r\n\r\n if (!myMap.containsKey(a))\r\n {\r\n myMap.put(a, 1);\r\n }\r\n else\r\n {\r\n myMap.put(a, (value + 1));\r\n }\r\n }\r\n\r\n //prints out the map for debugging purposes\r\n System.out.println(myMap);\r\n\r\n PriorityQueue<Node> myQueue = new PriorityQueue<>();\r\n\r\n //creates a node for each Character/value in the map and puts it into the priority Queue\r\n for (Character a : myMap.keySet())\r\n {\r\n Node b = new Node(a, myMap.get(a));\r\n myQueue.add(b);\r\n }\r\n\r\n //removes and re-adds nodes to form the tree, remaining node is the root of the tree\r\n while (myQueue.size() > 1)\r\n {\r\n //removes first two nodes\r\n Node firstRemoved = myQueue.remove();\r\n Node secondRemoved = myQueue.remove();\r\n\r\n //the value for the new node being a sum of the first two removed node's respective frequencies\r\n int val = firstRemoved.frequency + secondRemoved.frequency;\r\n\r\n //creates the new node, set's its frequency to the value of the first two, then ties its left/right node values\r\n //to those originally removed nodes\r\n Node replacementNode = new Node();\r\n replacementNode.frequency = val;\r\n replacementNode.left = firstRemoved;\r\n replacementNode.right = secondRemoved;\r\n\r\n myQueue.add(replacementNode);\r\n }\r\n\r\n //does the recursion on the priorityQueue\r\n huffmanStringSplit(myQueue.peek(), \"\");\r\n\r\n //prints out the map for debugging purposes\r\n System.out.println(secondMap);\r\n\r\n //creates and writes to the .CODE file and the .HUFF file\r\n try\r\n {\r\n //PrintWriter for easily writing to a file\r\n String output = directoryPath + \"\\\\FILENAME.code\";\r\n PrintWriter myPrinter = new PrintWriter(output);\r\n\r\n //goes through the second map\r\n for (Character a : secondMap.keySet())\r\n {\r\n int ascii = (int) a;\r\n myPrinter.println(ascii);\r\n myPrinter.println(secondMap.get(a));\r\n }\r\n\r\n //closes printer\r\n myPrinter.close();\r\n\r\n //reopens the printer to the new file\r\n output = directoryPath + \"\\\\FILENAME.huff\";\r\n myPrinter = new PrintWriter(output);\r\n\r\n //outputs every value in the original list to the .huff file with the characters converted to huff code\r\n for (Character a : myList)\r\n {\r\n myPrinter.print(secondMap.get(a));\r\n myPrinter.flush();\r\n }\r\n\r\n //closes the printer after it's written\r\n myPrinter.close();\r\n\r\n } catch (IOException e)\r\n {\r\n e.printStackTrace();\r\n }\r\n }", "private void constructTree() {\r\n\t\tsortLeaves();\r\n\t\tNode currentNode;\r\n\t\tint index = 0;\r\n\t\t\tdo{\r\n\t\t\t\t// Create a new node with the next two least frequent nodes as its children\r\n\t\t\t\tcurrentNode = new Node(this.treeNodes[0], this.treeNodes[1]); \r\n\t\t\t\taddNewNode(currentNode);\r\n\t\t\t}\r\n\t\t\twhile (this.treeNodes.length > 1); // Until there is only one root node\r\n\t\t\tthis.rootNode = currentNode;\r\n\t\t\tindex++;\r\n\t}", "public ArrayPriorityQueue()\n { \n\tqueue = new ArrayList();\n }", "MinHeapNode newNode(char data, int freq)\r\n\t{\r\n\t MinHeapNode temp = new MinHeapNode();\r\n\t temp.left = temp.right = null;\r\n\t temp.data = data;\r\n\t temp.freq = freq;\r\n\t return temp;\r\n\t}", "public HuffmanNode(HuffmanNode l, HuffmanNode r)\n\t{\n\t\tleft = l;\n\t\tright = r;\n\t\tvalue = l.value() + r.value();\n\t\tfrequency = l.frequency() + r.frequency();\n\t}", "@SuppressWarnings(\"unchecked\")\n\tpublic PriorityQueue(Comparator<? super AnyType> c){\n\t\tcurrentSize = 0;\n\t\tcmp = c;\n\t\tarray = (AnyType[]) new Object[10]; // safe to ignore warning\n\t}", "static binaryTreeNode inorderConstruct(int[] keys){\n binaryTreeNode head = null;\n binaryTreeNode lnode = null;\n binaryTreeNode rnode = null;\n for(int i:keys){\n if(head == null){\n head = new binaryTreeNode(i);\n continue;\n }\n if(lnode == null){\n lnode = head;\n head = new binaryTreeNode(i);\n continue;\n }\n if(rnode == null){\n rnode = new binaryTreeNode(i);\n head.lnode = lnode;\n head.rnode = rnode;\n rnode = null;\n lnode = null;\n }\n }\n return head;\n }", "public int[] headCode(Hashtable<Character,Code> codes,int[] rep) {\r\n\t\t\r\n\t\tint count = 0;\r\n\t\tint counter = 0;\r\n\t\tfor (int i = 0 ; i < rep.length ; i++) \r\n\t\t\tif (rep[i] > 0)\r\n\t\t\t\tcount++;\r\n\t\tint[] headArr = new int[count]; // create integer array that will hold the integer value for the every character information \r\n\t\t\r\n\t\tfor (int i = 0 ; i < rep.length ; i++) {\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif (rep[i] > 0) {\r\n\t\t\t\tSystem.out.println(i);\r\n\t\t\t\tint num = 0;\r\n\t\t\t\t\r\n\t\t\t\t//num |= codes.get((char)i).code.length();\r\n\t\t\t\t\r\n\t\t\t\tString c = codes.get((char)i).code; // get huffman code for the character from hash table which is O(1)\r\n\t\t\t\tSystem.out.println(c + \" \" + c.length());\r\n\t\t\t\tfor (int j = 0 ; j < c.length() ; j++) {\r\n\t\t\t\t\tnum <<= 1; // shift the integer by 1 bit to the left\r\n\t\t\t\t\tif (c.charAt(j) == '1') {\r\n\t\t\t\t\t\tnum |= 1; // make or operation for each digit of the huffman code with num that will contains the information\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tnum |= 0; \r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\tint ch = i; \r\n\t\t\t\tch <<= 24; // shift character value 24 bit to the left so that it will be in the first byte to the left of the integer\r\n\t\t\t\tint l = c.length();\r\n\t\t\t\tl <<= 16; // shift the length of huffman code 16 bit to the left so that it will be in the second byte to the left of the integer\r\n\t\t\t\tnum |= ch; // make or operation that will put the value of character to the fisrt byte of the integer\r\n\t\t\t\tnum |= l; // make of operation that will put the calue of huffman code to the second byte of the integer\r\n\t\t\t\t\r\n\t\t\t\t/*\r\n\t\t\t\t * integer representation >> 00000000000000000000000000000000\r\n\t\t\t\t * my representation >>\t ccccccccllllllllhhhhhhhhhhhhhhhh\r\n\t\t\t\t * \r\n\t\t\t\t */\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.println(num);\r\n\t\t\t\theadArr[counter++] = num;\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn headArr;\r\n\t\t\r\n\t}", "public FixedSizedPriorityQueue(int elementsLeft) {\n\t\tsuper();\n\t\tthis.elementsLeft = elementsLeft;\n\t}", "private int Huffmancodebits( int [] ix, EChannel gi ) {\n\t\tint region1Start;\n\t\tint region2Start;\n\t\tint count1End;\n\t\tint bits, stuffingBits;\n\t\tint bvbits, c1bits, tablezeros, r0, r1, r2;//, rt, pr;\n\t\tint bitsWritten = 0;\n\t\tint idx = 0;\n\t\ttablezeros = 0;\n\t\tr0 = r1 = r2 = 0;\n\n\t\tint bigv = gi.big_values * 2;\n\t\tint count1 = gi.count1 * 4;\n\n\n\t\t/* 1: Write the bigvalues */\n\n\t\tif ( bigv!= 0 ) {\n\t\t\tif ( (gi.mixed_block_flag) == 0 && gi.window_switching_flag != 0 && (gi.block_type == 2) ) { /* Three short blocks */\n\t\t\t\t// if ( (gi.mixed_block_flag) == 0 && (gi.block_type == 2) ) { /* Three short blocks */\n\t\t\t\t/*\n Within each scalefactor band, data is given for successive\n time windows, beginning with window 0 and ending with window 2.\n Within each window, the quantized values are then arranged in\n order of increasing frequency...\n\t\t\t\t */\n\n\t\t\t\tint sfb, window, line, start, end;\n\n\t\t\t\t//int [] scalefac = scalefac_band_short; //da modificare nel caso si convertano mp3 con fs diversi\n\n\t\t\t\tregion1Start = 12;\n\t\t\t\tregion2Start = 576;\n\n\t\t\t\tfor ( sfb = 0; sfb < 13; sfb++ ) {\n\t\t\t\t\tint tableindex = 100;\n\t\t\t\t\tstart = scalefac_band_short[ sfb ];\n\t\t\t\t\tend = scalefac_band_short[ sfb+1 ];\n\n\t\t\t\t\tif ( start < region1Start )\n\t\t\t\t\t\ttableindex = gi.table_select[ 0 ];\n\t\t\t\t\telse\n\t\t\t\t\t\ttableindex = gi.table_select[ 1 ];\n\n\t\t\t\t\tfor ( window = 0; window < 3; window++ )\n\t\t\t\t\t\tfor ( line = start; line < end; line += 2 ) {\n\t\t\t\t\t\t\tx = ix[ line * 3 + window ];\n\t\t\t\t\t\t\ty = ix[ (line + 1) * 3 + window ];\n\n\t\t\t\t\t\t\tbits = HuffmanCode( tableindex, x, y );\n\t\t\t\t\t\t\tmn.add_entry( code, cbits );\n\t\t\t\t\t\t\tmn.add_entry( ext, xbits );\n\n\t\t\t\t\t\t\tbitsWritten += bits;\n\t\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t} else\n\t\t\t\tif ( gi.mixed_block_flag!= 0 && gi.block_type == 2 ) { /* Mixed blocks long, short */\n\t\t\t\t\tint sfb, window, line, start, end;\n\t\t\t\t\tint tableindex;\n\t\t\t\t\t//scalefac_band_long;\n\n\t\t\t\t\t/* Write the long block region */\n\t\t\t\t\ttableindex = gi.table_select[0];\n\t\t\t\t\tif ( tableindex != 0 )\n\t\t\t\t\t\tfor (int i = 0; i < 36; i += 2 ) {\n\t\t\t\t\t\t\tx = ix[i];\n\t\t\t\t\t\t\ty = ix[i + 1];\n\t\t\t\t\t\t\tbits = HuffmanCode( tableindex, x, y );\n\t\t\t\t\t\t\tmn.add_entry( code, cbits );\n\t\t\t\t\t\t\tmn.add_entry( ext, xbits );\n\t\t\t\t\t\t\tbitsWritten += bits;\n\t\t\t\t\t\t}\n\t\t\t\t\t/* Write the short block region */\n\t\t\t\t\ttableindex = gi.table_select[ 1 ];\n\n\t\t\t\t\tfor ( sfb = 3; sfb < 13; sfb++ ) {\n\t\t\t\t\t\tstart = scalefac_band_long[ sfb ];\n\t\t\t\t\t\tend = scalefac_band_long[ sfb+1 ];\n\n\t\t\t\t\t\tfor ( window = 0; window < 3; window++ )\n\t\t\t\t\t\t\tfor ( line = start; line < end; line += 2 ) {\n\t\t\t\t\t\t\t\tx = ix[ line * 3 + window ];\n\t\t\t\t\t\t\t\ty = ix[ (line + 1) * 3 + window ];\n\t\t\t\t\t\t\t\tbits = HuffmanCode( tableindex, x, y );\n\t\t\t\t\t\t\t\tmn.add_entry( code, cbits );\n\t\t\t\t\t\t\t\tmn.add_entry( ext, xbits );\n\t\t\t\t\t\t\t\tbitsWritten += bits;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t} else { /* Long blocks */\n\t\t\t\t\tint scalefac_index = 100;\n\n\t\t\t\t\tif ( gi.mixed_block_flag != 0 ) {\n\t\t\t\t\t\tregion1Start = 36;\n\t\t\t\t\t\tregion2Start = 576;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tscalefac_index = gi.region0_count + 1;\n\t\t\t\t\t\tregion1Start = scalefac_band_long[ scalefac_index ];\n\t\t\t\t\t\tscalefac_index += gi.region1_count + 1;\n\t\t\t\t\t\tregion2Start = scalefac_band_long[ scalefac_index ];\n\t\t\t\t\t}\n\n\t\t\t\t\tfor (int i = 0; i < bigv; i += 2 ) {\n\t\t\t\t\t\tint tableindex = 100;\n\t\t\t\t\t\tif ( i < region1Start ) {\n\t\t\t\t\t\t\ttableindex = gi.table_select[0];\n\t\t\t\t\t\t} else\n\t\t\t\t\t\t\tif ( i < region2Start ) {\n\t\t\t\t\t\t\t\ttableindex = gi.table_select[1];\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ttableindex = gi.table_select[2];\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t/* get huffman code */\n\t\t\t\t\t\tx = ix[i];\n\t\t\t\t\t\ty = ix[i + 1];\n\t\t\t\t\t\tif ( tableindex!= 0 ) {\n\t\t\t\t\t\t\tbits = HuffmanCode( tableindex, x, y );\n\t\t\t\t\t\t\tmn.add_entry( code, cbits );\n\t\t\t\t\t\t\tmn.add_entry( ext, xbits );\n\t\t\t\t\t\t\tbitsWritten += bits;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ttablezeros += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t}\n\t\tbvbits = bitsWritten;\n\n\t\t/* 2: Write count1 area */\n\t\tint tableindex = gi.count1table_select + 32;\n\n\t\tcount1End = bigv + count1;\n\t\tfor (int i = bigv; i < count1End; i += 4 ) {\n\t\t\tv = ix[i];\n\t\t\tw = ix[i+1];\n\t\t\tx = ix[i+2];\n\t\t\ty = ix[i+3];\n\t\t\tbitsWritten += huffman_coder_count1(tableindex);\n\t\t}\n\n\t\t// c1bits = bitsWritten - bvbits;\n\t\t// if ( (stuffingBits = gi.part2_3_length - gi.part2_length - bitsWritten) != 0 ) {\n\t\t// int stuffingWords = stuffingBits / 32;\n\t\t// int remainingBits = stuffingBits % 32;\n\t\t//\n\t\t// /*\n\t\t// Due to the nature of the Huffman code\n\t\t// tables, we will pad with ones\n\t\t// */\n\t\t// while ( stuffingWords-- != 0){\n\t\t// mn.add_entry( -1, 32 );\n\t\t// }\n\t\t// if ( remainingBits!=0 )\n\t\t// mn.add_entry( -1, remainingBits );\n\t\t// bitsWritten += stuffingBits;\n\t\t//\n\t\t// }\n\t\treturn bitsWritten;\n\t}", "public MyQueue() {\n queue = new PriorityQueue<>();\n }" ]
[ "0.7056172", "0.7016122", "0.697307", "0.6940457", "0.67499167", "0.6717505", "0.6680176", "0.66192216", "0.64550686", "0.6441307", "0.64000976", "0.6394858", "0.63871115", "0.6377602", "0.6373346", "0.6324038", "0.6317852", "0.63057417", "0.62746555", "0.62224776", "0.6222309", "0.6206016", "0.61413515", "0.61306065", "0.60884744", "0.6087576", "0.60582817", "0.60552347", "0.5950503", "0.5935842", "0.5932701", "0.5924042", "0.59222615", "0.5906096", "0.58844835", "0.5874955", "0.58404756", "0.5840306", "0.58274055", "0.5797219", "0.5796167", "0.57196283", "0.56727195", "0.5652764", "0.5639176", "0.5633875", "0.5567037", "0.55399233", "0.5530532", "0.5516946", "0.5516378", "0.5439678", "0.5416228", "0.53946596", "0.5389577", "0.5387175", "0.5386076", "0.537687", "0.5348514", "0.53335464", "0.53204733", "0.5317118", "0.5313398", "0.5309927", "0.524285", "0.5222084", "0.5221966", "0.51831704", "0.5129236", "0.51122", "0.5106578", "0.50965065", "0.50869155", "0.508124", "0.5066484", "0.50364316", "0.5033791", "0.5020737", "0.5012253", "0.50102377", "0.5005416", "0.49950257", "0.4993029", "0.49868882", "0.49733248", "0.49683136", "0.4948771", "0.49436975", "0.49359608", "0.49340737", "0.4919388", "0.4913073", "0.49103722", "0.49006155", "0.4892278", "0.48835558", "0.4883281", "0.4880629", "0.48618954", "0.48563832" ]
0.7987007
0
A constructor that takes in a scanner. Assumes it's reading in a previously constructed, legal code file. Also assumes the Scanner is not null.
public HuffmanCode(Scanner input) { this.front = new HuffmanNode(); while (input.hasNextLine()) { int character = Integer.parseInt(input.nextLine()); String location = input.nextLine(); ScannerHuffmanCodeCreator(this.front, location, (char) character); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Scanner(String source) {\n // The source code read in from stdin is stored here as a char array\n // TODO: if source is empty in Sc.java do something??\n this.source = source.toCharArray();\n this.position = 0;\n this.size = source.length();\n this.comments = false;\n this.depth = 0;\n this.called = false;\n }", "public CoolParser(java_cup.runtime.Scanner s) {super(s);}", "public Parser(Scanner scanner) {\n this.scanner = scanner;\n scan();\n }", "public Scanner(java.io.InputStream in) {\r\n this(new java.io.InputStreamReader(in));\r\n }", "public CompParser(java_cup.runtime.Scanner s) {super(s);}", "public Scanner( String filename ) throws IOException\n {\n sourceFile = new PushbackInputStream(new FileInputStream(filename));\n \n nextToken = null;\n }", "public Scanner(java.io.InputStream in) {\n this(new java.io.InputStreamReader(in));\n }", "public Scanner(java.io.InputStream in) {\n this(new java.io.InputStreamReader(in));\n }", "public Parser(Scanner fileStream) {\n // Save fileStream for later\n this.fileStream = fileStream;\n // Set the delimiter so that actual instructions are read, instead of the whitespace\n this.fileStream.useDelimiter(Pattern.compile(whitespace, Pattern.MULTILINE));\n }", "public parser(java_cup.runtime.Scanner s) {super(s);}", "public parser(java_cup.runtime.Scanner s) {super(s);}", "public parser(java_cup.runtime.Scanner s) {super(s);}", "public parser(java_cup.runtime.Scanner s) {super(s);}", "public parser(java_cup.runtime.Scanner s) {super(s);}", "public parser(java_cup.runtime.Scanner s) {super(s);}", "public parser(java_cup.runtime.Scanner s) {super(s);}", "public parser(java_cup.runtime.Scanner s) {super(s);}", "public Parser(java_cup.runtime.Scanner s) {super(s);}", "public Parser(java_cup.runtime.Scanner s) {super(s);}", "public Parser(java_cup.runtime.Scanner s) {super(s);}", "public Parser(java_cup.runtime.Scanner s) {super(s);}", "public Parser(java_cup.runtime.Scanner s) {super(s);}", "public Parser(java_cup.runtime.Scanner s) {super(s);}", "public Scanner(String program) {\n\t\tthis.program=program;\n\t\tpos=0;\n\t\ttoken=null;\n\t\tinitWhitespace(whitespace);\n\t\tinitDigits(digits);\n\t\tinitLetters(letters);\n\t\tinitLegits(legits);\n\t\tinitKeywords(keywords);\n\t\tinitOperators(operators);\n }", "public TokenScanner(final File f) throws FileNotFoundException {\n\t\tfileScanner = new Scanner(file = f);\n\t}", "public CommandParser(String filename) {\r\n try {\r\n sc = new Scanner(new File(filename));\r\n }\r\n catch (FileNotFoundException e) {\r\n e.printStackTrace();\r\n System.out.println(\"File not found.\");\r\n }\r\n }", "public Scanner(InputStream inStream)\n {\n in = new BufferedReader(new InputStreamReader(inStream));\n eof = false;\n getNextChar();\n }", "public A4Parser(java_cup.runtime.Scanner s) {super(s);}", "public A4Parser(java_cup.runtime.Scanner s) {super(s);}", "public PasitoScanner(java.io.Reader in) {\n this.yy_reader = in;\n }", "public Scanner(java.io.Reader in) {\n this.zzReader = in;\n }", "public Scanner(java.io.Reader in) {\n this.zzReader = in;\n }", "public Scanner(java.io.Reader in) {\r\n this.zzReader = in;\r\n }", "public Scanner(String inString)\n {\n in = new BufferedReader(new StringReader(inString));\n eof = false;\n getNextChar();\n }", "public InputReader(File file){\n try {\n inputStream = new Scanner(file);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n instantiate();\n assert(invariant());\n }", "public Scanner(String sourceFile, String confFile) throws Exception{\n\t\ttry{\n\t\t\tsourceReader = new BufferedReader(new FileReader(sourceFile));\n\t\t} catch(IOException e) {\n\t\t\tString msj = \"Error opening source file named: \" + sourceFile;\n\t\t\tthrow new Exception(msj,e);\n\t\t}\n\t\ttry{\n\t\t\tinit(confFile);\n\t\t}catch(Exception e){\n\t\t\tString msj = \"Error during initializacion of scanner - init()\";\n\t\t\tthrow new Exception(msj,e);\n\t\t}\n\t}", "public FractalParser(java_cup.runtime.Scanner s) {super(s);}", "public parser(Scanner s) {super(s);}", "public CoolParser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public static synchronized void Initialize() throws FileNotFoundException, UnsupportedEncodingException {\n fileReaderInit(fLocation);\n \n pbr = new PushbackReader(reader, 5);\n \n \n File currentDirFile = new File(\".\");\n String helper = currentDirFile.getAbsolutePath();\n outLocation = \"src/parser_resources/\" + outFile;\n /*scan.nextLine();*/\n \n File f = new File(outLocation);\n\n if (f.exists() && !f.isDirectory()) {\n fWriter = new PrintWriter(outLocation, \"Ascii\");\n System.out.println(\"\\nOutput file initialized for Scanner\");\n System.out.println(\"Scanning output to: \" + helper + \"/\" + outLocation);\n } else {\n System.out.println(\"Error: output file missing please \\\"touch\"\n + \"scanner.out\\\" in parser_resources directory.\");\n }\n }", "public MJParser(java_cup.runtime.Scanner s) {super(s);}", "public PasitoScanner(java.io.InputStream in) {\n this(new java.io.InputStreamReader(in));\n }", "public LexicalScanner() throws IOException {\n this.codesMap = new CodesMap();\n this.keyWords = loadKeywords();\n this.specialCharacters = loadSpecialCharacters();\n this.identifierAutomata = new FA(IDENTIFIER_AUTOMATA_FILE);\n this.constantAutomata = new FA(CONSTANT_AUTOMATA_FILE);\n }", "public void analyze(File sourceFile) throws CompilerException,IOException\r\n\t{\r\n\t\tthis.stream = new BufferedReader(new FileReader(sourceFile));\r\n\t\tif (!this.stream.markSupported())\r\n\t\t\tthrow new CompilerException(\"Mark method is not available,updating java should solve this.\");\r\n\t\t\r\n\t\tfor (;;)\r\n\t\t{\t\r\n\t\t\t/**\r\n\t\t\t * Info is read char by char until end of stream is reached.\r\n\t\t\t */\r\n\t\t\tint c = this.stream.read();\r\n\t\t\tif (c == -1)\r\n\t\t\t\tbreak;\r\n\t\t\tchar rchar = (char)c;\r\n\t\t\t\r\n\t\t\t/**\r\n\t\t\t * If current char is '\"' it starts reading string constant\r\n\t\t\t * it reads it until it is terminated by another '\"'\r\n\t\t\t */\r\n\t\t\tif (rchar == '\"') // string token.\r\n\t\t\t{\r\n\t\t\t\tStringBuilder builder = new StringBuilder();\r\n\t\t\t\tfor (;;)\r\n\t\t\t\t{\r\n\t\t\t\t\tint ca = this.stream.read();\r\n\t\t\t\t\tif (ca == -1)\r\n\t\t\t\t\t\tthrow new CompilerException(\"Unterminated string - \" + builder.toString());\r\n\t\t\t\t\tchar caa = (char)ca;\r\n\t\t\t\t\tif (caa == '\"')\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tbuilder.append(caa);\r\n\t\t\t\t}\r\n\t\t\t\tthis.tokens.Put(new StringToken(builder.toString()));\r\n\t\t\t}\r\n\t\t\t/**\r\n\t\t\t * If current char is \"'\" it starts reading char constant\r\n\t\t\t * it reads it until it is terminated by another \"'\"\r\n\t\t\t */\r\n\t\t\telse if (rchar == new String(\"'\").charAt(0)) // char token\r\n\t\t\t{\r\n\t\t\t\tStringBuilder builder = new StringBuilder();\r\n\t\t\t\tfor (;;)\r\n\t\t\t\t{\r\n\t\t\t\t\tint ca = this.stream.read();\r\n\t\t\t\t\tif (ca == -1)\r\n\t\t\t\t\t\tthrow new CompilerException(\"Unterminated character - \" + builder.toString());\r\n\t\t\t\t\tchar caa = (char)ca;\r\n\t\t\t\t\tif (caa == new String(\"'\").charAt(0))\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tbuilder.append(caa);\r\n\t\t\t\t}\r\n\t\t\t\tthis.tokens.Put(new CharToken(builder.toString()));\r\n\t\t\t}\r\n\t\t\t/**\r\n\t\t\t * If current char starts with number\r\n\t\t\t * it reads it until it encounters char which is not letter\r\n\t\t\t * and not number.\r\n\t\t\t */\r\n\t\t\telse if (isNumber(rchar))\r\n\t\t\t{\r\n\t\t\t\tStringBuilder builder = new StringBuilder();\r\n\t\t\t\tbuilder.append(rchar);\r\n\t\t\t\tfor (;;)\r\n\t\t\t\t{\r\n\t\t\t\t\tthis.stream.mark(1);\r\n\t\t\t\t\tint ca = this.stream.read();\r\n\t\t\t\t\tif (ca == -1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tthis.stream.reset();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tchar caa = (char)ca;\r\n\t\t\t\t\tif (!isLetterOrNumber(caa))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tthis.stream.reset();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tbuilder.append(caa);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tthis.tokens.Put(new NumericToken(builder.toString()));\r\n\t\t\t}\r\n\t\t\t/**\r\n\t\t\t * If current char is symbol it reads it and converts to SymbolToken.\r\n\t\t\t */\r\n\t\t\telse if (isSymbol(rchar))\r\n\t\t\t{\r\n\t\t\t\t/**\r\n\t\t\t\t * We have exceptional check for /\r\n\t\t\t\t * because if next char is / or * , it means it's comment\r\n\t\t\t\t */\r\n\t\t\t\tboolean isComment = false;\r\n\t\t\t\tif (rchar == '/')\r\n\t\t\t\t{\r\n\t\t\t\t\tthis.stream.mark(1);\r\n\t\t\t\t\tint data = this.stream.read();\r\n\t\t\t\t\tif (data == -1) {\r\n\t\t\t\t\t\tthis.stream.reset();\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tchar second = (char)data;\r\n\t\t\t\t\t\tif (second == '/') {\r\n\t\t\t\t\t\t\tisComment = true;\r\n\t\t\t\t\t\t\tfor (;;) {\r\n\t\t\t\t\t\t\t\tdata = this.stream.read();\r\n\t\t\t\t\t\t\t\tif (data == -1)\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\tsecond = (char)data;\r\n\t\t\t\t\t\t\t\tif (second == '\\n')\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse if (second == '*') {\r\n\t\t\t\t\t\t\tisComment = true;\r\n\t\t\t\t\t\t\tfor (;;) {\r\n\t\t\t\t\t\t\t\tdata = this.stream.read();\r\n\t\t\t\t\t\t\t\tif (data == -1)\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\tsecond = (char)data;\r\n\t\t\t\t\t\t\t\tint thirdData = this.stream.read();\r\n\t\t\t\t\t\t\t\tif (thirdData == -1)\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\tchar third = (char)thirdData;\r\n\t\t\t\t\t\t\t\tif (second == '*' && third == '/') {\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tthis.stream.reset();\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\tif (!isComment) {\r\n\t\t\t\t\tthis.tokens.Put(new SymbolToken(new StringBuilder().append(rchar).toString()));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t/**\r\n\t\t\t * If current char is letter then it reads it until it encounters char\r\n\t\t\t * which is not number or letter or symbol\r\n\t\t\t * When done reading letter it checks if it's keyword \r\n\t\t\t * If it is , it writes KeywordToken , else - NameToken\r\n\t\t\t */\r\n\t\t\telse if (isLetter(rchar))\r\n\t\t\t{\r\n\t\t\t\tStringBuilder builder = new StringBuilder();\r\n\t\t\t\tbuilder.append(rchar);\r\n\t\t\t\tfor (;;)\r\n\t\t\t\t{\r\n\t\t\t\t\tthis.stream.mark(1);\r\n\t\t\t\t\tint ca = this.stream.read();\r\n\t\t\t\t\tif (ca == -1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tthis.stream.reset();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tchar caa = (char)ca;\r\n\t\t\t\t\tif (!isLetterOrNumber(caa))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tthis.stream.reset();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tbuilder.append(caa);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tthis.tokens.Put(isKeyword(builder.toString()) ? new KeywordToken(builder.toString()) : \r\n\t\t\t\t\t(isExpressionKeyword(builder.toString()) ? new ExpressionKeywordToken(builder.toString()) : new NameToken(builder.toString())));\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tthis.stream.close();\r\n\t\t/**\r\n\t\t * Once we are done with reading and analyzing, flip the tokens bag\r\n\t\t * so it's prepared for reading.\r\n\t\t */\r\n\t\tthis.tokens.Flip();\r\n\t}", "public parserCapas(java_cup.runtime.Scanner s) {super(s);}", "public Programa(java.io.InputStream stream, String encoding) {\n if (jj_initialized_once) {\n System.out.println(\"ERROR: Second call to constructor of static parser. \");\n System.out.println(\" You must either use ReInit() or set the JavaCC option STATIC to false\");\n System.out.println(\" during parser generation.\");\n throw new Error();\n }\n jj_initialized_once = true;\n try { jj_input_stream = new SimpleCharStream(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); }\n token_source = new ProgramaTokenManager(jj_input_stream);\n token = new Token();\n jj_ntk = -1;\n jj_gen = 0;\n for (int i = 0; i < 2; i++) jj_la1[i] = -1;\n }", "public CBS(java.io.Reader in) {\n this.yy_reader = in;\n }", "public Parser( File inFile ) throws FileNotFoundException\r\n {\r\n if( inFile.isDirectory() )\r\n throw new FileNotFoundException( \"Excepted a file but found a directory\" );\r\n \r\n feed = new Scanner( inFile );\r\n lineNum = 1;\r\n }", "private ConsoleScanner() {}", "public iCimpilir(java.io.InputStream stream, String encoding) {\n if (jj_initialized_once) {\n System.out.println(\"ERROR: Second call to constructor of static parser. \");\n System.out.println(\" You must either use ReInit() or set the JavaCC option STATIC to false\");\n System.out.println(\" during parser generation.\");\n throw new Error();\n }\n jj_initialized_once = true;\n try {\n jj_input_stream = new SimpleCharStream(stream, encoding, 1, 1);\n } catch (java.io.UnsupportedEncodingException e) {\n throw new RuntimeException(e);\n }\n token_source = new iCimpilirTokenManager(jj_input_stream);\n token = new Token();\n jj_ntk = -1;\n jj_gen = 0;\n for (int i = 0; i < 18; i++) {\n jj_la1[i] = -1;\n }\n }", "public LuaGrammarCup(java_cup.runtime.Scanner s) {super(s);}", "public Lexer(java.io.Reader in) {\r\n this.zzReader = in;\r\n }", "public MetadataScanner()\n {\n this(\"\");\n }", "public MyInput() {\r\n\t\tthis.scanner = new Scanner(System.in);\r\n\t}", "public PCLParser(java_cup.runtime.Scanner s) {super(s);}", "public static void init()throws IOException{if(fileIO){f=new FastScanner(\"\");}else{f=new FastScanner(System.in);}}", "public Sintactico(java_cup.runtime.Scanner s) {super(s);}", "public CompParser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public Parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public Parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public Parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public Parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public Parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public Parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public Parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public Scanner createScanner(File file) {\n Scanner scanner;\n try {\n scanner = new Scanner(file);\n\n } catch (FileNotFoundException e) {\n scanner = null;\n }\n return scanner;\n }", "public SparrowParser(java.io.InputStream stream, String encoding) {\n if (jj_initialized_once) {\n System.out.println(\"ERROR: Second call to constructor of static parser. \");\n System.out.println(\" You must either use ReInit() or set the JavaCC option STATIC to false\");\n System.out.println(\" during parser generation.\");\n throw new Error();\n }\n jj_initialized_once = true;\n try { jj_input_stream = new JavaCharStream(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); }\n token_source = new SparrowParserTokenManager(jj_input_stream);\n token = new Token();\n jj_ntk = -1;\n jj_gen = 0;\n for (int i = 0; i < 3; i++) jj_la1[i] = -1;\n for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();\n }", "private static Scanner createScanner(File inputFile)\n\t{\n\t\t/// create Scanner to read from file and also check if the file exists\n\t Scanner in = null; // closes before the end of readDataFile\n\t try \n\t {\n\t \tin=new Scanner(inputFile);\n\t }\n\t catch(FileNotFoundException e) \n\t {\n\t \tSystem.out.println(\"The file \"+ inputFile.getName() + \" can not be found!\");\n\t \tSystem.exit(0);\n\t }\n\t \n\t return in;\n\t}", "public parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public parser(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "Lexer(java.io.Reader in) {\n this.zzReader = in;\n }", "Lexer(java.io.Reader in) {\n this.zzReader = in;\n }", "public SYEParser(InputStream input, String name) throws FileNotFoundException {\n super(input);\n this.filename = name;\n }", "public SintaxAnalysis(java_cup.runtime.Scanner s) {super(s);}", "public Asintactico(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public JackTokenizer(File inFile) {\n\n try {\n\n Scanner scanner = new Scanner(inFile);\n String preprocessed = \"\";\n String line = \"\";\n\n while(scanner.hasNext()){\n\n line = noComments(scanner.nextLine()).trim();\n\n if (line.length() > 0) {\n preprocessed += line + \"\\n\";\n }\n }\n\n preprocessed = noBlockComments(preprocessed).trim();\n\n //init all regex\n initRegs();\n\n Matcher m = tokenPatterns.matcher(preprocessed);\n tokens = new ArrayList<String>();\n pointer = 0;\n\n while (m.find()){\n\n tokens.add(m.group());\n\n }\n\n } catch (FileNotFoundException e) {\n\n e.printStackTrace();\n\n }\n\n currentToken = \"\";\n currentTokenType = TYPE.NONE;\n\n }", "public Scanner(Reader reader, String confFile) throws Exception{\n\t\tsourceReader = new BufferedReader(reader);\n\t\ttry{\n\t\t\tinit(confFile);\n\t\t}catch(Exception e){\n\t\t\tString msj = \"Error during initializacion of scanner - init()\";\n\t\t\tthrow new Exception(msj,e);\n\t\t}\n\t}", "public Yylex(java.io.Reader in) {\r\n this.zzReader = in;\r\n }", "public In(){\n\t\tscanner=new Scanner(new BufferedInputStream(System.in),CHARSET_NAME);\n\t\tscanner.useLocale(LOCALE);\n\t}", "public ProgramParser(java.io.InputStream stream, String encoding) {\n try { jj_input_stream = new SimpleCharStream(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); }\n token_source = new ProgramParserTokenManager(jj_input_stream);\n token = new Token();\n jj_ntk = -1;\n jj_gen = 0;\n for (int i = 0; i < 14; i++) jj_la1[i] = -1;\n for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();\n }", "PTB2TextLexer(java.io.InputStream in) {\n this(new java.io.InputStreamReader(in));\n }", "public ClassCreator(){\n\n\n\t\tScanner fin = null;\n\n\t\ttry {\n\t\t\tString[] nameHandler = fileName.split(\"\\\\.\");\n\n\t\t\tString className = nameHandler[0].replaceAll(\" |_|\\\\s$|0|1|2|3|4|5|6|7|8|9\", \"\");\n\n\n\t\t\t//Setting Up Scanners/PrintWriter\n\t\t\tfin = new Scanner(new File(fileName));\n\n\n\t\t\tPrintWriter pw = new PrintWriter(className + \".java\");\n\n\n\t\t\tString[] prop = fin.nextLine().split(\"\\t\");\n\t\t\tString[] data = fin.nextLine().split(\"\\t\");\n\n\t\t\tfor(int i = 0; i<prop.length; i++) {\n\t\t\t\tpropertyList.add(new Properties(prop[i].replaceAll(\"\\\\s\", \"\"), getDataType(data[i])));\n\t\t\t}\n\n\t\t\t//Imports\n\t\t\tpw.println(\"import java.util.Scanner;\\n\\n\");\n\t\t\t\n\t\t\t//Class Line\n\t\t\tpw.println(\"\\npublic class \" + className + \" {\");\n\n\t\t\t//Properties\n\t\t\tpw.println(\"\\n\\t//======================================================= Properties\\n\");\n\n\t\t\tfor(Properties p: propertyList) {\n\t\t\t\tpw.println(p.generateProperty());\n\t\t\t}\n\n\t\t\t//Constructors\n\t\t\tpw.println(\"\\n\\t//======================================================= Constructors\\n\");\n\n\t\t\t//================= Workhorse Constructor\n\t\t\tpw.print(\"\\tpublic \" + className + \"(\");\n\t\t\tfor(int i=0; i<propertyList.size()-1; i++) {\n\t\t\t\tpw.print(propertyList.get(i).getDataType() + \" \" + propertyList.get(i).getFieldName() + \", \");\n\t\t\t}\n\t\t\tpw.print(propertyList.get(propertyList.size()-1).getDataType() + \" \" \n\t\t\t\t\t+ propertyList.get(propertyList.size()-1).getFieldName() + \"){\\n\");\n\t\t\tfor(Properties p: propertyList) {\n\t\t\t\tpw.println(p.generateSetCall(p));\n\t\t\t}\n\t\t\tpw.println(\"\\t}\\n\");\n\n\t\t\t//================= Scanner Constructor\n\t\t\tpw.print(\"\\tpublic \" + className + \"(Scanner fin) throws Exception {\\n\");\n\t\t\tpw.println(\"\\t\\tString[] parts = fin.nextLine().split(\\\"\\\\t\\\");\");\n\t\t\tint arrayCount = 0;\n\t\t\tfor(Properties p: propertyList) {\n\t\t\t\tif(p.getDataType().equals(\"int\")) {\n\t\t\t\t\tpw.println(p.generateSetCall(\"Integer.parseInt(parts[\" + arrayCount + \"])\"));\n\t\t\t\t\tarrayCount++;\n\t\t\t\t}\n\t\t\t\telse if(p.getDataType().equals(\"double\")) {\n\t\t\t\t\tpw.println(p.generateSetCall(\"Double.parseDouble(parts[\" + arrayCount + \"])\"));\n\t\t\t\t\tarrayCount++;\n\t\t\t\t}\n\t\t\t\telse if(p.getDataType().equals(\"long\")) {\n\t\t\t\t\tpw.println(p.generateSetCall(\"Long.parseLong(parts[\" + arrayCount + \"])\"));\n\t\t\t\t\tarrayCount++;\n\t\t\t\t}\n\t\t\t\telse if(p.getDataType().equals(\"boolean\")) {\n\t\t\t\t\tpw.println(p.generateSetCall(\"Boolean.parseBoolean(parts[\" + arrayCount + \"])\"));\n\t\t\t\t\tarrayCount++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tpw.println(p.generateSetCall(\"parts[\" + arrayCount + \"]\"));\n\t\t\t\t\tarrayCount++;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tpw.println(\"\\n\\t}\");\n\n\t\t\t//Methods\n\t\t\tpw.println(\"\\n\\t//======================================================= Methods\\n\");\n\n\t\t\t\t//Equals\n\t\t\tpw.println(\"\\tpublic boolean equals(Object obj) {\");\n\t\t\tpw.println(\"\\t\\tif(!(obj instanceof \" + className + \")) return false;\");\n\t\t\tpw.println(\"\\t\\t\" + className + \" \" + className.substring(0,1).toLowerCase() + \" = (\" + className + \")obj;\");\n\t\t\tpw.println(\"\\t\\treturn getEqualsString().equals(\" + className.substring(0,1).toLowerCase() + \".getEqualsString());\");\n\t\t\tpw.println(\"\\t}\");\n\t\t\t\n\t\t\t\t//EqualsHelper\n\t\t\tpw.println(\"\\n\\tprivate String getEqualsString() {\");\n\t\t\tpw.print(\"\\t\\treturn \");\n\t\t\tfor(int i=0; i<propertyList.size()-1; i++) {\n\t\t\t\tpw.print(propertyList.get(i).getFieldName() + \" + \\\"~\\\" + \");\n\t\t\t}\n\t\t\tpw.print(propertyList.get(propertyList.size()-1).getFieldName() + \";\\n\");\n\t\t\tpw.println(\"\\t}\");\n\t\t\t\n\t\t\t\t//toString\n\t\t\tpw.println(\"\\n\\tpublic String toString() {\");\n\t\t\tpw.print(\"\\t\\treturn \\\"\");\n\t\t\tfor(int i=0; i<propertyList.size()-1; i++) {\n\t\t\t\tpw.print(propertyList.get(i).generateUpperCase() + \": \\\" + \" + propertyList.get(i).getFieldName() + \" + \\\", \");\n\t\t\t}\n\t\t\tpw.print(propertyList.get(propertyList.size()-1).generateUpperCase() + \": \\\" + \" + propertyList.get(propertyList.size()-1).getFieldName() + \";\\n\");\n\t\t\tpw.println(\"\\t}\");\n\t\t\t\n\t\t\t\n\t\t\t//Getters/Setters\n\t\t\tpw.println(\"\\n\\t//======================================================= Getters/Setters\\n\");\n\t\t\tfor(Properties p: propertyList) {\n\t\t\t\tpw.println(p.generateGetter());\n\t\t\t}\n\t\t\tpw.println();\n\t\t\tfor(Properties p: propertyList) {\n\t\t\t\tpw.println(p.generateSetter());\n\t\t\t}\n\n\t\t\t//End of the file code\n\t\t\tpw.print(\"\\n\\n}\");\n\t\t\tfin.close();\n\t\t\tpw.close();\n\n\n\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Error: \" + e.getMessage());\n\t\t} finally { //Checked Last after try\n\t\t\ttry {fin.close();} catch (Exception e) {} //Just Double Checking\n\n\t\t}\n\n\n\n\n\t}", "public static void init() {\n\t\tscanner = new Scanner(System.in);\n\t\treturn;\n\t}", "public JavaCodeGenerator(String filename)\n throws IOException {\n this(filename, new CodeStyle());\n }", "public ClassParser(final InputStream inputStream, final String file_name) {\n this.file_name = file_name;\n fileOwned = false;\n\n if (inputStream instanceof DataInputStream) {\n this.dataInputStream = (DataInputStream) inputStream;\n } else {\n this.dataInputStream = new DataInputStream(new BufferedInputStream(inputStream, BUF_SIZE));\n }\n }", "public WrongInputDataInScanner() {\n\tsuper();\n\t\n}", "public SqlFileParser(File sqlScript) {\n try {\n this.reader = new BufferedReader(new FileReader(sqlScript));\n } catch (FileNotFoundException e) {\n throw new IllegalArgumentException(\"file not found \" + sqlScript);\n }\n }", "Yylex(java.io.Reader in) {\n this.zzReader = in;\n }", "Yylex(java.io.Reader in) {\n this.zzReader = in;\n }", "Yylex(java.io.Reader in) {\n this.zzReader = in;\n }", "Yylex(java.io.Reader in) {\n \n this.zzReader = in;\n }", "_JavaCCLexer(java.io.InputStream in) {\n this(new java.io.InputStreamReader(in));\n }", "public JackTokenizer(File inputFile, FileReader freader){\r\n\t\tfile = inputFile;\r\n\t\treader = freader;\r\n\t\tclassdot = false;\r\n\t\tdotSymbol = false;\r\n\t\tclassdot_Str=null;\r\n\t\tisSymbol = false;\r\n\t\tinit();\r\n\t\t//advanceToNextCommand();\r\n\t}", "public void init(String inputFile) \n\t{\t\t\n\t\tif (instance != null)\n\t\t{\n\t\t\ttry {\n\t\t\t\ts = new Scanner(new FileReader(inputFile));\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\tSystem.out.println(\"\\nnot a valid inputFile\");\n\t\t\t}\n\t\t\t//load mapping of reserved words and special symbols\n\t\t\tLoadCoreValues();\n\t\t\tinstance = new Tokenizer();\n\t\t}\n\t}" ]
[ "0.7014511", "0.6879627", "0.6802315", "0.66840094", "0.6677422", "0.6646458", "0.6641576", "0.6641576", "0.66351813", "0.65603954", "0.65603954", "0.65603954", "0.65603954", "0.65603954", "0.65603954", "0.65603954", "0.65603954", "0.65241545", "0.65241545", "0.65241545", "0.65241545", "0.65241545", "0.65241545", "0.65062624", "0.6402961", "0.6395264", "0.63946927", "0.63531035", "0.63531035", "0.63101053", "0.6304468", "0.6304468", "0.6295861", "0.6280562", "0.6277572", "0.6266882", "0.6259961", "0.62561584", "0.62344205", "0.6232203", "0.62018824", "0.61979204", "0.6153776", "0.6140983", "0.61161095", "0.6091121", "0.6032334", "0.6023125", "0.6013157", "0.5996361", "0.59883964", "0.5981754", "0.5978093", "0.59328884", "0.5931266", "0.5900917", "0.5897267", "0.58924127", "0.5886854", "0.5886854", "0.5886854", "0.5886854", "0.5886854", "0.5886854", "0.5886854", "0.5883345", "0.58744514", "0.58585405", "0.58528095", "0.58528095", "0.58528095", "0.58528095", "0.58528095", "0.58528095", "0.58528095", "0.58528095", "0.58528095", "0.5849866", "0.5849866", "0.5837547", "0.58288974", "0.5769807", "0.57665426", "0.576241", "0.57387704", "0.5738739", "0.5738516", "0.57232", "0.57158744", "0.5713466", "0.57103395", "0.57049024", "0.5703735", "0.5700299", "0.5696257", "0.5696257", "0.5696257", "0.5688433", "0.56862885", "0.5684203", "0.5659084" ]
0.0
-1
A private helper method that is called when the Scanner constructor is used. Creates a Huffman tree. Takes in a HuffmanNodenode, a string and a character.
private void ScannerHuffmanCodeCreator(HuffmanNode node, String s, char c) { if (s.length() == 1) { if (s.charAt(0) == '0') { node.left = new HuffmanNode(c); } else { node.right = new HuffmanNode(c); } } else { if (s.charAt(0) == '0') { if (node.left == null && node.right == null) { node.left = new HuffmanNode(); } ScannerHuffmanCodeCreator(node.left, s.substring(1), c); } else { if (node.right == null && node.right == null) { node.right = new HuffmanNode(); } ScannerHuffmanCodeCreator(node.right, s.substring(1), c); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Huffman(String input) {\n\t\t\n\t\tthis.input = input;\n\t\tmapping = new HashMap<>();\n\t\t\n\t\t//first, we create a map from the letters in our string to their frequencies\n\t\tMap<Character, Integer> freqMap = getFreqs(input);\n\n\t\t//we'll be using a priority queue to store each node with its frequency,\n\t\t//as we need to continually find and merge the nodes with smallest frequency\n\t\tPriorityQueue<Node> huffman = new PriorityQueue<>();\n\t\t\n\t\t/*\n\t\t * TODO:\n\t\t * 1) add all nodes to the priority queue\n\t\t * 2) continually merge the two lowest-frequency nodes until only one tree remains in the queue\n\t\t * 3) Use this tree to create a mapping from characters (the leaves)\n\t\t * to their binary strings (the path along the tree to that leaf)\n\t\t * \n\t\t * Remember to store the final tree as a global variable, as you will need it\n\t\t * to decode your encrypted string\n\t\t */\n\t\t\n\t\tfor (Character key: freqMap.keySet()) {\n\t\t\tNode thisNode = new Node(key, freqMap.get(key), null, null);\n\t\t\thuffman.add(thisNode);\n\t\t}\n\t\t\n\t\twhile (huffman.size() > 1) {\n\t\t\tNode leftNode = huffman.poll();\n\t\t\tNode rightNode = huffman.poll();\n\t\t\tint parentFreq = rightNode.freq + leftNode.freq;\n\t\t\tNode parent = new Node(null, parentFreq, leftNode, rightNode);\n\t\t\thuffman.add(parent);\n\t\t}\n\t\t\n\t\tthis.huffmanTree = huffman.poll();\n\t\twalkTree();\n\t}", "public HuffmanCode(Scanner input) {\n this.front = new HuffmanNode();\n while (input.hasNextLine()) {\n int character = Integer.parseInt(input.nextLine());\n String location = input.nextLine();\n ScannerHuffmanCodeCreator(this.front, location, (char) character);\n }\n }", "public void HuffmanCode()\n {\n String text=message;\n /* Count the frequency of each character in the string */\n //if the character does not exist in the list add it\n for(int i=0;i<text.length();i++)\n {\n if(!(c.contains(text.charAt(i))))\n c.add(text.charAt(i));\n } \n int[] freq=new int[c.size()];\n //counting the frequency of each character in the text\n for(int i=0;i<c.size();i++)\n for(int j=0;j<text.length();j++)\n if(c.get(i)==text.charAt(j))\n freq[i]++;\n /* Build the huffman tree */\n \n root= buildTree(freq); \n \n }", "public void makeTree(){\n //convert Hashmap into charList\n for(Map.Entry<Character,Integer> entry : freqTable.entrySet()){\n HuffmanNode newNode = new HuffmanNode(entry.getKey(),entry.getValue());\n charList.add(newNode);\n }\n \n if(charList.size()==0)\n return;\n \n if(charList.size()==1){\n HuffmanNode onlyNode = charList.get(0);\n root = new HuffmanNode(null,onlyNode.getFrequency());\n root.setLeft(onlyNode);\n return;\n }\n \n Sort heap = new Sort(charList);\n heap.heapSort();\n \n while(heap.size()>1){\n \n HuffmanNode leftNode = heap.remove(0);\n HuffmanNode rightNode = heap.remove(0);\n \n HuffmanNode newNode = merge(leftNode,rightNode);\n heap.insert(newNode);\n heap.heapSort();\n }\n \n charList = heap.getList();\n root = charList.get(0);\n }", "public void constructTree(){\n PriorityQueue<HCNode> queue=new PriorityQueue<HCNode>();\n \n for(int i=0;i<MAXSIZE;i++){\n if(NOZERO){\n if(occTable[i]!=0){\n HCNode nnode=new HCNode(\"\"+(char)(i-DIFF),occTable[i], null);\n queue.add(nnode);\n }\n }else{\n HCNode nnode=new HCNode(\"\"+(char)(i-DIFF),occTable[i], null);\n queue.add(nnode);\n }\n }\n //constructing the Huffman Tree\n HCNode n1=null,n2=null;\n while(((n2=queue.poll())!=null) && ((n1=queue.poll())!=null)){\n HCNode nnode=new HCNode(n1.str+n2.str,n1.occ+n2.occ, null);\n nnode.left=n1;nnode.right=n2;\n n1.parent=nnode;n2.parent=nnode;\n queue.add(nnode);\n }\n if(n1==null&&n2==null){\n System.out.println(\"oops\");\n }\n if(n1!=null)\n root=n1;\n else\n root=n2;\n }", "public HuffmanTree() {\r\n\t\tsuper();\r\n\t}", "public static void HuffmanTree(String input, String output) throws Exception {\n\t\tFileReader inputFile = new FileReader(input);\n\t\tArrayList<HuffmanNode> tree = new ArrayList<HuffmanNode>(200);\n\t\tchar current;\n\t\t\n\t\t// loops through the file and creates the nodes containing all present characters and frequencies\n\t\twhile((current = (char)(inputFile.read())) != (char)-1) {\n\t\t\tint search = 0;\n\t\t\tboolean found = false;\n\t\t\twhile(search < tree.size() && found != true) {\n\t\t\t\tif(tree.get(search).inChar == (char)current) {\n\t\t\t\t\ttree.get(search).frequency++; \n\t\t\t\t\tfound = true;\n\t\t\t\t}\n\t\t\t\tsearch++;\n\t\t\t}\n\t\t\tif(found == false) {\n\t\t\t\ttree.add(new HuffmanNode(current));\n\t\t\t}\n\t\t}\n\t\tinputFile.close();\n\t\t\n\t\t//creates the huffman tree\n\t\tcreateTree(tree);\n\t\t\n\t\t//the huffman tree\n\t\tHuffmanNode sortedTree = tree.get(0);\n\t\t\n\t\t//prints out the statistics of the input file and the space saved\n\t\tFileWriter newVersion = new FileWriter(\"C:\\\\Users\\\\Chris\\\\workspace\\\\P2\\\\src\\\\P2_cxt240_Tsuei_statistics.txt\");\n\t\tprintTree(sortedTree, \"\", newVersion);\n\t\tspaceSaver(newVersion);\n\t\tnewVersion.close();\n\t\t\n\t\t// codes the file using huffman encoding\n\t\tFileWriter outputFile = new FileWriter(output);\n\t\ttranslate(input, outputFile);\n\t}", "private static void generateHuffmanTree(){\n try (BufferedReader br = new BufferedReader(new FileReader(_codeTableFile))) {\n String line;\n while ((line = br.readLine()) != null) {\n // process the line.\n if(!line.isEmpty() && line!=null){\n int numberData = Integer.parseInt(line.split(\" \")[0]);\n String code = line.split(\" \")[1];\n Node traverser = root;\n for (int i = 0; i < code.length() - 1; i++){\n char c = code.charAt(i); \n if (c == '0'){\n //bit is 0\n if(traverser.getLeftPtr() == null){\n traverser.setLeftPtr(new BranchNode(999999, null, null));\n }\n traverser = traverser.getLeftPtr();\n }\n else{\n //bit is 1\n if(traverser.getRightPtr() == null){\n traverser.setRightPtr(new BranchNode(999999, null, null));\n }\n traverser = traverser.getRightPtr();\n }\n }\n //Put data in the last node by creating a new leafNode\n char c = code.charAt(code.length() - 1);\n if(c == '0'){\n traverser.setLeftPtr(new LeafNode(9999999, numberData, null, null));\n }\n else{\n traverser.setRightPtr(new LeafNode(9999999, numberData, null, null));\n }\n }\n }\n } \n catch (IOException ex) {\n Logger.getLogger(FrequencyTableBuilder.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public HuffmanCoding(String text) {\n\t\t// TODO fill this in.\n\t\tMap<Character, Integer> frequencyMap = new HashMap<>();\n\t\tint textLength = text.length();\n\n\t\tfor (int i = 0; i < textLength; i++) {\n\t\t\tchar character = text.charAt(i);\n\t\t\tif (!frequencyMap.containsKey(character)) {\n\t\t\t\tfrequencyMap.put(character, 1);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tint newFreq = frequencyMap.get(character) + 1;\n\t\t\t\tfrequencyMap.replace(character, newFreq);\n\t\t\t}\n\t\t}\n\n\t\tPriorityQueue<Node> queue = new PriorityQueue<>();\n\n\t\tIterator iterator = frequencyMap.entrySet().iterator();\n\t\twhile (iterator.hasNext()) {\n\t\t\tMap.Entry<Character, Integer> pair = (Map.Entry<Character, Integer>) iterator.next();\n\t\t\tNode node = new Node(null, null, pair.getKey(), pair.getValue());\n\t\t\tqueue.add(node);\n\t\t}\n\n\t\twhile (queue.size() > 1) {\n\t\t\tNode node1 = queue.poll();\n\t\t\tNode node2 = queue.poll();\n\t\t\tNode parent = new Node(node1, node2, '\\t', node1.getFrequency() + node2.getFrequency());\n\t\t\tqueue.add(parent);\n\t\t}\n\t\thuffmanTree = queue.poll();\n\t\tSystem.out.println(\"firstNode: \"+ huffmanTree);\n\t\tcodeTable(huffmanTree);\n\n\t\t//Iterator iterator1 = encodingTable.entrySet().iterator();\n\n\t\t/*\n\t\twhile (iterator1.hasNext()) {\n\t\t\tMap.Entry<Character, String> pair = (Map.Entry<Character, String>) iterator1.next();\n\t\t\tSystem.out.println(pair.getKey() + \" : \" + pair.getValue() + \"\\n\");\n\t\t}\n\t\t*/\n\n\t\t//System.out.println(\"Hashmap.size() : \" + frequencyMap.size());\n\n\t}", "public Node createHuffmanTree(File f) throws FileNotFoundException {\r\n File file = f;\r\n FileInputStream fi = new FileInputStream(file);\r\n List<Node> nodes = new LinkedList<>();\r\n\r\n// Creating a map, where the key is characters and the values are the number of characters in the file\r\n Map<Character, Integer> charsMap = new LinkedHashMap<>();\r\n try (Reader reader = new InputStreamReader(fi);) {\r\n int r;\r\n while ((r = reader.read()) != -1) {\r\n char nextChar = (char) r;\r\n\r\n if (charsMap.containsKey(nextChar))\r\n charsMap.compute(nextChar, (k, v) -> v + 1);\r\n else\r\n charsMap.put(nextChar, 1);\r\n }\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n//// Sort the map by value and create a list\r\n// charsMap = charsMap.entrySet().stream().sorted(Map.Entry.comparingByValue(Comparator.reverseOrder())).collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (e1, e2) -> e1, LinkedHashMap::new));\r\n\r\n// Creating a list of Nodes from a map\r\n for (Character ch : charsMap.keySet()) {\r\n nodes.add(new Node(ch, charsMap.get(ch), null, null));\r\n }\r\n\r\n// Creating a Huffman tree\r\n while (nodes.size() > 1) {\r\n Node firstMin = nodes.stream().min(Comparator.comparingInt(n -> n.count)).get();\r\n nodes.remove(firstMin);\r\n Node secondMin = nodes.stream().min(Comparator.comparingInt(n -> n.count)).get();\r\n nodes.remove(secondMin);\r\n\r\n Node newNode = new Node(null, firstMin.count + secondMin.count, firstMin, secondMin);\r\n newNode.left.count = null;\r\n newNode.right.count = null;\r\n nodes.add(newNode);\r\n nodes.remove(firstMin);\r\n nodes.remove(secondMin);\r\n }\r\n\r\n// Why first? See algorithm!\r\n nodes.get(0).count = null;\r\n return nodes.get(0);\r\n }", "public HuffmanCoding(String text) {\n\t\t// TODO fill this in.\n\t\ttextArray = text.toCharArray();\n\n\t\tPriorityQueue<Leaf> queue = new PriorityQueue<>(new Comparator<Leaf>() {\n\t\t\t@Override\n\t\t\tpublic int compare(Leaf a, Leaf b) {\n\t\t\t\tif (a.frequency > b.frequency) {\n\t\t\t\t\treturn 1;\n\t\t\t\t} else if (a.frequency < b.frequency) {\n\t\t\t\t\treturn -1;\n\t\t\t\t} else {\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tfor (char c : textArray) {\n\t\t\tif (chars.containsKey(c)) {\n\t\t\t\tint freq = chars.get(c);\n\t\t\t\tfreq = freq + 1;\n\t\t\t\tchars.remove(c);\n\t\t\t\tchars.put(c, freq);\n\t\t\t} else {\n\t\t\t\tchars.put(c, 1);\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(\"tree print\");\t\t\t\t\t\t\t\t// print method begin\n\n\t\tfor(char c : chars.keySet()){\n\t\t\tint freq = chars.get(c);\n\t\t\tSystem.out.println(c + \" \" + freq);\n\t\t}\n\n\t\tint total = 0;\n\t\tfor(char c : chars.keySet()){\n\t\t\ttotal = total + chars.get(c);\n\t\t}\n\t\tSystem.out.println(\"total \" + total);\t\t\t\t\t\t\t// ends\n\n\t\tfor (char c : chars.keySet()) {\n\t\t\tLeaf l = new Leaf(c, chars.get(c), null, null);\n\t\t\tqueue.offer(l);\n\t\t}\n\n\t\twhile (queue.size() > 1) {\n\t\t\tLeaf a = queue.poll();\n\t\t\tLeaf b = queue.poll();\n\n\t\t\tint frequency = a.frequency + b.frequency;\n\n\t\t\tLeaf leaf = new Leaf('\\0', frequency, a, b);\n\n\t\t\tqueue.offer(leaf);\n\t\t}\n\n\t\tif(queue.size() == 1){\n\t\t\tthis.root = queue.peek();\n\t\t}\n\t}", "public HuffmanNode(int freq, int ascii){\r\n this.freq = freq;\r\n this.ascii = ascii;\r\n }", "public HuffmanCoding(String text) {\n\t\t// TODO fill this in.\n\t\tif (text.length() <= 1)\n\t\t\treturn;\n\n\t\t//Create a the frequency huffman table\n\t\tHashMap<Character, huffmanNode> countsMap = new HashMap<>();\n\t\tfor (int i = 0; i < text.length(); i++) {\n\t\t\tchar c = text.charAt(i);\n\t\t\tif (countsMap.containsKey(c))\n\t\t\t\tcountsMap.get(c).huffmanFrequency++;\n\t\t\telse\n\t\t\t\tcountsMap.put(c, new huffmanNode(c, 1));\n\t\t}\n\n\t\t//Build the frequency tree\n\t\tPriorityQueue<huffmanNode> countQueue = new PriorityQueue<>(countsMap.values());\n\t\twhile (countQueue.size() > 1) {\n\t\t\thuffmanNode left = countQueue.poll();\n\t\t\thuffmanNode right = countQueue.poll();\n\t\t\thuffmanNode parent = new huffmanNode('\\0', left.huffmanFrequency + right.huffmanFrequency);\n\t\t\tparent.leftNode = left;\n\t\t\tparent.rightNode = right;\n\n\t\t\tcountQueue.offer(parent);\n\t\t}\n\n\t\thuffmanNode rootNode = countQueue.poll();\n\n\t\t//Assign the codes to each node in the tree\n\t\tStack<huffmanNode> huffmanNodeStack = new Stack<>();\n\t\thuffmanNodeStack.add(rootNode);\n\t\twhile (!huffmanNodeStack.empty()) {\n\t\t\thuffmanNode huffmanNode = huffmanNodeStack.pop();\n\n\t\t\tif (huffmanNode.huffmanValue != '\\0') {\n\t\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\t\thuffmanNode.codeRecord.forEach(sb::append);\n\t\t\t\tString codeSb = sb.toString();\n\n\t\t\t\tencodingTable.put(huffmanNode.huffmanValue, codeSb);\n\t\t\t\tdecodingTable.put(codeSb, huffmanNode.huffmanValue);\n\t\t\t}\n\t\t\telse {\n\t\t\t\thuffmanNode.leftNode.codeRecord.addAll(huffmanNode.codeRecord);\n\t\t\t\thuffmanNode.leftNode.codeRecord.add('0');\n\t\t\t\thuffmanNode.rightNode.codeRecord.addAll(huffmanNode.codeRecord);\n\t\t\t\thuffmanNode.rightNode.codeRecord.add('1');\n\t\t\t}\n\n\t\t\tif (huffmanNode.leftNode != null)\n\t\t\t\thuffmanNodeStack.add(huffmanNode.leftNode);\n\n\t\t\tif (huffmanNode.rightNode != null)\n\t\t\t\thuffmanNodeStack.add(huffmanNode.rightNode);\n\t\t}\n\t}", "private void buildTree() {\n\t\tfinal TreeSet<Tree> treeSet = new TreeSet<Tree>();\n\t\tfor (char i = 0; i < 256; i++) {\n\t\t\tif (characterCount[i] > 0) {\n\t\t\t\ttreeSet.add(new Tree(i, characterCount[i]));\n\t\t\t}\n\t\t}\n\n\t\t// Merge the trees to one Tree\n\t\tTree left;\n\t\tTree right;\n\t\twhile (treeSet.size() > 1) {\n\t\t\tleft = treeSet.pollFirst();\n\t\t\tright = treeSet.pollFirst();\n\t\t\ttreeSet.add(new Tree(left, right));\n\t\t}\n\n\t\t// There is only our final tree left\n\t\thuffmanTree = treeSet.pollFirst();\n\t}", "public HuffmanNode(String v, int f)\n\t{\n\t\tfrequency = f;\n\t\tvalue = v;\n\t\tleft = null;\n\t\tright = null;\n\t}", "public void createHuffmanTree() {\n\t\twhile (pq.getSize() > 1) {\n\t\t\tBinaryTreeInterface<HuffmanData> b1 = pq.removeMin();\n\t\t\tBinaryTreeInterface<HuffmanData> b2 = pq.removeMin();\n\t\t\tHuffmanData newRootData =\n\t\t\t\t\t\t\tnew HuffmanData(b1.getRootData().getFrequency() +\n\t\t\t\t\t\t\t\t\t\t\tb2.getRootData().getFrequency());\n\t\t\tBinaryTreeInterface<HuffmanData> newB =\n\t\t\t\t\t\t\tnew BinaryTree<HuffmanData>(newRootData,\n\t\t\t\t\t\t\t\t\t\t\t(BinaryTree) b1,\n\t\t\t\t\t\t\t\t\t\t\t(BinaryTree) b2);\n\t\t\tpq.add(newB);\n\t\t}\n\t\thuffmanTree = pq.getMin();\n\t}", "public HuffmanNode(int freq){\r\n this(freq, null, null);\r\n }", "public static void main(String args[])\n {\n Scanner s = new Scanner(System.in).useDelimiter(\"\");\n List<node> freq = new SinglyLinkedList<node>();\n \n // read data from input\n while (s.hasNext())\n {\n // s.next() returns string; we're interested in first char\n char c = s.next().charAt(0);\n if (c == '\\n') continue;\n // look up character in frequency list\n node query = new node(c);\n node item = freq.remove(query);\n if (item == null)\n { // not found, add new node\n freq.addFirst(query);\n } else { // found, increment node\n item.frequency++;\n freq.addFirst(item);\n }\n }\n \n // insert each character into a Huffman tree\n OrderedList<huffmanTree> trees = new OrderedList<huffmanTree>();\n for (node n : freq)\n {\n trees.add(new huffmanTree(n));\n }\n \n // merge trees in pairs until one remains\n Iterator ti = trees.iterator();\n while (trees.size() > 1)\n {\n // construct a new iterator\n ti = trees.iterator();\n // grab two smallest values\n huffmanTree smallest = (huffmanTree)ti.next();\n huffmanTree small = (huffmanTree)ti.next();\n // remove them\n trees.remove(smallest);\n trees.remove(small);\n // add bigger tree containing both\n trees.add(new huffmanTree(smallest,small));\n }\n // print only tree in list\n ti = trees.iterator();\n Assert.condition(ti.hasNext(),\"Huffman tree exists.\");\n huffmanTree encoding = (huffmanTree)ti.next();\n encoding.print();\n }", "public HuffmanNode(String key, int value)\n\t{\n\t\tcharacters = key;\n\t\tfrequency = value;\n\t\t\n\t\tleft = null;\n\t\tright = null;\n\t\tparent = null;\n\t\tchecked = false;\n\t}", "public TreeNode(char s, int freq){\n\t\tleftChild = null;\n\t\trightChild = null;\n\t\tkey = s;\n\t\tfrequency = freq;\n\t}", "public Node buildTree(int[] frequency)\n {\n /* Initialize the priority queue */\n pq=new PriorityQueue<Node>(c.size(),comp); \n p=new PriorityQueue<Node>(c.size(),comp); \n /* Create leaf node for each unique character in the string */\n for(int i = 0; i < c.size(); i++)\n { \n pq.offer(new Node(c.get(i), frequency[i], null, null));\n } \n createCopy(pq); \n /* Until there is only one node in the priority queue */\n while(pq.size() > 1)\n { \n /* Minimum frequency is kept in the left */\n Node left = pq.poll();\n /* Next minimum frequency is kept in the right */\n Node right = pq.poll();\n /* Create a new internal node as the parent of left and right */\n pq.offer(new Node('\\0', left.frequency+right.frequency, left, right)); \n } \n /* Return the only node which is the root */\n return pq.poll();\n }", "public static CharNode createCharNode(char character){\n \t\tif(character < charNodeConstants.length){\n \t\t\tCharNode charNode = charNodeConstants[character];\n \t\t\tif(charNode != null) return charNode;\n \t\t\t\n \t\t\treturn (charNodeConstants[character] = new CharNode(character));\n \t\t}\n \t\t\n \t\treturn new CharNode(character);\n \t}", "public Node(char character, int frequency){\n\t\tthis.character = character;\n\t\tthis.frequency = frequency;\n\t}", "public HuffmanCompressor(){\n charList = new ArrayList<HuffmanNode>();\n }", "private static TreeNode<Character> buildTree () {\n // build left half\n TreeNode<Character> s = new TreeNode<Character>('S', \n new TreeNode<Character>('H'),\n new TreeNode<Character>('V'));\n\n TreeNode<Character> u = new TreeNode<Character>('U', \n new TreeNode<Character>('F'),\n null);\n \n TreeNode<Character> i = new TreeNode<Character>('I', s, u);\n\n TreeNode<Character> r = new TreeNode<Character>('R', \n new TreeNode<Character>('L'), \n null);\n\n TreeNode<Character> w = new TreeNode<Character>('W', \n new TreeNode<Character>('P'),\n new TreeNode<Character>('J'));\n\n TreeNode<Character> a = new TreeNode<Character>('A', r, w);\n\n TreeNode<Character> e = new TreeNode<Character>('E', i, a);\n\n // build right half\n TreeNode<Character> d = new TreeNode<Character>('D', \n new TreeNode<Character>('B'),\n new TreeNode<Character>('X'));\n\n TreeNode<Character> k = new TreeNode<Character>('K', \n new TreeNode<Character>('C'),\n new TreeNode<Character>('Y'));\n\n TreeNode<Character> n = new TreeNode<Character>('N', d, k);\n\n\n TreeNode<Character> g = new TreeNode<Character>('G', \n new TreeNode<Character>('Z'),\n new TreeNode<Character>('Q'));\n\n TreeNode<Character> o = new TreeNode<Character>('O');\n\n TreeNode<Character> m = new TreeNode<Character>('M', g, o);\n\n TreeNode<Character> t = new TreeNode<Character>('T', n, m);\n\n // build the root\n TreeNode<Character> root = new TreeNode<Character>(null, e, t);\n return root;\n }", "public HuffmanTree(HuffmanPair element) {\r\n\t\tsuper(element);\r\n\t}", "public static void main(String[] args) throws FileNotFoundException, IOException {\n\t\tString input = \"\";\r\n\r\n\t\t//읽어올 파일 경로\r\n\t\tString filePath = \"C:/Users/user/Desktop/data13_huffman.txt\";\r\n\r\n\t\t//파일에서 읽어옴\r\n\t\ttry(FileInputStream fStream = new FileInputStream(filePath);){\r\n\t\t\tbyte[] readByte = new byte[fStream.available()];\r\n\t\t\twhile(fStream.read(readByte) != -1);\r\n\t\t\tfStream.close();\r\n\t\t\tinput = new String(readByte);\r\n\t\t}\r\n\r\n\t\t//빈도수 측정 해시맵 생성\r\n\t\tHashMap<Character, Integer> frequency = new HashMap<>();\r\n\t\t//최소힙 생성\r\n\t\tList<Node> nodes = new ArrayList<>();\r\n\t\t//테이블 생성 해시맵\r\n\t\tHashMap<Character, String> table = new HashMap<>();\r\n\r\n\t\t//노드와 빈도수 측정\r\n\t\tfor(int i = 0; i < input.length(); i++) {\r\n\t\t\tif(frequency.containsKey(input.charAt(i))) {\r\n\t\t\t\t//이미 있는 값일 경우 빈도수를 1 증가\r\n\t\t\t\tchar currentChar = input.charAt(i);\r\n\t\t\t\tfrequency.put(currentChar, frequency.get(currentChar) + 1);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t//키를 생성해서 넣어줌\r\n\t\t\t\tfrequency.put(input.charAt(i), 1);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//최소 힙에 저장\r\n\t\tfor(Character key : frequency.keySet()) \r\n\t\t\tnodes.add(new Node(key, frequency.get(key), null, null));\r\n\t\t\t\t\r\n\t\t//최소힙으로 정렬\r\n\t\tbuildMinHeap(nodes);\r\n\r\n\t\t//huffman tree를 만드는 함수 실행\r\n\t\tNode resultNode = huffman(nodes);\r\n\r\n\t\t//파일에 씀 (table)\r\n\t\ttry(FileWriter fw = new FileWriter(\"201702034_table.txt\")){\r\n\t\t\tmakeTable(table, resultNode, \"\");\r\n\t\t\tfor(Character key : table.keySet()) {\r\n\t\t\t\t//System.out.println(key + \" : \" + table.get(key));\r\n\t\t\t\tfw.write(key + \" : \" + table.get(key) + \"\\n\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//파일에 씀 (encoded code)\r\n\t\ttry(FileWriter fw = new FileWriter(\"201702034_encoded.txt\")){\r\n\t\t\tString allString = \"\";\r\n\t\t\t\r\n\t\t\tfor(int i = 0; i < input.length(); i++)\r\n\t\t\t\tallString += table.get(input.charAt(i));\r\n\r\n\t\t\t//System.out.println(allString);\r\n\t\t\tfw.write(allString);\r\n\t\t}\r\n\t}", "public static HuffmanNode createTree(HuffmanNode[] nodeArr){\n HuffmanNode[] garbageArr = nodeArr;\n while(garbageArr.length != 1){\n HuffmanNode[] tempArr = new HuffmanNode[garbageArr.length-1];\n tempArr[0] = combineNodes(garbageArr[0], garbageArr[1]);\n for(int i = 1; i < garbageArr.length-1; i++){\n tempArr[i] = garbageArr[i+1];\n }\n garbageArr = freqSort(tempArr);\n }\n return garbageArr[0];\n }", "public HuffmanNode(int freq, HuffmanNode left, HuffmanNode right){\r\n this.freq = freq;\r\n this.left = left;\r\n this.right = right;\r\n }", "private void buildBinaryTree() {\n log.info(\"Constructing priority queue\");\n Huffman huffman = new Huffman(cache.vocabWords());\n huffman.build();\n\n log.info(\"Built tree\");\n\n }", "private HuffmanNode buildTree(int n) {\r\n \tfor (int i = 1; i <= n; i++) {\r\n \t\tHuffmanNode node = new HuffmanNode();\r\n \t\tnode.left = pQueue.poll();\r\n \t\tnode.right = pQueue.poll();\r\n \t\tnode.frequency = node.left.frequency + node.right.frequency;\r\n \t\tpQueue.add(node);\r\n \t}\r\n return pQueue.poll();\r\n }", "@Test\r\n public void testEncode() throws Exception {\r\n System.out.println(\"encode\");\r\n String message = \"furkan\";\r\n \r\n HuffmanTree Htree = new HuffmanTree();\r\n\r\n HuffmanTree.HuffData[] symbols = {\r\n new HuffmanTree.HuffData(186, '_'),\r\n new HuffmanTree.HuffData(103, 'e'),\r\n new HuffmanTree.HuffData(80, 't'),\r\n new HuffmanTree.HuffData(64, 'a'),\r\n new HuffmanTree.HuffData(63, 'o'),\r\n new HuffmanTree.HuffData(57, 'i'),\r\n new HuffmanTree.HuffData(57, 'n'),\r\n new HuffmanTree.HuffData(51, 's'),\r\n new HuffmanTree.HuffData(48, 'r'),\r\n new HuffmanTree.HuffData(47, 'h'),\r\n new HuffmanTree.HuffData(32, 'b'),\r\n new HuffmanTree.HuffData(32, 'l'),\r\n new HuffmanTree.HuffData(23, 'u'),\r\n new HuffmanTree.HuffData(22, 'c'),\r\n new HuffmanTree.HuffData(21, 'f'),\r\n new HuffmanTree.HuffData(20, 'm'),\r\n new HuffmanTree.HuffData(18, 'w'),\r\n new HuffmanTree.HuffData(16, 'y'),\r\n new HuffmanTree.HuffData(15, 'g'),\r\n new HuffmanTree.HuffData(15, 'p'),\r\n new HuffmanTree.HuffData(13, 'd'),\r\n new HuffmanTree.HuffData(8, 'v'),\r\n new HuffmanTree.HuffData(5, 'k'),\r\n new HuffmanTree.HuffData(1, 'j'),\r\n new HuffmanTree.HuffData(1, 'q'),\r\n new HuffmanTree.HuffData(1, 'x'),\r\n new HuffmanTree.HuffData(1, 'z')\r\n };\r\n\r\n Htree.buildTree(symbols);\r\n \r\n String expResult = \"1100110000100101100001110100111\";\r\n String result = Htree.encode(message, Htree.huffTree);\r\n \r\n assertEquals(expResult, result);\r\n \r\n }", "public interface ITreeMaker {\n /**\n * Return the Huffman/coding tree.\n * @return the Huffman tree\n */\n public HuffTree makeHuffTree(InputStream stream) throws IOException;\n}", "public void encodeTreeHelper(HuffmanNode node, StringBuilder builder){\n if(node.getLeft() == null && node.getRight()== null && !node.getCharAt().equals(null))\n encodedTable.put(node.getCharAt(),builder.toString());\n else{\n encodeTreeHelper(node.getLeft(), builder.append(\"0\"));\n encodeTreeHelper(node.getRight(), builder.append(\"1\"));\n }\n \n if(builder.length()>0)\n builder.deleteCharAt(builder.length()-1);\n }", "public HuffmanNode (HuffmanToken token) {\n \ttotalFrequency = token.getFrequency();\n \ttokens = new ArrayList<HuffmanToken>();\n \ttokens.add(token);\n \tleft = null;\n \tright = null;\n }", "public static Node make_huffmann_tree(List li){\n //Sorting list in increasing order of its letter frequency \n li.sort(new comp());\n Node temp=null;\n Iterator it=li.iterator();\n //System.out.println(li.size());\n //Loop for making huffman tree till only single node remains in list\n while(true){\n temp=new Node();\n //a and b are Node which are to be combine to make its parent\n Node a=new Node(),b=new Node();\n a=null;b=null;\n //checking if list is eligible for combining or not\n //here first assignment of it.next in a will always be true as list till end will\n //must have atleast one node\n a=(Node)it.next();\n //Below condition is to check either list has 2nd node or not to combine \n //If this condition will be false, then it means construction of huffman tree is completed\n if(it.hasNext()){b=(Node)it.next();}\n //Combining first two smallest nodes in list to make its parent whose frequncy \n //will be equals to sum of frequency of these two nodes \n if(b!=null){\n temp.freq=a.freq+b.freq;a.data=0;b.data=1;//assigining 0 and 1 to left and right nodes\n temp.left=a;temp.right=b;\n //after combing, removing first two nodes in list which are already combined\n li.remove(0);//removes first element which is now combined -step1\n li.remove(0);//removes 2nd element which comes on 1st position after deleting first in step1\n li.add(temp);//adding new combined node to list\n //print_list(li); //For visualizing each combination step\n }\n //Sorting after combining to again repeat above on sorted frequency list\n li.sort(new comp()); \n it=li.iterator();//resetting list pointer to first node (head/root of tree)\n if(li.size()==1){return (Node)it.next();} //base condition ,returning root of huffman tree \n }\n}", "public HuffTree makeHuffTree(InputStream stream) throws IOException;", "public CS232LinkedBinaryTree<Integer, Character> buildHuffTree() {\n\n\t\twhile (huffBuilder.size() > 1) {// Until one tree is left...\n\n\t\t\t// Make references to the important trees\n\t\t\tCS232LinkedBinaryTree<Integer, Character> newTree = new CS232LinkedBinaryTree<Integer, Character>();\n\t\t\tCS232LinkedBinaryTree<Integer, Character> firstSubTree = huffBuilder.remove();\n\t\t\tCS232LinkedBinaryTree<Integer, Character> secondSubTree = huffBuilder.remove();\n\n\t\t\t// Create the new root on the new joined tree. Use the character of higher priority.\n\t\t\tCharacter newTreeRootValue = this.getPriorityCharacter(firstSubTree.root.value, secondSubTree.root.value);\n\t\t\tnewTree.add(firstSubTree.root.key + secondSubTree.root.key, newTreeRootValue);\n\n\t\t\t// Join the new root's right side with the first tree\n\t\t\tnewTree.root.right = firstSubTree.root;\n\t\t\tfirstSubTree.root.parent = newTree.root;\n\n\t\t\t// Join the new root's left side with the second tree\n\t\t\tnewTree.root.left = secondSubTree.root;\n\t\t\tsecondSubTree.root.parent = newTree.root;\n\n\t\t\t// put the newly created tree back into the priority queue\n\t\t\thuffBuilder.add(newTree); \n\t\t}\n\t\t/*\n\t\t * At the end of the whole process, we have one final mega-tree. return\n\t\t * it and finally empty the queue!\n\t\t */\n\t\treturn huffBuilder.remove();\n\t}", "public Node(Character letter, int freq, Node left, Node right) {\n\t\t\tthis.letter = letter;\n\t\t\tthis.freq = freq;\n\t\t\tthis.left = left;\n\t\t\tthis.right = right;\n\t\t}", "MinHeapNode newNode(char data, int freq)\r\n\t{\r\n\t MinHeapNode temp = new MinHeapNode();\r\n\t temp.left = temp.right = null;\r\n\t temp.data = data;\r\n\t temp.freq = freq;\r\n\t return temp;\r\n\t}", "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 }", "public HuffmanCode(int[] frequencies) {\n Queue<HuffmanNode> nodeFrequencies = new PriorityQueue<HuffmanNode>();\n for (int i = 0; i < frequencies.length; i++) {\n if (frequencies[i] > 0) {\n nodeFrequencies.add(new HuffmanNode(frequencies[i], (char) i));\n }\n }\n nodeFrequencies = ArrayHuffmanCodeCreator(nodeFrequencies);\n this.front = nodeFrequencies.peek();\n }", "public HuffmanTree(Queue<Node> queue) {\r\n while (queue.size() > 1) {\r\n Node left = queue.poll();\r\n Node right = queue.poll();\r\n Node node = new Node('-', left.f + right.f, left, right);\r\n queue.add(node);\r\n }\r\n this.root = queue.peek();\r\n\r\n //initial two maps\r\n this.initialTable(this.root, \"\");\r\n\r\n }", "public Node(char value) {\n this.value = value;\n this.left = null;\n this.right = null;\n }", "public void insert(HuffmanTree node);", "public static String huffmanCoder(String inputFileName, String outputFileName){\n File inputFile = new File(inputFileName+\".txt\");\n File outputFile = new File(outputFileName+\".txt\");\n File encodedFile = new File(\"encodedTable.txt\");\n File savingFile = new File(\"Saving.txt\");\n HuffmanCompressor run = new HuffmanCompressor();\n \n run.buildHuffmanList(inputFile);\n run.makeTree();\n run.encodeTree();\n run.computeSaving(inputFile,outputFile);\n run.printEncodedTable(encodedFile);\n run.printSaving(savingFile);\n return \"Done!\";\n }", "public Node(String wordIn) {\n MyLogger.writeMessage(\"Constructor called - \" + this.toString(), MyLogger.DebugLevel.CONSTRUCTOR);\n this.word = wordIn;\n this.wordCount = 1;\n this.left = null;\n this.right = null;\n }", "public static void createTree(ArrayList<HuffmanNode> tree) {\n\t\n\t\t//loops through until the tree.\n\t\twhile(tree.size() > 1) {\n\t\t\tCollections.sort(tree);\n\t\t\tHuffmanNode left = tree.get(0);\n\t\t\tHuffmanNode right = tree.get(1);\n\t\t\t\n\t\t\t/*creates the new node and adds it to the arrayList, and removes the two lowest frequency nodes\n\t\t\t * then recursively calls the create method again\n\t\t\t */\n\t\t\ttree.add(new HuffmanNode((right.frequency + left.frequency), left, right));\n\t\t\ttree.remove(0);\n\t\t\ttree.remove(0);\n\t\t\tcreateTree(tree);\n\t\t}\n\t}", "public HuffmanTree(ArrayOrderedList<HuffmanPair> pairsList) {\r\n\r\n\t\t\t\r\n\t\tArrayOrderedList<HuffmanTree> buildList = new ArrayOrderedList<HuffmanTree>();\r\n\t\tIterator<HuffmanPair> iterator = pairsList.iterator();\r\n\t\t\twhile (iterator.hasNext()) {\r\n\t\t\t\tbuildList.add(new HuffmanTree(iterator.next()));\r\n//\t\t\t\tif(buildList.first().getRoot().getElement().getCharacter() == iterator.next().getCharacter())i++;\r\n\t\t\t}\r\n//\t\t\tif (i == buildList.size()) {\r\n//\t\t\t\tArrayOrderedList<HuffmanTree> new_buildList = new ArrayOrderedList<HuffmanTree>();\r\n//\t\t\t\tnew_buildList.add(buildList.first());\r\n//\t\t\t\tbuildList = new_buildList;\r\n//\t\t\t}\r\n//\t\t\telse {\t\r\n\t\t\twhile (buildList.size() > 1) {\r\n\t\t\t\tHuffmanTree lefttree = buildList.removeFirst(); HuffmanTree righttree = buildList.removeFirst();\r\n\t\t\t\t//totalFre = the total weights of both trees.\r\n\t\t\t\tint totalFre = lefttree.getRoot().getElement().getFrequency() + righttree.getRoot().getElement().getFrequency();\r\n\t\t\t\tHuffmanPair root = new HuffmanPair(totalFre);\r\n\t\t\t\tbuildList.add(new HuffmanTree(root, lefttree, righttree));\r\n\t\t\t}\r\n\t\tthis.setRoot(buildList.first().getRoot());\r\n\t}", "public HuffmanCodes() {\n\t\thuffBuilder = new PriorityQueue<CS232LinkedBinaryTree<Integer, Character>>();\n\t\tfileData = new ArrayList<char[]>();\n\t\tfrequencyCount = new int[127];\n\t\thuffCodeVals = new String[127];\n\t}", "public static void main(String[] args)\n {\n\t\t\tHuffman tree= new Huffman();\n \t \t Scanner sc=new Scanner(System.in);\n\t\t\tnoOfFrequencies=sc.nextInt();\n\t\t\t// It adds all the user input values in the tree.\n\t\t\tfor(int i=1;i<=noOfFrequencies;i++)\n\t\t\t{\n\t\t\t\tString temp=sc.next();\n\t\t\t\ttree.add(temp,sc.next());\n\t\t\t}\n\t\tint lengthToDecode=sc.nextInt();\n\t\tString encodedValue=sc.next();\n\t\t// This statement decodes the encoded values.\n\t\ttree.getDecodedMessage(encodedValue);\n\t\tSystem.out.println();\n\t\t}", "public Node(char myLetter, int myCount){\n\t\tletter = myLetter;\n\t\tcount = myCount;\n\t\tleftChild = null;\n\t\trightChild = null;\n\t}", "public static void main(String[] args) {\n Huffman huffman=new Huffman(\"Shevchenko Vladimir Vladimirovich\");\n System.out.println(huffman.getCodeText());//\n //answer:110100001001101011000001001110111110110101100110110001001110101111100011101000011011000100111010111110001110100101110101111100000\n\n huffman.getSizeBits();//размер в битах\n ;//кол-во символов\n System.out.println((double) huffman.getSizeBits()/(huffman.getValueOfCharactersOfText()*8)); //коэффициент сжатия относительно aski кодов\n System.out.println((double) huffman.getSizeBits()/(huffman.getValueOfCharactersOfText()*\n (Math.pow(huffman.getValueOfCharactersOfText(),0.5)))); //коэффициент сжатия относительно равномерного кода. Не учитывается размер таблицы\n System.out.println(huffman.getMediumLenght());//средняя длина кодового слова\n System.out.println(huffman.getDisper());//дисперсия\n\n\n }", "private void constructTree() {\r\n\t\tsortLeaves();\r\n\t\tNode currentNode;\r\n\t\tint index = 0;\r\n\t\t\tdo{\r\n\t\t\t\t// Create a new node with the next two least frequent nodes as its children\r\n\t\t\t\tcurrentNode = new Node(this.treeNodes[0], this.treeNodes[1]); \r\n\t\t\t\taddNewNode(currentNode);\r\n\t\t\t}\r\n\t\t\twhile (this.treeNodes.length > 1); // Until there is only one root node\r\n\t\t\tthis.rootNode = currentNode;\r\n\t\t\tindex++;\r\n\t}", "public void buildHuffmanList(File inputFile){\n try{\n Scanner sc = new Scanner(inputFile);\n while(sc.hasNextLine()){\n\n String line = sc.nextLine();\n for(int i =0;i<line.length();i++){\n \n if(freqTable.isEmpty())\n freqTable.put(line.charAt(i),1);\n else{\n if(freqTable.containsKey(line.charAt(i)) == false)\n freqTable.put(line.charAt(i),1);\n else{\n int oldValue = freqTable.get(line.charAt(i));\n freqTable.replace(line.charAt(i),oldValue+1);\n }\n }\n }\n }\n }\n catch(FileNotFoundException e){\n System.out.println(\"Can't find the file\");\n }\n }", "public Node(int frequency){;\n\t\tthis.frequency = frequency;\n\t\t// we cannot use null since it is our EOF so try \"SOH\" or start of heading.\n\t\t// also setting here does not work ... (hmm)!\n\t\tthis.character = (char) 0x01;\n\t}", "public TrieNode() {children = new HashMap<Character, TrieNode>();hasWord = false;}", "Node(char d) {\n data = d;\n next = null;\n }", "public ABTNode(char s) {\n this.s = s;\n }", "public TreeNode(char data, TreeNode left, TreeNode right) {\r\n\t\t\tthis.data = data;\r\n\t\t\tthis.left = left;\r\n\t\t\tthis.right = right;\r\n\t\t}", "public HuffmanNode(String key, int value, HuffmanNode leftNode, HuffmanNode rightNode)\n\t{\n\t\tthis(key,value);\n\t\tleft = leftNode;\n\t\tright = rightNode;\n\t}", "public HuffmanNode (HuffmanNode left, HuffmanNode right) {\n \ttotalFrequency = left.totalFrequency + right.totalFrequency;\n \ttokens = new ArrayList<HuffmanToken>();\n \ttokens.addAll(left.tokens);\n \ttokens.addAll(right.tokens);\n \tfor(HuffmanToken node: left.tokens)\n \t\tnode.prependBitToCode(false);\n \tfor(HuffmanToken node: right.tokens)\n \t\tnode.prependBitToCode(true);\n \tthis.left = left;\n \tthis.right = right;\n \tCollections.sort(tokens, new HuffmanTokenComparator());\n }", "private TreeNode createTree() {\n // Map<String, String> map = new HashMap<>();\n // map.put(\"dd\", \"qq\");\n // 叶子节点\n TreeNode G = new TreeNode(\"G\");\n TreeNode D = new TreeNode(\"D\");\n TreeNode E = new TreeNode(\"E\", G, null);\n TreeNode B = new TreeNode(\"B\", D, E);\n TreeNode H = new TreeNode(\"H\");\n TreeNode I = new TreeNode(\"I\");\n TreeNode F = new TreeNode(\"F\", H, I);\n TreeNode C = new TreeNode(\"C\", null, F);\n // 构造根节点\n TreeNode root = new TreeNode(\"A\", B, C);\n return root;\n }", "private static TreeNode parseTreeNode(Scanner in)\n {\n int numberOfChildren = in.nextInt();\n int numberOfMetadata = in.nextInt();\n TreeNode newNode = new TreeNode(numberOfChildren, numberOfMetadata);\n\n // Recursively resolve children\n for (int i = 0; i < numberOfChildren; i++)\n {\n newNode.mChildren[i] = parseTreeNode(in);\n }\n\n // Now resolve the metadata by consuming tokens\n for (int i = 0; i < numberOfMetadata; i++)\n {\n newNode.mMetadata[i] = in.nextInt();\n }\n\n return newNode;\n }", "public static TreeNode mkTree(String str) {\n\n int[] arr = StrToIntArray(str);\n TreeNode[] nodes = new TreeNode[arr.length + 1];\n for (int i = 1; i < nodes.length; i++) {\n if (arr[i - 1] != Integer.MAX_VALUE) {\n nodes[i] = new TreeNode(arr[i - 1]);\n } else {\n nodes[i] = null;\n }\n }\n\n TreeNode node = null;\n for (int i = 1; i < nodes.length / 2; i++) {\n node = nodes[i];\n if (node == null) continue;\n node.left = nodes[2 * i];\n node.right = nodes[2 * i + 1];\n }\n return nodes[1];\n }", "public BinaryTree(String expression) {\n \tString[] arr = expression.split(\" \");\n \troot = parse(arr);\n }", "public Node (String newW ) {\n word = newW;\n left = null;\n right = null;\n freq = 0;\n }", "public Decode(String inputFileName, String outputFileName){\r\n try(\r\n BitInputStream in = new BitInputStream(new FileInputStream(inputFileName));\r\n OutputStream out = new FileOutputStream(outputFileName))\r\n {\r\n int[] characterFrequency = readCharacterFrequency(in);//\r\n int frequencySum = Arrays.stream(characterFrequency).sum();\r\n BinNode root = HoffmanTree.HoffmanTreeFactory(characterFrequency).rootNode;\r\n //Generate Hoffman tree and get root\r\n\r\n int bit;\r\n BinNode currentNode = root;\r\n int byteCounter = 0;\r\n\r\n while ((bit = in.readBit()) != -1 & frequencySum >= byteCounter){\r\n //Walk the tree based on the incoming bits\r\n if (bit == 0){\r\n currentNode = currentNode.leftLeg;\r\n } else {\r\n currentNode = currentNode.rightLeg;\r\n }\r\n\r\n //If at end of tree, treat node as leaf and consider key as character instead of weight\r\n if (currentNode.leftLeg == null){\r\n out.write(currentNode.k); //Write character\r\n currentNode = root; //Reset walk\r\n byteCounter++; //Increment byteCounter to protect from EOF 0 fill\r\n }\r\n }\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }", "private HuffmanTempTree makeTree() {\n \tPQHeap queue = makeQueue();\n \tfor (int i = 0; i < frequency.length - 1; i++) {\n \t\tHuffmanTempTree zTree = new HuffmanTempTree(0);\n \t\tElement x = queue.extractMin();\n \t\tElement y = queue.extractMin();\n \t\tint zFreq = x.key + y.key;\n \t\tzTree.merge((HuffmanTempTree) x.data, (HuffmanTempTree) y.data);\n \t\tqueue.insert(new Element(zFreq, zTree));\n \t}\n \treturn (HuffmanTempTree) queue.extractMin().data;\n \t}", "public void createTree() {\n Node<String> nodeB = new Node<String>(\"B\", null, null);\n Node<String> nodeC = new Node<String>(\"C\", null, null);\n Node<String> nodeD = new Node<String>(\"D\", null, null);\n Node<String> nodeE = new Node<String>(\"E\", null, null);\n Node<String> nodeF = new Node<String>(\"F\", null, null);\n Node<String> nodeG = new Node<String>(\"G\", null, null);\n root.leftChild = nodeB;\n root.rightChild = nodeC;\n nodeB.leftChild = nodeD;\n nodeB.rightChild = nodeE;\n nodeC.leftChild = nodeF;\n nodeC.rightChild = nodeG;\n\n }", "public TreeNode(TreeNode left, TreeNode right, int freq){\n\t\tleftChild = left;\n\t\trightChild = right;\n\t\tfrequency = freq;\n\t\tkey = '\\0';\n\t}", "public void run() {\n\n\t\tScanner s = new Scanner(System.in); // A scanner to scan the file per\n\t\t\t\t\t\t\t\t\t\t\t// character\n\t\ttype = s.next(); // The type specifies our wanted output\n\t\ts.nextLine(); \n\n\t\t// STEP 1: Count how many times each character appears.\n\t\tthis.charFrequencyCount(s);\n\n\t\t/*\n\t\t * Type F only wants the frequency. Display it, and we're done (so\n\t\t * return)\n\t\t */\n\t\tif (type.equals(\"F\")) {\n\t\t\tdisplayFrequency(frequencyCount);\n\t\t\treturn;\n\t\t}\n\n\t\t/*\n\t\t * STEP 2: we want to make our final tree (used to get the direction\n\t\t * values) This entails loading up the priority queue and using it to\n\t\t * build the tree.\n\t\t */\n\t\tloadInitQueue();\n\t\tthis.finalHuffmanTree = this.buildHuffTree();\n\t\t\n\t\t/*\n\t\t * Type T wants a level order display of the Tree. Do so, and we're done\n\t\t * (so return)\n\t\t */\n\t\tif (type.equals(\"T\")) {\n\t\t\tthis.finalHuffmanTree.visitLevelOrder(new HuffmanVisitorForTypeT());\n\t\t\treturn;\n\t\t}\n\n\t\t/*\n\t\t * STEP 3: We want the Huffman code values for the characters.\n\t\t * The Huffman codes are specified by the path (directions) from the root.\n\t\t * \n\t\t * Each node in the tree has a path to get to it from the root. The\n\t\t * leaves are especially important because they are the original\n\t\t * characters scanned. Load every node with it's special direction value\n\t\t * (the method saves the original character Huffman codes, the direction\n\t\t * vals).\n\t\t */\n\t\tthis.loadDirectionValues(this.finalHuffmanTree.root);\n\t\t// Type H simply wants the codes... display them and we're done (so\n\t\t// return)\n\t\tif (type.equals(\"H\")) {\n\t\t\tthis.displayHuffCodesTable();\n\t\t\treturn;\n\t\t}\n\n\t\t/*\n\t\t * STEP 4: The Type must be M (unless there was invalid input) since all other cases were exhausted, so now we simply display the file using\n\t\t * the Huffman codes.\n\t\t */\n\t\tthis.displayHuffCodefile();\n\t}", "private BinaryTree<Character> constructTree(){\n if(pq.size() == 1) return pq.poll().data;\n if(pq.size() == 0) return null;\n // Poll the lowest two trees, combine them, then stick them back in the queue.\n Helper<BinaryTree<Character>> temp0 = pq.poll(), temp1 = pq.poll(),\n result = new Helper<>(temp0.priority + temp1.priority, new BinaryTree<>(temp0.data, null , temp1.data));\n pq.add(result);\n // Call again to keep constructing.\n return constructTree();\n }", "private void HuffmanPrinter(HuffmanNode node, String s, PrintStream output) {\n if (node.left == null) {\n output.println((byte) node.getData());\n output.println(s);\n } else {\n HuffmanPrinter(node.left, s + 0, output);\n HuffmanPrinter(node.right, s + 1, output);\n }\n }", "@Test\n public void testGenerarCodigo() {\n System.out.println(\"generarCodigo\");\n Nodo miNodo = null;\n String cadena = \"\";\n Huffman instance = null;\n instance.generarCodigo(miNodo, cadena);\n // TODO review the generated test code and remove the default call to fail.\n \n }", "TreeNode(String str) {\n // Constructor. Make a node containing the specified string.\n // Note that left and right pointers are initially null.\n item = str;\n }", "@Override\n\tpublic TreeNode buildTree(String[] exp) {\n\t\tStack<TreeNode> stk = new Stack<TreeNode>();\n\t\tTreeNode tmpL, tmpR, tmpRoot;\n\t\tint i;\n\n\t\tfor(String s: exp) {\n\t\t\tif(s.equals(EMPTY))\n\t\t\t\tcontinue;\n\t\t\t\n\t\t\ttry {\n\t\t\t\ti = Integer.parseInt(s);\n\t\t\t\tstk.push(new TreeNode(EMPTY + i));\n\t\t\t}\n\t\t\tcatch (NumberFormatException n) {\n\t\t\t\ttmpR = stk.pop();\n\t\t\t\ttmpL = stk.pop();\n\t\t\t\ttmpRoot = new TreeNode(s, tmpL, tmpR);\n\t\t\t\tstk.push(tmpRoot);\n\t\t\t}\n\t\t}\n\n\t\treturn stk.pop();\n\n\t}", "public MorseCodeTree()\r\n\t{\r\n\t\tbuildTree();\r\n\t}", "private void ReadHuffman(String aux) {\n\n Huffman DY = new Huffman();\n Huffman DCB = new Huffman();\n Huffman DCR = new Huffman();\n DY.setFrequencies(FreqY);\n DCB.setFrequencies(FreqCB);\n DCR.setFrequencies(FreqCR);\n\n StringBuilder encoding = new StringBuilder();\n int iteradorMatrix = aux.length() - sizeYc - sizeCBc - sizeCRc;\n for (int x = 0; x < sizeYc; ++x) {\n encoding.append(aux.charAt(iteradorMatrix));\n ++iteradorMatrix;\n }\n Ydes = DY.decompressHuffman(encoding.toString());\n encoding = new StringBuilder();\n for (int x = 0; x < sizeCBc; ++x) {\n encoding.append(aux.charAt(iteradorMatrix));\n ++iteradorMatrix;\n }\n CBdes = DCB.decompressHuffman(encoding.toString());\n encoding = new StringBuilder();\n for (int x = 0; x < sizeCRc; ++x) {\n encoding.append(aux.charAt(iteradorMatrix));\n ++iteradorMatrix;\n }\n CRdes = DCR.decompressHuffman(encoding.toString());\n }", "private Node CreateTree() {\n\t\tScanner sc = new Scanner(System.in);\n\t\tQueue<Node> q = new LinkedList<>();\n\t\tint item = sc.nextInt();\n\t\tNode nn = new Node();\n\t\tnn.val = item;\n\t\troot = nn;\n\t\tq.add(nn);\n\t\twhile (!q.isEmpty()) {\n\t\t\tNode rv = q.poll();\n\t\t\tint c1 = sc.nextInt();\n\t\t\tint c2 = sc.nextInt();\n\t\t\tif (c1 != -1) {\n\t\t\t\tNode node = new Node();\n\t\t\t\tnode.val = c1;\n\t\t\t\trv.left = node;\n\t\t\t\tq.add(node);\n\t\t\t}\n\t\t\tif (c2 != -1) {\n\t\t\t\tNode node = new Node();\n\t\t\t\tnode.val = c2;\n\t\t\t\trv.right = node;\n\t\t\t\tq.add(node);\n\t\t\t}\n\t\t}\n\n\t\treturn root;\n\n\t}", "public void buildTree(HuffData[] symbols) {\n //Create a new priorityqueue of type BinaryTree<HuffData> the size of \n //the number of symbols passed in\n Queue<BinaryTree<HuffData>> theQueue = new PriorityQueue<BinaryTree<HuffData>>(symbols.length, new CompareHuffmanTrees());\n //For each symbol in the symbols array\n for (HuffData nextSymbol : symbols) {\n //Create a new binary tree with the symbol\n BinaryTree<HuffData> aBinaryTree = new BinaryTree<HuffData>(nextSymbol, null, null);\n //Offer the new binary tree to the queue\n theQueue.offer(aBinaryTree);\n }\n //While there are still more than one items in the queue\n while(theQueue.size() > 1) {\n BinaryTree<HuffData> left = theQueue.poll(); //Take the top off the queue\n BinaryTree<HuffData> right = theQueue.poll(); //Take the new top off the queue\n int wl = left.getData().weight; //Get the weight of the left BinaryTree\n int wr = left.getData().weight; //Get the weight of the right BinaryTree\n //Create a new HuffData object with the weight as the sum of the left\n //and right and a null symbol\n HuffData sum = new HuffData(wl + wr, null); \n //Create a new BinaryTree with the sum HuffData and the left and right\n //as the left and right children\n BinaryTree<HuffData> newTree = new BinaryTree<HuffData>(sum, left, right);\n //Offer the sum binarytree back to the queue\n theQueue.offer(newTree);\n }\n //Take the last item off the queue\n huffTree = theQueue.poll();\n \n //Initalize the EncodeData array to be the same length as the passed in symbols\n encodings = new EncodeData[symbols.length];\n }", "public static HuffmanNode[] createNodes(int[] freqNums){\n HuffmanNode[] nodeArr = new HuffmanNode[94];\n for(int i = 0; i < freqNums.length; i++){\n nodeArr[i] = new HuffmanNode((char)(i+32), freqNums[i], null, null);\n }\n return nodeArr;\n }", "public static ArrayList<HuffmanNode> nodeGenerator(String inputName, String outputName) throws IOException {\r\n\t\tFileReader input = new FileReader(inputName);\r\n\t\tBufferedReader reader = new BufferedReader(input);\r\n\t\t\r\n\t\tint data;\r\n\t\t\r\n\t\twhile((data = reader.read()) != -1) {\r\n\t\t\tif(data < 256) {\r\n\t\t\t\tif(freqArr[data] != null) {\r\n\t\t\t\t\tfreqArr[data].frequency++;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tfreqArr[data] = new FreqData((char) data, 0);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treader.close();\r\n\t\t\t\t\r\n\t\tfor(int x = 0; x < freqArr.length; x++) {\r\n\t\t\tif(freqArr[x] != null) {\r\n\t\t\t\tnodeArrList.add(new HuffmanNode(freqArr[x].data, freqArr[x].frequency));\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tbubbleSort();\r\n\t\t\r\n\t\treturn nodeArrList;\r\n\t}", "public static void huffmanTraverser(HuffmanNode root, String s) {\r\n\t\tif(root == null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif(root.left == null && root.right == null) {\r\n\t\t\tmap.put(root.inChar, s);\r\n\t\t}\r\n\t\t\r\n\t\thuffmanTraverser(root.left, s + \"0\");\r\n\t\thuffmanTraverser(root.right, s + \"1\");\r\n\t}", "public HuffmanNode(HuffmanNode l, HuffmanNode r)\n\t{\n\t\tleft = l;\n\t\tright = r;\n\t\tvalue = l.value() + r.value();\n\t\tfrequency = l.frequency() + r.frequency();\n\t}", "public static void main(String[] args) {\n Scanner teclado = new Scanner(System.in);\r\n String mensajeUsuario;\r\n System.out.println(\"Ingrese su mensaje:\");\r\n mensajeUsuario = teclado.nextLine();\r\n \r\n ArrayList inicial = new ArrayList<Nodo>();\r\n \r\n boolean valido = true;\r\n int contador = 0;\r\n //Se convierte el mensaje a una array de chars\r\n char [] arrayMensaje = mensajeUsuario.toCharArray();\r\n //Se cuenta la frecuencia de cada elemento\r\n for(char i: arrayMensaje){\r\n valido = true;\r\n Iterator itr = inicial.iterator();\r\n //Si el elemento que le toca no fue contado ya, es valido contar su frecuencia\r\n while (itr.hasNext()&&valido){\r\n Nodo element = (Nodo) itr.next();\r\n if (i==element.getCh()){\r\n valido = false;\r\n }\r\n }\r\n //Contar la frecuencia del elemento\r\n if (valido== true){\r\n Nodo temp = new Nodo();\r\n temp.setCh(i);\r\n for (char j:arrayMensaje){\r\n if (j==i){\r\n contador++;\r\n }\r\n }\r\n temp.setFreq(contador);\r\n inicial.add(temp);\r\n contador = 0;\r\n \r\n }\r\n }\r\n //Se recorre la lista generada de nodos para mostrar la frecuencia de cada elemento ene el orden en que aparecen\r\n System.out.println(\"elemento | frecuencia\");\r\n Iterator itr = inicial.iterator();\r\n while (itr.hasNext()){\r\n Nodo element = (Nodo)itr.next();\r\n System.out.println(element.getCh() + \" \"+ element.getFreq());\r\n }\r\n \r\n HuffmanTree huff = new HuffmanTree();\r\n huff.createTree(inicial);\r\n //System.out.println(huff.getRoot().getCh()+\" \"+huff.getRoot().getFreq());\r\n \r\n huff.codificar();\r\n System.out.println(\"elemento | frecuencia | codigo\");\r\n Iterator itrf= huff.getListaH().iterator();\r\n while(itrf.hasNext()){\r\n Nodo pivotal = (Nodo)itrf.next();\r\n System.out.println(pivotal.getCh() + \" \"+ pivotal.getFreq()+ \" \"+ pivotal.getCadena()); \r\n }\r\n \r\n System.out.println(\"Ingrese un codigo en base a la tabla anterior, separando por espacios cada nuevo caracter\");\r\n mensajeUsuario = teclado.nextLine();\r\n mensajeUsuario.indexOf(\" \");\r\n String mensajeFinal = \"\";\r\n String letra = \" \";\r\n String[] arrayDecode = mensajeUsuario.split(\" \");\r\n boolean codigoValido = true;\r\n for (String i: arrayDecode){\r\n if (codigoValido){\r\n letra = huff.decodificar(i);\r\n }\r\n if (letra.length()>5){\r\n codigoValido = false;\r\n }\r\n else {\r\n mensajeFinal = mensajeFinal.concat(letra);\r\n }\r\n }\r\n \r\n if (codigoValido){\r\n System.out.println(mensajeFinal);\r\n }\r\n else {\r\n System.out.println(\"El codigo ingresado no es valido\");\r\n }\r\n \r\n \r\n }", "public static void main(String[] args) throws IOException {\n\n HuffmanTree huffman = null;\n int value;\n String inputString = null, codedString = null;\n\n while (true) {\n System.out.print(\"Enter first letter of \");\n System.out.print(\"enter, show, code, or decode: \");\n int choice = getChar();\n switch (choice) {\n case 'e':\n System.out.println(\"Enter text lines, terminate with $\");\n inputString = getText();\n printAdjustedInputString(inputString);\n huffman = new HuffmanTree(inputString);\n printFrequencyTable(huffman.frequencyTable);\n break;\n case 's':\n if (inputString == null)\n System.out.println(\"Please enter string first\");\n else\n huffman.encodingTree.displayTree();\n break;\n case 'c':\n if (inputString == null)\n System.out.println(\"Please enter string first\");\n else {\n codedString = huffman.encodeAll(inputString);\n System.out.println(\"Code:\\t\" + codedString);\n }\n break;\n case 'd':\n if (inputString == null)\n System.out.println(\"Please enter string first\");\n else if (codedString == null)\n System.out.println(\"Please enter 'c' for code first\");\n else {\n System.out.println(\"Decoded:\\t\" + huffman.decode(codedString));\n }\n break;\n default:\n System.out.print(\"Invalid entry\\n\");\n }\n }\n }", "public TreeNode(TreeNode left, TreeNode right, char operand){\n\t\tthis.left = left;\n\t\tthis.right = right;\n\t\tthis.operand = operand;\n\t\tthis.type = \"op\";\n\n\t}", "private Node getNode(char c) {\n if (!alreadyExists(c)) {\n Node innerNode = new Node(null, 1);\n Node newNode = new Node(String.valueOf(c), 1);\n //make the newly inserted node as new\n newNode.isNew = true;\n\n innerNode.left = nytNode;\n innerNode.right = newNode;\n innerNode.parent = nytNode.parent;\n if (nytNode.parent == null) {\n //first node\n root = innerNode;\n\n } else {\n nytNode.parent.left = innerNode;\n }\n nytNode.parent = innerNode;\n newNode.parent = innerNode;\n\n return innerNode.parent;\n }\n //char exists, get the existing node\n return findNode(c);\n }", "public BinaryTree(){}", "private QuestionNode readTree(Scanner input){\n String type = input.nextLine();\n String data = input.nextLine();\n QuestionNode current = new QuestionNode(data);\n if(!type.equals(\"A:\")) {\n current.left = readTree(input);\n current.right = readTree(input);\n }\n return current;\n }", "BinaryTree() {\n this.size = 0;\n Scanner in = new Scanner(System.in);\n this.root = buildBinaryTree(null, in, false);\n }", "public TrieNode() {\n children = new HashMap<Character, TrieNode>();\n hasWord = false;\n }", "public TrieNode() {\n map = new HashMap<Character, TrieNode>();\n isLeaf = false;\n }", "void makeTree()\n \t{\n \t\t\t \n \t\tobj.insert(5,\"spandu\");\n \tobj.insert(4,\"anshu\");\n \tobj.insert(3,\"anu\");\n \tobj.insert(6,\"himani\");\n \t\t\n \t}", "public Node(Character charId) {\n this.charId = charId;\n }", "public static Node createTree(int data, String pString, int[] arr) {\n\n // Invalid input as alphabets maps from 1 to 26\n if (data > 26)\n return null;\n\n // Parent String + String for this node\n String dataToStr = pString + alphabet[data];\n\n Node root = new Node(dataToStr);\n\n // if arr.length is 0 means we are done\n if (arr.length != 0) {\n data = arr[0];\n\n // new array will be from index 1 to end as we are consuming\n // first index with this node\n int newArr[] = Arrays.copyOfRange(arr, 1, arr.length);\n\n // left child\n root.left = createTree(data, dataToStr, newArr);\n\n // right child will be null if size of array is 0 or 1\n if (arr.length > 1) {\n\n data = arr[0] * 10 + arr[1];\n\n // new array will be from index 2 to end as we\n // are consuming first two index with this node\n newArr = Arrays.copyOfRange(arr, 2, arr.length);\n\n root.right = createTree(data, dataToStr, newArr);\n }\n }\n return root;\n }", "public static void expand() {\n Node root = readTrie();\n\n // number of bytes to write\n int length = BinaryStdIn.readInt();\n\n // decode using the Huffman trie\n for (int i = 0; i < length; i++) {\n Node x = root;\n while (!x.isLeaf()) {\n boolean bit = BinaryStdIn.readBoolean();\n if (bit) x = x.right;\n else x = x.left;\n }\n BinaryStdOut.write(x.ch, 8);\n }\n BinaryStdOut.close();\n }", "private static void fillTree(Branch side, Scanner scanner, BinaryNode<String> parent) {\r\n\t\t//If the scanner has a next line, take in the line and see if it is \"NULL\". If it is NULL, do nothing (Base case). Else, set the left or right child\r\n\t\t//to a BinaryNode containing the next string taken in by the scanner depending on the side the method was called with. \r\n\t\t//Then execute two recursive calls to fill out the rest of that side of the tree..\r\n\t\tif(scanner.hasNext()) {\r\n\t\t\tBinaryNode <String> entry = new BinaryNode<String>(scanner.nextLine());\r\n\t\t\t//Base case: If the line is \"NULL\", do nothing\r\n\t\t\tif(entry.getData().equals(\"NULL\")) {}\r\n\t\t\telse {\r\n\t\t\t\t//If the side is LEFT, set the left node to the entry\r\n\t\t\t\tif(side == Branch.LEFT) \r\n\t\t\t\t\tparent.setLeftChild(entry);\r\n\t\t\t\t//If the side is RIGHT, set the right node to the entry\r\n\t\t\t\telse if(side == Branch.RIGHT) \r\n\t\t\t\t\tparent.setRightChild(entry);\r\n\t\t\t\t//Call the method for the left and right sides again to fill out the rest of that side of the tree\r\n\t\t\t\tfillTree(Branch.LEFT, scanner, entry);\r\n\t\t\t\tfillTree(Branch.RIGHT, scanner, entry);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void loadInitQueue() {\n\t\t// go through every character\n\t\tfor (int i = 0; i < frequencyCount.length; i++) { \n\t\t\t// check to see if it has appeared at least once.\n\t\t\tif (frequencyCount[i] != 0) { \n\t\t\t\t// if so, make a tree for it and add it to the priority queue.\n\t\t\t\tCS232LinkedBinaryTree<Integer, Character> curTree = new CS232LinkedBinaryTree<Integer, Character>();\n\t\t\t\tcurTree.add(frequencyCount[i], (char) i);\n\t\t\t\thuffBuilder.add(curTree);\n\t\t\t}\n\t\t}\n\t}" ]
[ "0.7609883", "0.7273075", "0.7256497", "0.7162151", "0.7020763", "0.70153683", "0.7004681", "0.6926964", "0.6910097", "0.68125015", "0.6712049", "0.6711897", "0.6623984", "0.660072", "0.6549731", "0.65246934", "0.6457774", "0.6449233", "0.6443494", "0.6418679", "0.641247", "0.63921386", "0.637981", "0.63183063", "0.63043356", "0.6274134", "0.62591946", "0.6207877", "0.6169632", "0.61455005", "0.6125212", "0.61141515", "0.60540885", "0.6050692", "0.6017364", "0.59653705", "0.5962365", "0.59373134", "0.59338474", "0.5925155", "0.5923417", "0.58968115", "0.5830966", "0.5818426", "0.5815602", "0.578621", "0.5779547", "0.5779239", "0.5778118", "0.57725316", "0.57691", "0.5756899", "0.57549834", "0.57422334", "0.57351506", "0.5705154", "0.5687973", "0.5687334", "0.568315", "0.56772184", "0.56662625", "0.5657669", "0.5637682", "0.5620896", "0.5596347", "0.55898577", "0.55884933", "0.55881053", "0.55763364", "0.5547992", "0.55432844", "0.55403847", "0.55327237", "0.55312765", "0.5523219", "0.5491549", "0.5486493", "0.54823965", "0.5481781", "0.5476672", "0.54353845", "0.5430589", "0.54190904", "0.5415901", "0.5415215", "0.540049", "0.5378572", "0.5378288", "0.536279", "0.5360386", "0.53567874", "0.5347271", "0.53350943", "0.53342015", "0.5328596", "0.53061503", "0.52934766", "0.5292183", "0.52761173", "0.5264095" ]
0.7782593
0
A private helper method that is called when the int[] constructor is used. Creates a Huffman tree. Takes in a priorityQueue and returns a priorityQueue.
private Queue<HuffmanNode> ArrayHuffmanCodeCreator(Queue<HuffmanNode> frequencies) { while (frequencies.size() > 1) { HuffmanNode first = frequencies.poll(); HuffmanNode second = frequencies.poll(); HuffmanNode tempNode = new HuffmanNode(first.getFrequency() + second.getFrequency()); tempNode.left = first; tempNode.right = second; frequencies.add(tempNode); } return frequencies; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void constructTree(){\n PriorityQueue<HCNode> queue=new PriorityQueue<HCNode>();\n \n for(int i=0;i<MAXSIZE;i++){\n if(NOZERO){\n if(occTable[i]!=0){\n HCNode nnode=new HCNode(\"\"+(char)(i-DIFF),occTable[i], null);\n queue.add(nnode);\n }\n }else{\n HCNode nnode=new HCNode(\"\"+(char)(i-DIFF),occTable[i], null);\n queue.add(nnode);\n }\n }\n //constructing the Huffman Tree\n HCNode n1=null,n2=null;\n while(((n2=queue.poll())!=null) && ((n1=queue.poll())!=null)){\n HCNode nnode=new HCNode(n1.str+n2.str,n1.occ+n2.occ, null);\n nnode.left=n1;nnode.right=n2;\n n1.parent=nnode;n2.parent=nnode;\n queue.add(nnode);\n }\n if(n1==null&&n2==null){\n System.out.println(\"oops\");\n }\n if(n1!=null)\n root=n1;\n else\n root=n2;\n }", "public void createHuffmanTree() {\n\t\twhile (pq.getSize() > 1) {\n\t\t\tBinaryTreeInterface<HuffmanData> b1 = pq.removeMin();\n\t\t\tBinaryTreeInterface<HuffmanData> b2 = pq.removeMin();\n\t\t\tHuffmanData newRootData =\n\t\t\t\t\t\t\tnew HuffmanData(b1.getRootData().getFrequency() +\n\t\t\t\t\t\t\t\t\t\t\tb2.getRootData().getFrequency());\n\t\t\tBinaryTreeInterface<HuffmanData> newB =\n\t\t\t\t\t\t\tnew BinaryTree<HuffmanData>(newRootData,\n\t\t\t\t\t\t\t\t\t\t\t(BinaryTree) b1,\n\t\t\t\t\t\t\t\t\t\t\t(BinaryTree) b2);\n\t\t\tpq.add(newB);\n\t\t}\n\t\thuffmanTree = pq.getMin();\n\t}", "private void buildBinaryTree() {\n log.info(\"Constructing priority queue\");\n Huffman huffman = new Huffman(cache.vocabWords());\n huffman.build();\n\n log.info(\"Built tree\");\n\n }", "private HuffmanTempTree makeTree() {\n \tPQHeap queue = makeQueue();\n \tfor (int i = 0; i < frequency.length - 1; i++) {\n \t\tHuffmanTempTree zTree = new HuffmanTempTree(0);\n \t\tElement x = queue.extractMin();\n \t\tElement y = queue.extractMin();\n \t\tint zFreq = x.key + y.key;\n \t\tzTree.merge((HuffmanTempTree) x.data, (HuffmanTempTree) y.data);\n \t\tqueue.insert(new Element(zFreq, zTree));\n \t}\n \treturn (HuffmanTempTree) queue.extractMin().data;\n \t}", "private PQHeap makeQueue(){\n \tPQHeap queue = new PQHeap(frequency.length);\n \tfor (int i = 0; i < frequency.length; i++) {\n \t\tqueue.insert(new Element(frequency[i], new HuffmanTempTree(i)));\n \t}\n \treturn queue;\n \t}", "private HuffmanNode buildTree(int n) {\r\n \tfor (int i = 1; i <= n; i++) {\r\n \t\tHuffmanNode node = new HuffmanNode();\r\n \t\tnode.left = pQueue.poll();\r\n \t\tnode.right = pQueue.poll();\r\n \t\tnode.frequency = node.left.frequency + node.right.frequency;\r\n \t\tpQueue.add(node);\r\n \t}\r\n return pQueue.poll();\r\n }", "public Node buildTree(int[] frequency)\n {\n /* Initialize the priority queue */\n pq=new PriorityQueue<Node>(c.size(),comp); \n p=new PriorityQueue<Node>(c.size(),comp); \n /* Create leaf node for each unique character in the string */\n for(int i = 0; i < c.size(); i++)\n { \n pq.offer(new Node(c.get(i), frequency[i], null, null));\n } \n createCopy(pq); \n /* Until there is only one node in the priority queue */\n while(pq.size() > 1)\n { \n /* Minimum frequency is kept in the left */\n Node left = pq.poll();\n /* Next minimum frequency is kept in the right */\n Node right = pq.poll();\n /* Create a new internal node as the parent of left and right */\n pq.offer(new Node('\\0', left.frequency+right.frequency, left, right)); \n } \n /* Return the only node which is the root */\n return pq.poll();\n }", "public HuffmanTree(Queue<Node> queue) {\r\n while (queue.size() > 1) {\r\n Node left = queue.poll();\r\n Node right = queue.poll();\r\n Node node = new Node('-', left.f + right.f, left, right);\r\n queue.add(node);\r\n }\r\n this.root = queue.peek();\r\n\r\n //initial two maps\r\n this.initialTable(this.root, \"\");\r\n\r\n }", "private HuffmanTreeNode[] heapify(int freq[][]) {\n\t\tHuffmanTreeNode[] heap = new HuffmanTreeNode[freq.length];\n\t\tfor (int i = 0; i < freq.length; i++)\n\t\t{\n\t\t\theap[i] = new HuffmanTreeNode(freq[i][1], freq[i][0], null, null);\n\t\t}\n\t\t\n\t\theap = heapSort(heap);\n\n\t\treturn heap;\n\t}", "public static HuffmanNode createTree(HuffmanNode[] nodeArr){\n HuffmanNode[] garbageArr = nodeArr;\n while(garbageArr.length != 1){\n HuffmanNode[] tempArr = new HuffmanNode[garbageArr.length-1];\n tempArr[0] = combineNodes(garbageArr[0], garbageArr[1]);\n for(int i = 1; i < garbageArr.length-1; i++){\n tempArr[i] = garbageArr[i+1];\n }\n garbageArr = freqSort(tempArr);\n }\n return garbageArr[0];\n }", "public void makeTree(){\n //convert Hashmap into charList\n for(Map.Entry<Character,Integer> entry : freqTable.entrySet()){\n HuffmanNode newNode = new HuffmanNode(entry.getKey(),entry.getValue());\n charList.add(newNode);\n }\n \n if(charList.size()==0)\n return;\n \n if(charList.size()==1){\n HuffmanNode onlyNode = charList.get(0);\n root = new HuffmanNode(null,onlyNode.getFrequency());\n root.setLeft(onlyNode);\n return;\n }\n \n Sort heap = new Sort(charList);\n heap.heapSort();\n \n while(heap.size()>1){\n \n HuffmanNode leftNode = heap.remove(0);\n HuffmanNode rightNode = heap.remove(0);\n \n HuffmanNode newNode = merge(leftNode,rightNode);\n heap.insert(newNode);\n heap.heapSort();\n }\n \n charList = heap.getList();\n root = charList.get(0);\n }", "public static Node buildHuffManTree(PriorityQueue<Node> queue) {\n\t\t\n\t\twhile(queue.size()>1) {\n\t\t\t\n\t\t\tNode left = queue.poll();\n\t\t\tNode right = queue.poll();\n\t\t\t\n\t\t\tNode root = new Node(left.frequency + right.frequency);\n\t\t\troot.left = left;\n\t\t\troot.right = right;\n\t\t\t\n\t\t\tqueue.add(root);\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\treturn queue.poll();\n\t\t\n\t}", "public HuffmanCode(int[] frequencies) {\n Queue<HuffmanNode> nodeFrequencies = new PriorityQueue<HuffmanNode>();\n for (int i = 0; i < frequencies.length; i++) {\n if (frequencies[i] > 0) {\n nodeFrequencies.add(new HuffmanNode(frequencies[i], (char) i));\n }\n }\n nodeFrequencies = ArrayHuffmanCodeCreator(nodeFrequencies);\n this.front = nodeFrequencies.peek();\n }", "public void setPriorityQueue() {\n\t\tfor (int i = 0; i < 7; i++) {\n\t\t\tif (leafEntries[i].getFrequency() > 0)\n\t\t\t\tpq.add(new BinaryTree<HuffmanData>(leafEntries[i]));\n\t\t}\n\t}", "public void buildTree(HuffData[] symbols) {\n //Create a new priorityqueue of type BinaryTree<HuffData> the size of \n //the number of symbols passed in\n Queue<BinaryTree<HuffData>> theQueue = new PriorityQueue<BinaryTree<HuffData>>(symbols.length, new CompareHuffmanTrees());\n //For each symbol in the symbols array\n for (HuffData nextSymbol : symbols) {\n //Create a new binary tree with the symbol\n BinaryTree<HuffData> aBinaryTree = new BinaryTree<HuffData>(nextSymbol, null, null);\n //Offer the new binary tree to the queue\n theQueue.offer(aBinaryTree);\n }\n //While there are still more than one items in the queue\n while(theQueue.size() > 1) {\n BinaryTree<HuffData> left = theQueue.poll(); //Take the top off the queue\n BinaryTree<HuffData> right = theQueue.poll(); //Take the new top off the queue\n int wl = left.getData().weight; //Get the weight of the left BinaryTree\n int wr = left.getData().weight; //Get the weight of the right BinaryTree\n //Create a new HuffData object with the weight as the sum of the left\n //and right and a null symbol\n HuffData sum = new HuffData(wl + wr, null); \n //Create a new BinaryTree with the sum HuffData and the left and right\n //as the left and right children\n BinaryTree<HuffData> newTree = new BinaryTree<HuffData>(sum, left, right);\n //Offer the sum binarytree back to the queue\n theQueue.offer(newTree);\n }\n //Take the last item off the queue\n huffTree = theQueue.poll();\n \n //Initalize the EncodeData array to be the same length as the passed in symbols\n encodings = new EncodeData[symbols.length];\n }", "public HuffmanTree() {\r\n\t\tsuper();\r\n\t}", "public CS232LinkedBinaryTree<Integer, Character> buildHuffTree() {\n\n\t\twhile (huffBuilder.size() > 1) {// Until one tree is left...\n\n\t\t\t// Make references to the important trees\n\t\t\tCS232LinkedBinaryTree<Integer, Character> newTree = new CS232LinkedBinaryTree<Integer, Character>();\n\t\t\tCS232LinkedBinaryTree<Integer, Character> firstSubTree = huffBuilder.remove();\n\t\t\tCS232LinkedBinaryTree<Integer, Character> secondSubTree = huffBuilder.remove();\n\n\t\t\t// Create the new root on the new joined tree. Use the character of higher priority.\n\t\t\tCharacter newTreeRootValue = this.getPriorityCharacter(firstSubTree.root.value, secondSubTree.root.value);\n\t\t\tnewTree.add(firstSubTree.root.key + secondSubTree.root.key, newTreeRootValue);\n\n\t\t\t// Join the new root's right side with the first tree\n\t\t\tnewTree.root.right = firstSubTree.root;\n\t\t\tfirstSubTree.root.parent = newTree.root;\n\n\t\t\t// Join the new root's left side with the second tree\n\t\t\tnewTree.root.left = secondSubTree.root;\n\t\t\tsecondSubTree.root.parent = newTree.root;\n\n\t\t\t// put the newly created tree back into the priority queue\n\t\t\thuffBuilder.add(newTree); \n\t\t}\n\t\t/*\n\t\t * At the end of the whole process, we have one final mega-tree. return\n\t\t * it and finally empty the queue!\n\t\t */\n\t\treturn huffBuilder.remove();\n\t}", "public HuffmanCoding(String text) {\n\t\t// TODO fill this in.\n\t\tMap<Character, Integer> frequencyMap = new HashMap<>();\n\t\tint textLength = text.length();\n\n\t\tfor (int i = 0; i < textLength; i++) {\n\t\t\tchar character = text.charAt(i);\n\t\t\tif (!frequencyMap.containsKey(character)) {\n\t\t\t\tfrequencyMap.put(character, 1);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tint newFreq = frequencyMap.get(character) + 1;\n\t\t\t\tfrequencyMap.replace(character, newFreq);\n\t\t\t}\n\t\t}\n\n\t\tPriorityQueue<Node> queue = new PriorityQueue<>();\n\n\t\tIterator iterator = frequencyMap.entrySet().iterator();\n\t\twhile (iterator.hasNext()) {\n\t\t\tMap.Entry<Character, Integer> pair = (Map.Entry<Character, Integer>) iterator.next();\n\t\t\tNode node = new Node(null, null, pair.getKey(), pair.getValue());\n\t\t\tqueue.add(node);\n\t\t}\n\n\t\twhile (queue.size() > 1) {\n\t\t\tNode node1 = queue.poll();\n\t\t\tNode node2 = queue.poll();\n\t\t\tNode parent = new Node(node1, node2, '\\t', node1.getFrequency() + node2.getFrequency());\n\t\t\tqueue.add(parent);\n\t\t}\n\t\thuffmanTree = queue.poll();\n\t\tSystem.out.println(\"firstNode: \"+ huffmanTree);\n\t\tcodeTable(huffmanTree);\n\n\t\t//Iterator iterator1 = encodingTable.entrySet().iterator();\n\n\t\t/*\n\t\twhile (iterator1.hasNext()) {\n\t\t\tMap.Entry<Character, String> pair = (Map.Entry<Character, String>) iterator1.next();\n\t\t\tSystem.out.println(pair.getKey() + \" : \" + pair.getValue() + \"\\n\");\n\t\t}\n\t\t*/\n\n\t\t//System.out.println(\"Hashmap.size() : \" + frequencyMap.size());\n\n\t}", "private BinaryTree<Character> constructTree(){\n if(pq.size() == 1) return pq.poll().data;\n if(pq.size() == 0) return null;\n // Poll the lowest two trees, combine them, then stick them back in the queue.\n Helper<BinaryTree<Character>> temp0 = pq.poll(), temp1 = pq.poll(),\n result = new Helper<>(temp0.priority + temp1.priority, new BinaryTree<>(temp0.data, null , temp1.data));\n pq.add(result);\n // Call again to keep constructing.\n return constructTree();\n }", "public HuffmanCodes() {\n\t\thuffBuilder = new PriorityQueue<CS232LinkedBinaryTree<Integer, Character>>();\n\t\tfileData = new ArrayList<char[]>();\n\t\tfrequencyCount = new int[127];\n\t\thuffCodeVals = new String[127];\n\t}", "public void loadInitQueue() {\n\t\t// go through every character\n\t\tfor (int i = 0; i < frequencyCount.length; i++) { \n\t\t\t// check to see if it has appeared at least once.\n\t\t\tif (frequencyCount[i] != 0) { \n\t\t\t\t// if so, make a tree for it and add it to the priority queue.\n\t\t\t\tCS232LinkedBinaryTree<Integer, Character> curTree = new CS232LinkedBinaryTree<Integer, Character>();\n\t\t\t\tcurTree.add(frequencyCount[i], (char) i);\n\t\t\t\thuffBuilder.add(curTree);\n\t\t\t}\n\t\t}\n\t}", "public Http2PriorityTree() {\n this.rootNode = new Http2PriorityNode(0, 0);\n nodesByID.put(0, this.rootNode);\n this.evictionQueue = new int[10]; //todo: make this size customisable\n }", "public HuffmanCoding(String text) {\n\t\t// TODO fill this in.\n\t\ttextArray = text.toCharArray();\n\n\t\tPriorityQueue<Leaf> queue = new PriorityQueue<>(new Comparator<Leaf>() {\n\t\t\t@Override\n\t\t\tpublic int compare(Leaf a, Leaf b) {\n\t\t\t\tif (a.frequency > b.frequency) {\n\t\t\t\t\treturn 1;\n\t\t\t\t} else if (a.frequency < b.frequency) {\n\t\t\t\t\treturn -1;\n\t\t\t\t} else {\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tfor (char c : textArray) {\n\t\t\tif (chars.containsKey(c)) {\n\t\t\t\tint freq = chars.get(c);\n\t\t\t\tfreq = freq + 1;\n\t\t\t\tchars.remove(c);\n\t\t\t\tchars.put(c, freq);\n\t\t\t} else {\n\t\t\t\tchars.put(c, 1);\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(\"tree print\");\t\t\t\t\t\t\t\t// print method begin\n\n\t\tfor(char c : chars.keySet()){\n\t\t\tint freq = chars.get(c);\n\t\t\tSystem.out.println(c + \" \" + freq);\n\t\t}\n\n\t\tint total = 0;\n\t\tfor(char c : chars.keySet()){\n\t\t\ttotal = total + chars.get(c);\n\t\t}\n\t\tSystem.out.println(\"total \" + total);\t\t\t\t\t\t\t// ends\n\n\t\tfor (char c : chars.keySet()) {\n\t\t\tLeaf l = new Leaf(c, chars.get(c), null, null);\n\t\t\tqueue.offer(l);\n\t\t}\n\n\t\twhile (queue.size() > 1) {\n\t\t\tLeaf a = queue.poll();\n\t\t\tLeaf b = queue.poll();\n\n\t\t\tint frequency = a.frequency + b.frequency;\n\n\t\t\tLeaf leaf = new Leaf('\\0', frequency, a, b);\n\n\t\t\tqueue.offer(leaf);\n\t\t}\n\n\t\tif(queue.size() == 1){\n\t\t\tthis.root = queue.peek();\n\t\t}\n\t}", "private void buildTree() {\n\t\tfinal TreeSet<Tree> treeSet = new TreeSet<Tree>();\n\t\tfor (char i = 0; i < 256; i++) {\n\t\t\tif (characterCount[i] > 0) {\n\t\t\t\ttreeSet.add(new Tree(i, characterCount[i]));\n\t\t\t}\n\t\t}\n\n\t\t// Merge the trees to one Tree\n\t\tTree left;\n\t\tTree right;\n\t\twhile (treeSet.size() > 1) {\n\t\t\tleft = treeSet.pollFirst();\n\t\t\tright = treeSet.pollFirst();\n\t\t\ttreeSet.add(new Tree(left, right));\n\t\t}\n\n\t\t// There is only our final tree left\n\t\thuffmanTree = treeSet.pollFirst();\n\t}", "private static void generateHuffmanTree(){\n try (BufferedReader br = new BufferedReader(new FileReader(_codeTableFile))) {\n String line;\n while ((line = br.readLine()) != null) {\n // process the line.\n if(!line.isEmpty() && line!=null){\n int numberData = Integer.parseInt(line.split(\" \")[0]);\n String code = line.split(\" \")[1];\n Node traverser = root;\n for (int i = 0; i < code.length() - 1; i++){\n char c = code.charAt(i); \n if (c == '0'){\n //bit is 0\n if(traverser.getLeftPtr() == null){\n traverser.setLeftPtr(new BranchNode(999999, null, null));\n }\n traverser = traverser.getLeftPtr();\n }\n else{\n //bit is 1\n if(traverser.getRightPtr() == null){\n traverser.setRightPtr(new BranchNode(999999, null, null));\n }\n traverser = traverser.getRightPtr();\n }\n }\n //Put data in the last node by creating a new leafNode\n char c = code.charAt(code.length() - 1);\n if(c == '0'){\n traverser.setLeftPtr(new LeafNode(9999999, numberData, null, null));\n }\n else{\n traverser.setRightPtr(new LeafNode(9999999, numberData, null, null));\n }\n }\n }\n } \n catch (IOException ex) {\n Logger.getLogger(FrequencyTableBuilder.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public Node createHuffmanTree(File f) throws FileNotFoundException {\r\n File file = f;\r\n FileInputStream fi = new FileInputStream(file);\r\n List<Node> nodes = new LinkedList<>();\r\n\r\n// Creating a map, where the key is characters and the values are the number of characters in the file\r\n Map<Character, Integer> charsMap = new LinkedHashMap<>();\r\n try (Reader reader = new InputStreamReader(fi);) {\r\n int r;\r\n while ((r = reader.read()) != -1) {\r\n char nextChar = (char) r;\r\n\r\n if (charsMap.containsKey(nextChar))\r\n charsMap.compute(nextChar, (k, v) -> v + 1);\r\n else\r\n charsMap.put(nextChar, 1);\r\n }\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n//// Sort the map by value and create a list\r\n// charsMap = charsMap.entrySet().stream().sorted(Map.Entry.comparingByValue(Comparator.reverseOrder())).collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (e1, e2) -> e1, LinkedHashMap::new));\r\n\r\n// Creating a list of Nodes from a map\r\n for (Character ch : charsMap.keySet()) {\r\n nodes.add(new Node(ch, charsMap.get(ch), null, null));\r\n }\r\n\r\n// Creating a Huffman tree\r\n while (nodes.size() > 1) {\r\n Node firstMin = nodes.stream().min(Comparator.comparingInt(n -> n.count)).get();\r\n nodes.remove(firstMin);\r\n Node secondMin = nodes.stream().min(Comparator.comparingInt(n -> n.count)).get();\r\n nodes.remove(secondMin);\r\n\r\n Node newNode = new Node(null, firstMin.count + secondMin.count, firstMin, secondMin);\r\n newNode.left.count = null;\r\n newNode.right.count = null;\r\n nodes.add(newNode);\r\n nodes.remove(firstMin);\r\n nodes.remove(secondMin);\r\n }\r\n\r\n// Why first? See algorithm!\r\n nodes.get(0).count = null;\r\n return nodes.get(0);\r\n }", "public HeapIntPriorityQueue() {\n elementData = new int[10];\n size = 0;\n }", "public static HuffmanNode[] createNodes(int[] freqNums){\n HuffmanNode[] nodeArr = new HuffmanNode[94];\n for(int i = 0; i < freqNums.length; i++){\n nodeArr[i] = new HuffmanNode((char)(i+32), freqNums[i], null, null);\n }\n return nodeArr;\n }", "public HuffmanCoding(String text) {\n\t\t// TODO fill this in.\n\t\tif (text.length() <= 1)\n\t\t\treturn;\n\n\t\t//Create a the frequency huffman table\n\t\tHashMap<Character, huffmanNode> countsMap = new HashMap<>();\n\t\tfor (int i = 0; i < text.length(); i++) {\n\t\t\tchar c = text.charAt(i);\n\t\t\tif (countsMap.containsKey(c))\n\t\t\t\tcountsMap.get(c).huffmanFrequency++;\n\t\t\telse\n\t\t\t\tcountsMap.put(c, new huffmanNode(c, 1));\n\t\t}\n\n\t\t//Build the frequency tree\n\t\tPriorityQueue<huffmanNode> countQueue = new PriorityQueue<>(countsMap.values());\n\t\twhile (countQueue.size() > 1) {\n\t\t\thuffmanNode left = countQueue.poll();\n\t\t\thuffmanNode right = countQueue.poll();\n\t\t\thuffmanNode parent = new huffmanNode('\\0', left.huffmanFrequency + right.huffmanFrequency);\n\t\t\tparent.leftNode = left;\n\t\t\tparent.rightNode = right;\n\n\t\t\tcountQueue.offer(parent);\n\t\t}\n\n\t\thuffmanNode rootNode = countQueue.poll();\n\n\t\t//Assign the codes to each node in the tree\n\t\tStack<huffmanNode> huffmanNodeStack = new Stack<>();\n\t\thuffmanNodeStack.add(rootNode);\n\t\twhile (!huffmanNodeStack.empty()) {\n\t\t\thuffmanNode huffmanNode = huffmanNodeStack.pop();\n\n\t\t\tif (huffmanNode.huffmanValue != '\\0') {\n\t\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\t\thuffmanNode.codeRecord.forEach(sb::append);\n\t\t\t\tString codeSb = sb.toString();\n\n\t\t\t\tencodingTable.put(huffmanNode.huffmanValue, codeSb);\n\t\t\t\tdecodingTable.put(codeSb, huffmanNode.huffmanValue);\n\t\t\t}\n\t\t\telse {\n\t\t\t\thuffmanNode.leftNode.codeRecord.addAll(huffmanNode.codeRecord);\n\t\t\t\thuffmanNode.leftNode.codeRecord.add('0');\n\t\t\t\thuffmanNode.rightNode.codeRecord.addAll(huffmanNode.codeRecord);\n\t\t\t\thuffmanNode.rightNode.codeRecord.add('1');\n\t\t\t}\n\n\t\t\tif (huffmanNode.leftNode != null)\n\t\t\t\thuffmanNodeStack.add(huffmanNode.leftNode);\n\n\t\t\tif (huffmanNode.rightNode != null)\n\t\t\t\thuffmanNodeStack.add(huffmanNode.rightNode);\n\t\t}\n\t}", "private void makePrioQ()\n\t{\n\t\tprioQ = new PrioQ();\n\t\t\n\t\tfor(int i = 0; i < canonLengths.length; i++)\n\t\t{\n\t\t\tif(canonLengths[i] == 0)\n\t\t\t\tcontinue;\n\t\t\tNode node = new Node(i, canonLengths[i]);\n\t\t\tprioQ.insert(node);\n\t\t}\n\t}", "public PriorityQueue()\r\n\t{\r\n\t\tcurrentSize = 0;\r\n\t\tlowestCurrentPriority = Integer.MAX_VALUE;\r\n\t\tpq = new DLL[MAXIMUM_PRIORITY + 1];\r\n\t\tfor (int i = 0; i < pq.length; i++)\r\n\t\t{\r\n\t\t\tpq[i] = new DLL();\r\n\t\t}\r\n\t}", "public Huffman(String input) {\n\t\t\n\t\tthis.input = input;\n\t\tmapping = new HashMap<>();\n\t\t\n\t\t//first, we create a map from the letters in our string to their frequencies\n\t\tMap<Character, Integer> freqMap = getFreqs(input);\n\n\t\t//we'll be using a priority queue to store each node with its frequency,\n\t\t//as we need to continually find and merge the nodes with smallest frequency\n\t\tPriorityQueue<Node> huffman = new PriorityQueue<>();\n\t\t\n\t\t/*\n\t\t * TODO:\n\t\t * 1) add all nodes to the priority queue\n\t\t * 2) continually merge the two lowest-frequency nodes until only one tree remains in the queue\n\t\t * 3) Use this tree to create a mapping from characters (the leaves)\n\t\t * to their binary strings (the path along the tree to that leaf)\n\t\t * \n\t\t * Remember to store the final tree as a global variable, as you will need it\n\t\t * to decode your encrypted string\n\t\t */\n\t\t\n\t\tfor (Character key: freqMap.keySet()) {\n\t\t\tNode thisNode = new Node(key, freqMap.get(key), null, null);\n\t\t\thuffman.add(thisNode);\n\t\t}\n\t\t\n\t\twhile (huffman.size() > 1) {\n\t\t\tNode leftNode = huffman.poll();\n\t\t\tNode rightNode = huffman.poll();\n\t\t\tint parentFreq = rightNode.freq + leftNode.freq;\n\t\t\tNode parent = new Node(null, parentFreq, leftNode, rightNode);\n\t\t\thuffman.add(parent);\n\t\t}\n\t\t\n\t\tthis.huffmanTree = huffman.poll();\n\t\twalkTree();\n\t}", "public static void createTree(ArrayList<HuffmanNode> tree) {\n\t\n\t\t//loops through until the tree.\n\t\twhile(tree.size() > 1) {\n\t\t\tCollections.sort(tree);\n\t\t\tHuffmanNode left = tree.get(0);\n\t\t\tHuffmanNode right = tree.get(1);\n\t\t\t\n\t\t\t/*creates the new node and adds it to the arrayList, and removes the two lowest frequency nodes\n\t\t\t * then recursively calls the create method again\n\t\t\t */\n\t\t\ttree.add(new HuffmanNode((right.frequency + left.frequency), left, right));\n\t\t\ttree.remove(0);\n\t\t\ttree.remove(0);\n\t\t\tcreateTree(tree);\n\t\t}\n\t}", "public static HuffmanNode huffmanAlgo() {\r\n\t\tHuffmanNode root;\r\n\t\t\r\n\t\twhile(nodeArrList.size() > 1) {\r\n\t\t\tif(nodeArrList.get(0).frequency == 0) {\r\n\t\t\t\tnodeArrList.remove(0);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tHuffmanNode left = nodeArrList.remove(0);\r\n\t\t\t\tHuffmanNode right = nodeArrList.remove(0);\r\n\t\t\t\tHuffmanNode replacement = new HuffmanNode(null, left.frequency + right.frequency);\r\n\t\t\t\treplacement.left = left;\r\n\t\t\t\treplacement.right = right;\r\n\t\t\t\tnodeArrList.add(replacement);\r\n\t\t\t}\r\n\t\t}\r\n\t\troot = nodeArrList.get(0);\r\n\t\treturn root;\r\n\t}", "public PriorityQueue()\n {\n // initialise instance variables\n heap = new PriorityCustomer[100];\n size = 0;\n }", "public static Node make_huffmann_tree(List li){\n //Sorting list in increasing order of its letter frequency \n li.sort(new comp());\n Node temp=null;\n Iterator it=li.iterator();\n //System.out.println(li.size());\n //Loop for making huffman tree till only single node remains in list\n while(true){\n temp=new Node();\n //a and b are Node which are to be combine to make its parent\n Node a=new Node(),b=new Node();\n a=null;b=null;\n //checking if list is eligible for combining or not\n //here first assignment of it.next in a will always be true as list till end will\n //must have atleast one node\n a=(Node)it.next();\n //Below condition is to check either list has 2nd node or not to combine \n //If this condition will be false, then it means construction of huffman tree is completed\n if(it.hasNext()){b=(Node)it.next();}\n //Combining first two smallest nodes in list to make its parent whose frequncy \n //will be equals to sum of frequency of these two nodes \n if(b!=null){\n temp.freq=a.freq+b.freq;a.data=0;b.data=1;//assigining 0 and 1 to left and right nodes\n temp.left=a;temp.right=b;\n //after combing, removing first two nodes in list which are already combined\n li.remove(0);//removes first element which is now combined -step1\n li.remove(0);//removes 2nd element which comes on 1st position after deleting first in step1\n li.add(temp);//adding new combined node to list\n //print_list(li); //For visualizing each combination step\n }\n //Sorting after combining to again repeat above on sorted frequency list\n li.sort(new comp()); \n it=li.iterator();//resetting list pointer to first node (head/root of tree)\n if(li.size()==1){return (Node)it.next();} //base condition ,returning root of huffman tree \n }\n}", "public int[] createTree(int[] input) {\n int[] bit = new int[input.length + 1];\n for (int i = 0; i < input.length; i++) {\n update(bit, input[i], i);\n }\n return bit;\n }", "public void HuffmanCode()\n {\n String text=message;\n /* Count the frequency of each character in the string */\n //if the character does not exist in the list add it\n for(int i=0;i<text.length();i++)\n {\n if(!(c.contains(text.charAt(i))))\n c.add(text.charAt(i));\n } \n int[] freq=new int[c.size()];\n //counting the frequency of each character in the text\n for(int i=0;i<c.size();i++)\n for(int j=0;j<text.length();j++)\n if(c.get(i)==text.charAt(j))\n freq[i]++;\n /* Build the huffman tree */\n \n root= buildTree(freq); \n \n }", "public HuffmanNode(int freq, int ascii){\r\n this.freq = freq;\r\n this.ascii = ascii;\r\n }", "public HeapPriorityQueue () \n\t{\n\t\tthis(DEFAULT_SIZE);\n\t}", "public HuffmanNode(int freq){\r\n this(freq, null, null);\r\n }", "public PriorityQueue(int capacity) { \r\n this.capacity=capacity;\r\n this.currentSize=0;\r\n this.queue=new NodeBase[capacity];\r\n }", "public TreeNode buildTree(int[] preorder, int[] inorder) {\n if (preorder == null || inorder == null || preorder.length != inorder.length) {\n \treturn null;\n }\n HashMap<Integer, Integer> map = new HashMap<Integer, Integer>();\n for (int i = 0; i < inorder.length; i++) {\n \tmap.put(inorder[i], i);\n }\n return helper(preorder, 0, inorder, 0, inorder.length - 1, map);\n }", "public TreeNode buildTree(int[] preorder, int[] inorder) {\n if(preorder == null || preorder.length==0) {\n return new TreeNode();\n }\n HashMap<Integer,Integer> indexmap = new HashMap<>();\n for(int idx=0; idx< inorder.length; idx++) {\n indexmap.put(inorder[idx], idx);\n }\n return btpo(preorder,0, preorder.length-1, inorder, 0, inorder.length-1, indexmap);\n }", "public HuffmanCompressor(){\n charList = new ArrayList<HuffmanNode>();\n }", "public Tree getHuffmanTree() {\n return huffmanTree;\n }", "public static Node createTree(int data, String pString, int[] arr) {\n\n // Invalid input as alphabets maps from 1 to 26\n if (data > 26)\n return null;\n\n // Parent String + String for this node\n String dataToStr = pString + alphabet[data];\n\n Node root = new Node(dataToStr);\n\n // if arr.length is 0 means we are done\n if (arr.length != 0) {\n data = arr[0];\n\n // new array will be from index 1 to end as we are consuming\n // first index with this node\n int newArr[] = Arrays.copyOfRange(arr, 1, arr.length);\n\n // left child\n root.left = createTree(data, dataToStr, newArr);\n\n // right child will be null if size of array is 0 or 1\n if (arr.length > 1) {\n\n data = arr[0] * 10 + arr[1];\n\n // new array will be from index 2 to end as we\n // are consuming first two index with this node\n newArr = Arrays.copyOfRange(arr, 2, arr.length);\n\n root.right = createTree(data, dataToStr, newArr);\n }\n }\n return root;\n }", "private static Node buildTree(int[] preorder, int[] inorder) {\n Map<Integer, Integer> inorderMap = new HashMap<>();\n IntStream.range(0, inorder.length).forEach(i -> inorderMap.put(inorder[i], i));\n\n int[] preorderIndex = new int[1];\n return buildTreeHelper(preorder, preorderIndex, 0, inorder.length - 1, inorderMap);\n }", "public HuffmanTree(ArrayOrderedList<HuffmanPair> pairsList) {\r\n\r\n\t\t\t\r\n\t\tArrayOrderedList<HuffmanTree> buildList = new ArrayOrderedList<HuffmanTree>();\r\n\t\tIterator<HuffmanPair> iterator = pairsList.iterator();\r\n\t\t\twhile (iterator.hasNext()) {\r\n\t\t\t\tbuildList.add(new HuffmanTree(iterator.next()));\r\n//\t\t\t\tif(buildList.first().getRoot().getElement().getCharacter() == iterator.next().getCharacter())i++;\r\n\t\t\t}\r\n//\t\t\tif (i == buildList.size()) {\r\n//\t\t\t\tArrayOrderedList<HuffmanTree> new_buildList = new ArrayOrderedList<HuffmanTree>();\r\n//\t\t\t\tnew_buildList.add(buildList.first());\r\n//\t\t\t\tbuildList = new_buildList;\r\n//\t\t\t}\r\n//\t\t\telse {\t\r\n\t\t\twhile (buildList.size() > 1) {\r\n\t\t\t\tHuffmanTree lefttree = buildList.removeFirst(); HuffmanTree righttree = buildList.removeFirst();\r\n\t\t\t\t//totalFre = the total weights of both trees.\r\n\t\t\t\tint totalFre = lefttree.getRoot().getElement().getFrequency() + righttree.getRoot().getElement().getFrequency();\r\n\t\t\t\tHuffmanPair root = new HuffmanPair(totalFre);\r\n\t\t\t\tbuildList.add(new HuffmanTree(root, lefttree, righttree));\r\n\t\t\t}\r\n\t\tthis.setRoot(buildList.first().getRoot());\r\n\t}", "public TreeNode buildTree(int[] preorder, int[] inorder) {\n if (preorder == null || inorder == null || preorder.length != inorder.length) return null;\n HashMap<Integer, Integer> map = new HashMap<Integer, Integer>();\n for (int i = 0; i < inorder.length; ++i) {\n map.put(inorder[i], i);\n }\n return buildTree(preorder, inorder, map, 0, inorder.length - 1, 0, preorder.length - 1);\n }", "private TreeNode helper(Queue<String> q) {\n String val = q.poll();\n if (val.equals(N)) {\n return null;\n }\n TreeNode node = new TreeNode(Integer.valueOf(val));\n node.left = helper(q);\n node.right = helper(q);\n return node;\n }", "public PriorityQueue() {\n\t\theap = new ArrayList<Pair<Integer, Integer>>();\n\t\tlocation = new HashMap<Integer, Integer>();\n\t}", "public HuffmanNode(String key, int value)\n\t{\n\t\tcharacters = key;\n\t\tfrequency = value;\n\t\t\n\t\tleft = null;\n\t\tright = null;\n\t\tparent = null;\n\t\tchecked = false;\n\t}", "public WBLeftistHeapPriorityQueueFIFO() {\n\t\theap = new WBLeftistHeap<>();\n\t}", "static binaryTreeNode inorderConstruct(int[] keys){\n binaryTreeNode head = null;\n binaryTreeNode lnode = null;\n binaryTreeNode rnode = null;\n for(int i:keys){\n if(head == null){\n head = new binaryTreeNode(i);\n continue;\n }\n if(lnode == null){\n lnode = head;\n head = new binaryTreeNode(i);\n continue;\n }\n if(rnode == null){\n rnode = new binaryTreeNode(i);\n head.lnode = lnode;\n head.rnode = rnode;\n rnode = null;\n lnode = null;\n }\n }\n return head;\n }", "MinHeapNode newNode(char data, int freq)\r\n\t{\r\n\t MinHeapNode temp = new MinHeapNode();\r\n\t temp.left = temp.right = null;\r\n\t temp.data = data;\r\n\t temp.freq = freq;\r\n\t return temp;\r\n\t}", "public BTreeNode(int t){\n T = t;\n isLeaf = true;\n key = new int[2*T-1];\n c = new BTreeNode[2*T];\n n=0; \n }", "PriorityQueueUsingArray(int size) {\n\t\tthis.array = new Nodes[size + 1];\n\t}", "private void constructTree() {\r\n\t\tsortLeaves();\r\n\t\tNode currentNode;\r\n\t\tint index = 0;\r\n\t\t\tdo{\r\n\t\t\t\t// Create a new node with the next two least frequent nodes as its children\r\n\t\t\t\tcurrentNode = new Node(this.treeNodes[0], this.treeNodes[1]); \r\n\t\t\t\taddNewNode(currentNode);\r\n\t\t\t}\r\n\t\t\twhile (this.treeNodes.length > 1); // Until there is only one root node\r\n\t\t\tthis.rootNode = currentNode;\r\n\t\t\tindex++;\r\n\t}", "public ArrayPriorityQueue()\n { \n\tqueue = new ArrayList();\n }", "private PriorityQueue<PCB> newRemainingQueue() {\n\n\t\t// Comparator for sorting low priorities first\n\t\tComparator<PCB> byLowestPriority =\n\t\t\t(p1, p2) -> new Integer(p1.getPriority()).compareTo(p2.getPriority());\n\n\t\treturn new PriorityQueue<>(byLowestPriority);\n\t}", "public TreeNode buildTree(int[] A, int[] B) {\n HashMap<Integer, Integer> order = new HashMap<>();\n for (int i = 0; i < B.length; i++) {\n order.put(B[i], i);\n }\n\n // build Binary Tree from Pre-order list with order of nodes\n TreeNode root = new TreeNode(A[0]);\n Deque<TreeNode> stack = new LinkedList<>();\n stack.offerLast(root);\n\n /*\n for (int i = 1; i < A.length; i++) {\n if (order.get(A[i]) < order.get(stack.peekLast().val)) {\n TreeNode parent = stack.peekLast();\n parent.left = new TreeNode(A[i]);\n stack.offerLast(parent.left);\n }\n else {\n TreeNode parent = stack.peekLast();\n while(!stack.isEmpty() &&\n (order.get(stack.peekLast().val) < order.get(A[i]))) {\n parent = stack.pollLast();\n }\n parent.right = new TreeNode(A[i]);\n stack.offerLast(parent.right);\n }\n\n }\n */\n for (int i = 1; i < A.length; i++) {\n TreeNode parent = stack.peekLast();\n TreeNode node = new TreeNode(A[i]);\n if (order.get(A[i]) < order.get(parent.val)) {\n parent.left = node;\n } else {\n while (!stack.isEmpty() && (order.get(stack.peekLast().val) < order.get(A[i]))) {\n parent = stack.pollLast();\n }\n parent.right = node;\n }\n stack.offerLast(node);\n }\n\n return root;\n }", "public TreeNode buildTree(int[] inorder, int[] postorder) {\r\n index = postorder.length-1; // setting index to end of postorder array as that is the root\r\n\r\n for(int i=0;i<inorder.length;i++) // adding values to the hashmap\r\n map.put(inorder[i],i);\r\n \r\n return helper(inorder, postorder, 0, inorder.length-1);\r\n }", "public MyQueue() {\n queue = new PriorityQueue<>();\n }", "private TreeNode buildTree(int[] preorder, int[] inorder, int[] preIndex, int[] inIndex, int target) {\n if (inIndex[0] >= inorder.length || inorder[inIndex[0]] == target) {\n return null;\n }\n TreeNode root = new TreeNode(preorder[preIndex[0]]);\n //preorder, advance the index by 1 sice we already finish the root;\n preIndex[0]++;\n root.left = buildTree(preorder, inorder, preIndex, inIndex, root.val);\n //after finishing left subtree, we can advance the index by 1\n inIndex[0]++;\n root.right = buildTree(preorder, inorder, preIndex, inIndex, target);\n return root;\n }", "public static Node constructTree(int[] preorder, int[] isLeaf)\r\n {\r\n // pIndex stores index of next unprocessed key in preorder sequence\r\n // start with the root node (at 0'th index)\r\n // Using Atomicint as Integer is passed by value in Java\r\n AtomicInteger pIndex = new AtomicInteger(0);\r\n return construct(preorder, isLeaf, pIndex);\r\n }", "public TreeNode buildTree(int[] preorder, int[] inorder) {\n if(preorder == null || inorder == null) return null;\n Map<Integer, Integer> inorderMap = new HashMap<>();\n for(int i = 0; i < inorder.length; i++) {\n inorderMap.put(inorder[i], i);\n }\n return helper(0, 0, inorder.length - 1, preorder, inorderMap);\n }", "public interface ITreeMaker {\n /**\n * Return the Huffman/coding tree.\n * @return the Huffman tree\n */\n public HuffTree makeHuffTree(InputStream stream) throws IOException;\n}", "static TreeNode createTree(TreeNode root, int[] arr, int index) {\r\n\t\t\r\n\t\tif (index < arr.length) {\r\n\t\t\tTreeNode tmp = null;\r\n\t\t\tif (arr[index]>=0) {\r\n\t\t\t\ttmp = new TreeNode(arr[index]);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\ttmp = null;\r\n\t\t\t}\r\n\t\t\troot= tmp;\r\n\t\t\t\r\n\t\t\tif (root != null) {\r\n\t\t\t\troot.left = createTree(tmp.left,arr,index*2+1);\r\n\t\t\t\troot.right = createTree(tmp.right,arr,index*2+2);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn root;\r\n\t}", "static TreeNode createTree(TreeNode root, int[] arr, int index) {\r\n\t\t\r\n\t\tif (index < arr.length) {\r\n\t\t\tTreeNode tmp = null;\r\n\t\t\tif (arr[index]>=0) {\r\n\t\t\t\ttmp = new TreeNode(arr[index]);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\ttmp = null;\r\n\t\t\t}\r\n\t\t\troot= tmp;\r\n\t\t\t\r\n\t\t\tif (root != null) {\r\n\t\t\t\troot.left = createTree(tmp.left,arr,index*2+1);\r\n\t\t\t\troot.right = createTree(tmp.right,arr,index*2+2);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn root;\r\n\t}", "public static Tree solve() {\n Scanner scan = new Scanner(System.in);\n int n = scan.nextInt();\n Map<Integer, Set<Integer>> map = new HashMap<Integer,Set<Integer>>();\n int[] valArr = new int[n];\n int[] colArr = new int[n];\n for(int i =0;i<n;i++){\n valArr[i] = scan.nextInt();\n }\n for(int i =0;i<n;i++){\n colArr[i] = scan.nextInt();\n }\n for(int i=0;i<n-1;i++){\n //10^10 / 1024/ 1024/1024, 10GB\n int a = scan.nextInt()-1;\n int b = scan.nextInt()-1;\n \n //Tree[] treeArr = new Tree[n];\n if(map.containsKey(a)){\n map.get(a).add(b);\n }else{\n Set<Integer> set = new HashSet<Integer>();\n set.add(b);\n map.put(a,set);\n }\n //case 1-2, 2-1\n if(map.containsKey(b)){\n map.get(b).add(a);\n }else{\n Set<Integer> set = new HashSet<Integer>();\n set.add(a);\n map.put(b,set);\n } \n }\n Set<Integer> visited = new HashSet<Integer>();\n Tree root =buildTree(map,0,0,valArr,colArr);\n return root;\n }", "public YFastTrie() {\n \n this.w = 30;\n \n maxC = (1 << w) - 1;\n \n binSz = w;\n \n nBins = (int)Math.ceil((double)maxC/(double)binSz);\n \n //System.out.println(\"nBins=\" + nBins + \" rt of ops=\" +\n // (Math.log(binSz)/Math.log(2)));\n \n rbs = new TIntObjectHashMap<TreeMap<Integer, Integer>>();\n \n XFastTrieNode<Integer> clsNode = new XFastTrieNode<Integer>();\n Integerizer<Integer> it = new Integerizer<Integer>() {\n @Override\n public int intValue(Integer x) {\n return x;\n }\n };\n \n xft = new XFastTrie<XFastTrieNode<Integer>, Integer>(clsNode, it, w);\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic PriorityQueue(){\n\n\t\tcurrentSize = 0;\n\t\tcmp = null;\n\t\tarray = (AnyType[]) new Object[10]; // safe to ignore warning\n\t}", "private Node CreateTree() {\n\t\tScanner sc = new Scanner(System.in);\n\t\tQueue<Node> q = new LinkedList<>();\n\t\tint item = sc.nextInt();\n\t\tNode nn = new Node();\n\t\tnn.val = item;\n\t\troot = nn;\n\t\tq.add(nn);\n\t\twhile (!q.isEmpty()) {\n\t\t\tNode rv = q.poll();\n\t\t\tint c1 = sc.nextInt();\n\t\t\tint c2 = sc.nextInt();\n\t\t\tif (c1 != -1) {\n\t\t\t\tNode node = new Node();\n\t\t\t\tnode.val = c1;\n\t\t\t\trv.left = node;\n\t\t\t\tq.add(node);\n\t\t\t}\n\t\t\tif (c2 != -1) {\n\t\t\t\tNode node = new Node();\n\t\t\t\tnode.val = c2;\n\t\t\t\trv.right = node;\n\t\t\t\tq.add(node);\n\t\t\t}\n\t\t}\n\n\t\treturn root;\n\n\t}", "public static void main(String[] args) throws FileNotFoundException, IOException {\n\t\tString input = \"\";\r\n\r\n\t\t//읽어올 파일 경로\r\n\t\tString filePath = \"C:/Users/user/Desktop/data13_huffman.txt\";\r\n\r\n\t\t//파일에서 읽어옴\r\n\t\ttry(FileInputStream fStream = new FileInputStream(filePath);){\r\n\t\t\tbyte[] readByte = new byte[fStream.available()];\r\n\t\t\twhile(fStream.read(readByte) != -1);\r\n\t\t\tfStream.close();\r\n\t\t\tinput = new String(readByte);\r\n\t\t}\r\n\r\n\t\t//빈도수 측정 해시맵 생성\r\n\t\tHashMap<Character, Integer> frequency = new HashMap<>();\r\n\t\t//최소힙 생성\r\n\t\tList<Node> nodes = new ArrayList<>();\r\n\t\t//테이블 생성 해시맵\r\n\t\tHashMap<Character, String> table = new HashMap<>();\r\n\r\n\t\t//노드와 빈도수 측정\r\n\t\tfor(int i = 0; i < input.length(); i++) {\r\n\t\t\tif(frequency.containsKey(input.charAt(i))) {\r\n\t\t\t\t//이미 있는 값일 경우 빈도수를 1 증가\r\n\t\t\t\tchar currentChar = input.charAt(i);\r\n\t\t\t\tfrequency.put(currentChar, frequency.get(currentChar) + 1);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t//키를 생성해서 넣어줌\r\n\t\t\t\tfrequency.put(input.charAt(i), 1);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//최소 힙에 저장\r\n\t\tfor(Character key : frequency.keySet()) \r\n\t\t\tnodes.add(new Node(key, frequency.get(key), null, null));\r\n\t\t\t\t\r\n\t\t//최소힙으로 정렬\r\n\t\tbuildMinHeap(nodes);\r\n\r\n\t\t//huffman tree를 만드는 함수 실행\r\n\t\tNode resultNode = huffman(nodes);\r\n\r\n\t\t//파일에 씀 (table)\r\n\t\ttry(FileWriter fw = new FileWriter(\"201702034_table.txt\")){\r\n\t\t\tmakeTable(table, resultNode, \"\");\r\n\t\t\tfor(Character key : table.keySet()) {\r\n\t\t\t\t//System.out.println(key + \" : \" + table.get(key));\r\n\t\t\t\tfw.write(key + \" : \" + table.get(key) + \"\\n\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//파일에 씀 (encoded code)\r\n\t\ttry(FileWriter fw = new FileWriter(\"201702034_encoded.txt\")){\r\n\t\t\tString allString = \"\";\r\n\t\t\t\r\n\t\t\tfor(int i = 0; i < input.length(); i++)\r\n\t\t\t\tallString += table.get(input.charAt(i));\r\n\r\n\t\t\t//System.out.println(allString);\r\n\t\t\tfw.write(allString);\r\n\t\t}\r\n\t}", "public PriorityQueue(int size){\n heap = new Element[size];\n }", "int[][] constructTree(ArrayList<Integer> arr, int n)\n {\n int x = (int)(Math.ceil(Math.log(n)/Math.log(2))); // Height of the tree\n\n int max_size = 2 * (int)Math.pow(2, x) - 1;\n int[][] tree = new int[max_size][4];\n\n build(tree, 0, n - 1, 1, arr);\n return tree;\n }", "public MaxPriorityQueue() {\n heap = new MaxHeap<>();\n }", "static binaryTreeNode levelorderConstruct(int[] keys){\n binaryTreeNode head = new binaryTreeNode(keys[0]);\n int count = 1;\n binaryTreeNode temp;\n List<binaryTreeNode> l = new ArrayList<>();\n temp = head;\n while(count < keys.length){\n if(temp.lnode == null){\n temp.lnode = new binaryTreeNode(keys[count]);\n count++;\n l.add(temp.lnode);\n } else if(temp.rnode == null){\n temp.rnode = new binaryTreeNode(keys[count]);\n count++;\n l.add(temp.rnode);\n temp = l.remove(0);\n }\n }\n return head;\n }", "public HuffmanNode(int freq, HuffmanNode left, HuffmanNode right){\r\n this.freq = freq;\r\n this.left = left;\r\n this.right = right;\r\n }", "public PriorityQueue(int N) {\r\n\t\tthis.arr = new Node[N];\r\n\t\tthis.MAX_LENGTH = N;\r\n\t}", "public BinaryHeap(int maxCapacity) {\n\tpq = new Comparable[maxCapacity];\n\tsize = 0;\n }", "public PriorityQueue(final int theLength) {\r\n super(theLength);\r\n }", "@Override\n public PermutationSolution<Integer> createSolution() {\n return new DefaultBinaryIntegerPermutationSolution(this) ;\n }", "TreeNode generateBinaryTree(int[] arr) {\n\n if (arr.length == 0) {\n\n return null;\n }\n return buildNode(arr, 0, 1, 2);\n }", "public HuffmanTree(HuffmanPair element) {\r\n\t\tsuper(element);\r\n\t}", "public CodeBook getOptimalCodificacion(){\n ArrayList<ArbolCod> listaA=new ArrayList<ArbolCod>();\n \n // Se inicializan los árboles con las probabilidades.\n for (int i=0;i<probabilidades.size();i++)\n listaA.add(new ArbolCod(alfabeto.getI(i),probabilidades.get(i)));\n \n return codHuffman(listaA);\n }", "public static String huffmanCoder(String inputFileName, String outputFileName){\n File inputFile = new File(inputFileName+\".txt\");\n File outputFile = new File(outputFileName+\".txt\");\n File encodedFile = new File(\"encodedTable.txt\");\n File savingFile = new File(\"Saving.txt\");\n HuffmanCompressor run = new HuffmanCompressor();\n \n run.buildHuffmanList(inputFile);\n run.makeTree();\n run.encodeTree();\n run.computeSaving(inputFile,outputFile);\n run.printEncodedTable(encodedFile);\n run.printSaving(savingFile);\n return \"Done!\";\n }", "public Priority()\r\n\t{\r\n\t\tsouthQueue = new State[50];\r\n\t\tsouthElem = 0;\r\n southFront = 0; \r\n southRear = -1;\r\n\t\t\r\n\t\twestQueue = new State[50];\r\n\t\twestElem = 0;\r\n westFront = 0;\r\n westRear = -1;\r\n\t\t\r\n\t\tmidwestQueue = new State[50];\r\n\t\tmidwestElem = 0;\r\n midwestFront = 0;\r\n midwestRear = -1;\r\n }", "private void buildOutput()\n\t{\n\t\tif(outIndex >= output.length)\n\t\t{\n\t\t\tbyte[] temp = output;\n\t\t\toutput = new byte[temp.length * 2];\n\t\t\tSystem.arraycopy(temp, 0, output, 0, temp.length);\n\t\t}\n\t\t\n\t\tif(sb.length() < 16 && aryIndex < fileArray.length)\n\t\t{\n\t\t\tbyte[] b = new byte[1];\n\t\t\tb[0] = fileArray[aryIndex++];\n\t\t\tsb.append(toBinary(b));\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < prioQ.size(); i++)\n\t\t{\n\t\t\tif(sb.toString().startsWith(prioQ.get(i).getCode()))\n\t\t\t{\n\t\t\t\toutput[outIndex++] = (byte)prioQ.get(i).getByteData();\n\t\t\t\tsb = new StringBuilder(\n\t\t\t\t\t\tsb.substring(prioQ.get(i).getCode().length()));\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"Can't find Huffman code.\");\n\t\tSystem.exit(1);\n\t\texit = true;\n\t}", "static SimpleTreeNode getTree(int[] values) {\n\n if(values.length>0) {\n\n SimpleTreeNode root = new SimpleTreeNode(values[0]);\n Queue<SimpleTreeNode> queue = new LinkedList<>();\n\n queue.add(root);\n\n boolean done = false;\n int index = 1;\n\n while (!done) {\n\n SimpleTreeNode node = queue.element();\n int childCount = node.getChildCount();\n\n if(childCount==0) {\n node.add(new SimpleTreeNode(values[index++]));\n queue.add((SimpleTreeNode)node.getChildAt(0));\n } else if(childCount==1) {\n node.add(new SimpleTreeNode(values[index++]));\n queue.add((SimpleTreeNode)node.getChildAt(1));\n } else {\n queue.remove();\n }\n\n done = (index == values.length);\n }\n\n return root;\n } else {\n return null;\n }\n }", "@Override\n\tpublic TreeNode buildTree(String[] exp) {\n\t\tStack<TreeNode> stk = new Stack<TreeNode>();\n\t\tTreeNode tmpL, tmpR, tmpRoot;\n\t\tint i;\n\n\t\tfor(String s: exp) {\n\t\t\tif(s.equals(EMPTY))\n\t\t\t\tcontinue;\n\t\t\t\n\t\t\ttry {\n\t\t\t\ti = Integer.parseInt(s);\n\t\t\t\tstk.push(new TreeNode(EMPTY + i));\n\t\t\t}\n\t\t\tcatch (NumberFormatException n) {\n\t\t\t\ttmpR = stk.pop();\n\t\t\t\ttmpL = stk.pop();\n\t\t\t\ttmpRoot = new TreeNode(s, tmpL, tmpR);\n\t\t\t\tstk.push(tmpRoot);\n\t\t\t}\n\t\t}\n\n\t\treturn stk.pop();\n\n\t}", "public HIRTree(){\r\n\t\t\r\n\t}", "public BinaryTree(){}", "public static Tree solve() {\n Scanner scan = new Scanner(System.in);\n int n = scan.nextInt();\n\n int[] arrayNode = new int[n + 1];\n for (int i = 1; i <= n; i++) {\n arrayNode[i] = scan.nextInt();\n }\n\n Color[] arrayColor = new Color[n + 1];\n for (int i = 1; i <= n; i++) {\n if (scan.nextInt() == 0) {\n arrayColor[i] = Color.RED;\n } else {\n arrayColor[i] = Color.GREEN;\n }\n }\n\n List<Integer>[] adjacentsList = new List[n + 1];\n for (int i = 1; i <= n; i++) {\n adjacentsList[i] = new ArrayList<Integer>();\n }\n\n for (int i = 0; i < n - 1; i++) {\n int x = scan.nextInt();\n int y = scan.nextInt();\n\n adjacentsList[x].add(y);\n adjacentsList[y].add(x);\n }\n\n scan.close();\n\n List<Integer>[] childrenList = new List[n + 1];\n for (int i = 1; i <= n; i++) {\n childrenList[i] = new ArrayList<Integer>();\n }\n\n int[] depths = new int[n + 1];\n boolean[] visited = new boolean[n + 1];\n\n Queue<Integer> queue = new LinkedList<Integer>();\n depths[1] = 0;\n queue.offer(1);\n while (!queue.isEmpty()) {\n int head = queue.poll();\n\n if (visited[head]) {\n continue;\n }\n visited[head] = true;\n\n for (int adjacent : adjacentsList[head]) {\n if (!visited[adjacent]) {\n childrenList[head].add(adjacent);\n depths[adjacent] = depths[head] + 1;\n queue.offer(adjacent);\n }\n }\n }\n\n Tree[] nodes = new Tree[n + 1];\n for (int i = 1; i <= n; i++) {\n if (childrenList[i].isEmpty()) {\n nodes[i] = new TreeLeaf(arrayNode[i], arrayColor[i], depths[i]);\n } else {\n nodes[i] = new TreeNode(arrayNode[i], arrayColor[i], depths[i]);\n }\n }\n for (int i = 1; i <= n; i++) {\n for (int child : childrenList[i]) {\n ((TreeNode) nodes[i]).addChild(nodes[child]);\n }\n }\n return nodes[1];\n }", "public BinaryHeap(int maxCapacity) {\n pq = new Comparable[maxCapacity];\n size = 0;\n }", "public Node buildTree2(int[] preorder, int[] inorder) {\n if(preorder==null || inorder==null || preorder.length==0 || inorder.length==0) return null;\n \n return helper2(preorder, inorder, 0, preorder.length-1);\n }", "private static TreeNode deserializeHelper(Queue<String> dataQueue){\n \t// use equals to compare Strings\n if (dataQueue.peek().equals(\"null\")){\n dataQueue.poll();\n return null;\n }\n int val = Integer.parseInt(dataQueue.poll());\n TreeNode res = new TreeNode(val);\n res.left = deserializeHelper(dataQueue);\n res.right = deserializeHelper(dataQueue);\n return res;\n }", "public HeapPriorityQueue(int size)\n\t{\n\t\tstorage = new Comparable[size + 1];\n\t\tcurrentSize = 0;\n\t}", "public static Node construct(Integer[] arr){\r\n Node root = null;\r\n Stack<Node> st = new Stack<>();\r\n \r\n for(int i=0; i<arr.length; i++){\r\n Integer data = arr[i];\r\n if(data != null){\r\n Node nn = new Node(data);\r\n if(st.size()==0){\r\n root = nn;\r\n st.push(nn);\r\n }\r\n else{\r\n st.peek().children.add(nn);\r\n st.push(nn);\r\n }\r\n }\r\n else{ //if data is equal to NULL\r\n st.pop();\r\n }\r\n }\r\n return root;\r\n }" ]
[ "0.76917744", "0.7231746", "0.7230042", "0.71714216", "0.6979571", "0.6922152", "0.6911023", "0.6869594", "0.66579276", "0.6577282", "0.65756583", "0.6573262", "0.6568137", "0.65517724", "0.6538524", "0.6522274", "0.64288795", "0.639482", "0.63582", "0.6346758", "0.62173307", "0.6202324", "0.61913925", "0.6179389", "0.61684686", "0.6082362", "0.6051608", "0.59946984", "0.5967001", "0.5961583", "0.5955137", "0.59293187", "0.59291106", "0.58672106", "0.57966304", "0.57515997", "0.5700894", "0.5666882", "0.56668025", "0.566577", "0.56348115", "0.56338507", "0.5631088", "0.56195927", "0.5587631", "0.5575858", "0.55551356", "0.5530725", "0.55086917", "0.5506932", "0.54882276", "0.54832864", "0.54727095", "0.54551613", "0.544928", "0.54422563", "0.5438233", "0.5429064", "0.54270506", "0.5426017", "0.5425288", "0.5420799", "0.5415844", "0.5414253", "0.5401681", "0.5395103", "0.53877306", "0.53502375", "0.53499246", "0.53499246", "0.5345306", "0.53431666", "0.5328161", "0.5321334", "0.53168136", "0.53126174", "0.5301478", "0.52916545", "0.52905613", "0.5288002", "0.5273068", "0.5272087", "0.52652866", "0.525438", "0.5254353", "0.5241282", "0.52311397", "0.5230742", "0.5229264", "0.5222038", "0.521458", "0.52127695", "0.5200522", "0.51862025", "0.51799613", "0.517307", "0.514261", "0.5138051", "0.513453", "0.5130926" ]
0.71393865
4
A private helper method that takes in a HuffmanNode, a string and a PrintStream.
private void HuffmanPrinter(HuffmanNode node, String s, PrintStream output) { if (node.left == null) { output.println((byte) node.getData()); output.println(s); } else { HuffmanPrinter(node.left, s + 0, output); HuffmanPrinter(node.right, s + 1, output); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void translate(BitInputStream input, PrintStream output) {\n HuffmanNode node = this.front;\n while (input.hasNextBit()) {\n while (node.left != null && node.right != null) {\n if (input.nextBit() == 0) {\n node = node.left;\n } else {\n node = node.right;\n }\n }\n output.print(node.getData());\n node = this.front;\n }\n }", "public void printCode(PrintStream out, String code, BinaryTree<HuffData> tree) {\n HuffData theData = tree.getData(); //Get the data of the tree\n if (theData.symbol != null) { //If the data's symbol is not null (as in a symbol and not a sum)\n if(theData.symbol.equals(\" \")) { //If the symbol is a space print out \"space: \"\n out.println(\"space: \" + code);\n } else { //Otherwise print out the symbol and the code\n out.println(theData.symbol + \" \" + code);\n //Then add the symbol and code to the EncodeData table\n this.encodings[encodingsTop++] = new EncodeData(code, theData.symbol);\n }\n } else {\n //If the data's symbol is null, that means it is a sum node\n //and so it needs to go farther down the tree\n \n //Go down the left tree and add a 0\n printCode(out, code + \"0\", tree.getLeftSubtree());\n //Go down the right tree and add a 1\n printCode(out, code + \"1\", tree.getRightSubtree());\n }\n }", "public void save(PrintStream output) {\n HuffmanPrinter(this.front, \"\", output);\n }", "public static void main(String args[])\n {\n Scanner s = new Scanner(System.in).useDelimiter(\"\");\n List<node> freq = new SinglyLinkedList<node>();\n \n // read data from input\n while (s.hasNext())\n {\n // s.next() returns string; we're interested in first char\n char c = s.next().charAt(0);\n if (c == '\\n') continue;\n // look up character in frequency list\n node query = new node(c);\n node item = freq.remove(query);\n if (item == null)\n { // not found, add new node\n freq.addFirst(query);\n } else { // found, increment node\n item.frequency++;\n freq.addFirst(item);\n }\n }\n \n // insert each character into a Huffman tree\n OrderedList<huffmanTree> trees = new OrderedList<huffmanTree>();\n for (node n : freq)\n {\n trees.add(new huffmanTree(n));\n }\n \n // merge trees in pairs until one remains\n Iterator ti = trees.iterator();\n while (trees.size() > 1)\n {\n // construct a new iterator\n ti = trees.iterator();\n // grab two smallest values\n huffmanTree smallest = (huffmanTree)ti.next();\n huffmanTree small = (huffmanTree)ti.next();\n // remove them\n trees.remove(smallest);\n trees.remove(small);\n // add bigger tree containing both\n trees.add(new huffmanTree(smallest,small));\n }\n // print only tree in list\n ti = trees.iterator();\n Assert.condition(ti.hasNext(),\"Huffman tree exists.\");\n huffmanTree encoding = (huffmanTree)ti.next();\n encoding.print();\n }", "private static void printTree(HuffmanNode tree, String direction, FileWriter newVersion) throws IOException {\n\t\tif(tree.inChar != null) {\n\t\t\tnewVersion.write(tree.inChar + \": \" + direction + \" | \" + tree.frequency + System.getProperty(\"line.separator\"));\n\t\t\tresults[resultIndex][0] = tree.inChar;\n\t\t\tresults[resultIndex][1] = direction;\n\t\t\tresults[resultIndex][2] = tree.frequency;\n\t\t\tresultIndex++;\n\t\t}\n\t\telse {\n\t\t\tprintTree(tree.right, direction + \"1\", newVersion);\n\t\t\tprintTree(tree.left, direction + \"0\", newVersion);\n\t\t}\n\t}", "public void print(Node node) \n{\n PrintWriter w = new PrintWriter(new OutputStreamWriter(System.out), true);\n print(node, w);\n}", "public String printInline(HuffmanTreeNode node){\n\t\tif (node != null){\n\t\t\tStringBuffer sb = new StringBuffer();\n\n\t\t\tif (node.getLeft() != null)\n sb.append(this.printInline(node.getLeft()));\n\t\t\tsb.append(node.toString());\n\n\t\t\tif (node.getRight() != null)\n sb.append(this.printInline(node.getRight()));\n\t\t\treturn sb.toString();\n\t\t}\n\t\telse\n\t\t\treturn null;\n\t}", "public HuffmanNode(int freq, int ascii){\r\n this.freq = freq;\r\n this.ascii = ascii;\r\n }", "public static void main(String[] args) throws IOException {\n\n HuffmanTree huffman = null;\n int value;\n String inputString = null, codedString = null;\n\n while (true) {\n System.out.print(\"Enter first letter of \");\n System.out.print(\"enter, show, code, or decode: \");\n int choice = getChar();\n switch (choice) {\n case 'e':\n System.out.println(\"Enter text lines, terminate with $\");\n inputString = getText();\n printAdjustedInputString(inputString);\n huffman = new HuffmanTree(inputString);\n printFrequencyTable(huffman.frequencyTable);\n break;\n case 's':\n if (inputString == null)\n System.out.println(\"Please enter string first\");\n else\n huffman.encodingTree.displayTree();\n break;\n case 'c':\n if (inputString == null)\n System.out.println(\"Please enter string first\");\n else {\n codedString = huffman.encodeAll(inputString);\n System.out.println(\"Code:\\t\" + codedString);\n }\n break;\n case 'd':\n if (inputString == null)\n System.out.println(\"Please enter string first\");\n else if (codedString == null)\n System.out.println(\"Please enter 'c' for code first\");\n else {\n System.out.println(\"Decoded:\\t\" + huffman.decode(codedString));\n }\n break;\n default:\n System.out.print(\"Invalid entry\\n\");\n }\n }\n }", "public static void main(String[] args) {\n Huffman huffman=new Huffman(\"Shevchenko Vladimir Vladimirovich\");\n System.out.println(huffman.getCodeText());//\n //answer:110100001001101011000001001110111110110101100110110001001110101111100011101000011011000100111010111110001110100101110101111100000\n\n huffman.getSizeBits();//размер в битах\n ;//кол-во символов\n System.out.println((double) huffman.getSizeBits()/(huffman.getValueOfCharactersOfText()*8)); //коэффициент сжатия относительно aski кодов\n System.out.println((double) huffman.getSizeBits()/(huffman.getValueOfCharactersOfText()*\n (Math.pow(huffman.getValueOfCharactersOfText(),0.5)))); //коэффициент сжатия относительно равномерного кода. Не учитывается размер таблицы\n System.out.println(huffman.getMediumLenght());//средняя длина кодового слова\n System.out.println(huffman.getDisper());//дисперсия\n\n\n }", "public static void main(String[] args) throws FileNotFoundException, IOException {\n\t\tString input = \"\";\r\n\r\n\t\t//읽어올 파일 경로\r\n\t\tString filePath = \"C:/Users/user/Desktop/data13_huffman.txt\";\r\n\r\n\t\t//파일에서 읽어옴\r\n\t\ttry(FileInputStream fStream = new FileInputStream(filePath);){\r\n\t\t\tbyte[] readByte = new byte[fStream.available()];\r\n\t\t\twhile(fStream.read(readByte) != -1);\r\n\t\t\tfStream.close();\r\n\t\t\tinput = new String(readByte);\r\n\t\t}\r\n\r\n\t\t//빈도수 측정 해시맵 생성\r\n\t\tHashMap<Character, Integer> frequency = new HashMap<>();\r\n\t\t//최소힙 생성\r\n\t\tList<Node> nodes = new ArrayList<>();\r\n\t\t//테이블 생성 해시맵\r\n\t\tHashMap<Character, String> table = new HashMap<>();\r\n\r\n\t\t//노드와 빈도수 측정\r\n\t\tfor(int i = 0; i < input.length(); i++) {\r\n\t\t\tif(frequency.containsKey(input.charAt(i))) {\r\n\t\t\t\t//이미 있는 값일 경우 빈도수를 1 증가\r\n\t\t\t\tchar currentChar = input.charAt(i);\r\n\t\t\t\tfrequency.put(currentChar, frequency.get(currentChar) + 1);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t//키를 생성해서 넣어줌\r\n\t\t\t\tfrequency.put(input.charAt(i), 1);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//최소 힙에 저장\r\n\t\tfor(Character key : frequency.keySet()) \r\n\t\t\tnodes.add(new Node(key, frequency.get(key), null, null));\r\n\t\t\t\t\r\n\t\t//최소힙으로 정렬\r\n\t\tbuildMinHeap(nodes);\r\n\r\n\t\t//huffman tree를 만드는 함수 실행\r\n\t\tNode resultNode = huffman(nodes);\r\n\r\n\t\t//파일에 씀 (table)\r\n\t\ttry(FileWriter fw = new FileWriter(\"201702034_table.txt\")){\r\n\t\t\tmakeTable(table, resultNode, \"\");\r\n\t\t\tfor(Character key : table.keySet()) {\r\n\t\t\t\t//System.out.println(key + \" : \" + table.get(key));\r\n\t\t\t\tfw.write(key + \" : \" + table.get(key) + \"\\n\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//파일에 씀 (encoded code)\r\n\t\ttry(FileWriter fw = new FileWriter(\"201702034_encoded.txt\")){\r\n\t\t\tString allString = \"\";\r\n\t\t\t\r\n\t\t\tfor(int i = 0; i < input.length(); i++)\r\n\t\t\t\tallString += table.get(input.charAt(i));\r\n\r\n\t\t\t//System.out.println(allString);\r\n\t\t\tfw.write(allString);\r\n\t\t}\r\n\t}", "public void run() {\n\n\t\tScanner s = new Scanner(System.in); // A scanner to scan the file per\n\t\t\t\t\t\t\t\t\t\t\t// character\n\t\ttype = s.next(); // The type specifies our wanted output\n\t\ts.nextLine(); \n\n\t\t// STEP 1: Count how many times each character appears.\n\t\tthis.charFrequencyCount(s);\n\n\t\t/*\n\t\t * Type F only wants the frequency. Display it, and we're done (so\n\t\t * return)\n\t\t */\n\t\tif (type.equals(\"F\")) {\n\t\t\tdisplayFrequency(frequencyCount);\n\t\t\treturn;\n\t\t}\n\n\t\t/*\n\t\t * STEP 2: we want to make our final tree (used to get the direction\n\t\t * values) This entails loading up the priority queue and using it to\n\t\t * build the tree.\n\t\t */\n\t\tloadInitQueue();\n\t\tthis.finalHuffmanTree = this.buildHuffTree();\n\t\t\n\t\t/*\n\t\t * Type T wants a level order display of the Tree. Do so, and we're done\n\t\t * (so return)\n\t\t */\n\t\tif (type.equals(\"T\")) {\n\t\t\tthis.finalHuffmanTree.visitLevelOrder(new HuffmanVisitorForTypeT());\n\t\t\treturn;\n\t\t}\n\n\t\t/*\n\t\t * STEP 3: We want the Huffman code values for the characters.\n\t\t * The Huffman codes are specified by the path (directions) from the root.\n\t\t * \n\t\t * Each node in the tree has a path to get to it from the root. The\n\t\t * leaves are especially important because they are the original\n\t\t * characters scanned. Load every node with it's special direction value\n\t\t * (the method saves the original character Huffman codes, the direction\n\t\t * vals).\n\t\t */\n\t\tthis.loadDirectionValues(this.finalHuffmanTree.root);\n\t\t// Type H simply wants the codes... display them and we're done (so\n\t\t// return)\n\t\tif (type.equals(\"H\")) {\n\t\t\tthis.displayHuffCodesTable();\n\t\t\treturn;\n\t\t}\n\n\t\t/*\n\t\t * STEP 4: The Type must be M (unless there was invalid input) since all other cases were exhausted, so now we simply display the file using\n\t\t * the Huffman codes.\n\t\t */\n\t\tthis.displayHuffCodefile();\n\t}", "void print(String string) { printStream.print(string); }", "private void ScannerHuffmanCodeCreator(HuffmanNode node, String s, char c) {\n if (s.length() == 1) {\n if (s.charAt(0) == '0') {\n node.left = new HuffmanNode(c);\n } else {\n node.right = new HuffmanNode(c);\n }\n } else {\n if (s.charAt(0) == '0') {\n if (node.left == null && node.right == null) {\n node.left = new HuffmanNode();\n }\n ScannerHuffmanCodeCreator(node.left, s.substring(1), c);\n } else {\n if (node.right == null && node.right == null) {\n node.right = new HuffmanNode();\n }\n ScannerHuffmanCodeCreator(node.right, s.substring(1), c);\n }\n }\n }", "public void printTree(){ \n System.out.format(\"The suffix tree for S = %s is: %n\",this.text); \n this.print(0, this.root); \n }", "T print(short data) throws PrintingException;", "public static void HuffmanTree(String input, String output) throws Exception {\n\t\tFileReader inputFile = new FileReader(input);\n\t\tArrayList<HuffmanNode> tree = new ArrayList<HuffmanNode>(200);\n\t\tchar current;\n\t\t\n\t\t// loops through the file and creates the nodes containing all present characters and frequencies\n\t\twhile((current = (char)(inputFile.read())) != (char)-1) {\n\t\t\tint search = 0;\n\t\t\tboolean found = false;\n\t\t\twhile(search < tree.size() && found != true) {\n\t\t\t\tif(tree.get(search).inChar == (char)current) {\n\t\t\t\t\ttree.get(search).frequency++; \n\t\t\t\t\tfound = true;\n\t\t\t\t}\n\t\t\t\tsearch++;\n\t\t\t}\n\t\t\tif(found == false) {\n\t\t\t\ttree.add(new HuffmanNode(current));\n\t\t\t}\n\t\t}\n\t\tinputFile.close();\n\t\t\n\t\t//creates the huffman tree\n\t\tcreateTree(tree);\n\t\t\n\t\t//the huffman tree\n\t\tHuffmanNode sortedTree = tree.get(0);\n\t\t\n\t\t//prints out the statistics of the input file and the space saved\n\t\tFileWriter newVersion = new FileWriter(\"C:\\\\Users\\\\Chris\\\\workspace\\\\P2\\\\src\\\\P2_cxt240_Tsuei_statistics.txt\");\n\t\tprintTree(sortedTree, \"\", newVersion);\n\t\tspaceSaver(newVersion);\n\t\tnewVersion.close();\n\t\t\n\t\t// codes the file using huffman encoding\n\t\tFileWriter outputFile = new FileWriter(output);\n\t\ttranslate(input, outputFile);\n\t}", "public static void main(String[] args)\n {\n\t\t\tHuffman tree= new Huffman();\n \t \t Scanner sc=new Scanner(System.in);\n\t\t\tnoOfFrequencies=sc.nextInt();\n\t\t\t// It adds all the user input values in the tree.\n\t\t\tfor(int i=1;i<=noOfFrequencies;i++)\n\t\t\t{\n\t\t\t\tString temp=sc.next();\n\t\t\t\ttree.add(temp,sc.next());\n\t\t\t}\n\t\tint lengthToDecode=sc.nextInt();\n\t\tString encodedValue=sc.next();\n\t\t// This statement decodes the encoded values.\n\t\ttree.getDecodedMessage(encodedValue);\n\t\tSystem.out.println();\n\t\t}", "public void printStringsInLexicoOrder() {\n\t\t// ***** method code to be added in this class *****\n\t\t// now we just have a dummy method that prints a message.\n\n\t\tTreeNode node = root;\n\t\t\n\t\tprintStringsInLexicoOrder(node);\n\t}", "T println(short data) throws PrintingException;", "private void print(byte[] buffer, int level) {\n for (int i = 0; i < level; i++) {\n System.out.print(' ');\n }\n\n if (child == null) {\n System.out.print(\"Type: 0x\" + Integer.toHexString(type) +\n \" length: \" + length + \" value: \");\n if (type == PRINTSTR_TYPE ||\n type == TELETEXSTR_TYPE ||\n type == UTF8STR_TYPE ||\n type == IA5STR_TYPE ||\n type == UNIVSTR_TYPE) {\n try {\n System.out.print(new String(buffer, valueOffset, length,\n \"UTF-8\"));\n } catch (UnsupportedEncodingException e) {\n // ignore\n }\n } else if (type == OID_TYPE) {\n System.out.print(OIDtoString(buffer, valueOffset, length));\n } else {\n System.out.print(hexEncode(buffer, valueOffset, length, 14));\n }\n\n System.out.println(\"\");\n } else {\n if (type == SET_TYPE) {\n System.out.println(\"Set:\");\n } else if (type == VERSION_TYPE) {\n System.out.println(\"Version (explicit):\");\n } else if (type == EXTENSIONS_TYPE) {\n System.out.println(\"Extensions (explicit):\");\n } else {\n System.out.println(\"Sequence:\");\n }\n\n child.print(buffer, level + 1);\n }\n\n if (next != null) {\n next.print(buffer, level);\n }\n }", "public void printString()\r\n\t\t{\r\n\t\t\tTreeNode previousTreeNode = null; //holds the previous node\r\n\t\t\tTreeNode currentTreeNode = null; //holds current node\r\n\r\n\t\t\tData currentData = head; //start at the head of our data which is a linked list\r\n\t\t\twhile (currentData != null) //while the currentData is not null\r\n\t\t\t{\r\n\t\t\t\tcurrentTreeNode = currentData.getLT(); //get the Less Than tree\r\n\t\t\t\tif (currentTreeNode != previousTreeNode)\r\n\t\t\t\t\tcurrentTreeNode.printString(); //print the Less Than tree\r\n\t\t\t\tpreviousTreeNode = currentTreeNode;\r\n\r\n\t\t\t\tcurrentData.getWord(); //get the current word\r\n\t\t\t\tSystem.out.printf(\"%-20s\", currentData.getWord()); //print the current word\r\n\t\t\t\tArrayList locations = currentData.getLocations(); //get the word's locations in the file\r\n\t\t\t\tfor (int i = 0; i < locations.size(); i++) //print all of those\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.printf(\" (%s,%s)\", ((Point) locations.get(i)).x, ((Point) locations.get(i)).y);\r\n\t\t\t\t\tif ((((i + 1) % 8) == 0) && ((i + 1) != locations.size())) //only print 8 items per line\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.printf(\"\\n%-20s\", \"\\\"\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.println(); //print a newline\r\n\r\n\t\t\t\tcurrentTreeNode = currentData.getGT(); //get the Greater Than tree\r\n\t\t\t\tif (currentTreeNode != previousTreeNode)\r\n\t\t\t\t\tcurrentTreeNode.printString(); //print the Greater Than tree\r\n\t\t\t\tpreviousTreeNode = currentTreeNode;\r\n\t\t\t\tcurrentData = currentData.nextData();\r\n\t\t\t}\r\n\t\t}", "@Override\n\tpublic Object visit(ASTString node, Object data) {\n\t\tSystem.out.print(node.strName);\n\t\treturn null;\n\t}", "@Override\n\tpublic void addPrinter(Printer<? super BitString> printer) {\n\t\t\n\t}", "public void print(int level) {\n\n if (level == -1) {\n System.out.println(\"-------------\");\n System.out.println(\"Printing Trie\");\n }\n\n if (root == null) {\n System.out.println(\"Level \" + 1 + \": \");\n System.out.println(\"-------------\");\n return;\n }\n\n Queue<TrieNode.InternalNode<T>> queue = new LinkedList<>();\n TrieNode.InternalNode<T> rootInternal = \n new TrieNode.InternalNode<>('*', root);\n queue.offer(rootInternal);\n int currLevel = 0;\n int numElements = 1;\n\n while (numElements != 0) {\n int[] levelChars = new int[128];\n Counter newNumElements = new Counter();\n for (int i = 0; i < numElements; i++) {\n TrieNode.InternalNode<T> node = queue.poll();\n levelChars[node.c]++;\n node.node.children.forEach(childNode -> {\n queue.add(childNode);\n newNumElements.count++;\n });\n }\n\n if (currLevel == level || level == -1 && currLevel != 0) {\n Queue<Character> printChars = new LinkedList<>();\n for (int i = 0; i < levelChars.length; i++) {\n if (levelChars[i] != 0 && ((char) i) != ' ') {\n for (int j = 0; j < levelChars[i]; j++) {\n printChars.add((char) i);\n }\n }\n }\n\n System.out.print(\"Level \" + currLevel + \": \");\n while (true) {\n System.out.print(printChars.poll());\n if (printChars.peek() != null) {\n System.out.print(\",\");\n } else {\n break;\n }\n }\n System.out.println();\n }\n\n numElements = newNumElements.count;\n if (currLevel == level) {\n break;\n }\n currLevel++;\n }\n\n // Print last empty level if all levels had to be printed\n if (level == -1) {\n System.out.println(\"Level \" + currLevel + \": \");\n System.out.println(\"-------------\");\n }\n }", "public void readAndPrint(String str);", "private static void print(String p) {\n\t\tSystem.out.println(PREFIX + p);\n\t}", "public void HuffmanCode()\n {\n String text=message;\n /* Count the frequency of each character in the string */\n //if the character does not exist in the list add it\n for(int i=0;i<text.length();i++)\n {\n if(!(c.contains(text.charAt(i))))\n c.add(text.charAt(i));\n } \n int[] freq=new int[c.size()];\n //counting the frequency of each character in the text\n for(int i=0;i<c.size();i++)\n for(int j=0;j<text.length();j++)\n if(c.get(i)==text.charAt(j))\n freq[i]++;\n /* Build the huffman tree */\n \n root= buildTree(freq); \n \n }", "private void printCodeProcedure(String code, BinaryTreeInterface<HuffmanData> tree) {\n\t\t\t\tif (tree == null) {\n\n\t\t\t\t} else {\n\t\t\t\t\tprintCodeProcedure(code + \"0\", tree.getLeftSubtree());\n\t\t\t\t\tprintCodeProcedure(code + \"1\", tree.getRightSubtree());\n\t\t\t\t\tif (tree.getRootData().getSymbol() != '\\u0000') {\n\t\t\t\t\t\tSystem.out.println(tree.getRootData().getSymbol() + \": \" + code);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t}", "public static void main(String[] args) throws IOException {\n BufferedReader buffRead = new BufferedReader(new FileReader(\"/home/hsnavarro/IdeaProjects/Aula 1/src/input\"));\n FileOutputStream output = new FileOutputStream(\"src/output\", true);\n String s = \"\";\n s = buffRead.readLine().toLowerCase();\n System.out.println(s);\n CifraCesar c = new CifraCesar(0, s, true);\n c.getInfo();\n int[] freq = new int[26];\n for (int i = 0; i < 26; ++i) freq[i] = 0;\n for (int i = 0; i < c.criptografada.length(); i++) {\n freq[c.criptografada.charAt(i) - 97]++;\n }\n Huffman h = new Huffman(freq, c.criptografada);\n h.printHuffman();\n h.descriptografiaHuffman();\n System.out.println(\"huffman: \" + h.descriptoHuffman);\n CifraCesar d = new CifraCesar(h.criptoAnalisis(), h.descriptoHuffman, false);\n\n System.out.println(d.descriptografada);\n System.out.println(d.descriptografada);\n\n System.out.println(\"Comparando:\");\n System.out.println(\"Antes da compressão:\" + s.length());\n\n byte inp = 0;\n int cnt = 0;\n for (int i = 0; i < h.criptografada.length(); i++) {\n int idx = i % 8;\n if (h.criptografada.charAt(i) == '1') inp += (1 << (7 - idx));\n if (idx == 7) {\n cnt++;\n output.write(inp);\n inp = 0;\n }\n }\n if(h.criptografada.length() % 8 != 0){\n cnt++;\n output.write(inp);\n }\n System.out.println(\"Depois da compressão:\" + cnt);\n buffRead.close();\n output.close();\n }", "public HuffmanCode(Scanner input) {\n this.front = new HuffmanNode();\n while (input.hasNextLine()) {\n int character = Integer.parseInt(input.nextLine());\n String location = input.nextLine();\n ScannerHuffmanCodeCreator(this.front, location, (char) character);\n }\n }", "public static void main(String[] args) {\n int[] freqNums = scanFile(args[0]);\n HuffmanNode[] nodeArr = createNodes(freqNums);\n nodeArr = freqSort(nodeArr);\n HuffmanNode top = createTree(nodeArr);\n String empty = \"\";\n String[] encodings = new String[94];\n encodings = getCodes(top, empty, false, encodings, true);\n printEncoding(encodings, freqNums);\n writeFile(args[0], args[1], encodings);\n }", "public void print(Node node, PrintWriter w)\n{\n print(node, 0, w);\n}", "public HuffmanCoding(String text) {\n\t\t// TODO fill this in.\n\t\ttextArray = text.toCharArray();\n\n\t\tPriorityQueue<Leaf> queue = new PriorityQueue<>(new Comparator<Leaf>() {\n\t\t\t@Override\n\t\t\tpublic int compare(Leaf a, Leaf b) {\n\t\t\t\tif (a.frequency > b.frequency) {\n\t\t\t\t\treturn 1;\n\t\t\t\t} else if (a.frequency < b.frequency) {\n\t\t\t\t\treturn -1;\n\t\t\t\t} else {\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tfor (char c : textArray) {\n\t\t\tif (chars.containsKey(c)) {\n\t\t\t\tint freq = chars.get(c);\n\t\t\t\tfreq = freq + 1;\n\t\t\t\tchars.remove(c);\n\t\t\t\tchars.put(c, freq);\n\t\t\t} else {\n\t\t\t\tchars.put(c, 1);\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(\"tree print\");\t\t\t\t\t\t\t\t// print method begin\n\n\t\tfor(char c : chars.keySet()){\n\t\t\tint freq = chars.get(c);\n\t\t\tSystem.out.println(c + \" \" + freq);\n\t\t}\n\n\t\tint total = 0;\n\t\tfor(char c : chars.keySet()){\n\t\t\ttotal = total + chars.get(c);\n\t\t}\n\t\tSystem.out.println(\"total \" + total);\t\t\t\t\t\t\t// ends\n\n\t\tfor (char c : chars.keySet()) {\n\t\t\tLeaf l = new Leaf(c, chars.get(c), null, null);\n\t\t\tqueue.offer(l);\n\t\t}\n\n\t\twhile (queue.size() > 1) {\n\t\t\tLeaf a = queue.poll();\n\t\t\tLeaf b = queue.poll();\n\n\t\t\tint frequency = a.frequency + b.frequency;\n\n\t\t\tLeaf leaf = new Leaf('\\0', frequency, a, b);\n\n\t\t\tqueue.offer(leaf);\n\t\t}\n\n\t\tif(queue.size() == 1){\n\t\t\tthis.root = queue.peek();\n\t\t}\n\t}", "public Huffman(String input) {\n\t\t\n\t\tthis.input = input;\n\t\tmapping = new HashMap<>();\n\t\t\n\t\t//first, we create a map from the letters in our string to their frequencies\n\t\tMap<Character, Integer> freqMap = getFreqs(input);\n\n\t\t//we'll be using a priority queue to store each node with its frequency,\n\t\t//as we need to continually find and merge the nodes with smallest frequency\n\t\tPriorityQueue<Node> huffman = new PriorityQueue<>();\n\t\t\n\t\t/*\n\t\t * TODO:\n\t\t * 1) add all nodes to the priority queue\n\t\t * 2) continually merge the two lowest-frequency nodes until only one tree remains in the queue\n\t\t * 3) Use this tree to create a mapping from characters (the leaves)\n\t\t * to their binary strings (the path along the tree to that leaf)\n\t\t * \n\t\t * Remember to store the final tree as a global variable, as you will need it\n\t\t * to decode your encrypted string\n\t\t */\n\t\t\n\t\tfor (Character key: freqMap.keySet()) {\n\t\t\tNode thisNode = new Node(key, freqMap.get(key), null, null);\n\t\t\thuffman.add(thisNode);\n\t\t}\n\t\t\n\t\twhile (huffman.size() > 1) {\n\t\t\tNode leftNode = huffman.poll();\n\t\t\tNode rightNode = huffman.poll();\n\t\t\tint parentFreq = rightNode.freq + leftNode.freq;\n\t\t\tNode parent = new Node(null, parentFreq, leftNode, rightNode);\n\t\t\thuffman.add(parent);\n\t\t}\n\t\t\n\t\tthis.huffmanTree = huffman.poll();\n\t\twalkTree();\n\t}", "@Override\n protected void prettyPrintChildren(PrintStream s, String prefix) {\n }", "@Override\n protected void prettyPrintChildren(PrintStream s, String prefix) {\n }", "@Override\n protected void prettyPrintChildren(PrintStream s, String prefix) {\n }", "public void print(String someString) {\r\n try {\r\n innerStream.write(someString.getBytes(\"UTF8\"));\r\n } catch (Exception e) {\r\n LogManager.getRootLogger().error(e);\r\n }\r\n }", "@Test\r\n public void printTests(){\n\r\n BinaryTree<Integer> tree = new BinaryTree<>();\r\n tree.add(50);\r\n tree.add(25);\r\n tree.add(75);\r\n tree.add(12);\r\n tree.add(37);\r\n tree.add(67);\r\n tree.add(87);\r\n\r\n // redirect stdout to ByteArrayOutputStream for junit\r\n ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();\r\n PrintStream printStream = new PrintStream(byteArrayOutputStream);\r\n PrintStream oldPrintStream = System.out;\r\n System.setOut(printStream);\r\n\r\n // inorder should print 12 25 37 50 67 75 87\r\n tree.print();\r\n printStream.flush();\r\n assertEquals(\"12 25 37 50 67 75 87 \", byteArrayOutputStream.toString());\r\n\r\n byteArrayOutputStream.reset();\r\n\r\n // preorder should print 50 25 12 37 75 67 87\r\n tree.print(BinaryTree.PrintOrder.PREORDER);\r\n printStream.flush();\r\n assertEquals(\"50 25 12 37 75 67 87 \", byteArrayOutputStream.toString());\r\n\r\n byteArrayOutputStream.reset();\r\n\r\n // postorder should print 12 37 25 67 87 75 50\r\n tree.print(BinaryTree.PrintOrder.POSTORDER);\r\n printStream.flush();\r\n assertEquals(\"12 37 25 67 87 75 50 \", byteArrayOutputStream.toString());\r\n\r\n // restore stdout\r\n System.setOut(oldPrintStream);\r\n }", "public abstract String visualize(byte input);", "T println(char data) throws PrintingException;", "T print(String data) throws PrintingException;", "public HuffmanNode(String v, int f)\n\t{\n\t\tfrequency = f;\n\t\tvalue = v;\n\t\tleft = null;\n\t\tright = null;\n\t}", "void decode(){\n int bit = -1; // next bit from compressed file: 0 or 1. no more bit: -1\r\n int k = 0; // index to the Huffman tree array; k = 0 is the root of tree\r\n int n = 0; // number of symbols decoded, stop the while loop when n == filesize\r\n int numBits = 0; // number of bits in the compressed file\r\n FileOutputStream file = null;\r\n try {\r\n file = new FileOutputStream(\"uncompressed.txt\");\r\n } catch (FileNotFoundException ex) {\r\n System.err.println(\"Could not open file to write to.\");\r\n }\r\n while ((bit = inputBit()) >= 0){\r\n k = codetree[k][bit];\r\n numBits++;\r\n if (codetree[k][0] == 0){ // leaf\r\n try {\r\n file.write(codetree[k][1]);\r\n } catch (IOException ex) {\r\n System.err.println(\"Failed to write to file.\");\r\n }\r\n System.out.write(codetree[k][1]);\r\n if (n++ == filesize) break; // ignore any additional bits\r\n k = 0;\r\n }\r\n }\r\n System.out.printf(\"\\n\\n------------------------------\\n\" +\r\n \"%d bytes in uncompressed file.\\n\", filesize);\r\n System.out.printf(\"%d bytes in compressed file.\\n\", numBits / 8);\r\n System.out.printf(\"Compression ratio of %f.\", (double)numBits / (double)filesize);\r\n System.out.flush();\r\n }", "private void writeHelper(PrintStream output, QuestionNode root) {\r\n if (root.left == null || root.right == null) {\r\n output.println(\"A:\");\r\n output.println(root.data);\r\n } else {\r\n output.println(\"Q:\");\r\n output.println(root.data);\r\n writeHelper(output, root.left);\r\n writeHelper(output, root.right);\r\n }\r\n }", "@Override\r\n\tpublic String toString() {\r\n\t\tIterator<HuffmanPair> temp;\r\n\t\tString result = \"\";\r\n\t\ttemp = super.iteratorPreOrder();\r\n\t\twhile (temp.hasNext()) {\r\n\t\t\tresult += temp.next().toString();\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "public abstract void printToStream(PrintStream stream);", "public static void main(String[] args) {\n TextFileGenerator textFileGenerator = new TextFileGenerator();\n HuffmanTree huffmanTree;\n Scanner keyboard = new Scanner(System.in);\n PrintWriter encodedOutputStream = null;\n PrintWriter decodedOutputStream = null;\n String url, originalString = \"\", encodedString, decodedString;\n boolean badURL = true;\n int originalBits, encodedBits, decodedBits;\n\n while(badURL) {\n System.out.println(\"Please enter a URL: \");\n url = keyboard.nextLine();\n\n try {\n originalString = textFileGenerator.makeCleanFile(url, \"original.txt\");\n badURL = false;\n }\n catch(IOException e) {\n System.out.println(\"Error: Please try again\");\n }\n }\n\n huffmanTree = new HuffmanTree(originalString);\n encodedString = huffmanTree.encode(originalString);\n decodedString = huffmanTree.decode(encodedString);\n // NOTE: TextFileGenerator.getNumChars() was not working for me. I copied the encoded text file (pure 0s and 1s)\n // into google docs and the character count is accurate with the String length and not the method\n originalBits = originalString.length() * 16;\n encodedBits = encodedString.length();\n decodedBits = decodedString.length() * 16;\n\n decodedString = fixPrintWriterNewLine(decodedString);\n\n try { // creating the encoded and decoded files\n encodedOutputStream = new PrintWriter(new FileOutputStream(\"src\\\\edu\\\\miracosta\\\\cs113\\\\encoded.txt\"));\n decodedOutputStream = new PrintWriter(new FileOutputStream(\"src\\\\edu\\\\miracosta\\\\cs113\\\\decoded.txt\"));\n encodedOutputStream.print(encodedString);\n decodedOutputStream.print(decodedString);\n }\n catch(IOException e) {\n System.out.println(\"Error: IOException!\");\n }\n\n encodedOutputStream.close();\n decodedOutputStream.close();\n\n System.out.println(\"Original file bit count: \" + originalBits);\n System.out.println(\"Encoded file bit count: \" + encodedBits);\n System.out.println(\"Decoded file bit count: \" + decodedBits);\n System.out.println(\"Compression ratio: \" + (double)originalBits/encodedBits);\n }", "TypePrinter print(char c);", "public static void huffmanTraverser(HuffmanNode root, String s) {\r\n\t\tif(root == null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif(root.left == null && root.right == null) {\r\n\t\t\tmap.put(root.inChar, s);\r\n\t\t}\r\n\t\t\r\n\t\thuffmanTraverser(root.left, s + \"0\");\r\n\t\thuffmanTraverser(root.right, s + \"1\");\r\n\t}", "public static void compress(String s, String fileName) throws IOException {\n File file = new File(fileName);\n if (file.exists()){\n file.delete();\n }\n file.createNewFile();\n BufferedOutputStream out = new BufferedOutputStream(new FileOutputStream(file));\n char[] input = s.toCharArray();\n\n // tabulate frequency counts\n int[] freq = new int[R];\n for (int i = 0; i < input.length; i++)\n freq[input[i]]++;\n\n Node root = buildTrie(freq, out);\n\n // build code table\n String[] st = new String[R];\n buildCode(st, root, \"\");\n\n writeTrie(root, file);\n\n // print number of bytes in original uncompressed message\n BinaryStdOut.write(input.length);\n\n // use Huffman code to encode input\n for (int i = 0; i < input.length; i++) {\n String code = st[input[i]];\n for (int j = 0; j < code.length(); j++) {\n if (code.charAt(j) == '0') {\n BinaryStdOut.write(false);\n }\n else if (code.charAt(j) == '1') {\n BinaryStdOut.write(true);\n }\n else throw new IllegalStateException(\"Illegal state\");\n }\n }\n\n BinaryStdOut.close();\n }", "private void writeInternal(QuestionNode root, PrintStream output) {\r\n if(root != null) {\r\n if(root.isLeafNode()) { // leaf node\r\n output.println(\"A:\");\r\n output.println(root.data);\r\n } else {\r\n output.println(\"Q:\");\r\n output.println(root.data);\r\n }\r\n writeInternal(root.left, output);\r\n writeInternal(root.right, output);\r\n }\r\n }", "public static void printEncoding(String[] encodings, int[] freqNums){\n int saveSpace = 0;\n //loops through all characters to print encodings and calculate savings\n for(int i = 0; i < encodings.length; i++) {\n if (freqNums[i] != 0) {\n System.out.println(\"'\" + (char)(i+32) + \"'\" + \": \" + freqNums[i] + \": \" + encodings[i]);\n saveSpace = saveSpace + (8 - encodings[i].length())*freqNums[i];\n }\n }\n System.out.println();\n System.out.println(\"You will save \" + saveSpace + \" bits with the Huffman Compressor\");\n }", "private void writeTree(QuestionNode current,PrintStream output){\n if (current != null) {\n //assign type, 'Q' or 'A'\n String type = \"\";\n if (current.left == null && current.right == null){\n type = \"A:\";\n } else {\n type = \"Q:\";\n } \n //print data of tree node\n output.println(type);\n output.println(current.data);\n //print left branch\n writeTree(current.left,output);\n //print right branch\n writeTree(current.right,output); \n }\n }", "private String print(BSTNode<T> node, int level) {\r\n\t\tString ret = \"\";\r\n\t\tif(node!= null) {\r\n\t\t\tfor(int i = 0; i< level; i++) {\r\n\t\t\t\tret += \"\\t\";\r\n\t\t\t}\r\n\t\t\tret+= node.data;\r\n\t\t\tret +=\"\\n\";\r\n\t\t\tret += print(node.left, level +1);\r\n\t\t\tret += print(node.right, level+1);\r\n\t\t}\r\n\t\treturn ret;\r\n\t}", "public static void main(String[] args) throws IOException {\n\t\tString fname;\n\t\tFile file;\n\t\tScanner keyboard = new Scanner(System.in);\n\t\tScanner inFile;\n\n\t\tString line, word;\n\t\tStringTokenizer token;\n\t\tint[] freqTable = new int[256];\n\n\t\tSystem.out.println (\"Enter the complete path of the file to read from: \");\n\n\t\tfname = keyboard.nextLine();\n\t\tfile = new File(fname);\n\t\tinFile = new Scanner(file);\n\n\t\twhile (inFile.hasNext()) {\n\t\t\tline = inFile.nextLine();\n\t\t\ttoken = new StringTokenizer(line, \" \");\n\t\t\twhile (token.hasMoreTokens()) {\n\t\t\t\tword = token.nextToken();\n\t\t\t\tfreqTable = updateFrequencyTable(freqTable, word);\n\t\t\t}\n\t\t}\n\n\t\t//print frequency table\n\n\t\tSystem.out.println(\"Table of frequencies\");\n\t\tSystem.out.println(\"Character \\t Frequency \\n\");\n\n\t\tfor(int i=0; i<256; i++) {\n\t\t\tif (freqTable[i]>0)\n\t\t\t\tSystem.out.println(((char)i) + \"\\t\" + freqTable[i]);\n\t\t\t}\n\n\t\tQueue<BinaryTree<Pair>> S = buildQueue(freqTable);\n\n\t\tQueue<BinaryTree<Pair>> T = new Queue<BinaryTree<Pair>>();\n\n\t\tBinaryTree<Pair> huffmanTree = createTree(S, T);\n\n\t\tString[] encodingTable = findEncoding(huffmanTree);\n\n\t\tSystem.out.println(\"Encoding Table\");\n\t\tfor(int i=0; i<256; i++) {\n\t\t\tif (encodingTable[i]!=null)\n\t\t\t\tSystem.out.println(((char)i) + \"\\t\" + encodingTable[i]);\n\t\t}\n\t\tinFile.close();\n\t}", "T println(byte data) throws PrintingException;", "private void print(StringBuffer buffer, DAG.Node node,\n \t DAG.Node parent, List<DAG.Arc> arcs) {\n \n \t // Add the vertexIndex to the labels if it hasn't already been added.\n \t if (!(this.currentCanonicalLabelMapping.contains(node.vertexIndex))) {\n \t this.currentCanonicalLabelMapping.add(node.vertexIndex);\n \t }\n \n \t // print out any symbol for the edge in the input graph\n \t if (parent != null) {\n \t buffer.append(getEdgeSymbol(node.vertexIndex, parent.vertexIndex));\n \t }\n \n \t // print out the text that represents the node itself\n \t buffer.append(this.startNodeSymbol);\n \t buffer.append(getVertexSymbol(node.vertexIndex));\n \n \t int color = dag.colorFor(node.vertexIndex);\n \t if (color != 0) {\n \t buffer.append(',').append(color);\n \t }\n \t buffer.append(this.endNodeSymbol);\n \n \t // Need to sort the children here, so that they are printed in an order \n \t // according to their invariants.\n \t Collections.sort(node.children);\n \n \t // now print the sorted children, surrounded by branch symbols\n \t boolean addedBranchSymbol = false;\n \t for (DAG.Node child : node.children) {\n \t DAG.Arc arc = dag.new Arc(node.vertexIndex, child.vertexIndex);\n \t if (arcs.contains(arc)) {\n \t continue;\n \t } else {\n \t if (!addedBranchSymbol) {\n \t buffer.append(AbstractSignature.START_BRANCH_SYMBOL);\n \t addedBranchSymbol = true;\n \t }\n \t arcs.add(arc);\n \t print(buffer, child, node, arcs);\n \t }\n \t }\n \t if (addedBranchSymbol) {\n \t buffer.append(AbstractSignature.END_BRANCH_SYMBOL);\n \t }\n \t}", "public static void main(String[] args){\n huffmanCoder(args[0],args[1]);\n }", "public void print(String string){\n // make sure that the global weka log picks it up\n System.out.print(string);\n logStatusMessage(string); \n }", "private void buildOutput()\n\t{\n\t\tif(outIndex >= output.length)\n\t\t{\n\t\t\tbyte[] temp = output;\n\t\t\toutput = new byte[temp.length * 2];\n\t\t\tSystem.arraycopy(temp, 0, output, 0, temp.length);\n\t\t}\n\t\t\n\t\tif(sb.length() < 16 && aryIndex < fileArray.length)\n\t\t{\n\t\t\tbyte[] b = new byte[1];\n\t\t\tb[0] = fileArray[aryIndex++];\n\t\t\tsb.append(toBinary(b));\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < prioQ.size(); i++)\n\t\t{\n\t\t\tif(sb.toString().startsWith(prioQ.get(i).getCode()))\n\t\t\t{\n\t\t\t\toutput[outIndex++] = (byte)prioQ.get(i).getByteData();\n\t\t\t\tsb = new StringBuilder(\n\t\t\t\t\t\tsb.substring(prioQ.get(i).getCode().length()));\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"Can't find Huffman code.\");\n\t\tSystem.exit(1);\n\t\texit = true;\n\t}", "private static void generateHuffmanTree(){\n try (BufferedReader br = new BufferedReader(new FileReader(_codeTableFile))) {\n String line;\n while ((line = br.readLine()) != null) {\n // process the line.\n if(!line.isEmpty() && line!=null){\n int numberData = Integer.parseInt(line.split(\" \")[0]);\n String code = line.split(\" \")[1];\n Node traverser = root;\n for (int i = 0; i < code.length() - 1; i++){\n char c = code.charAt(i); \n if (c == '0'){\n //bit is 0\n if(traverser.getLeftPtr() == null){\n traverser.setLeftPtr(new BranchNode(999999, null, null));\n }\n traverser = traverser.getLeftPtr();\n }\n else{\n //bit is 1\n if(traverser.getRightPtr() == null){\n traverser.setRightPtr(new BranchNode(999999, null, null));\n }\n traverser = traverser.getRightPtr();\n }\n }\n //Put data in the last node by creating a new leafNode\n char c = code.charAt(code.length() - 1);\n if(c == '0'){\n traverser.setLeftPtr(new LeafNode(9999999, numberData, null, null));\n }\n else{\n traverser.setRightPtr(new LeafNode(9999999, numberData, null, null));\n }\n }\n }\n } \n catch (IOException ex) {\n Logger.getLogger(FrequencyTableBuilder.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "private static void printNode(@Nonnull Node<OWLClass> node) {\n DefaultPrefixManager pm = new DefaultPrefixManager(null, null, \"http://owl.man.ac.uk/2005/07/sssw/people#\");\n // Print out a node as a list of class names in curly brackets\n for (Iterator<OWLClass> it = node.getEntities().iterator(); it.hasNext();) {\n OWLClass cls = it.next();\n // User a prefix manager to provide a slightly nicer shorter name\n String shortForm = pm.getShortForm(cls);\n\n System.out.println(\"Short Name: \"+shortForm);\n //assertNotNull(shortForm);\n }\n }", "public void encodeData() {\n frequencyTable = new FrequencyTableBuilder(inputPath).buildFrequencyTable();\n huffmanTree = new Tree(new HuffmanTreeBuilder(new FrequencyTableBuilder(inputPath).buildFrequencyTable()).buildTree());\n codeTable = new CodeTableBuilder(huffmanTree).buildCodeTable();\n encodeMessage();\n print();\n }", "public void printString()\r\n\t{\r\n\t\t//print the column labels\r\n\t\tSystem.out.printf(\"%-20s %s\\n\", \"Word\", \"Occurrences [form: (Paragraph#, Line#)]\");\r\n\t\tSystem.out.printf(\"%-20s %s\\n\", \"----\", \"-----------\");\r\n\t\troot.printString();\r\n\t}", "public void print(String line);", "private static void writeTrie(Node x, BufferedOutputStream out) {\n if (x.isLeaf()) {\n BinaryStdOut.write(true);\n BinaryStdOut.write(x.ch, 8);\n return;\n }\n BinaryStdOut.write(false);\n writeTrie(x.left);\n writeTrie(x.right);\n }", "T print(byte data) throws PrintingException;", "public void print() {\n // char letter = (char)\n // (this.registers.get(this.registerPointer).intValue());\n char letter = (char) this.registers[this.registerPointer];\n this.intOutput.add(this.registers[this.registerPointer]);\n // System.out.println(\"print: \" + this.registers[this.registerPointer]);\n this.output.add(Character.toString(letter));\n }", "void printGivenLevel (Node root, int level)\n {\n if (root == null) {\n System.out.print(\"_ \");\n return;\n }\n if (level == 1)\n System.out.print(root.symbol + \" \");\n else if (level > 1)\n {\n printGivenLevel(root.left, level-1);\n printGivenLevel(root.right, level-1);\n }\n }", "public HuffmanCoding(String text) {\n\t\t// TODO fill this in.\n\t\tMap<Character, Integer> frequencyMap = new HashMap<>();\n\t\tint textLength = text.length();\n\n\t\tfor (int i = 0; i < textLength; i++) {\n\t\t\tchar character = text.charAt(i);\n\t\t\tif (!frequencyMap.containsKey(character)) {\n\t\t\t\tfrequencyMap.put(character, 1);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tint newFreq = frequencyMap.get(character) + 1;\n\t\t\t\tfrequencyMap.replace(character, newFreq);\n\t\t\t}\n\t\t}\n\n\t\tPriorityQueue<Node> queue = new PriorityQueue<>();\n\n\t\tIterator iterator = frequencyMap.entrySet().iterator();\n\t\twhile (iterator.hasNext()) {\n\t\t\tMap.Entry<Character, Integer> pair = (Map.Entry<Character, Integer>) iterator.next();\n\t\t\tNode node = new Node(null, null, pair.getKey(), pair.getValue());\n\t\t\tqueue.add(node);\n\t\t}\n\n\t\twhile (queue.size() > 1) {\n\t\t\tNode node1 = queue.poll();\n\t\t\tNode node2 = queue.poll();\n\t\t\tNode parent = new Node(node1, node2, '\\t', node1.getFrequency() + node2.getFrequency());\n\t\t\tqueue.add(parent);\n\t\t}\n\t\thuffmanTree = queue.poll();\n\t\tSystem.out.println(\"firstNode: \"+ huffmanTree);\n\t\tcodeTable(huffmanTree);\n\n\t\t//Iterator iterator1 = encodingTable.entrySet().iterator();\n\n\t\t/*\n\t\twhile (iterator1.hasNext()) {\n\t\t\tMap.Entry<Character, String> pair = (Map.Entry<Character, String>) iterator1.next();\n\t\t\tSystem.out.println(pair.getKey() + \" : \" + pair.getValue() + \"\\n\");\n\t\t}\n\t\t*/\n\n\t\t//System.out.println(\"Hashmap.size() : \" + frequencyMap.size());\n\n\t}", "protected void print(Object s) throws IOException {\n out.write(Convert.escapeUnicode(s.toString()));\n }", "private void outputDepthFirstSearch(TrieNode rootNode, StringBuilder output) {\n\n if (rootNode == null) {\n return;\n }\n for (int i = 0; i < 26; i++) {\n\n TrieNode trieNode = rootNode.offsprings[i];\n\n if (trieNode != null) {\n char ch = (char) (i + 'a');\n output.append(ch);\n }\n\n outputDepthFirstSearch(trieNode, output);\n }\n }", "public Node(int frequency){;\n\t\tthis.frequency = frequency;\n\t\t// we cannot use null since it is our EOF so try \"SOH\" or start of heading.\n\t\t// also setting here does not work ... (hmm)!\n\t\tthis.character = (char) 0x01;\n\t}", "@Test\n public void testToString2() {\n System.out.println(\"Animal.toString2\");\n ByteArrayOutputStream outContent = new ByteArrayOutputStream();\n System.setOut(new PrintStream(outContent));\n System.out.print(animal1);\n assertEquals(\"Abstract Axe (17 yo Aardvark) resides in cage #202\", outContent.toString());\n System.out.print(animal2);\n assertEquals(\"Brave Beard (3 yo Beaver) resides in cage #112\", animal2.toString());\n System.setOut(System.out);\n }", "@Override\n\tpublic void print() {\n System.out.println(\"Leaf [isbn=\"+number+\", title=\"+title+\"]\");\n\t}", "public HuffmanNode(int freq){\r\n this(freq, null, null);\r\n }", "private static void println(String message, SimpleAttributeSet settings) {print(message + \"\\n\", settings);}", "public static void expand() {\n Node root = readTrie();\n\n // number of bytes to write\n int length = BinaryStdIn.readInt();\n\n // decode using the Huffman trie\n for (int i = 0; i < length; i++) {\n Node x = root;\n while (!x.isLeaf()) {\n boolean bit = BinaryStdIn.readBoolean();\n if (bit) x = x.right;\n else x = x.left;\n }\n BinaryStdOut.write(x.ch, 8);\n }\n BinaryStdOut.close();\n }", "public static void main(String args[]) throws IOException {\n Scanner sc= new Scanner(System.in);\r\n String s= sc.next();\r\n char ch= s.charAt(0);\r\n switch (ch)\r\n {\r\n case 'P':\r\n case 'p': \r\n System.out.println(\"PrepBytes\");\r\n break;\r\n case 'Z':\r\n case 'z':\r\n System.out.println(\"Zenith\");\r\n break;\r\n case 'E':\r\n case 'e':\r\n System.out.println(\"Expert Coder\");\r\n break;\r\n case 'D':\r\n case 'd':\r\n System.out.println(\"Data Structure\");\r\n break;\r\n }\r\n }", "public String print(int option)\r\n\t{\r\n\t\t// The binary tree hasn't been created yet so no Nodes exist\r\n\t\tif(isEmpty())\r\n\t\t{\r\n\t\t\treturn \"The binary tree is empty!\";\r\n\t\t}\r\n\t\t\r\n\t\t// Create the temporary String array to write the name of the Nodes in\r\n\t\t// and set the array counter to 0 for the proper insertion\r\n\t\tString[] temp = new String[getCounter()]; // getCounter() returns the number of Nodes currently in the Tree\r\n\t\tsetArrayCounter(0);\r\n\t\t\r\n\t\t// Option is passed into the method to determine which traversing order to use\r\n\t\tswitch(option)\r\n\t\t{\r\n\t\t\tcase 0:\r\n\t\t\t\tinorder(temp, getRoot());\r\n\t\t\t\tbreak;\r\n\t\t\tcase 1:\r\n\t\t\t\tpreorder(temp, getRoot());\r\n\t\t\t\tbreak;\r\n\t\t\tcase 2:\r\n\t\t\t\tpostorder(temp,getRoot());\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\t\r\n\t\t// Create the empty String that will be storing the names of each Node\r\n\t\t// minor adjustment so a newline isn't inserted at the end of the last String\r\n\t\tString content = new String();\r\n\t\tfor(int i = 0; i < temp.length; i++)\r\n\t\t{\r\n\t\t\tif(i == temp.length - 1)\r\n\t\t\t{\r\n\t\t\t\tcontent += temp[i];\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tcontent += temp[i] + \"\\n\";\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn content;\r\n\t}", "public abstract PrintStream getOutputStream();", "public abstract <T extends INode<T>> String nodeToString(int nodeId, T node, boolean isInitial, boolean isTerminal);", "public void getDecodedMessage(String encoding){\n\n String output = \"\";\n Node temp = this.root;\n for(int i = 0;i<encoding.length();i++){\n\n if(encoding.charAt(i) == '0'){\n temp = temp.left;\n\n if(temp.left == null && temp.right == null){\n System.out.print(temp.getData());\n temp = this.root;\n }\n }\n else\n {\n temp = temp.right;\n if(temp.left == null && temp.right == null){\n System.out.print(temp.getData());\n temp = this.root; \n }\n\n }\n }\n }", "@Override\n\tpublic void print(PrintStream pw) {\n\n\t\tif(left!=null) {\n\t\t\tleft.print(pw);\n\t\t\t\n\t\t}\n\t\tpw.append(value+\" \");\n\t\t\n\t\tif(right!=null) {\n\t\t\tright.print(pw);\n\t\t}\n\t\t\n\t}", "String shortWrite();", "@Ignore\r\n @Test\r\n public void testCreateEncodingsLabelBitString2()\r\n {\r\n System.out.println(\"testCreateEncodingsLabelBitString2\");\r\n HuffmanEncoder huffman = new HuffmanEncoder(p2, ensemble2);\r\n HuffmanNode root = huffman.createTree();\r\n EncodingsLabelTextCreator enc = new EncodingsLabelTextCreator(root);\r\n String expResult = \"{ a: 01, b: 00, c: 0 }\"; \r\n String result = enc.getLabelText();\r\n System.out.println(result);\r\n assertEquals(expResult, result);\r\n }", "private void print(float coutTransfert) {\n\t}", "T print(char[] data) throws PrintingException;", "public void printTrie() // Wrapper Method.\n\t{\n\t\tStringBuilder str = new StringBuilder();\n\t\tprintTrie(this.root, str, 0);\n\t}", "private static void StackofStrings (Scanner in, PrintStream out) {\n StackofStrings stack = new StackofStrings();\n while(in.hasNext()){\n String s = in.next();\n if ((s.equals(\"-\"))){\n out.print(stack.pop()+ \" \");\n }else{\n stack.push(s);\n }\n }\n}", "@Override\n\tpublic void processNodeWithStringBuffer(DirectedGraphNode node, StringBuffer str) {\n\t\tstr.append(node.getLabel());\n\t\tif (node.getLabel().equals(\"End\")) {\n\t\t\tSystem.out.println(str);\n\t\t} else {\n\t\t\tstr.append(\"-->\");\n\t\t}\n\t}", "@Test\r\n public void testEncode() throws Exception {\r\n System.out.println(\"encode\");\r\n String message = \"furkan\";\r\n \r\n HuffmanTree Htree = new HuffmanTree();\r\n\r\n HuffmanTree.HuffData[] symbols = {\r\n new HuffmanTree.HuffData(186, '_'),\r\n new HuffmanTree.HuffData(103, 'e'),\r\n new HuffmanTree.HuffData(80, 't'),\r\n new HuffmanTree.HuffData(64, 'a'),\r\n new HuffmanTree.HuffData(63, 'o'),\r\n new HuffmanTree.HuffData(57, 'i'),\r\n new HuffmanTree.HuffData(57, 'n'),\r\n new HuffmanTree.HuffData(51, 's'),\r\n new HuffmanTree.HuffData(48, 'r'),\r\n new HuffmanTree.HuffData(47, 'h'),\r\n new HuffmanTree.HuffData(32, 'b'),\r\n new HuffmanTree.HuffData(32, 'l'),\r\n new HuffmanTree.HuffData(23, 'u'),\r\n new HuffmanTree.HuffData(22, 'c'),\r\n new HuffmanTree.HuffData(21, 'f'),\r\n new HuffmanTree.HuffData(20, 'm'),\r\n new HuffmanTree.HuffData(18, 'w'),\r\n new HuffmanTree.HuffData(16, 'y'),\r\n new HuffmanTree.HuffData(15, 'g'),\r\n new HuffmanTree.HuffData(15, 'p'),\r\n new HuffmanTree.HuffData(13, 'd'),\r\n new HuffmanTree.HuffData(8, 'v'),\r\n new HuffmanTree.HuffData(5, 'k'),\r\n new HuffmanTree.HuffData(1, 'j'),\r\n new HuffmanTree.HuffData(1, 'q'),\r\n new HuffmanTree.HuffData(1, 'x'),\r\n new HuffmanTree.HuffData(1, 'z')\r\n };\r\n\r\n Htree.buildTree(symbols);\r\n \r\n String expResult = \"1100110000100101100001110100111\";\r\n String result = Htree.encode(message, Htree.huffTree);\r\n \r\n assertEquals(expResult, result);\r\n \r\n }", "public void out(String input) {\t\t\r\n\t\tSystem.out.println(input);\r\n\t\tint count = 0;\r\n\t\t\r\n\t\t\r\n\t}", "void print(String message) throws IOException;", "@Ignore\r\n @Test\r\n public void testCreateEncodingsLabelBitString()\r\n {\r\n System.out.println(\"createEncodingsLabelBitString\");\r\n HuffmanEncoder huffman = new HuffmanEncoder(p, ensemble);\r\n HuffmanNode root = huffman.createTree();\r\n EncodingsLabelTextCreator enc = new EncodingsLabelTextCreator(root);\r\n String expResult = \"{ a: 01, b: 10, c: 11, d: 001, e: 000 }\"; \r\n String result = enc.getLabelText();\r\n System.out.println(result);\r\n assertEquals(expResult, result);\r\n }", "public TreeNode(char s, int freq){\n\t\tleftChild = null;\n\t\trightChild = null;\n\t\tkey = s;\n\t\tfrequency = freq;\n\t}", "void printSpecification(PrintStream ps);", "@Override\r\n public void run() {\n File huffmanFolder = newDirectoryEncodedFiles(file, encodedFilesDirectoryName);\r\n File huffmanTextFile = new File(huffmanFolder.getPath() + \"\\\\text.huff\");\r\n File huffmanTreeFile = new File(huffmanFolder.getPath() + \"\\\\tree.huff\");\r\n\r\n\r\n try (FileOutputStream textCodeOS = new FileOutputStream(huffmanTextFile);\r\n FileOutputStream treeCodeOS = new FileOutputStream(huffmanTreeFile)) {\r\n\r\n\r\n// Writing text bits to file text.huff\r\n StringBuilder byteStr;\r\n while (boolQueue.size() > 0 | !boolRead) {\r\n while (boolQueue.size() > 8) {\r\n byteStr = new StringBuilder();\r\n\r\n for (int i = 0; i < 8; i++) {\r\n String s = boolQueue.get() ? \"1\" : \"0\";\r\n byteStr.append(s);\r\n }\r\n\r\n if (isInterrupted())\r\n break;\r\n\r\n byte b = parser.parseStringToByte(byteStr.toString());\r\n textCodeOS.write(b);\r\n }\r\n\r\n if (fileRead && boolQueue.size() > 0) {\r\n lastBitsCount = boolQueue.size();\r\n byteStr = new StringBuilder();\r\n for (int i = 0; i < lastBitsCount; i++) {\r\n String bitStr = boolQueue.get() ? \"1\" : \"0\";\r\n byteStr.append(bitStr);\r\n }\r\n\r\n for (int i = 0; i < 8 - lastBitsCount; i++) {\r\n byteStr.append(\"0\");\r\n }\r\n\r\n byte b = parser.parseStringToByte(byteStr.toString());\r\n textCodeOS.write(b);\r\n }\r\n }\r\n\r\n\r\n// Writing the info for decoding to tree.huff\r\n// Writing last bits count to tree.huff\r\n treeCodeOS.write((byte)lastBitsCount);\r\n\r\n// Writing info for Huffman tree to tree.huff\r\n StringBuilder treeBitsArray = new StringBuilder();\r\n treeBitsArray.append(\r\n parser.parseByteToBinaryString(\r\n (byte) codesMap.size()));\r\n\r\n codesMap.keySet().forEach(key -> {\r\n String keyBits = parser.parseByteToBinaryString((byte) (char) key);\r\n String valCountBits = parser.parseByteToBinaryString((byte) codesMap.get(key).length());\r\n\r\n treeBitsArray.append(keyBits);\r\n treeBitsArray.append(valCountBits);\r\n treeBitsArray.append(codesMap.get(key));\r\n });\r\n if ((treeBitsArray.length() / 8) != 0) {\r\n int lastBitsCount = boolQueue.size() / 8;\r\n for (int i = 0; i < 7 - lastBitsCount; i++) {\r\n treeBitsArray.append(\"0\");\r\n }\r\n }\r\n\r\n for (int i = 0; i < treeBitsArray.length() / 8; i++) {\r\n treeCodeOS.write(parser.parseStringToByte(\r\n treeBitsArray.substring(8 * i, 8 * (i + 1))));\r\n }\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }" ]
[ "0.62411076", "0.619404", "0.5917807", "0.5876027", "0.57467264", "0.56327957", "0.5612778", "0.5608742", "0.5545321", "0.54995924", "0.54772437", "0.54707575", "0.5468135", "0.5462839", "0.54598665", "0.5445449", "0.543713", "0.53886694", "0.5366488", "0.535873", "0.53241", "0.53234124", "0.5301581", "0.52952033", "0.5275758", "0.526321", "0.52559966", "0.5253103", "0.52517676", "0.5236688", "0.52249956", "0.5218193", "0.5210542", "0.52072346", "0.5198706", "0.51899546", "0.51899546", "0.51899546", "0.5162342", "0.5158451", "0.515632", "0.51536196", "0.5146716", "0.5134627", "0.51171553", "0.51158", "0.51154864", "0.51001024", "0.5099687", "0.50959116", "0.5084899", "0.5062819", "0.50557137", "0.5055673", "0.50524575", "0.50480926", "0.5038183", "0.50377774", "0.50249237", "0.50217414", "0.5018243", "0.49883574", "0.4984785", "0.4966634", "0.49650002", "0.49460986", "0.49325815", "0.49300578", "0.49269727", "0.49263287", "0.49227676", "0.49216586", "0.4911284", "0.49078873", "0.49014103", "0.49004942", "0.48983407", "0.4897343", "0.48936892", "0.48896727", "0.48820224", "0.48564798", "0.48394907", "0.48357219", "0.48279747", "0.48258632", "0.48230168", "0.48198915", "0.48174608", "0.4815344", "0.48132178", "0.4806552", "0.48045245", "0.4799794", "0.47976762", "0.47919294", "0.47899312", "0.4786331", "0.47761562", "0.47738293" ]
0.7799173
0
A method that takes in a PrintStream and saves the HuffmanCode to a file.
public void save(PrintStream output) { HuffmanPrinter(this.front, "", output); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void printSaving(File savingsFile){\n clearFile(savingsFile);\n try{\n BufferedWriter output = new BufferedWriter(new FileWriter(savingsFile,true));\n output.write(\"Using HuffmanCompressor saves \"+ ((Integer)(savings)).toString()+\" \"+\"bits\");\n output.close();\n }\n catch(IOException e){\n System.out.println(\"IOException\");\n }\n }", "public static void main(String[] args) {\n int[] freqNums = scanFile(args[0]);\n HuffmanNode[] nodeArr = createNodes(freqNums);\n nodeArr = freqSort(nodeArr);\n HuffmanNode top = createTree(nodeArr);\n String empty = \"\";\n String[] encodings = new String[94];\n encodings = getCodes(top, empty, false, encodings, true);\n printEncoding(encodings, freqNums);\n writeFile(args[0], args[1], encodings);\n }", "void saveSimpleCodesToFile() {\n\t\tPrintWriter writer;\r\n\t\ttry {\r\n\t\t\t//writer = new PrintWriter(pathStr + \"/../pt.iscte.pidesco.codegenerator/Settings/Code.cg\", \"UTF-8\");\r\n\t\t\twriter = new PrintWriter(\"Code.cg\", \"UTF-8\");\r\n\t\t\tfor (SimpleCode sc : SimpleCodeMap.values()) {\r\n\t\t\t\twriter.print(sc.getCodeName() + \"-CGSeparator-\" + sc.resultCodeToWrite());\r\n\t\t\t\twriter.print(\"-CGCodeSeparator-\");\r\n\t\t\t}\r\n\t\t\twriter.close();\r\n\t\t} catch (FileNotFoundException | UnsupportedEncodingException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "void decode(){\n int bit = -1; // next bit from compressed file: 0 or 1. no more bit: -1\r\n int k = 0; // index to the Huffman tree array; k = 0 is the root of tree\r\n int n = 0; // number of symbols decoded, stop the while loop when n == filesize\r\n int numBits = 0; // number of bits in the compressed file\r\n FileOutputStream file = null;\r\n try {\r\n file = new FileOutputStream(\"uncompressed.txt\");\r\n } catch (FileNotFoundException ex) {\r\n System.err.println(\"Could not open file to write to.\");\r\n }\r\n while ((bit = inputBit()) >= 0){\r\n k = codetree[k][bit];\r\n numBits++;\r\n if (codetree[k][0] == 0){ // leaf\r\n try {\r\n file.write(codetree[k][1]);\r\n } catch (IOException ex) {\r\n System.err.println(\"Failed to write to file.\");\r\n }\r\n System.out.write(codetree[k][1]);\r\n if (n++ == filesize) break; // ignore any additional bits\r\n k = 0;\r\n }\r\n }\r\n System.out.printf(\"\\n\\n------------------------------\\n\" +\r\n \"%d bytes in uncompressed file.\\n\", filesize);\r\n System.out.printf(\"%d bytes in compressed file.\\n\", numBits / 8);\r\n System.out.printf(\"Compression ratio of %f.\", (double)numBits / (double)filesize);\r\n System.out.flush();\r\n }", "private void HuffmanPrinter(HuffmanNode node, String s, PrintStream output) {\n if (node.left == null) {\n output.println((byte) node.getData());\n output.println(s);\n } else {\n HuffmanPrinter(node.left, s + 0, output);\n HuffmanPrinter(node.right, s + 1, output);\n }\n }", "public static String huffmanCoder(String inputFileName, String outputFileName){\n File inputFile = new File(inputFileName+\".txt\");\n File outputFile = new File(outputFileName+\".txt\");\n File encodedFile = new File(\"encodedTable.txt\");\n File savingFile = new File(\"Saving.txt\");\n HuffmanCompressor run = new HuffmanCompressor();\n \n run.buildHuffmanList(inputFile);\n run.makeTree();\n run.encodeTree();\n run.computeSaving(inputFile,outputFile);\n run.printEncodedTable(encodedFile);\n run.printSaving(savingFile);\n return \"Done!\";\n }", "public static void writeFile(String inputFile, String outputFile, String[] encodings){\n File iFile = new File(inputFile);\n File oFile = new File(outputFile);\n //try catch for creating the output file\n try {\n //if it doesn't exist it creates the file. else if clears the output file\n\t if (oFile.createNewFile()){\n System.out.println(\"File is created!\");\n\t } else{\n PrintWriter writer = new PrintWriter(oFile);\n writer.print(\"\");\n writer.close();\n System.out.println(\"File cleared.\");\n\t }\n }\n catch(IOException e){\n e.printStackTrace();\n }\n //try catch to scan the input file\n try {\n Scanner scan = new Scanner(iFile);\n PrintWriter writer = new PrintWriter(oFile);\n //loop to look at each word in the file\n while (scan.hasNext()) {\n String s = scan.next();\n //loop to look at each character in the word\n for(int i = 0; i < s.length(); i++){\n if((int)s.charAt(i)-32 <= 94) {\n writer.print(encodings[(int)s.charAt(i)-32]);\n }\n }\n //gives the space between words\n writer.print(encodings[0]);\n }\n scan.close();\n }\n catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n }", "public static void printEncoding(String[] encodings, int[] freqNums){\n int saveSpace = 0;\n //loops through all characters to print encodings and calculate savings\n for(int i = 0; i < encodings.length; i++) {\n if (freqNums[i] != 0) {\n System.out.println(\"'\" + (char)(i+32) + \"'\" + \": \" + freqNums[i] + \": \" + encodings[i]);\n saveSpace = saveSpace + (8 - encodings[i].length())*freqNums[i];\n }\n }\n System.out.println();\n System.out.println(\"You will save \" + saveSpace + \" bits with the Huffman Compressor\");\n }", "private static void writeToOutput() {\r\n FileWriter salida = null;\r\n String archivo;\r\n JFileChooser jFC = new JFileChooser();\r\n jFC.setDialogTitle(\"KWIC - Seleccione el archivo de salida\");\r\n jFC.setCurrentDirectory(new File(\"src\"));\r\n int res = jFC.showSaveDialog(null);\r\n if (res == JFileChooser.APPROVE_OPTION) {\r\n archivo = jFC.getSelectedFile().getPath();\r\n } else {\r\n archivo = \"src/output.txt\";\r\n }\r\n try {\r\n salida = new FileWriter(archivo);\r\n PrintWriter bfw = new PrintWriter(salida);\r\n System.out.println(\"Índice-KWIC:\");\r\n for (String sentence : kwicIndex) {\r\n bfw.println(sentence);\r\n System.out.println(sentence);\r\n }\r\n bfw.close();\r\n System.out.println(\"Se ha creado satisfactoriamente el archivo de texto\");\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }", "public static void compress(String s, String fileName) throws IOException {\n File file = new File(fileName);\n if (file.exists()){\n file.delete();\n }\n file.createNewFile();\n BufferedOutputStream out = new BufferedOutputStream(new FileOutputStream(file));\n char[] input = s.toCharArray();\n\n // tabulate frequency counts\n int[] freq = new int[R];\n for (int i = 0; i < input.length; i++)\n freq[input[i]]++;\n\n Node root = buildTrie(freq, out);\n\n // build code table\n String[] st = new String[R];\n buildCode(st, root, \"\");\n\n writeTrie(root, file);\n\n // print number of bytes in original uncompressed message\n BinaryStdOut.write(input.length);\n\n // use Huffman code to encode input\n for (int i = 0; i < input.length; i++) {\n String code = st[input[i]];\n for (int j = 0; j < code.length(); j++) {\n if (code.charAt(j) == '0') {\n BinaryStdOut.write(false);\n }\n else if (code.charAt(j) == '1') {\n BinaryStdOut.write(true);\n }\n else throw new IllegalStateException(\"Illegal state\");\n }\n }\n\n BinaryStdOut.close();\n }", "public void writeFile() \r\n\t{\r\n\t\tStringBuilder builder = new StringBuilder();\r\n\t\tfor(String str : scorers)\r\n\t\t\tbuilder.append(str).append(\",\");\r\n\t\tbuilder.deleteCharAt(builder.length() - 1);\r\n\t\t\r\n\t\ttry(DataOutputStream output = new DataOutputStream(new FileOutputStream(HIGHSCORERS_FILE)))\r\n\t\t{\r\n\t\t\toutput.writeChars(builder.toString());\r\n\t\t} \r\n\t\tcatch (FileNotFoundException e) \r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t\tSystem.err.println(\"[ERROR]:[FileManager] File \" + HIGHSCORERS_FILE + \" was not found \" \r\n\t\t\t\t\t+ \"while writing.\");\r\n\t\t} \r\n\t\tcatch (IOException e) \r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t\tSystem.err.println(\"[ERROR]:[FileManager] Error while reading the file \" + HIGHSCORERS_FILE);\r\n\t\t}\r\n\t}", "public void printCode(PrintStream out, String code, BinaryTree<HuffData> tree) {\n HuffData theData = tree.getData(); //Get the data of the tree\n if (theData.symbol != null) { //If the data's symbol is not null (as in a symbol and not a sum)\n if(theData.symbol.equals(\" \")) { //If the symbol is a space print out \"space: \"\n out.println(\"space: \" + code);\n } else { //Otherwise print out the symbol and the code\n out.println(theData.symbol + \" \" + code);\n //Then add the symbol and code to the EncodeData table\n this.encodings[encodingsTop++] = new EncodeData(code, theData.symbol);\n }\n } else {\n //If the data's symbol is null, that means it is a sum node\n //and so it needs to go farther down the tree\n \n //Go down the left tree and add a 0\n printCode(out, code + \"0\", tree.getLeftSubtree());\n //Go down the right tree and add a 1\n printCode(out, code + \"1\", tree.getRightSubtree());\n }\n }", "public void writeMCPToFile() throws FileNotFoundException\n\t{\n\t\t try {\n\t\t\t String a = null;\n\t\t\t switch (sortingAlgorithm) {\n\t\t\t\tcase SelectionSort:\n\t\t\t\t\ta = \"SelectionSort.txt\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase InsertionSort:\n\t\t\t\t\ta = \"InsertionSort.txt\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase MergeSort:\n\t\t\t\t\ta = \"MergeSort.txt\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase QuickSort:\n\t\t\t\t\ta = \"QuickSort.txt\";\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t FileWriter myWriter = new FileWriter(a);\n\t\t myWriter.write(this.toString());\n\t\t myWriter.close();\n\t\t System.out.println(\"File generated: SUCCESS\");\n\t\t } catch (IOException e) {\n\t\t System.out.println(\"File generated: ERROR\");\n\t\t e.printStackTrace();\n\t\t }\n\t}", "public static void main(String[] args) throws IOException {\n BufferedReader buffRead = new BufferedReader(new FileReader(\"/home/hsnavarro/IdeaProjects/Aula 1/src/input\"));\n FileOutputStream output = new FileOutputStream(\"src/output\", true);\n String s = \"\";\n s = buffRead.readLine().toLowerCase();\n System.out.println(s);\n CifraCesar c = new CifraCesar(0, s, true);\n c.getInfo();\n int[] freq = new int[26];\n for (int i = 0; i < 26; ++i) freq[i] = 0;\n for (int i = 0; i < c.criptografada.length(); i++) {\n freq[c.criptografada.charAt(i) - 97]++;\n }\n Huffman h = new Huffman(freq, c.criptografada);\n h.printHuffman();\n h.descriptografiaHuffman();\n System.out.println(\"huffman: \" + h.descriptoHuffman);\n CifraCesar d = new CifraCesar(h.criptoAnalisis(), h.descriptoHuffman, false);\n\n System.out.println(d.descriptografada);\n System.out.println(d.descriptografada);\n\n System.out.println(\"Comparando:\");\n System.out.println(\"Antes da compressão:\" + s.length());\n\n byte inp = 0;\n int cnt = 0;\n for (int i = 0; i < h.criptografada.length(); i++) {\n int idx = i % 8;\n if (h.criptografada.charAt(i) == '1') inp += (1 << (7 - idx));\n if (idx == 7) {\n cnt++;\n output.write(inp);\n inp = 0;\n }\n }\n if(h.criptografada.length() % 8 != 0){\n cnt++;\n output.write(inp);\n }\n System.out.println(\"Depois da compressão:\" + cnt);\n buffRead.close();\n output.close();\n }", "public void computeSaving(File inputFile, File outputFile){\n clearFile(outputFile);\n \n int normBits =0;\n int huffBits =0;\n try{\n Scanner sc = new Scanner(inputFile);\n BufferedWriter output = new BufferedWriter(new FileWriter(outputFile,true));\n while(sc.hasNextLine()){\n String line = sc.nextLine();\n \n for(int i =0; i<line.length();i++){\n Character toCaculate = line.charAt(i);\n \n huffBits = encodedTable.get(toCaculate).length()*freqTable.get(toCaculate);\n normBits = 8*freqTable.get(toCaculate);\n savings = normBits - huffBits;\n \n String encoded = \"\";\n encoded = encodedTable.get(toCaculate);\n output.write(encoded);\n }\n }\n output.close();\n }\n catch(IOException e){\n System.out.println(\"IOException\");\n }\n }", "public static void main(String[] args) {\n TextFileGenerator textFileGenerator = new TextFileGenerator();\n HuffmanTree huffmanTree;\n Scanner keyboard = new Scanner(System.in);\n PrintWriter encodedOutputStream = null;\n PrintWriter decodedOutputStream = null;\n String url, originalString = \"\", encodedString, decodedString;\n boolean badURL = true;\n int originalBits, encodedBits, decodedBits;\n\n while(badURL) {\n System.out.println(\"Please enter a URL: \");\n url = keyboard.nextLine();\n\n try {\n originalString = textFileGenerator.makeCleanFile(url, \"original.txt\");\n badURL = false;\n }\n catch(IOException e) {\n System.out.println(\"Error: Please try again\");\n }\n }\n\n huffmanTree = new HuffmanTree(originalString);\n encodedString = huffmanTree.encode(originalString);\n decodedString = huffmanTree.decode(encodedString);\n // NOTE: TextFileGenerator.getNumChars() was not working for me. I copied the encoded text file (pure 0s and 1s)\n // into google docs and the character count is accurate with the String length and not the method\n originalBits = originalString.length() * 16;\n encodedBits = encodedString.length();\n decodedBits = decodedString.length() * 16;\n\n decodedString = fixPrintWriterNewLine(decodedString);\n\n try { // creating the encoded and decoded files\n encodedOutputStream = new PrintWriter(new FileOutputStream(\"src\\\\edu\\\\miracosta\\\\cs113\\\\encoded.txt\"));\n decodedOutputStream = new PrintWriter(new FileOutputStream(\"src\\\\edu\\\\miracosta\\\\cs113\\\\decoded.txt\"));\n encodedOutputStream.print(encodedString);\n decodedOutputStream.print(decodedString);\n }\n catch(IOException e) {\n System.out.println(\"Error: IOException!\");\n }\n\n encodedOutputStream.close();\n decodedOutputStream.close();\n\n System.out.println(\"Original file bit count: \" + originalBits);\n System.out.println(\"Encoded file bit count: \" + encodedBits);\n System.out.println(\"Decoded file bit count: \" + decodedBits);\n System.out.println(\"Compression ratio: \" + (double)originalBits/encodedBits);\n }", "@Override\r\n public void run() {\n File huffmanFolder = newDirectoryEncodedFiles(file, encodedFilesDirectoryName);\r\n File huffmanTextFile = new File(huffmanFolder.getPath() + \"\\\\text.huff\");\r\n File huffmanTreeFile = new File(huffmanFolder.getPath() + \"\\\\tree.huff\");\r\n\r\n\r\n try (FileOutputStream textCodeOS = new FileOutputStream(huffmanTextFile);\r\n FileOutputStream treeCodeOS = new FileOutputStream(huffmanTreeFile)) {\r\n\r\n\r\n// Writing text bits to file text.huff\r\n StringBuilder byteStr;\r\n while (boolQueue.size() > 0 | !boolRead) {\r\n while (boolQueue.size() > 8) {\r\n byteStr = new StringBuilder();\r\n\r\n for (int i = 0; i < 8; i++) {\r\n String s = boolQueue.get() ? \"1\" : \"0\";\r\n byteStr.append(s);\r\n }\r\n\r\n if (isInterrupted())\r\n break;\r\n\r\n byte b = parser.parseStringToByte(byteStr.toString());\r\n textCodeOS.write(b);\r\n }\r\n\r\n if (fileRead && boolQueue.size() > 0) {\r\n lastBitsCount = boolQueue.size();\r\n byteStr = new StringBuilder();\r\n for (int i = 0; i < lastBitsCount; i++) {\r\n String bitStr = boolQueue.get() ? \"1\" : \"0\";\r\n byteStr.append(bitStr);\r\n }\r\n\r\n for (int i = 0; i < 8 - lastBitsCount; i++) {\r\n byteStr.append(\"0\");\r\n }\r\n\r\n byte b = parser.parseStringToByte(byteStr.toString());\r\n textCodeOS.write(b);\r\n }\r\n }\r\n\r\n\r\n// Writing the info for decoding to tree.huff\r\n// Writing last bits count to tree.huff\r\n treeCodeOS.write((byte)lastBitsCount);\r\n\r\n// Writing info for Huffman tree to tree.huff\r\n StringBuilder treeBitsArray = new StringBuilder();\r\n treeBitsArray.append(\r\n parser.parseByteToBinaryString(\r\n (byte) codesMap.size()));\r\n\r\n codesMap.keySet().forEach(key -> {\r\n String keyBits = parser.parseByteToBinaryString((byte) (char) key);\r\n String valCountBits = parser.parseByteToBinaryString((byte) codesMap.get(key).length());\r\n\r\n treeBitsArray.append(keyBits);\r\n treeBitsArray.append(valCountBits);\r\n treeBitsArray.append(codesMap.get(key));\r\n });\r\n if ((treeBitsArray.length() / 8) != 0) {\r\n int lastBitsCount = boolQueue.size() / 8;\r\n for (int i = 0; i < 7 - lastBitsCount; i++) {\r\n treeBitsArray.append(\"0\");\r\n }\r\n }\r\n\r\n for (int i = 0; i < treeBitsArray.length() / 8; i++) {\r\n treeCodeOS.write(parser.parseStringToByte(\r\n treeBitsArray.substring(8 * i, 8 * (i + 1))));\r\n }\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }", "public static void HuffmanTree(String input, String output) throws Exception {\n\t\tFileReader inputFile = new FileReader(input);\n\t\tArrayList<HuffmanNode> tree = new ArrayList<HuffmanNode>(200);\n\t\tchar current;\n\t\t\n\t\t// loops through the file and creates the nodes containing all present characters and frequencies\n\t\twhile((current = (char)(inputFile.read())) != (char)-1) {\n\t\t\tint search = 0;\n\t\t\tboolean found = false;\n\t\t\twhile(search < tree.size() && found != true) {\n\t\t\t\tif(tree.get(search).inChar == (char)current) {\n\t\t\t\t\ttree.get(search).frequency++; \n\t\t\t\t\tfound = true;\n\t\t\t\t}\n\t\t\t\tsearch++;\n\t\t\t}\n\t\t\tif(found == false) {\n\t\t\t\ttree.add(new HuffmanNode(current));\n\t\t\t}\n\t\t}\n\t\tinputFile.close();\n\t\t\n\t\t//creates the huffman tree\n\t\tcreateTree(tree);\n\t\t\n\t\t//the huffman tree\n\t\tHuffmanNode sortedTree = tree.get(0);\n\t\t\n\t\t//prints out the statistics of the input file and the space saved\n\t\tFileWriter newVersion = new FileWriter(\"C:\\\\Users\\\\Chris\\\\workspace\\\\P2\\\\src\\\\P2_cxt240_Tsuei_statistics.txt\");\n\t\tprintTree(sortedTree, \"\", newVersion);\n\t\tspaceSaver(newVersion);\n\t\tnewVersion.close();\n\t\t\n\t\t// codes the file using huffman encoding\n\t\tFileWriter outputFile = new FileWriter(output);\n\t\ttranslate(input, outputFile);\n\t}", "public void writeFile()\n\t{\n\t\t//Printwriter object\n\t\tPrintWriter writer = FileUtils.openToWrite(\"TobaccoUse.txt\");\n\t\twriter.print(\"Year, State, Abbreviation, Percentage of Tobacco Use\\n\");\n\t\tfor(int i = 0; i < tobacco.size(); i++)\n\t\t{\n\t\t\tStateTobacco state = tobacco.get(i);\n\t\t\tString name = state.getState();\n\t\t\tString abbr = state.getAbbreviation();\n\t\t\tdouble percent = state.getPercentUse();\n\t\t\tint year = state.getYear();\n\t\t\twriter.print(\"\"+ year + \", \" + name + \", \" + abbr + \", \" + percent + \"\\n\");\n\t\t} \n\t\twriter.close(); //closes printwriter object\n\t}", "public void encodeData() {\n frequencyTable = new FrequencyTableBuilder(inputPath).buildFrequencyTable();\n huffmanTree = new Tree(new HuffmanTreeBuilder(new FrequencyTableBuilder(inputPath).buildFrequencyTable()).buildTree());\n codeTable = new CodeTableBuilder(huffmanTree).buildCodeTable();\n encodeMessage();\n print();\n }", "public static void main(String[] args) throws IOException {\r\n ObjectInputStream in = null; // reads in the compressed file\r\n FileWriter out = null; // writes out the decompressed file\r\n\r\n // Check for the file names on the command line.\r\n if (args.length != 2) {\r\n System.out.println(\"Usage: java Puff <in fname> <out fname>\");\r\n System.exit(1);\r\n }\r\n\r\n // Open the input file.\r\n try {\r\n in = new ObjectInputStream(new FileInputStream(args[0]));\r\n } catch (FileNotFoundException e) {\r\n System.out.println(\"Can't open file \" + args[0]);\r\n System.exit(1);\r\n }\r\n\r\n // Open the output file.\r\n try {\r\n out = new FileWriter(args[1]);\r\n } catch (FileNotFoundException e) {\r\n System.out.println(\"Can't open file \" + args[1]);\r\n System.exit(1);\r\n }\r\n \r\n Puff pf = new Puff();\r\n pf.getFrequencies(in);\r\n // Create a BitReader that is able to read the compressed file.\r\n BitReader reader = new BitReader(in);\r\n\r\n\r\n /****** Add your code here. ******/\r\n pf.createTree();\r\n pf.unCompress(reader,out);\r\n \r\n /* Leave these lines at the end of the method. */\r\n in.close();\r\n out.close();\r\n }", "public static void main(int seed) throws IOException\r\n {\r\n FileWriter writ = new FileWriter(\"output_\" + seed + \".txt\");\r\n String output = getBinaryDigit(512, seed);\r\n writ.write(output);\r\n writ.close();\r\n }", "private void outputToFile(String filename) throws FileNotFoundException, IOException {\n\t\tBufferedWriter writer = new BufferedWriter(\n\t\t\t\tnew FileWriter(filename+\".tmp\"));\n\t\twriter.write(VERIFY_STRING + \"\\n\");\n\n\t\t// output automata info\n\t\twriter.write(machine.getName() + \"\\n\");\n\t\twriter.write(machine.getType() + \"\\n\");\n\n\t\t// output state info\n\t\tfor (State state : machine.getStates()) {\n\t\t\twriter.write(\"STATE\\n\");\n\t\t\twriter.write(state.getName() + \"\\n\");\n\t\t\twriter.write(state.isAccept() + \" \" + state.isStart() + \" \" + \n\t\t\t\t\tstate.getID() + \" \" + state.getGraphic().getX() + \" \" + \n\t\t\t\t\tstate.getGraphic().getY() + \"\\n\");\n\n\t\t\t// output transitions\n\t\t\tfor (Transition t : state.getTransitions())\n\t\t\t\twriter.write(t.getID() + \" \" + t.getInput() + \" \" + \n\t\t\t\t\t\tt.getNext().getID() + \"\\n\");\n\t\t}\n\t\twriter.close();\n\t}", "public void printEncodedTable(File encodedFile){\n clearFile(encodedFile);\n try{\n BufferedWriter output = new BufferedWriter(new FileWriter(encodedFile,true));\n for(Map.Entry<Character,String> entry : encodedTable.entrySet()){\n Character c = entry.getKey();\n if(c >= 32 && c < 127)\n output.write(entry.getKey()+\": \"+entry.getValue());\n else\n output.write(\" [0x\" + Integer.toOctalString(c) + \"]\"+\": \"+entry.getValue());\n output.write(\"\\n\");\n }\n output.close();\n }catch(IOException e){\n System.out.println(\"IOException\");\n }\n }", "public abstract void saveToFile(PrintWriter out);", "private void buildOutput()\n\t{\n\t\tif(outIndex >= output.length)\n\t\t{\n\t\t\tbyte[] temp = output;\n\t\t\toutput = new byte[temp.length * 2];\n\t\t\tSystem.arraycopy(temp, 0, output, 0, temp.length);\n\t\t}\n\t\t\n\t\tif(sb.length() < 16 && aryIndex < fileArray.length)\n\t\t{\n\t\t\tbyte[] b = new byte[1];\n\t\t\tb[0] = fileArray[aryIndex++];\n\t\t\tsb.append(toBinary(b));\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < prioQ.size(); i++)\n\t\t{\n\t\t\tif(sb.toString().startsWith(prioQ.get(i).getCode()))\n\t\t\t{\n\t\t\t\toutput[outIndex++] = (byte)prioQ.get(i).getByteData();\n\t\t\t\tsb = new StringBuilder(\n\t\t\t\t\t\tsb.substring(prioQ.get(i).getCode().length()));\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"Can't find Huffman code.\");\n\t\tSystem.exit(1);\n\t\texit = true;\n\t}", "public static void main(String[] args) throws FileNotFoundException, IOException {\n\t\tString input = \"\";\r\n\r\n\t\t//읽어올 파일 경로\r\n\t\tString filePath = \"C:/Users/user/Desktop/data13_huffman.txt\";\r\n\r\n\t\t//파일에서 읽어옴\r\n\t\ttry(FileInputStream fStream = new FileInputStream(filePath);){\r\n\t\t\tbyte[] readByte = new byte[fStream.available()];\r\n\t\t\twhile(fStream.read(readByte) != -1);\r\n\t\t\tfStream.close();\r\n\t\t\tinput = new String(readByte);\r\n\t\t}\r\n\r\n\t\t//빈도수 측정 해시맵 생성\r\n\t\tHashMap<Character, Integer> frequency = new HashMap<>();\r\n\t\t//최소힙 생성\r\n\t\tList<Node> nodes = new ArrayList<>();\r\n\t\t//테이블 생성 해시맵\r\n\t\tHashMap<Character, String> table = new HashMap<>();\r\n\r\n\t\t//노드와 빈도수 측정\r\n\t\tfor(int i = 0; i < input.length(); i++) {\r\n\t\t\tif(frequency.containsKey(input.charAt(i))) {\r\n\t\t\t\t//이미 있는 값일 경우 빈도수를 1 증가\r\n\t\t\t\tchar currentChar = input.charAt(i);\r\n\t\t\t\tfrequency.put(currentChar, frequency.get(currentChar) + 1);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t//키를 생성해서 넣어줌\r\n\t\t\t\tfrequency.put(input.charAt(i), 1);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//최소 힙에 저장\r\n\t\tfor(Character key : frequency.keySet()) \r\n\t\t\tnodes.add(new Node(key, frequency.get(key), null, null));\r\n\t\t\t\t\r\n\t\t//최소힙으로 정렬\r\n\t\tbuildMinHeap(nodes);\r\n\r\n\t\t//huffman tree를 만드는 함수 실행\r\n\t\tNode resultNode = huffman(nodes);\r\n\r\n\t\t//파일에 씀 (table)\r\n\t\ttry(FileWriter fw = new FileWriter(\"201702034_table.txt\")){\r\n\t\t\tmakeTable(table, resultNode, \"\");\r\n\t\t\tfor(Character key : table.keySet()) {\r\n\t\t\t\t//System.out.println(key + \" : \" + table.get(key));\r\n\t\t\t\tfw.write(key + \" : \" + table.get(key) + \"\\n\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//파일에 씀 (encoded code)\r\n\t\ttry(FileWriter fw = new FileWriter(\"201702034_encoded.txt\")){\r\n\t\t\tString allString = \"\";\r\n\t\t\t\r\n\t\t\tfor(int i = 0; i < input.length(); i++)\r\n\t\t\t\tallString += table.get(input.charAt(i));\r\n\r\n\t\t\t//System.out.println(allString);\r\n\t\t\tfw.write(allString);\r\n\t\t}\r\n\t}", "public void JstringTrans(String line, File outfile) {\n\n\ttry {\n\t PrintWriter writer = new PrintWriter(new FileOutputStream(outfile, true));\n\n\t String[] printStatement = line.split(\"\\\\(\"); // splits the printStatement after (\n\t char[] systemSt = printStatement[0].toCharArray(); // sets the first part of split to systemSt\n\t char[] printSt = printStatement[1].toCharArray(); // sets second part of split to printSt\n\t int sysLength = systemSt.length; // creates sysLength to get obtain the length of the first part of split\n\t boolean endl = false; // sets endl = to false\n\n // if the length of systemSt -2 is l and systemSt -1 is n it declares endl as true\n\t if (systemSt[sysLength - 2] == 'l' && systemSt[sysLength - 1] == 'n') {\n//\t\tendl = true;\n writer.print(\"Console.WriteLine\"); // writes cout << into new file\n writer.print(\"TEST\");\n\t }\n\n\t // writer.print(\"Console.WriteLine\"); // writes cout << into new file\n\n\t // loops as long as i is less than the length of printSt -2 and reads through each part of the character array\n\t for (int i = 0; i < (printSt.length - 2); i++) {\n\n\t\tif (printSt[i] == '+') { //if code finds a +, it will replace it with <<\n\t\t writer.print(\"printf\");\n\t\t} else { // otherwise it will continue\n\t\t writer.print(printSt[i]);\n\t\t}\n\t }\n\n\t if (endl) { // if endl is true, code will add << endl; to the end of the line.\n\t\twriter.print(\"<< endl\");\n\t }\n\n\t writer.println(\";\");\n\n\n\t writer.close(); // finishes with writting in new file\n\t} catch (Exception IOException) {\n\t System.out.println(\"Some sort of IO error here\");\n\t}\n }", "public int compress(InputStream in, OutputStream out, boolean force) throws IOException {\n int walk = 0; // Temp storage for incoming byte from read file\n int walkCount = 0; // Number of total bits read\n char codeCheck = ' '; // Used as a key to find the code in the code map\n String[] codeMap = HuffEncoder.encoding(); // Stores the character codes, copied from HuffEncode\n String s2b = \"\"; // Temp string storage \n int codeLen = 0; // Temp storage for code length (array storage)\n BitInputStream bitIn = new BitInputStream(in); \n BitOutputStream bitOut = new BitOutputStream(out);\n\n // Writes the code array at the top of the file. It first writes the number of bits in the code, then \n // the code itself. In the decode proccess, the code length is first read, then the code is read using the length\n // as a guide.\n // A space at top of file ensures the following is the array, and the file will correctly decompress\n out.write(32);\n for (int i = 0; i < codeMap.length; i++) {\n // Value of the character\n s2b = codeMap[i];\n // If null, make it zero\n if(s2b == null){\n s2b = \"0\";\n }\n // Record length of code\n codeLen = s2b.length();\n // Write the length of the code, to use for decoding\n bitOut.writeBits(8, codeLen);\n // Write the value of the character\n for (int j = 0; j < s2b.length(); j++) {\n bitOut.writeBits(1, Integer.valueOf(s2b.charAt(j)));\n }\n }\n\n // Reads in a byte from the file, converts it to a character, then uses that \n // caracter to look up the huffman code. The huffman code is writen to the new \n // file.\n try {\n while(true){\n // Read first eight bits\n walk = bitIn.read();\n // -1 means the stream has reached the end\n if(walk == -1){break;}\n // convert the binary to a character\n codeCheck = (char) walk;\n // find the huff code for the character\n s2b = codeMap[codeCheck];\n // write the code to new file\n for (int i = 0; i < s2b.length(); i++) {\n bitOut.writeBits(1, Integer.valueOf(s2b.charAt(i)));\n }\n walkCount += 8; // Number of bits read\n }\n bitIn.close();\n bitOut.close();\n return walkCount; \n } catch (IOException e) {\n bitIn.close();\n bitOut.close();\n throw e;\n }\n }", "private static void spaceSaver(FileWriter output) throws IOException {\n\t\tint totalFrequency = 0;\n\t\tint modifiedCode = 0;\n\t\t\n\t\tfor(int i = 0; i < resultIndex; i++) {\n\t\t\tmodifiedCode += (((String) results[i][1]).length()) * (Integer)(results[i][2]);\n\t\t\ttotalFrequency += (Integer)results[i][2];\n\t\t}\n\t\t\n\t\tint saved = (totalFrequency * 8) - modifiedCode;\n\t\toutput.write(\"Space Saved: \" + saved + \"bits\");\n\t}", "public static void encode() {\n char[] symbols = initializeSymbols();\n int position;\n while (!BinaryStdIn.isEmpty()) {\n char symbol = BinaryStdIn.readChar();\n position = 0;\n while (symbols[position] != symbol) {\n position++;\n }\n BinaryStdOut.write(position, BITS_PER_BYTE);\n System.arraycopy(symbols, 0, symbols, 1, position);\n symbols[0] = symbol;\n }\n BinaryStdOut.close();\n }", "public static void outputAndStatistics(String inputName, String outputName) throws IOException {\r\n\t\tFileReader input = new FileReader(inputName);\r\n\t\tBufferedReader reader = new BufferedReader(input);\r\n\t\tStringBuilder output = new StringBuilder();\r\n\r\n\t\tint x;\r\n\r\n\t\twhile((x = reader.read()) != -1) {\r\n\t\t\tif(x < 256) {\r\n\t\t\t\toutput.append(map.get((char)x));\r\n\t\t\t}\r\n\t\t}\r\n\t\treader.close();\r\n\t\t\r\n\t\tFile file = new File(outputName);\r\n\t\tfile.createNewFile();\r\n\t\t\r\n\t\tBufferedWriter writer = new BufferedWriter(new FileWriter(file));\r\n\t\twriter.write(output.toString());\r\n\t\twriter.close();\r\n\t\t\r\n\t\tint sum = 0;\r\n\t\tfor(Character j : map.keySet()) {\r\n\t\t\tif(map.containsKey('j')) {\r\n\t\t\t\tsum += map.get('j').length() * freqArr[j].frequency;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tdouble savings = (1.0 - ((sum / nodeArrList.get(0).frequency) / 8.0)) * 100.0;\r\n\t\t\r\n\t\tString statisticsString = \"Savings: \" + savings + \"% \\n \\n\" + map.toString();\r\n\t\t\r\n\t\tFile file2 = new File(\"huffmanStatistics.txt\");\r\n\t\tfile2.createNewFile();\r\n\t\tBufferedWriter writer2 = new BufferedWriter(new FileWriter(file2));\r\n\t\twriter2.write(statisticsString);\r\n\t\twriter2.close();\r\n\t\t\r\n\t\tSystem.out.println(statisticsString);\r\n\t}", "public static void main(String args[]) {\n\t\t\r\n\t\tnew HuffmanEncode(\"book3.txt\", \"book3Comp.txt\");\r\n\t\t//do not add anything here\r\n\t}", "public void translate(BitInputStream input, PrintStream output) {\n HuffmanNode node = this.front;\n while (input.hasNextBit()) {\n while (node.left != null && node.right != null) {\n if (input.nextBit() == 0) {\n node = node.left;\n } else {\n node = node.right;\n }\n }\n output.print(node.getData());\n node = this.front;\n }\n }", "public static void main(String[] args) throws IOException {\n\t\tString fname;\n\t\tFile file;\n\t\tScanner keyboard = new Scanner(System.in);\n\t\tScanner inFile;\n\n\t\tString line, word;\n\t\tStringTokenizer token;\n\t\tint[] freqTable = new int[256];\n\n\t\tSystem.out.println (\"Enter the complete path of the file to read from: \");\n\n\t\tfname = keyboard.nextLine();\n\t\tfile = new File(fname);\n\t\tinFile = new Scanner(file);\n\n\t\twhile (inFile.hasNext()) {\n\t\t\tline = inFile.nextLine();\n\t\t\ttoken = new StringTokenizer(line, \" \");\n\t\t\twhile (token.hasMoreTokens()) {\n\t\t\t\tword = token.nextToken();\n\t\t\t\tfreqTable = updateFrequencyTable(freqTable, word);\n\t\t\t}\n\t\t}\n\n\t\t//print frequency table\n\n\t\tSystem.out.println(\"Table of frequencies\");\n\t\tSystem.out.println(\"Character \\t Frequency \\n\");\n\n\t\tfor(int i=0; i<256; i++) {\n\t\t\tif (freqTable[i]>0)\n\t\t\t\tSystem.out.println(((char)i) + \"\\t\" + freqTable[i]);\n\t\t\t}\n\n\t\tQueue<BinaryTree<Pair>> S = buildQueue(freqTable);\n\n\t\tQueue<BinaryTree<Pair>> T = new Queue<BinaryTree<Pair>>();\n\n\t\tBinaryTree<Pair> huffmanTree = createTree(S, T);\n\n\t\tString[] encodingTable = findEncoding(huffmanTree);\n\n\t\tSystem.out.println(\"Encoding Table\");\n\t\tfor(int i=0; i<256; i++) {\n\t\t\tif (encodingTable[i]!=null)\n\t\t\t\tSystem.out.println(((char)i) + \"\\t\" + encodingTable[i]);\n\t\t}\n\t\tinFile.close();\n\t}", "public void writeFile(String s) {\n\t\ttry\n\t\t{\t\t\t \n\t\t\tPrintWriter writer = new PrintWriter(s, \"UTF-8\");\n\t\t\twriter.println(\"digraph G{\");\n\t\t\tint u;\n\t\t\tint n = vertices();\n\t\t\tfor (u = 0; u < n; u++) {\n\t\t\t for (Edge e: next(u)) {\n\t\t\t \twriter.println(e.from + \"->\" + e.to + \"[label=\\\"\" + e.cost + \"\\\"];\");\n\t\t\t }\n\t\t\t}\n\t\t\twriter.println(\"}\");\n\t\t\twriter.close();\n\t\t} catch (IOException e) {\n\t\t\t\n\t\t}\t\t\t\t\t\t\n }", "private void saveUCSC() throws FileNotFoundException, IOException {\n\t\tString name = Misc.removeExtension(bedFile.getName());\n\t\tFile ucscFile = new File (bedFile.getParentFile(), name+\".ucsc.gz\");\n\t\tGzipper out = new Gzipper( ucscFile);\n\t\tfor (String chr: chromGenes.keySet()) {\n\t\t\tfor (UCSCGeneLine ugl: chromGenes.get(chr)) {\n\t\t\t\tout.println(ugl.toUCSC());\n\t\t\t}\n\t\t}\n\t\tout.close();\n\t\tIO.pl(\"\\nSaved \"+ucscFile);\n\t\t\n\t}", "public void run() {\n\n\t\tScanner s = new Scanner(System.in); // A scanner to scan the file per\n\t\t\t\t\t\t\t\t\t\t\t// character\n\t\ttype = s.next(); // The type specifies our wanted output\n\t\ts.nextLine(); \n\n\t\t// STEP 1: Count how many times each character appears.\n\t\tthis.charFrequencyCount(s);\n\n\t\t/*\n\t\t * Type F only wants the frequency. Display it, and we're done (so\n\t\t * return)\n\t\t */\n\t\tif (type.equals(\"F\")) {\n\t\t\tdisplayFrequency(frequencyCount);\n\t\t\treturn;\n\t\t}\n\n\t\t/*\n\t\t * STEP 2: we want to make our final tree (used to get the direction\n\t\t * values) This entails loading up the priority queue and using it to\n\t\t * build the tree.\n\t\t */\n\t\tloadInitQueue();\n\t\tthis.finalHuffmanTree = this.buildHuffTree();\n\t\t\n\t\t/*\n\t\t * Type T wants a level order display of the Tree. Do so, and we're done\n\t\t * (so return)\n\t\t */\n\t\tif (type.equals(\"T\")) {\n\t\t\tthis.finalHuffmanTree.visitLevelOrder(new HuffmanVisitorForTypeT());\n\t\t\treturn;\n\t\t}\n\n\t\t/*\n\t\t * STEP 3: We want the Huffman code values for the characters.\n\t\t * The Huffman codes are specified by the path (directions) from the root.\n\t\t * \n\t\t * Each node in the tree has a path to get to it from the root. The\n\t\t * leaves are especially important because they are the original\n\t\t * characters scanned. Load every node with it's special direction value\n\t\t * (the method saves the original character Huffman codes, the direction\n\t\t * vals).\n\t\t */\n\t\tthis.loadDirectionValues(this.finalHuffmanTree.root);\n\t\t// Type H simply wants the codes... display them and we're done (so\n\t\t// return)\n\t\tif (type.equals(\"H\")) {\n\t\t\tthis.displayHuffCodesTable();\n\t\t\treturn;\n\t\t}\n\n\t\t/*\n\t\t * STEP 4: The Type must be M (unless there was invalid input) since all other cases were exhausted, so now we simply display the file using\n\t\t * the Huffman codes.\n\t\t */\n\t\tthis.displayHuffCodefile();\n\t}", "public void writeParametersToTextFile(FileWriter jOut, TreePopulation oPop)\n throws IOException {\n \n boolean[] p_bAppliesTo = new boolean[oPop.getNumberOfSpecies()];\n String sVal;\n int i, iRow, iCol; \n \n jOut.write(\"\\n\" + m_sDescriptor + \"\\n\");\n \n //Write out function choices\n for (i = 0; i < p_bAppliesTo.length; i++) p_bAppliesTo[i] = true;\n Object[] p_oHeader = Behavior.formatSpeciesHeaderRow(p_bAppliesTo, oPop);\n jOut.write(p_oHeader[0].toString());\n for (iCol = 1; iCol < p_oHeader.length; iCol++) jOut.write(\"\\t\" + p_oHeader[iCol].toString());\n jOut.write(\"\\n\");\n \n Object[][] p_oTableData = null;\n p_oTableData = Behavior.formatDataForTable(p_oTableData, getWhatAdultHDFunction());\n p_oTableData = Behavior.formatDataForTable(p_oTableData, getWhatSaplingHDFunction());\n p_oTableData = Behavior.formatDataForTable(p_oTableData, getWhatSeedlingHDFunction());\n p_oTableData = Behavior.formatDataForTable(p_oTableData, getWhatAdultCRDFunction());\n p_oTableData = Behavior.formatDataForTable(p_oTableData, getWhatSaplingCRDFunction());\n p_oTableData = Behavior.formatDataForTable(p_oTableData, getWhatAdultCDHFunction());\n p_oTableData = Behavior.formatDataForTable(p_oTableData, getWhatSaplingCDHFunction());\n \n for (iRow = 0; iRow < p_oTableData.length; iRow++) {\n sVal = String.valueOf(p_oTableData[iRow][0]);\n //If a combo box - strip out the text\n if (sVal.startsWith(\"&&\")) {\n sVal = EnhancedTable.getComboValue(sVal);\n }\n jOut.write(sVal);\n for (iCol = 1; iCol < p_oTableData[iRow].length; iCol++) {\n sVal = String.valueOf(p_oTableData[iRow][iCol]);\n //If a combo box - strip out the text\n if (sVal.startsWith(\"&&\")) {\n sVal = EnhancedTable.getComboValue(sVal);\n }\n jOut.write(\"\\t\" + sVal);\n }\n jOut.write(\"\\n\");\n }\n \n //Write the rest of the parameters \n ArrayList<BehaviorParameterDisplay> p_oAllObjects = formatDataForDisplay(oPop);\n if (null == p_oAllObjects || p_oAllObjects.size() == 0) {\n jOut.write(\"\\n\" + m_sDescriptor + \"\\nNo parameters.\\n\");\n return;\n }\n \n \n for (BehaviorParameterDisplay oDisp : p_oAllObjects) {\n jOut.write(\"\\n\" + oDisp.m_sBehaviorName + \"\\n\");\n jOut.write(oDisp.m_sAppliesTo + \"\\n\");\n \n for (TableData oTable : oDisp.mp_oTableData) {\n //Header row\n jOut.write(oTable.mp_oHeaderRow[0].toString());\n for (iCol = 1; iCol < oTable.mp_oHeaderRow.length; iCol++) {\n jOut.write(\"\\t\" + oTable.mp_oHeaderRow[iCol].toString());\n }\n jOut.write(\"\\n\");\n \n //Write each row\n for (iRow = 0; iRow < oTable.mp_oTableData.length; iRow++) {\n sVal = String.valueOf(oTable.mp_oTableData[iRow][0]);\n //If a combo box - strip out the text\n if (sVal.startsWith(\"&&\")) {\n sVal = EnhancedTable.getComboValue(sVal);\n }\n jOut.write(sVal);\n for (iCol = 1; iCol < oTable.mp_oTableData[iRow].length; iCol++) {\n sVal = String.valueOf(oTable.mp_oTableData[iRow][iCol]);\n //If a combo box - strip out the text\n if (sVal.startsWith(\"&&\")) {\n sVal = EnhancedTable.getComboValue(sVal);\n }\n jOut.write(\"\\t\" + sVal);\n }\n jOut.write(\"\\n\");\n }\n }\n }\n }", "private void writeTree() throws IOException {\n\t\ttry (final BufferedWriter writer = Files.newBufferedWriter(destinationFile, CHARSET)) {\n\t\t\tfinal char[] treeString = new char[512];\n\t\t\tint treeStringLength = 0;\n\t\t\tfor (final CharacterCode cur : sortedCodes) {\n\t\t\t\ttreeString[treeStringLength++] = cur.getChar();\n\t\t\t\ttreeString[treeStringLength++] = (char) cur.getCode().length();\n\t\t\t}\n\t\t\tif (treeStringLength > 0xff) { //tree length will not always be less than 255, we have to write it on two bytes\n\t\t\t\tfinal int msb = (treeStringLength & 0xff00) >> Byte.SIZE;\n\t\t\t\ttreeStringLength &= 0x00ff;\n\t\t\t\twriter.write(msb);\n\t\t\t} else {\n\t\t\t\twriter.write(0);\n\t\t\t}\n\t\t\twriter.write(treeStringLength);\n\t\t\twriter.write(treeString, 0, treeStringLength);\n\t\t}\n\t}", "private void saveTree(PrintStream saveStream, BinaryNode<String> current) {\r\n\t\t// TODO: Implement and comment based on comments above and assignment description: 10 points\r\n\t\t//The current node is null, save it as NULL in the txt file. This indicates the presence of a leaf and the end of a portion of the \r\n\t\t//tree.\r\n\t\tif(current == null) {\r\n\t\t\tsaveStream.println(\"NULL\");\r\n\t\t}\r\n\t\t//Else, print the data of the current node to the save file in the preorder style\r\n\t\telse {\r\n\t\t\t//Save current\r\n\t\t\tsaveStream.println(current.getData());\r\n\t\t\t//Save left\r\n\t\t\tsaveTree(saveStream, current.getLeftChild());\r\n\t\t\t//Save right\r\n\t\t\tsaveTree(saveStream, current.getRightChild());\r\n\r\n\t\t}\r\n\t}", "@Override\n\tpublic void printToFile() {\n\t\t\n\t}", "private void outputFile() {\n // Define output file name\n Scanner sc = new Scanner(System.in);\n System.out.println(\"What do you want to call this file?\");\n String name = sc.nextLine();\n\n // Output to file\n Path outputFile = Paths.get(\"submissions/\" + name + \".java\");\n try {\n Files.write(outputFile, imports);\n if (imports.size() > 0)\n Files.write(outputFile, Collections.singletonList(\"\"), StandardOpenOption.APPEND);\n Files.write(outputFile, lines, StandardOpenOption.APPEND);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }", "public void save(PrintWriter p) {\n Vector listTrans;\n Vector varsSinTrans=new Vector();\n Vector varsConTrans=new Vector();\n FiniteStates mainVar=(FiniteStates)variables.elementAt(0);\n FiniteStates var;\n FiniteStates transVar;\n Configuration indexingVars, confComplete;\n int whites;\n int i,j,k,l;\n \n p.print(\"values= credal-set-tree (\\n\"); \n listTrans=getListTransparents();\n\n // Create a configuration removing transparent variables and mainVar\n for(k=1; k < variables.size(); k++){\n var=(FiniteStates)variables.elementAt(k);\n\n // If this variable is in listTrans, do not consider\n if (listTrans.contains(var) == false){\n varsSinTrans.addElement(var);\n }\n }\n \n // Create the configuration \n indexingVars=new Configuration(varsSinTrans);\n confComplete=new Configuration(variables);\n\n // Call the recursive method responsible for printing the branches\n // of the tree\n printBranch(indexingVars, confComplete, listTrans, mainVar,2,p);\n p.print(\");\\n\");\n }", "public static void main(String[] args) throws IOException\n {\n \n BufferedReader f = new BufferedReader(new InputStreamReader(System.in));\n PrintWriter writer = new PrintWriter(new BufferedOutputStream(System.out));\n \n String output = \"\"; //Write all output to this string\n\n //Code here\n int numLevels = Integer.parseInt(f.readLine());\n int[] nums = new int[numLevels];\n String line = f.readLine();\n StringTokenizer st = new StringTokenizer(line);\n int numLevelsX = Integer.parseInt(st.nextToken());\n for(int i = 0; i < numLevelsX; i++)\n {\n int n = Integer.parseInt(st.nextToken());\n nums[n-1]++;\n }\n line = f.readLine();\n st = new StringTokenizer(line);\n int numLevelsY = Integer.parseInt(st.nextToken());\n for(int i = 0; i < numLevelsY; i++)\n {\n int n = Integer.parseInt(st.nextToken());\n nums[n-1]++;\n }\n boolean isBeatable = true;\n for(int i = 0; i < numLevels; i++)\n {\n if(nums[i]==0)\n isBeatable = false;\n }\n output = isBeatable?\"I become the guy.\":\"Oh, my keyboard!\";\n \n \n //Code here\n\n //out.println(output);\n \n writer.println(output);\n writer.close();\n System.exit(0);\n \n }", "public static void main(String[] args) {\n\n /** Reading a message from the keyboard **/\n // @SuppressWarnings(\"resource\")\n // Scanner scanner = new Scanner(System.in);\n // System.out.println(\"Please enter a message to be encoded: \");\n // String inputString = scanner.nextLine();\n //\n // System.out.println(\"Please enter the code length: \");\n // String codeLen = scanner.nextLine();\n // int num = Integer.parseInt(codeLen);\n // Encode encodeThis = new Encode(inputString, num);\n // encodeThis.createFrequencyTable();\n // encodeThis.createPriorityQueue();\n // while (encodeThis.stillEncoding()) {\n // encodeThis.build();\n // }\n // String codedMessage = encodeThis.getEncodedMessage();\n // /** Printing message to the screen **/\n // System.out.println(codedMessage);\n\n /** Reading message from a file **/\n ArrayList<String> info = new ArrayList<String>();\n try {\n File file = new File(\"/Users/ugoslight/Desktop/message.txt\");\n Scanner reader = new Scanner(file);\n\n while (reader.hasNextLine()) {\n String data = reader.nextLine();\n info.add(data);\n }\n reader.close();\n } catch (FileNotFoundException e) {\n System.out.println(\"No file found.\");\n e.printStackTrace();\n }\n\n /** Encoding message from file **/\n Encode encodeThis = new Encode(info.get(0), Integer.parseInt(info.get(1)));\n encodeThis.createFrequencyTable();\n encodeThis.createPriorityQueue();\n while (encodeThis.stillEncoding()) {\n encodeThis.build();\n }\n String codedMessage = encodeThis.getEncodedMessage();\n /** Create new file **/\n try {\n File myObj = new File(\"/Users/ugoslight/Desktop/filename.txt\");\n if (myObj.createNewFile()) {\n System.out.println(\"File created: \" + myObj.getName());\n } else {\n System.out.println(\"File already exists.\");\n }\n } catch (IOException e) {\n System.out.println(\"An error occurred.\");\n e.printStackTrace();\n }\n /** Write to file **/\n try {\n FileWriter myWriter = new FileWriter(\"/Users/ugoslight/Desktop/filename.txt\");\n myWriter.write(codedMessage);\n myWriter.close();\n System.out.println(\"Successfully wrote to the file.\");\n } catch (IOException e) {\n System.out.println(\"An error occurred.\");\n e.printStackTrace();\n }\n\n\n\n }", "public void outputToFile(StatementList original, StatementList mutant)\n {\n if (comp_unit == null) \n \t return;\n\t\tif(original.toString().equalsIgnoreCase(mutant.toString()))\n\t\t\treturn;\n String f_name;\n num++;\n f_name = getSourceName(\"SDL\");\n String mutant_dir = getMuantID(\"SDL\");\n\n try \n {\n\t\t PrintWriter out = getPrintWriter(f_name);\n\t\t SDL_Writer writer = new SDL_Writer(mutant_dir, out);\n\t\t writer.setMutant(original, mutant);\n writer.setMethodSignature(currentMethodSignature);\n\t\t comp_unit.accept( writer );\n\t\t out.flush(); \n\t\t out.close();\n } catch ( IOException e ) \n {\n\t\t System.err.println( \"fails to create \" + f_name );\n } catch ( ParseTreeException e ) {\n\t\t System.err.println( \"errors during printing \" + f_name );\n\t\t e.printStackTrace();\n }\n }", "public void save()\r\n {\r\n \tfc=new JFileChooser();\r\n\t fc.setCurrentDirectory(new File(\"\"));\r\n\t if(fc.showSaveDialog(this)==JFileChooser.APPROVE_OPTION)\r\n\t \t//Try-Catch Block\r\n\t try\r\n\t {\r\n\t pw=new PrintWriter(new FileWriter(fc.getSelectedFile()+\".txt\")); //Print to the user-selected file\r\n\t\t \tfor(Organism o: e.getTree()) //IN PROGESS\r\n\t\t \t{\r\n\t\t\t\t\tint[] genes=o.getGenes(); //Getting genes from \r\n\t\t\t\t\tfor(int i=0; i<genes.length; i++)\r\n\t\t\t\t\t\tpw.print(genes[i]+\" \"); //Print each gene value in a line\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tpw.println(); //Starts printing on a new line\r\n\t\t\t\t}\r\n\t\t\t\tpw.close(); //Closes the File\r\n\t }\r\n\t catch (Exception ex) //Catch Any Exception\r\n\t {\r\n\t ex.printStackTrace();\r\n\t }\r\n }", "private void save()\n {\n String saveFile = FileBrowser.chooseFile( false );\n try{\n PrintWriter output = new PrintWriter( new File( saveFile ) );\n \n output.println( numRows + \" \" + numCols );\n\n for( int r=0; r<numRows; r++ )\n output.println( rowLabels[r] );\n\n for( int c=0; c<numCols; c++ )\n output.println( colLabels[c] );\n\n for( int r=0; r<numRows; r++ )\n {\n for( int c=0; c<numCols; c++ )\n output.print( a[r][c] + \" \" );\n output.println();\n }\n output.close();\n }\n catch(Exception e)\n {\n System.out.println(\"Uh-oh, save failed for some reason\");\n e.printStackTrace();\n }\n }", "public void printToFile(AI input) {\n\t\ttry {\n\t\t\t// Create file\n\t\t\tFileWriter fstream = new FileWriter(FILENAME);\n\t\t\tBufferedWriter out = new BufferedWriter(fstream);\n\t\t\tout.write(input.toString() + \"\\n\");\n\t\t\t// Close the output stream\n\t\t\tout.close();\n\t\t} catch (Exception e) { // Catch exception if any\n\t\t\tSystem.err.println(\"Error: \" + e.getMessage());\n\t\t}\n\t}", "public void dump(File file)\n {\n try\n {\n FileOutputStream out = new FileOutputStream(file);\n BufferedWriter write = new BufferedWriter(new OutputStreamWriter(out, Encoder.UTF_8));\n\n dump(write);\n\n write.close();\n }\n catch (Exception ex)\n {\n ex.printStackTrace();\n }\n }", "public static void writeNumberToFile() {\n try {\n FileOutputStream outputStream = new FileOutputStream(\"ex1.txt\");\n outputStream.write(String.valueOf(53).getBytes());\n } catch (FileNotFoundException e) {\n // handle FileNotFoundException\n } catch (IOException e) {\n // handle IOException\n } finally {\n System.out.println(\"Finally block\");\n }\n }", "public static void main(String args[])\n {\n Scanner s = new Scanner(System.in).useDelimiter(\"\");\n List<node> freq = new SinglyLinkedList<node>();\n \n // read data from input\n while (s.hasNext())\n {\n // s.next() returns string; we're interested in first char\n char c = s.next().charAt(0);\n if (c == '\\n') continue;\n // look up character in frequency list\n node query = new node(c);\n node item = freq.remove(query);\n if (item == null)\n { // not found, add new node\n freq.addFirst(query);\n } else { // found, increment node\n item.frequency++;\n freq.addFirst(item);\n }\n }\n \n // insert each character into a Huffman tree\n OrderedList<huffmanTree> trees = new OrderedList<huffmanTree>();\n for (node n : freq)\n {\n trees.add(new huffmanTree(n));\n }\n \n // merge trees in pairs until one remains\n Iterator ti = trees.iterator();\n while (trees.size() > 1)\n {\n // construct a new iterator\n ti = trees.iterator();\n // grab two smallest values\n huffmanTree smallest = (huffmanTree)ti.next();\n huffmanTree small = (huffmanTree)ti.next();\n // remove them\n trees.remove(smallest);\n trees.remove(small);\n // add bigger tree containing both\n trees.add(new huffmanTree(smallest,small));\n }\n // print only tree in list\n ti = trees.iterator();\n Assert.condition(ti.hasNext(),\"Huffman tree exists.\");\n huffmanTree encoding = (huffmanTree)ti.next();\n encoding.print();\n }", "private static void generateHuffmanTree(){\n try (BufferedReader br = new BufferedReader(new FileReader(_codeTableFile))) {\n String line;\n while ((line = br.readLine()) != null) {\n // process the line.\n if(!line.isEmpty() && line!=null){\n int numberData = Integer.parseInt(line.split(\" \")[0]);\n String code = line.split(\" \")[1];\n Node traverser = root;\n for (int i = 0; i < code.length() - 1; i++){\n char c = code.charAt(i); \n if (c == '0'){\n //bit is 0\n if(traverser.getLeftPtr() == null){\n traverser.setLeftPtr(new BranchNode(999999, null, null));\n }\n traverser = traverser.getLeftPtr();\n }\n else{\n //bit is 1\n if(traverser.getRightPtr() == null){\n traverser.setRightPtr(new BranchNode(999999, null, null));\n }\n traverser = traverser.getRightPtr();\n }\n }\n //Put data in the last node by creating a new leafNode\n char c = code.charAt(code.length() - 1);\n if(c == '0'){\n traverser.setLeftPtr(new LeafNode(9999999, numberData, null, null));\n }\n else{\n traverser.setRightPtr(new LeafNode(9999999, numberData, null, null));\n }\n }\n }\n } \n catch (IOException ex) {\n Logger.getLogger(FrequencyTableBuilder.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public static void encode()\n {\n String s = BinaryStdIn.readString();\n CircularSuffixArray myCsa = new CircularSuffixArray(s);\n int first = 0;\n while (first < myCsa.length() && myCsa.index(first) != 0) {\n first++;\n }\n BinaryStdOut.write(first);\n int i = 0;\n while (i < myCsa.length()) {\n BinaryStdOut.write(s.charAt((myCsa.index(i) + s.length() - 1) % s.length()));\n i++;\n }\n BinaryStdOut.close();\n }", "public Decode(String inputFileName, String outputFileName){\r\n try(\r\n BitInputStream in = new BitInputStream(new FileInputStream(inputFileName));\r\n OutputStream out = new FileOutputStream(outputFileName))\r\n {\r\n int[] characterFrequency = readCharacterFrequency(in);//\r\n int frequencySum = Arrays.stream(characterFrequency).sum();\r\n BinNode root = HoffmanTree.HoffmanTreeFactory(characterFrequency).rootNode;\r\n //Generate Hoffman tree and get root\r\n\r\n int bit;\r\n BinNode currentNode = root;\r\n int byteCounter = 0;\r\n\r\n while ((bit = in.readBit()) != -1 & frequencySum >= byteCounter){\r\n //Walk the tree based on the incoming bits\r\n if (bit == 0){\r\n currentNode = currentNode.leftLeg;\r\n } else {\r\n currentNode = currentNode.rightLeg;\r\n }\r\n\r\n //If at end of tree, treat node as leaf and consider key as character instead of weight\r\n if (currentNode.leftLeg == null){\r\n out.write(currentNode.k); //Write character\r\n currentNode = root; //Reset walk\r\n byteCounter++; //Increment byteCounter to protect from EOF 0 fill\r\n }\r\n }\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }", "void saveFile () {\r\n\r\n\t\ttry {\r\n\t\t\tFileOutputStream fos = new FileOutputStream (\"Bank.dat\", true);\r\n\t\t\tDataOutputStream dos = new DataOutputStream (fos);\r\n\t\t\tdos.writeUTF (saves[count][0]);\r\n\t\t\tdos.writeUTF (saves[count][1]);\r\n\t\t\tdos.writeUTF (saves[count][2]);\r\n\t\t\tdos.writeUTF (saves[count][3]);\r\n\t\t\tdos.writeUTF (saves[count][4]);\r\n\t\t\tdos.writeUTF (saves[count][5]);\r\n\t\t\tJOptionPane.showMessageDialog (this, \"The Record has been Saved Successfully\",\r\n\t\t\t\t\t\t\"BankSystem - Record Saved\", JOptionPane.PLAIN_MESSAGE);\r\n\t\t\ttxtClear ();\r\n\t\t\tdos.close();\r\n\t\t\tfos.close();\r\n\t\t}\r\n\t\tcatch (IOException ioe) {\r\n\t\t\tJOptionPane.showMessageDialog (this, \"There are Some Problem with File\",\r\n\t\t\t\t\t\t\"BankSystem - Problem\", JOptionPane.PLAIN_MESSAGE);\r\n\t\t}\r\n\r\n\t}", "public void recordOrder(){\n PrintWriter output = null;\n try{\n output = \n new PrintWriter(new FileOutputStream(\"record.txt\", true));\n }\n catch(Exception e){//throws exception\n System.out.println(\"File not found\");\n System.exit(0);\n }\n output.println(Coffee);//prints in file contents of Coffee\n output.close();//closes file\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(\"Hudai\");\r\n\t\t\r\n\t\ttry {\r\n\t\t\t//System.setIn(new Scanner(new File(E:\\\\hudai\\\\filetry.txt)));\r\n\t\t\tSystem.setOut(new PrintStream(new FileOutputStream( new File(\"E:\\\\hudai\\\\filetry.txt\"))) );\r\n\t\t\tSystem.out.println(\"Happy to see \");\r\n\t\t\tSystem.out.println(\"মোঃ জুবায়ের ইবনে মোস্তফা\");\r\n\t\t\tSystem.out.println(\"Nothing\");\r\n\t\t\t\r\n\t\t\tSystem.setOut( new PrintStream(new FileOutputStream(FileDescriptor.out)));\r\n\t\t\tSystem.out.println(\"Happy to see \");\r\n\t\t\tSystem.out.println(\"Nothing\");\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "private void saveToFile(){\n this.currentMarkovChain.setMarkovName(this.txtMarkovChainName.getText());\n saveMarkovToCSVFileInformation();\n \n //Save to file\n Result result = DigPopGUIUtilityClass.saveDigPopGUIInformationSaveFile(\n this.digPopGUIInformation,\n this.digPopGUIInformation.getFilePath());\n }", "public static void saveOutput(String filename, DSALinkedList list)\n {\n try\n {\n PrintWriter out = new PrintWriter(filename);\n //out.println(input);\n\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n PrintStream ps = new PrintStream(baos);\n PrintStream old = System.out;\n System.setOut(ps);\n //stuff goes here\n\n if(!list.isEmpty())\n {\n System.out.println(\"# All routes Traversed:\");\n Iterator<DSAQueue> itr = list.iterator();\n int counter = 0;\n while(itr.hasNext())\n {\n counter ++;\n System.out.println(\"\\n# Route number: [\" + counter + \"]\");\n itr.next().show();\n }\n }\n else\n {\n System.out.println(\"# Route list is empty. Add some more!\");\n }\n System.out.flush();\n System.setOut(old);\n out.println(baos.toString());\n\n out.close();\n }\n catch (Exception e)\n { //should do more here might not be needed\n throw new IllegalArgumentException(\"Unable to print object to file: \" + e);\n }\n\n }", "void printAssociations(HashMap<BitSet, Integer> allAssociations){\n try{\n boolean firstLine = true;\n FileWriter fw = new FileWriter(this.outputFilePath);\n \n for(Map.Entry<BitSet, Integer> entry : allAssociations.entrySet()){\n BitSet bs = entry.getKey();\n if(firstLine)\n firstLine = false;\n else\n fw.write(\"\\n\");\n \n for(int i=0; i<bs.length() ; i++){\n if(bs.get(i))\n fw.write(intToStrItem.get(frequentItemListSetLenOne.get(i).getKey())+\" \");\n }\n\n fw.write(\"(\" + entry.getValue() +\")\");\n }\n \n fw.close();\n }\n catch(Exception e){\n e.printStackTrace();\n }\n }", "public void saveStage1(String format)\n {\n super.saveStage1(format);\n try{\n writer.write(\"CB336\");\n writer.write(\"\\t\");\n writer.write(checkValue(input.get(33).getText()));\n writer.write(\"\\t\");\n writer.write(checkValue(input.get(34).getText()));\n writer.write(\"\\t\");\n writer.write(checkValue(input.get(35).getText()));\n writer.write(\"\\r\\n\");\n\n writer.write(\"CB714\");\n writer.write(\"\\t\");\n writer.write(checkValue(input.get(36).getText()));\n writer.write(\"\\t\");\n writer.write(checkValue(input.get(37).getText()));\n writer.write(\"\\t\");\n writer.write(checkValue(input.get(38).getText()));\n writer.write(\"\\t\");\n writer.write(checkValue(input.get(39).getText())); \n writer.close();\n }\n catch(IOException e){\n JOptionPane.showMessageDialog(null, \"Error in exporting file\", \"Error\",\n JOptionPane.ERROR_MESSAGE);\n }\n }", "public void recordOrder(){ \n PrintWriter output = null;\n try{\n output = \n new PrintWriter(new FileOutputStream(\"record.txt\", true));\n }\n catch(Exception e){\n System.out.println(\"File not found\");\n System.exit(0);\n }\n output.println(Tea);//writes into the file contents of String Tea\n output.close();//closes file\n }", "private void export() {\n print(\"Outputting Instructions to file ... \");\n\n // Generate instructions right now\n List<Instruction> instructions = new ArrayList<Instruction>();\n convertToInstructions(instructions, shape);\n\n // Verify Instructions\n if (instructions == null || instructions.size() == 0) {\n println(\"failed\\nNo instructions!\");\n return;\n }\n\n // Prepare the output file\n output = createWriter(\"output/instructions.txt\");\n \n // TODO: Write configuration information to the file\n \n\n // Write all the Instructions to the file\n for (int i = 0; i < instructions.size(); i++) {\n Instruction instruction = instructions.get(i);\n output.println(instruction.toString());\n }\n\n // Finish the file\n output.flush();\n output.close();\n\n println(\"done\");\n }", "public static void writeFileForMedian( String file ) throws Exception{\r\n\t\tBufferedOutputStream writer = new BufferedOutputStream( new FileOutputStream( file ) );\r\n\t\t//BufferedWriter writer = new BufferedWriter( new FileWriter( file ) );\r\n\t\t//char ch;\r\n\t\t\r\n\t\twriter.write( 'P' );\r\n\t\twriter.write( '5' );\r\n\t\twriter.write( ' ' );\r\n\t\twriter.write( '1' );\r\n\t\twriter.write( '2' );\r\n\t\twriter.write( '8' );\r\n\t\twriter.write( ' ' );\r\n\t\twriter.write( '1' );\r\n\t\twriter.write( '2' );\r\n\t\twriter.write( '8' );\r\n\t\twriter.write( ' ' );\r\n\t\twriter.write( '2' );\r\n\t\twriter.write( '5' );\r\n\t\twriter.write( '5' );\r\n\t\twriter.write( ' ' );\r\n\r\n\t\tfor ( int i = 0; i < WIDTH; i++ ){\r\n\t\t\tfor ( int j = 0; j < HEIGHT; j++ ){\r\n\t\t\t\twriter.write( mResult[i][j] );\t\r\n\t\t\t\t//if ( mResult[i][j] > 255 )\r\n\t\t\t\t\t//System.out.print( mResult[i][j] + \" \" );\r\n\t\t\t}\r\n\t\t\tSystem.out.println( );\r\n\t\t}\r\n\t\t\r\n\t\twriter.close();\r\n\t}", "public static void fileBanner(PrintWriter fout){\n \tfout.println(\"*******************************************\");\n \tfout.println(\"Name:\t\tsveinson\");\n \tfout.println(\"Class:\t\tCS20S\");\n \tfout.println(\"Assignment:\tAx Qy\");\n \tfout.println(\"*******************************************\"); \n }", "private void writeCoCitationPajekFile(PrintWriter coCitWriter) {\n\t\tcoCitWriter.println(\"*Vertices \" + publications.size());\n\t\tthis.writePubVertices(coCitWriter);\n\n\t\tcoCitWriter.println(\"*Arcs\");\n\t\tthis.writePubArcs(coCitWriter);\n\n\t\tcoCitWriter.println(\"*Edges\");\n\t}", "public static void encode(File inFile, File outFile) throws IOException {\n\t\tif (inFile.length() == 0) {\n\t\t\tFileOutputStream os = new FileOutputStream(outFile);\n\t\t\tos.close();\n\t\t\treturn;\n\t\t}\n\n\t\t// Get prefix-free code\n\t\tint[][] S = getSymbols(inFile);\n\t\tint symbolCount = S.length;\n\t\tint[] depths = PrefixFreeCode.getDepths(S, symbolCount);\n\n\t\t// Build tree\n\t\tNode root = new Node();\n\t\tint bodySize = 0;\n\t\tfor (int i = 0; i < symbolCount; i++) {\n\t\t\tbodySize += depths[i] * S[i][1];\n\t\t\troot.add(depths[i], S[i][0]);\n\t\t}\n\n\t\t// Initialize output\n\t\tFileOutputBuffer ob = new FileOutputBuffer(new FileOutputStream(outFile));\n\n\t\t// Emit table information\n\t\tob.append(symbolCount - 1, 8);\n\t\tfor (int i = 0; i < symbolCount; i++) {\n\t\t\tob.append(S[i][0], 8);\n\t\t\tob.append(depths[i], 8);\n\t\t}\n\n\t\t// Emit padding\n\t\tint padding = (int) ((bodySize + 3) % 8);\n\t\tif (padding != 0) {\n\t\t\tpadding = 8 - padding;\n\t\t}\n\t\tob.append(padding, 3);\n\t\tob.append(0, padding);\n\n\t\t// Emit body\n\t\tencodeBody(new Table(root), inFile, ob);\n\t\tob.close();\n\t}", "public void storeToFile() throws IOException {\n\t\t\n\t\tDLProgramStorer storer = new DLProgramStorerImpl();\n\t\t\n\t\t//String datalogFile = inputCKR.getGlobalOntologyFilename() + \".dlv\";\n\t\t//String datalogFile = \"./testcase/output.dlv\";\n\t\t//System.out.println(datalogGlobal.getStatements().size());\n\t\t\n\t\tFileWriter writer = new FileWriter(outputFilePath);\n\t\tstorer.store(datalogCKR, writer);\n\t\t//writer.flush();\n\t\twriter.close();\n\t\t\n\t\t//System.out.println(\"CKR program saved in: \" + outputFilePath);\n\t}", "private static void printToFile(FrequencyCounter<Integer> freqCounter, ArrayList<Pair<Integer, Float>> plot) {\r\n\t\tPrintWriter writer;\r\n\t\ttry {\r\n\t\t\tString fName = \"experimentalResults\" + File.separator + \"results\" + freqCounter.getname() + \".txt\";\r\n\t\t\twriter = new PrintWriter(new File(fName));\r\n\t\t\tfor (Pair<Integer, Float> p : plot)\r\n\t\t\t\twriter.println(p);\r\n\r\n\t\t\twriter.close();\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public void writeOut(PrintWriter pw){}", "public static void main(String[] args) throws IOException {\n\n HuffmanTree huffman = null;\n int value;\n String inputString = null, codedString = null;\n\n while (true) {\n System.out.print(\"Enter first letter of \");\n System.out.print(\"enter, show, code, or decode: \");\n int choice = getChar();\n switch (choice) {\n case 'e':\n System.out.println(\"Enter text lines, terminate with $\");\n inputString = getText();\n printAdjustedInputString(inputString);\n huffman = new HuffmanTree(inputString);\n printFrequencyTable(huffman.frequencyTable);\n break;\n case 's':\n if (inputString == null)\n System.out.println(\"Please enter string first\");\n else\n huffman.encodingTree.displayTree();\n break;\n case 'c':\n if (inputString == null)\n System.out.println(\"Please enter string first\");\n else {\n codedString = huffman.encodeAll(inputString);\n System.out.println(\"Code:\\t\" + codedString);\n }\n break;\n case 'd':\n if (inputString == null)\n System.out.println(\"Please enter string first\");\n else if (codedString == null)\n System.out.println(\"Please enter 'c' for code first\");\n else {\n System.out.println(\"Decoded:\\t\" + huffman.decode(codedString));\n }\n break;\n default:\n System.out.print(\"Invalid entry\\n\");\n }\n }\n }", "public void printer() throws Exception{\n File outputFile = new File(\"output.txt\");\n FileOutputStream is = new FileOutputStream(outputFile);\n OutputStreamWriter osw = new OutputStreamWriter(is);\n Writer w = new BufferedWriter(osw);\n w.write(this.result());\n w.close();\n }", "public void dumpMyData() {\n\t PrintStream output=null;\n\t try{\n\t\t output=new PrintStream(new FileOutputStream(\"/Users/saigeetha/Documents/School Documents/Fall 2016/Assignments/CSCI_572_HW2/CrawlReport.txt\"));\n\t\t System.setOut(output);\n\t\t System.out.println(\"Name: Sai Geetha Kandepalli Cherukuru\");\n\t\t System.out.println(\"USC ID : 7283210853\");\n\t\t System.out.println(\"News site crawled: nytimes.com\");\n\t\t System.out.println();\n\t\t System.out.println(\"Fetch Statistics\");\n\t\t System.out.println(\"================\");\n\t\t System.out.println(\"# fetches attempted: \"+fetchesAttempted);\n\t\t System.out.println(\"# fetches succeeded: \"+fetchesSucceeded);\n\t\t System.out.println(\"# fetches aborted: \"+fetchesAborted);\n\t\t System.out.println(\"# fetches failed: \"+fetchesFailed);\n\t\t System.out.println();\n\t\t System.out.println(\"Outgoing URLs:\");\n\t\t System.out.println(\"================\");\n\t\t System.out.println(\"Total URLs extracted:\"+urlsExtracted);\n\t\t System.out.println(\"# unique URLs extracted: \"+uniqueUrlsExtracted.size());\n\t\t System.out.println(\"# unique URLs within News Site: \"+uniqueUrlsWithinNews.size());\n\t\t System.out.println(\"# unique URLs outside News Site: \"+uniqueUrlsOutsideNews.size());\n\t\t System.out.println();\n\t\t System.out.println(\"Status Codes:\");\n\t\t System.out.println(\"================\");\n\t\t \n\t\t for(Integer k: statusCodes.keySet()) {\n\t\t\t Integer value=statusCodes.get(k);\n\t\t\t System.out.println(k+\": \"+value);\n\t\t }\n\t\t \n\t\t System.out.println();\n\t\t System.out.println(\"File Sizes:\");\n\t\t System.out.println(\"================\");\n\t\t \n\t\t for(String k: fileSizes.keySet()) {\n\t\t\t Integer value=fileSizes.get(k);\n\t\t\t System.out.println(k+\": \"+value);\n\t\t }\n\t\t \n\t\t System.out.println();\n\t\t System.out.println(\"Content Types:\");\n\t\t System.out.println(\"================\");\n\t\t \n\t\t for(String k: contentTypes.keySet()) {\n\t\t\t Integer value=contentTypes.get(k);\n\t\t\t System.out.println(k+\": \"+value);\n\t\t }\n\t\t \n\t } catch(FileNotFoundException e) {\n\t\t e.printStackTrace();\n\t }\n }", "public void compress(BitInputStream in, BitOutputStream out){\n\n\t\t\tint[] counts = readForCounts(in);\n\t\t\tHuffNode root = makeTree(counts);\n\t\t\tMap<Integer, String> codings = makeCodingsFromTree(root);\n\t\t\twriter(root, out);\n\t\t\tin.reset();\n\t\t\twriteCompressedBits(in, codings, out);\n\t\t\tout.close();\n\t\t}", "private static void printTree(HuffmanNode tree, String direction, FileWriter newVersion) throws IOException {\n\t\tif(tree.inChar != null) {\n\t\t\tnewVersion.write(tree.inChar + \": \" + direction + \" | \" + tree.frequency + System.getProperty(\"line.separator\"));\n\t\t\tresults[resultIndex][0] = tree.inChar;\n\t\t\tresults[resultIndex][1] = direction;\n\t\t\tresults[resultIndex][2] = tree.frequency;\n\t\t\tresultIndex++;\n\t\t}\n\t\telse {\n\t\t\tprintTree(tree.right, direction + \"1\", newVersion);\n\t\t\tprintTree(tree.left, direction + \"0\", newVersion);\n\t\t}\n\t}", "private static void decode() throws IOException{\n File file = new File(_encodedBinFile);\n String longStringAsFile;\n \n //DataInputStream dis;\n FileWriter w;\n try {\n //dis = new DataInputStream(new FileInputStream(file));\n longStringAsFile = getLongStringAsFile();\n //dis.close();\n w = new FileWriter(\"decoded.txt\");\n Node traverser = root;\n for(int i=0; i < longStringAsFile.length(); i++){\n if(longStringAsFile.charAt(i) == '0'){\n //go to left\n if (traverser.getLeftPtr() == null){\n //fallen off the tree. Print to file\n if (i == longStringAsFile.length() - 1 ){\n w.write(((LeafNode)traverser).getData());\n }\n else{\n w.write(((LeafNode)traverser).getData() + \"\\n\");\n traverser = root.getLeftPtr();\n }\n }\n else{\n traverser = traverser.getLeftPtr();\n }\n }\n else{\n //go to right of tree\n if (traverser.getRightPtr() == null){\n //fallen off the tree. PRint to file\n if (i == longStringAsFile.length() - 1){\n w.write(((LeafNode)traverser).getData() );\n }\n else{\n w.write(((LeafNode)traverser).getData() + \"\\n\");\n traverser = root.getRightPtr();\n }\n\n }\n else{\n traverser = traverser.getRightPtr();\n }\n }\n \n }\n //dis.close();\n w.close();\n } catch (IOException ex) {\n Logger.getLogger(decoder.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n }", "public void outputToFile(String filemame)\n {\n }", "public void output(File outputFile){\n try {\n BufferedWriter file = new BufferedWriter(new FileWriter(outputFile));\n file.write(hashTable.length + \"\\n\");\n file.write(space() + \"\\n\");\n file.write(loadFactor + \"\\n\");\n file.write(collisionLength() + \"\\n\");\n for (int i = 0; i < hashTable.length; i++){\n if (hashTable[i] != null){\n LLNodeHash ptr = hashTable[i];\n while (ptr.getNext() != null){\n file.write(\"(\" + ptr.getKey() + \",\" + ptr.getFreq() + \") \");\n ptr = ptr.getNext();\n }\n file.write(\"(\" + ptr.getKey() + \",\" + ptr.getFreq() + \") \");\n }\n }\n file.close();\n }\n catch (IOException e){\n System.out.println(\"Cannot create new file\");\n e.printStackTrace();\n }\n }", "void save(String output);", "private void toFile(OutputData data) {\n if(data == null) {\r\n JOptionPane.showMessageDialog(this, \"Dane wynikowe nie zostały jeszcze umieszczone w pamieci\");\r\n return;\r\n }\r\n\r\n // Sprawdzenie sciezki zapisu\r\n String filePath = this.outputFileSelector.getPath();\r\n if(filePath.length() <= 5) {\r\n JOptionPane.showMessageDialog(this, \"Nie można zapisać wyniku w wybranej lokacji!\");\r\n return;\r\n }\r\n\r\n // Zapisujemy plik na dysk\r\n try{\r\n PrintWriter writer = new PrintWriter(filePath, \"UTF-8\");\r\n OutputDataFormatter odf = new OutputDataFormatter(this.outputData);\r\n\r\n String userPattern = this.outputFormatPanel.getPattern();\r\n writer.write(odf.getParsedString(userPattern.length() < 2 ? defaultFormatting : userPattern));\r\n\r\n writer.close();\r\n } catch (IOException e) {\r\n JOptionPane.showMessageDialog(this, \"Wystąpił błąd IO podczas zapisu.\");\r\n }\r\n\r\n }", "public void saveResult(PrintWriter P) {\n \n System.out.println(\"CaseListMem: Not implemented\");\n}", "public void writeToCsv(String fileName) throws Exception {\n\tFileWriter writer=new FileWriter(fileName);\n\n\twriter.append(Integer.toString(this.gen));\n\twriter.append('\\n');\n\n\tfor(int i=0;i<popSize;i++) {\n\t writer.append(getBna(i));\n\t writer.append('\\n');\n\t}\n\twriter.close();\n }", "private void outputToFile() {\n\t\tPath filePath = Paths.get(outputFile);\n\n\t\ttry (BufferedWriter writer = Files.newBufferedWriter(filePath,\n\t\t\t\tCharset.forName(\"UTF-8\"));) {\n\t\t\tRowIterator iterator = currentGen.iterateRows();\n\t\t\twhile (iterator.hasNext()) {\n\t\t\t\tElemIterator elem = iterator.next();\n\t\t\t\twhile (elem.hasNext()) {\n\t\t\t\t\tMatrixElem mElem = elem.next();\n\t\t\t\t\twriter.write(mElem.rowIndex() + \",\" + mElem.columnIndex());\n\t\t\t\t\twriter.newLine();\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Unable to write to the provided file\");\n\t\t}\n\n\t}", "private static void writer(String filename, char[] chars) {\n BinaryOut binaryOut = new BinaryOut(filename);\n\n for (char c : chars) {\n binaryOut.write(c);\n }\n\n binaryOut.close();\n }", "public void outputToFile(MethodCallExpr original, MethodCallExpr mutant) {\n if (comp_unit == null || currentMethodSignature == null){\n return;\n }\n num++;\n String f_name = getSourceName(\"ARGR\");\n String mutant_dir = getMuantID(\"ARGR\");\n try {\n PrintWriter out = getPrintWriter(f_name);\n ARGR_Writer writer = new ARGR_Writer(mutant_dir, out);\n writer.setMutant(original, mutant);\n writer.setMethodSignature(currentMethodSignature);\n writer.writeFile(comp_unit);\n out.flush();\n out.close();\n }\n catch (IOException e) {\n System.err.println(\"ARGR: Fails to create \" + f_name);\n logger.error(\"Fails to create \" + f_name);\n }\n }", "private void dumpASCII(Utterance utterance) {\n\tif (waveDumpFile != null) {\n\t LPCResult lpcResult = \n\t\t(LPCResult) utterance.getObject(\"target_lpcres\");\n\t try {\n\t\tif (waveDumpFile.equals(\"-\")) {\n\t\t lpcResult.dumpASCII();\n\t\t} else {\n\t\t lpcResult.dumpASCII(waveDumpFile);\n\t\t}\n\t } catch (IOException ioe) {\n\t\terror(\"Can't dump file to \" + waveDumpFile + \" \" + ioe);\n\t }\n\t}\n }", "private static void writeResults() {\n\t\t//Sort hashMap before sending to file\n\t\tTreeSet<Word> mySet = new TreeSet<>(hm.values());\n\n\t\t//Create result.txt file and write treeMap out to it\n\t\tWriter writer = null;\n\t\ttry {\n\t\t\t//System.out.println(\"Here\");\n\t\t\twriter = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(\"output\\\\results.txt\")));\n\t\t\tfor (Word word : mySet) {\n\t\t\t\twriter.write(word.getValue() + \"\\t\" + word.getCount() + \"\\n\");\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\twriter.close();\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public void writeJavaScript(File file) throws IOException {\n\t\tPrintStream ps = null;\n\t\ttry {\n\t\t\tps = new PrintStream(file);\n\t\t\tps.println(\"var allLetters = new Object();\");\n\t\t\tps.println();\n\n\t\t\tps.println(\"function getGlyph(letter) {\");\n\t\t\tps.println(\"\\tvar keyName = \\\"glyph-\\\"+letter;\");\n\n\t\t\tps.println(\"\\tvar g = allLetters[keyName];\");\n\t\t\tps.println(\"\\tif(g==null) {\");\n\t\t\tps.println(\"\\t\\tg = createGlyph(letter);\");\n\t\t\tps.println(\"\\t\\tallLetters[keyName] = g;\");\n\t\t\tps.println(\"\\t}\");\n\t\t\tps.println(\"\\treturn g;\");\n\t\t\tps.println(\"}\");\n\t\t\tps.println(\"\");\n\t\t\tps.println(\"function createGlyph(letter) {\");\n\t\t\tps.println(\"\\tvar glyph = new Object();\");\n\t\t\tps.println(\"\\tglyph.descent = \" + getProperty(WritingFont.DESCENT)\n\t\t\t\t\t+ \";\");\n\t\t\tps.println(\"\\tglyph.leading = \" + getProperty(WritingFont.LEADING)\n\t\t\t\t\t+ \";\");\n\t\t\tfor (Character ch : getDefinedGlyphs()) {\n\t\t\t\tif (ch == '\\'') {\n\t\t\t\t\tps.println(\"\\tif( letter==\\'\\\\\\'\\') {\");\n\t\t\t\t} else if (ch == '\\\\') {\n\t\t\t\t\tps.println(\"\\tif( letter==\\'\\\\\\\\\\') {\");\n\t\t\t\t} else {\n\t\t\t\t\tps.println(\"\\tif( letter==\\'\" + ch + \"\\') {\");\n\t\t\t\t}\n\t\t\t\tWritingShape ws = getGlyph(ch);\n\n\t\t\t\tps.println(\"\\t\\tglyph.bounds = new Object();\");\n\t\t\t\tps.println(\"\\t\\tglyph.unitWidth = \" + ws.getBounds().getWidth()\n\t\t\t\t\t\t+ \";\");\n\t\t\t\tps.println(\"\\t\\tglyph.pixels = \" + ws.getPixels() + \";\");\n\n\t\t\t\tps.println(\"\\t\\tglyph.paint = function(ctx, destinationBounds, percentComplete) {\");\n\t\t\t\tps.println(\"\\t\\t\\tvar tx = destinationBounds.x;\");\n\t\t\t\tps.println(\"\\t\\t\\tvar ty = destinationBounds.y;\");\n\t\t\t\tps.println(\"\\t\\t\\tvar sx = destinationBounds.width/glyph.unitWidth;\");\n\t\t\t\tps.println(\"\\t\\t\\tvar sy = destinationBounds.height\");\n\t\t\t\tps.println(\"\\t\\t\\tctx.beginPath();\");\n\t\t\t\tMeasuredShape[] ms = new MeasuredShape[ws.getStrokes().size()];\n\t\t\t\tfloat totalLength = 0;\n\t\t\t\tGeneralPath totalShape = new GeneralPath();\n\t\t\t\tfor (int a = 0; a < ws.strokes.size(); a++) {\n\t\t\t\t\tms[a] = new MeasuredShape(ws.strokes.get(a).getShape());\n\t\t\t\t\ttotalShape.append(ws.strokes.get(a).getShape(), false);\n\t\t\t\t\ttotalLength += ms[a].getOriginalDistance();\n\t\t\t\t}\n\t\t\t\tfor (int j = 0; j < 4; j++) {\n\t\t\t\t\tShape shapeToWrite;\n\t\t\t\t\tif (j == 3) {\n\t\t\t\t\t\tshapeToWrite = totalShape;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tGeneralPath t = new GeneralPath();\n\t\t\t\t\t\tfloat allowedLength = totalLength * (1 + j) / 4;\n\t\t\t\t\t\tfor (int a = 0; a < ms.length && allowedLength > 0; a++) {\n\t\t\t\t\t\t\tfloat myLength;\n\t\t\t\t\t\t\tif (allowedLength >= ms[a].getOriginalDistance()) {\n\t\t\t\t\t\t\t\tmyLength = ms[a].getOriginalDistance();\n\t\t\t\t\t\t\t\tt.append(ws.strokes.get(a).getShape(), false);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tmyLength = Math.min(allowedLength,\n\t\t\t\t\t\t\t\t\t\tms[a].getOriginalDistance());\n\t\t\t\t\t\t\t\tt.append(ms[a].getShape(0,\n\t\t\t\t\t\t\t\t\t\tmyLength / ms[a].getClosedDistance()),\n\t\t\t\t\t\t\t\t\t\tfalse);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tallowedLength = Math.max(0, allowedLength\n\t\t\t\t\t\t\t\t\t- myLength);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tshapeToWrite = t;\n\t\t\t\t\t}\n\t\t\t\t\tif (j == 0) {\n\t\t\t\t\t\tps.println(\"\\t\\t\\tif(percentComplete<\" + (j + 1) * 25\n\t\t\t\t\t\t\t\t+ \") {\");\n\t\t\t\t\t} else if (j == 3) {\n\t\t\t\t\t\tps.println(\"\\t\\t\\t} else {\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tps.println(\"\\t\\t\\t} else if(percentComplete<\" + (j + 1)\n\t\t\t\t\t\t\t\t* 25 + \") {\");\n\t\t\t\t\t}\n\n\t\t\t\t\tPathIterator i = shapeToWrite.getPathIterator(null);\n\t\t\t\t\tfloat[] coords = new float[6];\n\t\t\t\t\twhile (!i.isDone()) {\n\t\t\t\t\t\tint k = i.currentSegment(coords);\n\t\t\t\t\t\tif (k == PathIterator.SEG_MOVETO) {\n\t\t\t\t\t\t\tps.println(\"\\t\\t\\t\\tctx.moveTo( \" + coords[0]\n\t\t\t\t\t\t\t\t\t+ \"*sx+tx, \" + coords[1] + \"*sy+ty);\");\n\t\t\t\t\t\t} else if (k == PathIterator.SEG_LINETO) {\n\t\t\t\t\t\t\tps.println(\"\\t\\t\\t\\tctx.lineTo( \" + coords[0]\n\t\t\t\t\t\t\t\t\t+ \"*sx+tx, \" + coords[1] + \"*sy+ty);\");\n\t\t\t\t\t\t} else if (k == PathIterator.SEG_QUADTO) {\n\t\t\t\t\t\t\tps.println(\"\\t\\t\\t\\tctx.quadraticCurveTo( \"\n\t\t\t\t\t\t\t\t\t+ coords[0] + \"*sx+tx, \" + coords[1]\n\t\t\t\t\t\t\t\t\t+ \"*sy+ty,\" + coords[2] + \"*sx+tx, \"\n\t\t\t\t\t\t\t\t\t+ coords[3] + \"*sy+ty);\");\n\t\t\t\t\t\t} else if (k == PathIterator.SEG_CUBICTO) {\n\t\t\t\t\t\t\tps.println(\"\\t\\t\\t\\tctx.bezierCurveTo( \"\n\t\t\t\t\t\t\t\t\t+ coords[0] + \"*sx+tx, \" + coords[1]\n\t\t\t\t\t\t\t\t\t+ \"*sy+ty,\" + coords[2] + \"*sx+tx, \"\n\t\t\t\t\t\t\t\t\t+ coords[3] + \"*sy+ty,\" + coords[4]\n\t\t\t\t\t\t\t\t\t+ \"*sx+tx, \" + coords[5] + \"*sy+ty);\");\n\t\t\t\t\t\t} else if (k == PathIterator.SEG_CLOSE) {\n\t\t\t\t\t\t\tps.println(\"\\t\\t\\t\\tctx.closePath();\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\ti.next();\n\t\t\t\t\t}\n\n\t\t\t\t\tif (j == 3) {\n\t\t\t\t\t\tps.println(\"\\t\\t\\t}\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tps.println(\"\\t\\t\\tctx.stroke();\");\n\t\t\t\tps.println(\"\\t\\t}\");\n\n\t\t\t\tps.println(\"\\t\\treturn glyph;\");\n\t\t\t\tps.println(\"\\t}\");\n\t\t\t}\n\t\t\tps.println(\"\\treturn null;\");\n\t\t\tps.println(\"}\");\n\t\t} finally {\n\t\t\tps.close();\n\t\t}\n\t}", "public static void main(String[] args) {\n Huffman huffman=new Huffman(\"Shevchenko Vladimir Vladimirovich\");\n System.out.println(huffman.getCodeText());//\n //answer:110100001001101011000001001110111110110101100110110001001110101111100011101000011011000100111010111110001110100101110101111100000\n\n huffman.getSizeBits();//размер в битах\n ;//кол-во символов\n System.out.println((double) huffman.getSizeBits()/(huffman.getValueOfCharactersOfText()*8)); //коэффициент сжатия относительно aski кодов\n System.out.println((double) huffman.getSizeBits()/(huffman.getValueOfCharactersOfText()*\n (Math.pow(huffman.getValueOfCharactersOfText(),0.5)))); //коэффициент сжатия относительно равномерного кода. Не учитывается размер таблицы\n System.out.println(huffman.getMediumLenght());//средняя длина кодового слова\n System.out.println(huffman.getDisper());//дисперсия\n\n\n }", "@Override\n public void saveSolutions() {save solutions in unfolded format in a separate files for each solution (At this time, we have just one solution)\n // The result will print in 3 rows and each row have 4 columns:\n //\n // row1 --> col2\n // row2 --> col1 clo2 col3 col4\n // row2 --> clo2\n //\n //Example (of red cube):\n //\n // oo o\n // ooo\n // ooooo\n // ooo\n // oo\n // o o oo oo oo o\n //oooo ooooo ooo oooo\n // oooo ooo ooooo oooo\n //oooo ooooo ooo oooo\n // o o o oo o\n // o oo\n // oooo\n // oooo\n // oooo\n // oo oo\n //\n String directory = \"output\";\n File dir = new File(directory);\n if (!dir.exists()) dir.mkdirs();\n AtomicInteger counter = new AtomicInteger(1);\n solutions.forEach((number, solutionPuzzle) -> {\n StringBuilder rowStringValue1 = generateRowStringValue(null, solutionPuzzle.getTopPuzzlePiece(), null, null);\n StringBuilder rowStringValue2 = generateRowStringValue(solutionPuzzle.getLeftPuzzlePiece(), solutionPuzzle.getFrontPuzzlePiece(), solutionPuzzle.getRightPuzzlePiece(), solutionPuzzle.getBackPuzzlePiece());\n StringBuilder rowStringValue3 = generateRowStringValue(null, solutionPuzzle.getBottomPuzzlePiece(), null, null);\n Path path = Paths.get(directory + \"/solution\" + counter.getAndIncrement() + \".txt\");\n try (BufferedWriter writer = Files.newBufferedWriter(path)) {\n writer.write(rowStringValue1.append(rowStringValue2).append(rowStringValue3).toString());\n } catch (IOException e) {\n e.printStackTrace();\n }\n });\n\n }", "public void save(File file) throws IOException{\n\t\tBufferedWriter writer = new BufferedWriter(new FileWriter(file));\n\t //Write the header of the file\n\t\twriter.append(\"Celda\");\n\t for(String label:labels){\n\t \twriter.append (DELIMITER+label);\n\t }\n\t writer.append(NEWLINE);\n\t\t\n\t //Now, write the content of the tree\n\t Set<Integer> keys = this.keySet();\n\t for(Integer key:keys){\n\t \twriter.append(key+\"\");\n\t \tdouble[] datas = this.get(key);\n\t \tfor(int i=0;i<datas.length;i++){\n\t \t\twriter.append(DELIMITER+datas[i]);\n\t \t}\n\t \twriter.append(NEWLINE);\n\t }\n\t \n\t writer.flush();\n\t writer.close();\n\t}", "public void displayToFile(){\n String data = \"\";\n try{\n FileWriter fstream = new FileWriter(\"output.txt\", true);\n BufferedWriter out = new BufferedWriter(fstream);\n\n for (int i=0 ; i<40; i++) {\n for (int j=0; j<146 ;j++ ){\n if (board.getCharacter(j,i) == '0') {\n data += '-';\n } else {\n data += board.getCharacter(j,i);\n }\n }\n out.write(data);\n data = \"\";\n }\t\n out.close();\n } catch (Exception e){\n System.err.println(\"Error: \" + e.getMessage());\n }\n }", "public static void main(String[] args) {\n\r\n\t\tFileReader myReader=new FileReader();\r\n\t\ttry {\r\n\t\t\tmyReader.readFile(\"D:/test.txt\");\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\r\n\t\r\n\t\t//This is for writing to the file\r\n\t\t\t\tPrintWriter writer;\r\n\t\t\t\t\r\n\t\t\t\t//Open File 'output.txt'\r\n\t\t\t\ttry {\r\n\t\t\t\t\twriter = new PrintWriter(\"output.txt\", \"UTF-8\");\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\treturn;\r\n\t\t\t\t} \r\n\r\n\r\n//\t\t\t\tswitch (methodEmployed){\r\n//\t\t\t\t\tcase 1: //BiSection\r\n//\t\t\t\t\t\r\n//\t\t\t\t\tBisectionMethod(e,l,u,cE);\r\n//\t\t\t\t\t\r\n//\t\t\t\t\twriter.println(\"Report of BisectionSearch\");\r\n//\t\t\t\t\twriter.println(\"--------------------------------------\");\r\n//\t\t\t\t\twriter.println(\"App. Optimum Soln.=\" + String.valueOf(BisectionMethod.getXMean()));\r\n//\t\t\t\t\twriter.println(\"Abs. Range for Opt. Soln.=[\" + String.valueOf(BisectionMethod.getXLower())+\"-\"+String.valueOf(BisectionMethod.getXUpper())+\"]\");\r\n//\t\t\t\t\twriter.println(\"Z=\" + String.valueOf(BisectionMethod.getFunctionValue());\r\n//\t\t\t\t\tbreak;\r\n//\t\t\t\t\tcase 2: //GoldenSection\r\n//\t\t\t\t\tGoldenSectionMethod(e,l,u,cE);\r\n//\t\t\t\t\t\r\n//\t\t\t\t\twriter.println(\"Report of GoldenSectionSearch\");\r\n//\t\t\t\t\twriter.println(\"--------------------------------------\");\r\n//\t\t\t\t\twriter.println(\"App. Optimum Soln.=\" + String.valueOf(GoldenSectionMethod.getXMean()));\r\n//\t\t\t\t\twriter.println(\"Abs. Range for Opt. Soln.=[\" + String.valueOf(GoldenSectionMethod.getXLower())+\"-\"+String.valueOf(GoldenSectionMethod.getXUpper())+\"]\");\r\n//\t\t\t\t\twriter.println(\"Z=\" + String.valueOf(GoldenSectionMethod.getFunctionValue());\r\n//\t\t\t\t\tbreak;\r\n//\t\t\t\t\tcase 3: // NewtonMethod\r\n//\t\t\t\t\t\r\n//\t\t\t\t\tbreak;\r\n//\t\t\t\t\tcase 4: // SecantMethod\r\n//\t\t\t\t\t\r\n//\t\t\t\t\tbreak;\r\n//\t\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\twriter.close();\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.println(\"--------------------------------------\");\r\n\t\t\t\tSystem.out.println(\"RESULTS ARE WRITTEN TO 'output.txt' \");\r\n\r\n\t\r\n\t}", "public static void fileWriterPrinter() throws NumberFormatException, IOException {\n // Create File:\n\t\t\t\tFile f = new File(Common.testOutputFileDir + \"print.log\");\t\t\t\t \n\t\t\t // Write or add a String line into File:\t\n\t\t\t FileWriter fw = new FileWriter(f,true);\n\t\t\t PrintWriter pw = new PrintWriter(fw);\n\t\t\t pw.println();\n\t\t\t pw.close();\n\t\t\t // System Out Print Line:\n\t\t\t // if (printLine instanceof String) {}\n\t\t\t // if (printLine instanceof Integer) {}\n\t\t\t // if (printLine instanceof Long) {}\n\t\t\t // if (printLine instanceof Boolean) {}\n\t\t\t // if (printLine instanceof Double) {}\n\t\t\t System.out.print(\"\\n\");\t\t \n\t\t\t}", "private void saveCustomDeck() {\n try (PrintWriter pw = new PrintWriter(new FileWriter(USER_DECK))) {\n for (int i = 0; i < customDeck.size(); i++) {\n pw.print(customDeck.get(i) + \"\\n\\n\");\n }\n } catch (IOException ex) {\n System.out.println(\"FAILED TO SAVE SCORES\");\n }\n }", "public void writer(List<String> toStore) throws IOException{\n //creates writer and clears file\n PrintWriter writer = new PrintWriter(\"output.txt\", \"UTF-8\");\n //for each loop to store all the values in the file into the file named output.txt\n for(String s : toStore)\n //stores the strings for outputting\n writer.println(s);\n //closes the writer and outputs to the file\n writer.close();\n }", "public static void main(String[] args) {\n try (FileOutputStream f = new FileOutputStream()) //create an object of fileoutputstream\n {\n String data = \"Hello stupid\"; //custom string input\n byte[] arr = data.getBytes(); //convert string to bytes\n stream.write(arr); //text written in file\n } catch (Exception e) { //catch block to handle exception\n System.out.println(e.getMessage());\n }\n System.out.println(\"resources are closed so byebye\");\n }", "public static void encode()\n {\n \n String s = BinaryStdIn.readString();\n //String s = \"ABRACADABRA!\";\n int len = s.length();\n int key = 0;\n \n // generating rotating string table\n String[] table = new String[len];\n for (int i = 0 ; i < len; i++)\n {\n table[i] = rotate(s, i, len);\n }\n \n // sort the table\n String[] sorted = new String[len];\n for(int i = 0 ; i < len; i++)\n {\n sorted[i] = table[i];\n }\n sort(sorted, len);\n \n //generating encoded string\n StringBuilder result = new StringBuilder();\n for(int i = 0 ; i < len; i++)\n result.append(sorted[i].charAt(len-1));\n \n //find the key index \n for(int i = 0 ; i < table.length; i++)\n {\n if(sorted[i].equals(s))\n {\n key = i;\n break;\n }\n }\n \n // output part\n \n BinaryStdOut.write(key);\n \n for(int i = 0 ; i < len; i++)\n BinaryStdOut.write(result.charAt(i)); // generate the output character by character\n \n BinaryStdOut.close();\n \n }" ]
[ "0.6449896", "0.6358293", "0.6333043", "0.6228915", "0.62154514", "0.6022257", "0.6016767", "0.5928565", "0.5925787", "0.5871344", "0.5811741", "0.57862985", "0.57544416", "0.5719812", "0.5704972", "0.5697623", "0.56838447", "0.5672839", "0.56532276", "0.5640772", "0.55501384", "0.5544266", "0.5538606", "0.55156845", "0.55009985", "0.54706365", "0.54676276", "0.54106915", "0.54056484", "0.5359127", "0.53583735", "0.53516406", "0.5346015", "0.5333461", "0.531475", "0.5313064", "0.530957", "0.5289621", "0.5273361", "0.52493024", "0.5238442", "0.5203626", "0.5200206", "0.5184585", "0.51688766", "0.515444", "0.51516014", "0.5136212", "0.51102495", "0.510583", "0.5101368", "0.5095192", "0.5079766", "0.5070811", "0.50622064", "0.50583756", "0.5049378", "0.50478417", "0.5045659", "0.50377005", "0.5034918", "0.5029638", "0.50259453", "0.5016471", "0.5015518", "0.50106686", "0.5006536", "0.50048345", "0.50016314", "0.49979863", "0.49962473", "0.49925125", "0.4991146", "0.4990675", "0.49867454", "0.49762622", "0.49752828", "0.49713916", "0.49634942", "0.49549922", "0.49486876", "0.49480844", "0.4945717", "0.49372497", "0.4932318", "0.49311176", "0.49261546", "0.49260458", "0.4923569", "0.4912138", "0.48987016", "0.4897422", "0.48916042", "0.48849997", "0.48809254", "0.48773512", "0.48759001", "0.48687527", "0.48657772", "0.4863175" ]
0.73016447
0
A method that takes in a BitInputStream and a PrintStream. Reads bits from the BitInputStream and translates them using the HuffmanTree and prints those characters to the PrintStream.
public void translate(BitInputStream input, PrintStream output) { HuffmanNode node = this.front; while (input.hasNextBit()) { while (node.left != null && node.right != null) { if (input.nextBit() == 0) { node = node.left; } else { node = node.right; } } output.print(node.getData()); node = this.front; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void HuffmanPrinter(HuffmanNode node, String s, PrintStream output) {\n if (node.left == null) {\n output.println((byte) node.getData());\n output.println(s);\n } else {\n HuffmanPrinter(node.left, s + 0, output);\n HuffmanPrinter(node.right, s + 1, output);\n }\n }", "void decode(){\n int bit = -1; // next bit from compressed file: 0 or 1. no more bit: -1\r\n int k = 0; // index to the Huffman tree array; k = 0 is the root of tree\r\n int n = 0; // number of symbols decoded, stop the while loop when n == filesize\r\n int numBits = 0; // number of bits in the compressed file\r\n FileOutputStream file = null;\r\n try {\r\n file = new FileOutputStream(\"uncompressed.txt\");\r\n } catch (FileNotFoundException ex) {\r\n System.err.println(\"Could not open file to write to.\");\r\n }\r\n while ((bit = inputBit()) >= 0){\r\n k = codetree[k][bit];\r\n numBits++;\r\n if (codetree[k][0] == 0){ // leaf\r\n try {\r\n file.write(codetree[k][1]);\r\n } catch (IOException ex) {\r\n System.err.println(\"Failed to write to file.\");\r\n }\r\n System.out.write(codetree[k][1]);\r\n if (n++ == filesize) break; // ignore any additional bits\r\n k = 0;\r\n }\r\n }\r\n System.out.printf(\"\\n\\n------------------------------\\n\" +\r\n \"%d bytes in uncompressed file.\\n\", filesize);\r\n System.out.printf(\"%d bytes in compressed file.\\n\", numBits / 8);\r\n System.out.printf(\"Compression ratio of %f.\", (double)numBits / (double)filesize);\r\n System.out.flush();\r\n }", "public void run() {\n\n\t\tScanner s = new Scanner(System.in); // A scanner to scan the file per\n\t\t\t\t\t\t\t\t\t\t\t// character\n\t\ttype = s.next(); // The type specifies our wanted output\n\t\ts.nextLine(); \n\n\t\t// STEP 1: Count how many times each character appears.\n\t\tthis.charFrequencyCount(s);\n\n\t\t/*\n\t\t * Type F only wants the frequency. Display it, and we're done (so\n\t\t * return)\n\t\t */\n\t\tif (type.equals(\"F\")) {\n\t\t\tdisplayFrequency(frequencyCount);\n\t\t\treturn;\n\t\t}\n\n\t\t/*\n\t\t * STEP 2: we want to make our final tree (used to get the direction\n\t\t * values) This entails loading up the priority queue and using it to\n\t\t * build the tree.\n\t\t */\n\t\tloadInitQueue();\n\t\tthis.finalHuffmanTree = this.buildHuffTree();\n\t\t\n\t\t/*\n\t\t * Type T wants a level order display of the Tree. Do so, and we're done\n\t\t * (so return)\n\t\t */\n\t\tif (type.equals(\"T\")) {\n\t\t\tthis.finalHuffmanTree.visitLevelOrder(new HuffmanVisitorForTypeT());\n\t\t\treturn;\n\t\t}\n\n\t\t/*\n\t\t * STEP 3: We want the Huffman code values for the characters.\n\t\t * The Huffman codes are specified by the path (directions) from the root.\n\t\t * \n\t\t * Each node in the tree has a path to get to it from the root. The\n\t\t * leaves are especially important because they are the original\n\t\t * characters scanned. Load every node with it's special direction value\n\t\t * (the method saves the original character Huffman codes, the direction\n\t\t * vals).\n\t\t */\n\t\tthis.loadDirectionValues(this.finalHuffmanTree.root);\n\t\t// Type H simply wants the codes... display them and we're done (so\n\t\t// return)\n\t\tif (type.equals(\"H\")) {\n\t\t\tthis.displayHuffCodesTable();\n\t\t\treturn;\n\t\t}\n\n\t\t/*\n\t\t * STEP 4: The Type must be M (unless there was invalid input) since all other cases were exhausted, so now we simply display the file using\n\t\t * the Huffman codes.\n\t\t */\n\t\tthis.displayHuffCodefile();\n\t}", "public static void main(String args[])\n {\n Scanner s = new Scanner(System.in).useDelimiter(\"\");\n List<node> freq = new SinglyLinkedList<node>();\n \n // read data from input\n while (s.hasNext())\n {\n // s.next() returns string; we're interested in first char\n char c = s.next().charAt(0);\n if (c == '\\n') continue;\n // look up character in frequency list\n node query = new node(c);\n node item = freq.remove(query);\n if (item == null)\n { // not found, add new node\n freq.addFirst(query);\n } else { // found, increment node\n item.frequency++;\n freq.addFirst(item);\n }\n }\n \n // insert each character into a Huffman tree\n OrderedList<huffmanTree> trees = new OrderedList<huffmanTree>();\n for (node n : freq)\n {\n trees.add(new huffmanTree(n));\n }\n \n // merge trees in pairs until one remains\n Iterator ti = trees.iterator();\n while (trees.size() > 1)\n {\n // construct a new iterator\n ti = trees.iterator();\n // grab two smallest values\n huffmanTree smallest = (huffmanTree)ti.next();\n huffmanTree small = (huffmanTree)ti.next();\n // remove them\n trees.remove(smallest);\n trees.remove(small);\n // add bigger tree containing both\n trees.add(new huffmanTree(smallest,small));\n }\n // print only tree in list\n ti = trees.iterator();\n Assert.condition(ti.hasNext(),\"Huffman tree exists.\");\n huffmanTree encoding = (huffmanTree)ti.next();\n encoding.print();\n }", "public static void expand() {\n Node root = readTrie();\n\n // number of bytes to write\n int length = BinaryStdIn.readInt();\n\n // decode using the Huffman trie\n for (int i = 0; i < length; i++) {\n Node x = root;\n while (!x.isLeaf()) {\n boolean bit = BinaryStdIn.readBoolean();\n if (bit) x = x.right;\n else x = x.left;\n }\n BinaryStdOut.write(x.ch, 8);\n }\n BinaryStdOut.close();\n }", "public HuffmanCode(Scanner input) {\n this.front = new HuffmanNode();\n while (input.hasNextLine()) {\n int character = Integer.parseInt(input.nextLine());\n String location = input.nextLine();\n ScannerHuffmanCodeCreator(this.front, location, (char) character);\n }\n }", "public void compress(BitInputStream in, BitOutputStream out){\n\n\t\t\tint[] counts = readForCounts(in);\n\t\t\tHuffNode root = makeTree(counts);\n\t\t\tMap<Integer, String> codings = makeCodingsFromTree(root);\n\t\t\twriter(root, out);\n\t\t\tin.reset();\n\t\t\twriteCompressedBits(in, codings, out);\n\t\t\tout.close();\n\t\t}", "public void save(PrintStream output) {\n HuffmanPrinter(this.front, \"\", output);\n }", "public HuffTree makeHuffTree(InputStream stream) throws IOException;", "private static void readAndPrint(InputStream is) {\n try {\n int a = is.read();\n int b = is.read();\n int c = is.read();\n int d = is.read();\n System.out.print(\"Received: \");\n System.out.println(\"0x\" + Integer.toString(a, 16) + Integer.toString(b, 16) + Integer.toString(c, 16) + Integer.toString(d, 16));\n } catch (IOException ioe) {\n ioe.printStackTrace();\n }\n }", "public void printCode(PrintStream out, String code, BinaryTree<HuffData> tree) {\n HuffData theData = tree.getData(); //Get the data of the tree\n if (theData.symbol != null) { //If the data's symbol is not null (as in a symbol and not a sum)\n if(theData.symbol.equals(\" \")) { //If the symbol is a space print out \"space: \"\n out.println(\"space: \" + code);\n } else { //Otherwise print out the symbol and the code\n out.println(theData.symbol + \" \" + code);\n //Then add the symbol and code to the EncodeData table\n this.encodings[encodingsTop++] = new EncodeData(code, theData.symbol);\n }\n } else {\n //If the data's symbol is null, that means it is a sum node\n //and so it needs to go farther down the tree\n \n //Go down the left tree and add a 0\n printCode(out, code + \"0\", tree.getLeftSubtree());\n //Go down the right tree and add a 1\n printCode(out, code + \"1\", tree.getRightSubtree());\n }\n }", "public void decompress(BitInputStream in, BitOutputStream out){\n\n\t\tint bits = in.readBits(BITS_PER_INT);\n\t\tif(bits != HUFF_TREE)\n\t\t\tthrow new HuffException(\"Illegal header starts with \"+bits);\n\t\t\n\t\tHuffNode root = readTreeHeader(in);\n\t\treadCompressedBits(root, in, out);\n\t\tout.close();\n\t}", "private void loadOutput(InputStream in) throws IOException\r\n\t{\r\n\t\tlogger.debug(\"Begin: \"+getClass().getName()+\":loadOutput()\");\t\r\n\t\tStringBuffer sb=new StringBuffer();\r\n\t\tint c;\r\n\t\twhile((c=in.read())!= -1) \r\n\t\t{\t\t \r\n\t\t\tsb.append((char)c);\r\n\t\t}\t \r\n\t\toutput=sb.toString();\t\t\r\n\t\tlogger.debug(\"output is : \"+output);\r\n\t\tlogger.debug(\"Begin: \"+getClass().getName()+\":loadOutput()\");\t\r\n\t}", "public int compress(InputStream in, OutputStream out, boolean force) throws IOException {\n int walk = 0; // Temp storage for incoming byte from read file\n int walkCount = 0; // Number of total bits read\n char codeCheck = ' '; // Used as a key to find the code in the code map\n String[] codeMap = HuffEncoder.encoding(); // Stores the character codes, copied from HuffEncode\n String s2b = \"\"; // Temp string storage \n int codeLen = 0; // Temp storage for code length (array storage)\n BitInputStream bitIn = new BitInputStream(in); \n BitOutputStream bitOut = new BitOutputStream(out);\n\n // Writes the code array at the top of the file. It first writes the number of bits in the code, then \n // the code itself. In the decode proccess, the code length is first read, then the code is read using the length\n // as a guide.\n // A space at top of file ensures the following is the array, and the file will correctly decompress\n out.write(32);\n for (int i = 0; i < codeMap.length; i++) {\n // Value of the character\n s2b = codeMap[i];\n // If null, make it zero\n if(s2b == null){\n s2b = \"0\";\n }\n // Record length of code\n codeLen = s2b.length();\n // Write the length of the code, to use for decoding\n bitOut.writeBits(8, codeLen);\n // Write the value of the character\n for (int j = 0; j < s2b.length(); j++) {\n bitOut.writeBits(1, Integer.valueOf(s2b.charAt(j)));\n }\n }\n\n // Reads in a byte from the file, converts it to a character, then uses that \n // caracter to look up the huffman code. The huffman code is writen to the new \n // file.\n try {\n while(true){\n // Read first eight bits\n walk = bitIn.read();\n // -1 means the stream has reached the end\n if(walk == -1){break;}\n // convert the binary to a character\n codeCheck = (char) walk;\n // find the huff code for the character\n s2b = codeMap[codeCheck];\n // write the code to new file\n for (int i = 0; i < s2b.length(); i++) {\n bitOut.writeBits(1, Integer.valueOf(s2b.charAt(i)));\n }\n walkCount += 8; // Number of bits read\n }\n bitIn.close();\n bitOut.close();\n return walkCount; \n } catch (IOException e) {\n bitIn.close();\n bitOut.close();\n throw e;\n }\n }", "public static void printByteBinary(byte b) {\n\t\t// We first want to print the bit in the one's place\n\t\tbyte f;\n\t\tf=b;\n\t\tSystem.out.print(b&1);\n\t\t// Shift b seven bits to the right\n\t\tb=(byte)(b>>7);\n\t\t// Use the & operator to \"mask\" the bit in the one's place\n\t\t// This can be done by \"anding\" (&) it with the value of 1\n\t\tb=(byte)(b&1);\n\t\t// Print the result using System.out.print (NOT System.out.println)\n\t\tSystem.out.print(b);\n\t\t//Use this method to print the remaining 7 bits of b \n\t\tf=(byte)((b&2)>>1);\n\t\tSystem.out.print(f);\n\t\tf=(byte)((b&4)>>2);\n\t\tSystem.out.print(f);\n\t\tf=(byte)((b&8)>>3);\n\t\tSystem.out.print(b);\n\t\tf=(byte)((b&16)>>4);\n\t\tSystem.out.print(b);\n\t\tf=(byte)((b&32)>>5);\n\t\tSystem.out.print(f);\n\t\tf=(byte)((b&64)>>6);\n\t\tSystem.out.print(f);\n\t}", "public static void main(String[] args) throws IOException {\n\n HuffmanTree huffman = null;\n int value;\n String inputString = null, codedString = null;\n\n while (true) {\n System.out.print(\"Enter first letter of \");\n System.out.print(\"enter, show, code, or decode: \");\n int choice = getChar();\n switch (choice) {\n case 'e':\n System.out.println(\"Enter text lines, terminate with $\");\n inputString = getText();\n printAdjustedInputString(inputString);\n huffman = new HuffmanTree(inputString);\n printFrequencyTable(huffman.frequencyTable);\n break;\n case 's':\n if (inputString == null)\n System.out.println(\"Please enter string first\");\n else\n huffman.encodingTree.displayTree();\n break;\n case 'c':\n if (inputString == null)\n System.out.println(\"Please enter string first\");\n else {\n codedString = huffman.encodeAll(inputString);\n System.out.println(\"Code:\\t\" + codedString);\n }\n break;\n case 'd':\n if (inputString == null)\n System.out.println(\"Please enter string first\");\n else if (codedString == null)\n System.out.println(\"Please enter 'c' for code first\");\n else {\n System.out.println(\"Decoded:\\t\" + huffman.decode(codedString));\n }\n break;\n default:\n System.out.print(\"Invalid entry\\n\");\n }\n }\n }", "public static void main(String[] args) throws IOException {\n InputStream bS = new ByteArrayInputStream(\"Ы\".getBytes());\n int b = 0;\n while ((b = bS.read()) != -1)\n System.out.print(b + \" \");\n System.out.println(\"\\n\");\n\n for (byte c : \"Ы\".getBytes())\n System.out.print((c^-1 << 8) + \" \");\n System.out.println(\"\\n\");\n\n String s = \"Ы\";\n byte[] b1 = s.getBytes();\n for (int i = 0; i < b1.length; i++ ) {\n System.out.print(((int) b1[i] ^ -1 << 8) + \" \");\n }\n Writer writer = new OutputStreamWriter(System.out, StandardCharsets.US_ASCII);\n writer.write(\"Ч\");\n writer.close();\n }", "public static void HuffmanTree(String input, String output) throws Exception {\n\t\tFileReader inputFile = new FileReader(input);\n\t\tArrayList<HuffmanNode> tree = new ArrayList<HuffmanNode>(200);\n\t\tchar current;\n\t\t\n\t\t// loops through the file and creates the nodes containing all present characters and frequencies\n\t\twhile((current = (char)(inputFile.read())) != (char)-1) {\n\t\t\tint search = 0;\n\t\t\tboolean found = false;\n\t\t\twhile(search < tree.size() && found != true) {\n\t\t\t\tif(tree.get(search).inChar == (char)current) {\n\t\t\t\t\ttree.get(search).frequency++; \n\t\t\t\t\tfound = true;\n\t\t\t\t}\n\t\t\t\tsearch++;\n\t\t\t}\n\t\t\tif(found == false) {\n\t\t\t\ttree.add(new HuffmanNode(current));\n\t\t\t}\n\t\t}\n\t\tinputFile.close();\n\t\t\n\t\t//creates the huffman tree\n\t\tcreateTree(tree);\n\t\t\n\t\t//the huffman tree\n\t\tHuffmanNode sortedTree = tree.get(0);\n\t\t\n\t\t//prints out the statistics of the input file and the space saved\n\t\tFileWriter newVersion = new FileWriter(\"C:\\\\Users\\\\Chris\\\\workspace\\\\P2\\\\src\\\\P2_cxt240_Tsuei_statistics.txt\");\n\t\tprintTree(sortedTree, \"\", newVersion);\n\t\tspaceSaver(newVersion);\n\t\tnewVersion.close();\n\t\t\n\t\t// codes the file using huffman encoding\n\t\tFileWriter outputFile = new FileWriter(output);\n\t\ttranslate(input, outputFile);\n\t}", "public int preprocessCompress(InputStream in) throws IOException {\n try {\n // Count the characters\n int counted = CharCounter.countAll(in); \n int[] countedArray = CharCounter.countValues();\n // Build the huffman tree\n TreeBuilder countedTree = new TreeBuilder();\n countedTree.buildTree(countedArray);\n // Create the huffman character codes\n HuffEncoder.huffEncode(countedTree.getRoot());\n return counted;\n } catch (IOException e) {\n throw e;\n }\n }", "public static void main(String[] args) {\n TextFileGenerator textFileGenerator = new TextFileGenerator();\n HuffmanTree huffmanTree;\n Scanner keyboard = new Scanner(System.in);\n PrintWriter encodedOutputStream = null;\n PrintWriter decodedOutputStream = null;\n String url, originalString = \"\", encodedString, decodedString;\n boolean badURL = true;\n int originalBits, encodedBits, decodedBits;\n\n while(badURL) {\n System.out.println(\"Please enter a URL: \");\n url = keyboard.nextLine();\n\n try {\n originalString = textFileGenerator.makeCleanFile(url, \"original.txt\");\n badURL = false;\n }\n catch(IOException e) {\n System.out.println(\"Error: Please try again\");\n }\n }\n\n huffmanTree = new HuffmanTree(originalString);\n encodedString = huffmanTree.encode(originalString);\n decodedString = huffmanTree.decode(encodedString);\n // NOTE: TextFileGenerator.getNumChars() was not working for me. I copied the encoded text file (pure 0s and 1s)\n // into google docs and the character count is accurate with the String length and not the method\n originalBits = originalString.length() * 16;\n encodedBits = encodedString.length();\n decodedBits = decodedString.length() * 16;\n\n decodedString = fixPrintWriterNewLine(decodedString);\n\n try { // creating the encoded and decoded files\n encodedOutputStream = new PrintWriter(new FileOutputStream(\"src\\\\edu\\\\miracosta\\\\cs113\\\\encoded.txt\"));\n decodedOutputStream = new PrintWriter(new FileOutputStream(\"src\\\\edu\\\\miracosta\\\\cs113\\\\decoded.txt\"));\n encodedOutputStream.print(encodedString);\n decodedOutputStream.print(decodedString);\n }\n catch(IOException e) {\n System.out.println(\"Error: IOException!\");\n }\n\n encodedOutputStream.close();\n decodedOutputStream.close();\n\n System.out.println(\"Original file bit count: \" + originalBits);\n System.out.println(\"Encoded file bit count: \" + encodedBits);\n System.out.println(\"Decoded file bit count: \" + decodedBits);\n System.out.println(\"Compression ratio: \" + (double)originalBits/encodedBits);\n }", "public static void encode() {\n char[] symbols = initializeSymbols();\n int position;\n while (!BinaryStdIn.isEmpty()) {\n char symbol = BinaryStdIn.readChar();\n position = 0;\n while (symbols[position] != symbol) {\n position++;\n }\n BinaryStdOut.write(position, BITS_PER_BYTE);\n System.arraycopy(symbols, 0, symbols, 1, position);\n symbols[0] = symbol;\n }\n BinaryStdOut.close();\n }", "public void printStream(InputStream is) {\r\n BufferedReader br = new BufferedReader(new InputStreamReader(is));\r\n String line;\r\n try {\r\n while ((line=br.readLine())!=null) {\r\n System.out.println(line);\r\n }\r\n } catch (IOException ex) {\r\n System.out.println(\"RegisterRequest.printStream: \" + ex);\r\n }\r\n }", "public static void main(String[] args) throws IOException {\n BufferedReader buffRead = new BufferedReader(new FileReader(\"/home/hsnavarro/IdeaProjects/Aula 1/src/input\"));\n FileOutputStream output = new FileOutputStream(\"src/output\", true);\n String s = \"\";\n s = buffRead.readLine().toLowerCase();\n System.out.println(s);\n CifraCesar c = new CifraCesar(0, s, true);\n c.getInfo();\n int[] freq = new int[26];\n for (int i = 0; i < 26; ++i) freq[i] = 0;\n for (int i = 0; i < c.criptografada.length(); i++) {\n freq[c.criptografada.charAt(i) - 97]++;\n }\n Huffman h = new Huffman(freq, c.criptografada);\n h.printHuffman();\n h.descriptografiaHuffman();\n System.out.println(\"huffman: \" + h.descriptoHuffman);\n CifraCesar d = new CifraCesar(h.criptoAnalisis(), h.descriptoHuffman, false);\n\n System.out.println(d.descriptografada);\n System.out.println(d.descriptografada);\n\n System.out.println(\"Comparando:\");\n System.out.println(\"Antes da compressão:\" + s.length());\n\n byte inp = 0;\n int cnt = 0;\n for (int i = 0; i < h.criptografada.length(); i++) {\n int idx = i % 8;\n if (h.criptografada.charAt(i) == '1') inp += (1 << (7 - idx));\n if (idx == 7) {\n cnt++;\n output.write(inp);\n inp = 0;\n }\n }\n if(h.criptografada.length() % 8 != 0){\n cnt++;\n output.write(inp);\n }\n System.out.println(\"Depois da compressão:\" + cnt);\n buffRead.close();\n output.close();\n }", "@Override\r\n public void run() {\n File huffmanFolder = newDirectoryEncodedFiles(file, encodedFilesDirectoryName);\r\n File huffmanTextFile = new File(huffmanFolder.getPath() + \"\\\\text.huff\");\r\n File huffmanTreeFile = new File(huffmanFolder.getPath() + \"\\\\tree.huff\");\r\n\r\n\r\n try (FileOutputStream textCodeOS = new FileOutputStream(huffmanTextFile);\r\n FileOutputStream treeCodeOS = new FileOutputStream(huffmanTreeFile)) {\r\n\r\n\r\n// Writing text bits to file text.huff\r\n StringBuilder byteStr;\r\n while (boolQueue.size() > 0 | !boolRead) {\r\n while (boolQueue.size() > 8) {\r\n byteStr = new StringBuilder();\r\n\r\n for (int i = 0; i < 8; i++) {\r\n String s = boolQueue.get() ? \"1\" : \"0\";\r\n byteStr.append(s);\r\n }\r\n\r\n if (isInterrupted())\r\n break;\r\n\r\n byte b = parser.parseStringToByte(byteStr.toString());\r\n textCodeOS.write(b);\r\n }\r\n\r\n if (fileRead && boolQueue.size() > 0) {\r\n lastBitsCount = boolQueue.size();\r\n byteStr = new StringBuilder();\r\n for (int i = 0; i < lastBitsCount; i++) {\r\n String bitStr = boolQueue.get() ? \"1\" : \"0\";\r\n byteStr.append(bitStr);\r\n }\r\n\r\n for (int i = 0; i < 8 - lastBitsCount; i++) {\r\n byteStr.append(\"0\");\r\n }\r\n\r\n byte b = parser.parseStringToByte(byteStr.toString());\r\n textCodeOS.write(b);\r\n }\r\n }\r\n\r\n\r\n// Writing the info for decoding to tree.huff\r\n// Writing last bits count to tree.huff\r\n treeCodeOS.write((byte)lastBitsCount);\r\n\r\n// Writing info for Huffman tree to tree.huff\r\n StringBuilder treeBitsArray = new StringBuilder();\r\n treeBitsArray.append(\r\n parser.parseByteToBinaryString(\r\n (byte) codesMap.size()));\r\n\r\n codesMap.keySet().forEach(key -> {\r\n String keyBits = parser.parseByteToBinaryString((byte) (char) key);\r\n String valCountBits = parser.parseByteToBinaryString((byte) codesMap.get(key).length());\r\n\r\n treeBitsArray.append(keyBits);\r\n treeBitsArray.append(valCountBits);\r\n treeBitsArray.append(codesMap.get(key));\r\n });\r\n if ((treeBitsArray.length() / 8) != 0) {\r\n int lastBitsCount = boolQueue.size() / 8;\r\n for (int i = 0; i < 7 - lastBitsCount; i++) {\r\n treeBitsArray.append(\"0\");\r\n }\r\n }\r\n\r\n for (int i = 0; i < treeBitsArray.length() / 8; i++) {\r\n treeCodeOS.write(parser.parseStringToByte(\r\n treeBitsArray.substring(8 * i, 8 * (i + 1))));\r\n }\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }", "public abstract String visualize(byte input);", "public static void decode() {\n char[] symbols = initializeSymbols();\n int position;\n while (!BinaryStdIn.isEmpty()) {\n position = BinaryStdIn.readChar();\n char symbol = symbols[position];\n BinaryStdOut.write(symbol, BITS_PER_BYTE);\n System.arraycopy(symbols, 0, symbols, 1, position);\n symbols[0] = symbol;\n }\n BinaryStdOut.close();\n }", "public static void decode() {\n int first = BinaryStdIn.readInt();\n String t = BinaryStdIn.readString();\n int n = t.length();\n int[] count = new int[256 + 1];\n int[] next = new int[n];\n int i = 0;\n while (i < n) {\n count[t.charAt(i) + 1]++;\n i++;\n }\n i = 1;\n while (i < 256 + 1) {\n count[i] += count[i - 1];\n i++;\n }\n i = 0;\n while (i < n) {\n next[count[t.charAt(i)]++] = i;\n i++;\n }\n i = next[first];\n int c = 0;\n while (c < n){\n BinaryStdOut.write(t.charAt(i));\n i = next[i];\n c++;\n }\n BinaryStdOut.close();\n }", "public static void main(String[] args) throws IOException {\r\n ObjectInputStream in = null; // reads in the compressed file\r\n FileWriter out = null; // writes out the decompressed file\r\n\r\n // Check for the file names on the command line.\r\n if (args.length != 2) {\r\n System.out.println(\"Usage: java Puff <in fname> <out fname>\");\r\n System.exit(1);\r\n }\r\n\r\n // Open the input file.\r\n try {\r\n in = new ObjectInputStream(new FileInputStream(args[0]));\r\n } catch (FileNotFoundException e) {\r\n System.out.println(\"Can't open file \" + args[0]);\r\n System.exit(1);\r\n }\r\n\r\n // Open the output file.\r\n try {\r\n out = new FileWriter(args[1]);\r\n } catch (FileNotFoundException e) {\r\n System.out.println(\"Can't open file \" + args[1]);\r\n System.exit(1);\r\n }\r\n \r\n Puff pf = new Puff();\r\n pf.getFrequencies(in);\r\n // Create a BitReader that is able to read the compressed file.\r\n BitReader reader = new BitReader(in);\r\n\r\n\r\n /****** Add your code here. ******/\r\n pf.createTree();\r\n pf.unCompress(reader,out);\r\n \r\n /* Leave these lines at the end of the method. */\r\n in.close();\r\n out.close();\r\n }", "public Decode(String inputFileName, String outputFileName){\r\n try(\r\n BitInputStream in = new BitInputStream(new FileInputStream(inputFileName));\r\n OutputStream out = new FileOutputStream(outputFileName))\r\n {\r\n int[] characterFrequency = readCharacterFrequency(in);//\r\n int frequencySum = Arrays.stream(characterFrequency).sum();\r\n BinNode root = HoffmanTree.HoffmanTreeFactory(characterFrequency).rootNode;\r\n //Generate Hoffman tree and get root\r\n\r\n int bit;\r\n BinNode currentNode = root;\r\n int byteCounter = 0;\r\n\r\n while ((bit = in.readBit()) != -1 & frequencySum >= byteCounter){\r\n //Walk the tree based on the incoming bits\r\n if (bit == 0){\r\n currentNode = currentNode.leftLeg;\r\n } else {\r\n currentNode = currentNode.rightLeg;\r\n }\r\n\r\n //If at end of tree, treat node as leaf and consider key as character instead of weight\r\n if (currentNode.leftLeg == null){\r\n out.write(currentNode.k); //Write character\r\n currentNode = root; //Reset walk\r\n byteCounter++; //Increment byteCounter to protect from EOF 0 fill\r\n }\r\n }\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }", "private void outDec(){\n\t\tSystem.out.println(binary);\n\t\tpw.println(binary);\n\t\t\n\t}", "public static void main(String[] args) throws FileNotFoundException, IOException {\n\t\tString input = \"\";\r\n\r\n\t\t//읽어올 파일 경로\r\n\t\tString filePath = \"C:/Users/user/Desktop/data13_huffman.txt\";\r\n\r\n\t\t//파일에서 읽어옴\r\n\t\ttry(FileInputStream fStream = new FileInputStream(filePath);){\r\n\t\t\tbyte[] readByte = new byte[fStream.available()];\r\n\t\t\twhile(fStream.read(readByte) != -1);\r\n\t\t\tfStream.close();\r\n\t\t\tinput = new String(readByte);\r\n\t\t}\r\n\r\n\t\t//빈도수 측정 해시맵 생성\r\n\t\tHashMap<Character, Integer> frequency = new HashMap<>();\r\n\t\t//최소힙 생성\r\n\t\tList<Node> nodes = new ArrayList<>();\r\n\t\t//테이블 생성 해시맵\r\n\t\tHashMap<Character, String> table = new HashMap<>();\r\n\r\n\t\t//노드와 빈도수 측정\r\n\t\tfor(int i = 0; i < input.length(); i++) {\r\n\t\t\tif(frequency.containsKey(input.charAt(i))) {\r\n\t\t\t\t//이미 있는 값일 경우 빈도수를 1 증가\r\n\t\t\t\tchar currentChar = input.charAt(i);\r\n\t\t\t\tfrequency.put(currentChar, frequency.get(currentChar) + 1);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t//키를 생성해서 넣어줌\r\n\t\t\t\tfrequency.put(input.charAt(i), 1);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//최소 힙에 저장\r\n\t\tfor(Character key : frequency.keySet()) \r\n\t\t\tnodes.add(new Node(key, frequency.get(key), null, null));\r\n\t\t\t\t\r\n\t\t//최소힙으로 정렬\r\n\t\tbuildMinHeap(nodes);\r\n\r\n\t\t//huffman tree를 만드는 함수 실행\r\n\t\tNode resultNode = huffman(nodes);\r\n\r\n\t\t//파일에 씀 (table)\r\n\t\ttry(FileWriter fw = new FileWriter(\"201702034_table.txt\")){\r\n\t\t\tmakeTable(table, resultNode, \"\");\r\n\t\t\tfor(Character key : table.keySet()) {\r\n\t\t\t\t//System.out.println(key + \" : \" + table.get(key));\r\n\t\t\t\tfw.write(key + \" : \" + table.get(key) + \"\\n\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//파일에 씀 (encoded code)\r\n\t\ttry(FileWriter fw = new FileWriter(\"201702034_encoded.txt\")){\r\n\t\t\tString allString = \"\";\r\n\t\t\t\r\n\t\t\tfor(int i = 0; i < input.length(); i++)\r\n\t\t\t\tallString += table.get(input.charAt(i));\r\n\r\n\t\t\t//System.out.println(allString);\r\n\t\t\tfw.write(allString);\r\n\t\t}\r\n\t}", "public static void main(String[] args)\n {\n\t\t\tHuffman tree= new Huffman();\n \t \t Scanner sc=new Scanner(System.in);\n\t\t\tnoOfFrequencies=sc.nextInt();\n\t\t\t// It adds all the user input values in the tree.\n\t\t\tfor(int i=1;i<=noOfFrequencies;i++)\n\t\t\t{\n\t\t\t\tString temp=sc.next();\n\t\t\t\ttree.add(temp,sc.next());\n\t\t\t}\n\t\tint lengthToDecode=sc.nextInt();\n\t\tString encodedValue=sc.next();\n\t\t// This statement decodes the encoded values.\n\t\ttree.getDecodedMessage(encodedValue);\n\t\tSystem.out.println();\n\t\t}", "static void solve(InputStream is, PrintStream os) {\n }", "public static void main(String[] args) {\n Huffman huffman=new Huffman(\"Shevchenko Vladimir Vladimirovich\");\n System.out.println(huffman.getCodeText());//\n //answer:110100001001101011000001001110111110110101100110110001001110101111100011101000011011000100111010111110001110100101110101111100000\n\n huffman.getSizeBits();//размер в битах\n ;//кол-во символов\n System.out.println((double) huffman.getSizeBits()/(huffman.getValueOfCharactersOfText()*8)); //коэффициент сжатия относительно aski кодов\n System.out.println((double) huffman.getSizeBits()/(huffman.getValueOfCharactersOfText()*\n (Math.pow(huffman.getValueOfCharactersOfText(),0.5)))); //коэффициент сжатия относительно равномерного кода. Не учитывается размер таблицы\n System.out.println(huffman.getMediumLenght());//средняя длина кодового слова\n System.out.println(huffman.getDisper());//дисперсия\n\n\n }", "public abstract void printToStream(PrintStream stream);", "public static void printEncoding(String[] encodings, int[] freqNums){\n int saveSpace = 0;\n //loops through all characters to print encodings and calculate savings\n for(int i = 0; i < encodings.length; i++) {\n if (freqNums[i] != 0) {\n System.out.println(\"'\" + (char)(i+32) + \"'\" + \": \" + freqNums[i] + \": \" + encodings[i]);\n saveSpace = saveSpace + (8 - encodings[i].length())*freqNums[i];\n }\n }\n System.out.println();\n System.out.println(\"You will save \" + saveSpace + \" bits with the Huffman Compressor\");\n }", "@Test\r\n public void printTests(){\n\r\n BinaryTree<Integer> tree = new BinaryTree<>();\r\n tree.add(50);\r\n tree.add(25);\r\n tree.add(75);\r\n tree.add(12);\r\n tree.add(37);\r\n tree.add(67);\r\n tree.add(87);\r\n\r\n // redirect stdout to ByteArrayOutputStream for junit\r\n ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();\r\n PrintStream printStream = new PrintStream(byteArrayOutputStream);\r\n PrintStream oldPrintStream = System.out;\r\n System.setOut(printStream);\r\n\r\n // inorder should print 12 25 37 50 67 75 87\r\n tree.print();\r\n printStream.flush();\r\n assertEquals(\"12 25 37 50 67 75 87 \", byteArrayOutputStream.toString());\r\n\r\n byteArrayOutputStream.reset();\r\n\r\n // preorder should print 50 25 12 37 75 67 87\r\n tree.print(BinaryTree.PrintOrder.PREORDER);\r\n printStream.flush();\r\n assertEquals(\"50 25 12 37 75 67 87 \", byteArrayOutputStream.toString());\r\n\r\n byteArrayOutputStream.reset();\r\n\r\n // postorder should print 12 37 25 67 87 75 50\r\n tree.print(BinaryTree.PrintOrder.POSTORDER);\r\n printStream.flush();\r\n assertEquals(\"12 37 25 67 87 75 50 \", byteArrayOutputStream.toString());\r\n\r\n // restore stdout\r\n System.setOut(oldPrintStream);\r\n }", "public interface ITreeMaker {\n /**\n * Return the Huffman/coding tree.\n * @return the Huffman tree\n */\n public HuffTree makeHuffTree(InputStream stream) throws IOException;\n}", "public static void PrintSet(BitSet bs, int size) {\n for (int i = 0; i < size; i++) {\n String s1;\n if (bs.get(i) == true) {\n s1 = \"1\";\n } else {\n s1 = \"0\";\n }\n System.out.print(s1);\n }\n System.out.println();\n }", "public static void main(String[] args) throws IOException {\n\t\tString fname;\n\t\tFile file;\n\t\tScanner keyboard = new Scanner(System.in);\n\t\tScanner inFile;\n\n\t\tString line, word;\n\t\tStringTokenizer token;\n\t\tint[] freqTable = new int[256];\n\n\t\tSystem.out.println (\"Enter the complete path of the file to read from: \");\n\n\t\tfname = keyboard.nextLine();\n\t\tfile = new File(fname);\n\t\tinFile = new Scanner(file);\n\n\t\twhile (inFile.hasNext()) {\n\t\t\tline = inFile.nextLine();\n\t\t\ttoken = new StringTokenizer(line, \" \");\n\t\t\twhile (token.hasMoreTokens()) {\n\t\t\t\tword = token.nextToken();\n\t\t\t\tfreqTable = updateFrequencyTable(freqTable, word);\n\t\t\t}\n\t\t}\n\n\t\t//print frequency table\n\n\t\tSystem.out.println(\"Table of frequencies\");\n\t\tSystem.out.println(\"Character \\t Frequency \\n\");\n\n\t\tfor(int i=0; i<256; i++) {\n\t\t\tif (freqTable[i]>0)\n\t\t\t\tSystem.out.println(((char)i) + \"\\t\" + freqTable[i]);\n\t\t\t}\n\n\t\tQueue<BinaryTree<Pair>> S = buildQueue(freqTable);\n\n\t\tQueue<BinaryTree<Pair>> T = new Queue<BinaryTree<Pair>>();\n\n\t\tBinaryTree<Pair> huffmanTree = createTree(S, T);\n\n\t\tString[] encodingTable = findEncoding(huffmanTree);\n\n\t\tSystem.out.println(\"Encoding Table\");\n\t\tfor(int i=0; i<256; i++) {\n\t\t\tif (encodingTable[i]!=null)\n\t\t\t\tSystem.out.println(((char)i) + \"\\t\" + encodingTable[i]);\n\t\t}\n\t\tinFile.close();\n\t}", "public void print() {\n // char letter = (char)\n // (this.registers.get(this.registerPointer).intValue());\n char letter = (char) this.registers[this.registerPointer];\n this.intOutput.add(this.registers[this.registerPointer]);\n // System.out.println(\"print: \" + this.registers[this.registerPointer]);\n this.output.add(Character.toString(letter));\n }", "public void encodeData() {\n frequencyTable = new FrequencyTableBuilder(inputPath).buildFrequencyTable();\n huffmanTree = new Tree(new HuffmanTreeBuilder(new FrequencyTableBuilder(inputPath).buildFrequencyTable()).buildTree());\n codeTable = new CodeTableBuilder(huffmanTree).buildCodeTable();\n encodeMessage();\n print();\n }", "private void print(byte[] buffer, int level) {\n for (int i = 0; i < level; i++) {\n System.out.print(' ');\n }\n\n if (child == null) {\n System.out.print(\"Type: 0x\" + Integer.toHexString(type) +\n \" length: \" + length + \" value: \");\n if (type == PRINTSTR_TYPE ||\n type == TELETEXSTR_TYPE ||\n type == UTF8STR_TYPE ||\n type == IA5STR_TYPE ||\n type == UNIVSTR_TYPE) {\n try {\n System.out.print(new String(buffer, valueOffset, length,\n \"UTF-8\"));\n } catch (UnsupportedEncodingException e) {\n // ignore\n }\n } else if (type == OID_TYPE) {\n System.out.print(OIDtoString(buffer, valueOffset, length));\n } else {\n System.out.print(hexEncode(buffer, valueOffset, length, 14));\n }\n\n System.out.println(\"\");\n } else {\n if (type == SET_TYPE) {\n System.out.println(\"Set:\");\n } else if (type == VERSION_TYPE) {\n System.out.println(\"Version (explicit):\");\n } else if (type == EXTENSIONS_TYPE) {\n System.out.println(\"Extensions (explicit):\");\n } else {\n System.out.println(\"Sequence:\");\n }\n\n child.print(buffer, level + 1);\n }\n\n if (next != null) {\n next.print(buffer, level);\n }\n }", "private static void generateHuffmanTree(){\n try (BufferedReader br = new BufferedReader(new FileReader(_codeTableFile))) {\n String line;\n while ((line = br.readLine()) != null) {\n // process the line.\n if(!line.isEmpty() && line!=null){\n int numberData = Integer.parseInt(line.split(\" \")[0]);\n String code = line.split(\" \")[1];\n Node traverser = root;\n for (int i = 0; i < code.length() - 1; i++){\n char c = code.charAt(i); \n if (c == '0'){\n //bit is 0\n if(traverser.getLeftPtr() == null){\n traverser.setLeftPtr(new BranchNode(999999, null, null));\n }\n traverser = traverser.getLeftPtr();\n }\n else{\n //bit is 1\n if(traverser.getRightPtr() == null){\n traverser.setRightPtr(new BranchNode(999999, null, null));\n }\n traverser = traverser.getRightPtr();\n }\n }\n //Put data in the last node by creating a new leafNode\n char c = code.charAt(code.length() - 1);\n if(c == '0'){\n traverser.setLeftPtr(new LeafNode(9999999, numberData, null, null));\n }\n else{\n traverser.setRightPtr(new LeafNode(9999999, numberData, null, null));\n }\n }\n }\n } \n catch (IOException ex) {\n Logger.getLogger(FrequencyTableBuilder.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public static String huffmanCoder(String inputFileName, String outputFileName){\n File inputFile = new File(inputFileName+\".txt\");\n File outputFile = new File(outputFileName+\".txt\");\n File encodedFile = new File(\"encodedTable.txt\");\n File savingFile = new File(\"Saving.txt\");\n HuffmanCompressor run = new HuffmanCompressor();\n \n run.buildHuffmanList(inputFile);\n run.makeTree();\n run.encodeTree();\n run.computeSaving(inputFile,outputFile);\n run.printEncodedTable(encodedFile);\n run.printSaving(savingFile);\n return \"Done!\";\n }", "public StreamGobbler(InputStream from, PrintStream to) {\n\t\tinput = from;\n\t\toutput = to;\n\t}", "public static void compress(String s, String fileName) throws IOException {\n File file = new File(fileName);\n if (file.exists()){\n file.delete();\n }\n file.createNewFile();\n BufferedOutputStream out = new BufferedOutputStream(new FileOutputStream(file));\n char[] input = s.toCharArray();\n\n // tabulate frequency counts\n int[] freq = new int[R];\n for (int i = 0; i < input.length; i++)\n freq[input[i]]++;\n\n Node root = buildTrie(freq, out);\n\n // build code table\n String[] st = new String[R];\n buildCode(st, root, \"\");\n\n writeTrie(root, file);\n\n // print number of bytes in original uncompressed message\n BinaryStdOut.write(input.length);\n\n // use Huffman code to encode input\n for (int i = 0; i < input.length; i++) {\n String code = st[input[i]];\n for (int j = 0; j < code.length(); j++) {\n if (code.charAt(j) == '0') {\n BinaryStdOut.write(false);\n }\n else if (code.charAt(j) == '1') {\n BinaryStdOut.write(true);\n }\n else throw new IllegalStateException(\"Illegal state\");\n }\n }\n\n BinaryStdOut.close();\n }", "public Huffman(String input) {\n\t\t\n\t\tthis.input = input;\n\t\tmapping = new HashMap<>();\n\t\t\n\t\t//first, we create a map from the letters in our string to their frequencies\n\t\tMap<Character, Integer> freqMap = getFreqs(input);\n\n\t\t//we'll be using a priority queue to store each node with its frequency,\n\t\t//as we need to continually find and merge the nodes with smallest frequency\n\t\tPriorityQueue<Node> huffman = new PriorityQueue<>();\n\t\t\n\t\t/*\n\t\t * TODO:\n\t\t * 1) add all nodes to the priority queue\n\t\t * 2) continually merge the two lowest-frequency nodes until only one tree remains in the queue\n\t\t * 3) Use this tree to create a mapping from characters (the leaves)\n\t\t * to their binary strings (the path along the tree to that leaf)\n\t\t * \n\t\t * Remember to store the final tree as a global variable, as you will need it\n\t\t * to decode your encrypted string\n\t\t */\n\t\t\n\t\tfor (Character key: freqMap.keySet()) {\n\t\t\tNode thisNode = new Node(key, freqMap.get(key), null, null);\n\t\t\thuffman.add(thisNode);\n\t\t}\n\t\t\n\t\twhile (huffman.size() > 1) {\n\t\t\tNode leftNode = huffman.poll();\n\t\t\tNode rightNode = huffman.poll();\n\t\t\tint parentFreq = rightNode.freq + leftNode.freq;\n\t\t\tNode parent = new Node(null, parentFreq, leftNode, rightNode);\n\t\t\thuffman.add(parent);\n\t\t}\n\t\t\n\t\tthis.huffmanTree = huffman.poll();\n\t\twalkTree();\n\t}", "public static void main(String[] args) throws IOException\n {\n \n BufferedReader f = new BufferedReader(new InputStreamReader(System.in));\n PrintWriter writer = new PrintWriter(new BufferedOutputStream(System.out));\n \n String output = \"\"; //Write all output to this string\n\n //Code here\n int numLevels = Integer.parseInt(f.readLine());\n int[] nums = new int[numLevels];\n String line = f.readLine();\n StringTokenizer st = new StringTokenizer(line);\n int numLevelsX = Integer.parseInt(st.nextToken());\n for(int i = 0; i < numLevelsX; i++)\n {\n int n = Integer.parseInt(st.nextToken());\n nums[n-1]++;\n }\n line = f.readLine();\n st = new StringTokenizer(line);\n int numLevelsY = Integer.parseInt(st.nextToken());\n for(int i = 0; i < numLevelsY; i++)\n {\n int n = Integer.parseInt(st.nextToken());\n nums[n-1]++;\n }\n boolean isBeatable = true;\n for(int i = 0; i < numLevels; i++)\n {\n if(nums[i]==0)\n isBeatable = false;\n }\n output = isBeatable?\"I become the guy.\":\"Oh, my keyboard!\";\n \n \n //Code here\n\n //out.println(output);\n \n writer.println(output);\n writer.close();\n System.exit(0);\n \n }", "private void outHex(){\n\t\tSystem.out.println(binary);\n\t\tpw.println(binary);\n\t\t\n\t}", "private void buildOutput()\n\t{\n\t\tif(outIndex >= output.length)\n\t\t{\n\t\t\tbyte[] temp = output;\n\t\t\toutput = new byte[temp.length * 2];\n\t\t\tSystem.arraycopy(temp, 0, output, 0, temp.length);\n\t\t}\n\t\t\n\t\tif(sb.length() < 16 && aryIndex < fileArray.length)\n\t\t{\n\t\t\tbyte[] b = new byte[1];\n\t\t\tb[0] = fileArray[aryIndex++];\n\t\t\tsb.append(toBinary(b));\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < prioQ.size(); i++)\n\t\t{\n\t\t\tif(sb.toString().startsWith(prioQ.get(i).getCode()))\n\t\t\t{\n\t\t\t\toutput[outIndex++] = (byte)prioQ.get(i).getByteData();\n\t\t\t\tsb = new StringBuilder(\n\t\t\t\t\t\tsb.substring(prioQ.get(i).getCode().length()));\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"Can't find Huffman code.\");\n\t\tSystem.exit(1);\n\t\texit = true;\n\t}", "void print(String string) { printStream.print(string); }", "public static void encode(InputStream in, OutputStream out)\n throws IOException {\n int[] inBuffer = new int[3];\n\n boolean done = false;\n while (!done && (inBuffer[0] = in.read()) != END_OF_INPUT){\n // Fill the buffer\n inBuffer[1] = in.read();\n inBuffer[2] = in.read();\n\n /*\n * The first byte of input is valid but must check other two bytes\n * are not equal to END_OF_INPUT. Each set of three bytes add up to\n * 24 bits, the 24 bits are split up into 4 bytes of 6 bits and\n * converted to ascii characters.\n *\n * If there are not enough bytes to make a 24 bit group, the\n * remaining ascii characters are converted to the = character.\n */\n\n // Byte 1: first six bits of first byte\n out.write(lookupMap[inBuffer[0]>>2 ]);\n if (inBuffer[1]!=END_OF_INPUT){\n // Byte 2: last two bits of first byte, first four bits of second byte\n out.write(lookupMap[((inBuffer[0]<<4)&0x30)|(inBuffer[1]>>4)]);\n if (inBuffer[2] != END_OF_INPUT){\n // Byte 3: last four bits of second byte, first two bits of third byte\n out.write(lookupMap[((inBuffer[1]<<2)&0x3c)|(inBuffer[2]>>6) ]);\n // Byte 4: last six bits of third byte\n out.write(lookupMap[inBuffer[2]&0x3F]);\n } else {\n // Byte 3: last four bits of second byte\n out.write(lookupMap[((inBuffer[1]<<2)&0x3c)]);\n // Output = if no more characters to write\n out.write('=');\n done = true;\n }\n } else {\n // Byte 2: last two bits of first byte\n out.write(lookupMap[((inBuffer[0]<<4)&0x30)]);\n // Output = if no more characters to write\n out.write('=');\n out.write('=');\n done=true;\n }\n }\n out.flush();\n }", "T print(byte data) throws PrintingException;", "private void ReadHuffman(String aux) {\n\n Huffman DY = new Huffman();\n Huffman DCB = new Huffman();\n Huffman DCR = new Huffman();\n DY.setFrequencies(FreqY);\n DCB.setFrequencies(FreqCB);\n DCR.setFrequencies(FreqCR);\n\n StringBuilder encoding = new StringBuilder();\n int iteradorMatrix = aux.length() - sizeYc - sizeCBc - sizeCRc;\n for (int x = 0; x < sizeYc; ++x) {\n encoding.append(aux.charAt(iteradorMatrix));\n ++iteradorMatrix;\n }\n Ydes = DY.decompressHuffman(encoding.toString());\n encoding = new StringBuilder();\n for (int x = 0; x < sizeCBc; ++x) {\n encoding.append(aux.charAt(iteradorMatrix));\n ++iteradorMatrix;\n }\n CBdes = DCB.decompressHuffman(encoding.toString());\n encoding = new StringBuilder();\n for (int x = 0; x < sizeCRc; ++x) {\n encoding.append(aux.charAt(iteradorMatrix));\n ++iteradorMatrix;\n }\n CRdes = DCR.decompressHuffman(encoding.toString());\n }", "public void print(int level) {\n\n if (level == -1) {\n System.out.println(\"-------------\");\n System.out.println(\"Printing Trie\");\n }\n\n if (root == null) {\n System.out.println(\"Level \" + 1 + \": \");\n System.out.println(\"-------------\");\n return;\n }\n\n Queue<TrieNode.InternalNode<T>> queue = new LinkedList<>();\n TrieNode.InternalNode<T> rootInternal = \n new TrieNode.InternalNode<>('*', root);\n queue.offer(rootInternal);\n int currLevel = 0;\n int numElements = 1;\n\n while (numElements != 0) {\n int[] levelChars = new int[128];\n Counter newNumElements = new Counter();\n for (int i = 0; i < numElements; i++) {\n TrieNode.InternalNode<T> node = queue.poll();\n levelChars[node.c]++;\n node.node.children.forEach(childNode -> {\n queue.add(childNode);\n newNumElements.count++;\n });\n }\n\n if (currLevel == level || level == -1 && currLevel != 0) {\n Queue<Character> printChars = new LinkedList<>();\n for (int i = 0; i < levelChars.length; i++) {\n if (levelChars[i] != 0 && ((char) i) != ' ') {\n for (int j = 0; j < levelChars[i]; j++) {\n printChars.add((char) i);\n }\n }\n }\n\n System.out.print(\"Level \" + currLevel + \": \");\n while (true) {\n System.out.print(printChars.poll());\n if (printChars.peek() != null) {\n System.out.print(\",\");\n } else {\n break;\n }\n }\n System.out.println();\n }\n\n numElements = newNumElements.count;\n if (currLevel == level) {\n break;\n }\n currLevel++;\n }\n\n // Print last empty level if all levels had to be printed\n if (level == -1) {\n System.out.println(\"Level \" + currLevel + \": \");\n System.out.println(\"-------------\");\n }\n }", "public static void main(String[] args) {\n int[] freqNums = scanFile(args[0]);\n HuffmanNode[] nodeArr = createNodes(freqNums);\n nodeArr = freqSort(nodeArr);\n HuffmanNode top = createTree(nodeArr);\n String empty = \"\";\n String[] encodings = new String[94];\n encodings = getCodes(top, empty, false, encodings, true);\n printEncoding(encodings, freqNums);\n writeFile(args[0], args[1], encodings);\n }", "T print(short data) throws PrintingException;", "public static void generate(SparseStream stream, PrintStream output) {\n stream.position(0);\n byte[] buffer = new byte[1024 * 1024];\n for (Range block : StreamExtent.blocks(stream.getExtents(), buffer.length)) {\n long startPos = block.getOffset() * buffer.length;\n long endPos = Math.min((block.getOffset() + block.getCount()) * buffer.length, stream.getLength());\n stream.position(startPos);\n while (stream.position() < endPos) {\n int numLoaded = 0;\n long readStart = stream.position();\n while (numLoaded < buffer.length) {\n int bytesRead = stream.read(buffer, numLoaded, buffer.length - numLoaded);\n if (bytesRead == 0) {\n break;\n }\n\n numLoaded += bytesRead;\n }\n for (int i = 0; i < numLoaded; i += 16) {\n boolean foundVal = false;\n if (i > 0) {\n for (int j = 0; j < 16; j++) {\n if (buffer[i + j] != buffer[i + j - 16]) {\n foundVal = true;\n break;\n }\n\n }\n } else {\n foundVal = true;\n }\n if (foundVal) {\n output.printf(\"%08x\", i + readStart);\n for (int j = 0; j < 16; j++) {\n if (j % 8 == 0) {\n output.print(\" \");\n }\n\n output.printf(\" %02x\", buffer[i + j]);\n }\n output.print(\" |\");\n for (int j = 0; j < 16; j++) {\n if (j % 8 == 0 && j != 0) {\n output.print(\" \");\n }\n\n output.printf(\"%c\", (buffer[i + j] >= 32 && buffer[i + j] < 127) ? (char) buffer[i + j] : '.');\n }\n output.print(\"|\");\n output.println();\n }\n }\n }\n }\n }", "TypePrinter print(char c);", "private void print(Scanner input) {\n\t\tprogramStack.add(\"print\");\n\n\t\twhile (input.hasNext()){\n\t\t\tString token = input.next();\n\t\t\tif(token.equalsIgnoreCase(\"add\"))\n\t\t\t\taddOp(input);\n\t\t\telse\n\t\t\t\tprogramStack.push(token);\n\t\t}\n\n\t\tStringBuilder toPrint = new StringBuilder();\n\t\twhile (!programStack.peek().equalsIgnoreCase(\"print\")) {\n\t\t\tString popped = programStack.pop();\n\t\t\tif (isVariable(popped))\n\t\t\t\ttoPrint.insert(0, getRAMValue(popped) + \" \");\n\t\t\telse\n\t\t\t\ttoPrint.insert(0, popped + \" \");\n\t\t}\n\t\ttoPrint = new StringBuilder(toPrint.toString().trim());\n\n\t\tSystem.out.println(toPrint);\n\n\t\tprogramStack.pop();\n\t}", "private static void decode() throws IOException{\n File file = new File(_encodedBinFile);\n String longStringAsFile;\n \n //DataInputStream dis;\n FileWriter w;\n try {\n //dis = new DataInputStream(new FileInputStream(file));\n longStringAsFile = getLongStringAsFile();\n //dis.close();\n w = new FileWriter(\"decoded.txt\");\n Node traverser = root;\n for(int i=0; i < longStringAsFile.length(); i++){\n if(longStringAsFile.charAt(i) == '0'){\n //go to left\n if (traverser.getLeftPtr() == null){\n //fallen off the tree. Print to file\n if (i == longStringAsFile.length() - 1 ){\n w.write(((LeafNode)traverser).getData());\n }\n else{\n w.write(((LeafNode)traverser).getData() + \"\\n\");\n traverser = root.getLeftPtr();\n }\n }\n else{\n traverser = traverser.getLeftPtr();\n }\n }\n else{\n //go to right of tree\n if (traverser.getRightPtr() == null){\n //fallen off the tree. PRint to file\n if (i == longStringAsFile.length() - 1){\n w.write(((LeafNode)traverser).getData() );\n }\n else{\n w.write(((LeafNode)traverser).getData() + \"\\n\");\n traverser = root.getRightPtr();\n }\n\n }\n else{\n traverser = traverser.getRightPtr();\n }\n }\n \n }\n //dis.close();\n w.close();\n } catch (IOException ex) {\n Logger.getLogger(decoder.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n }", "T println(byte data) throws PrintingException;", "public static void decode () {\n // read the input\n int firstThing = BinaryStdIn.readInt();\n s = BinaryStdIn.readString();\n char[] t = s.toCharArray();\n char[] firstColumn = new char[t.length];\n int [] next = new int[t.length];\n \n // copy array and sort\n for (int i = 0; i < t.length; i++) {\n firstColumn[i] = t[i];\n }\n Arrays.sort(firstColumn);\n \n // decode\n int N = t.length;\n int [] count = new int[256];\n \n // counts frequency of each letter\n for (int i = 0; i < N; i++) {\n count[t[i]]++;\n }\n \n int m = 0, j = 0;\n \n // fills the next[] array with appropriate values\n while (m < N) {\n int _count = count[firstColumn[m]];\n while (_count > 0) {\n if (t[j] == firstColumn[m]) {\n next[m++] = j;\n _count--;\n }\n j++;\n }\n j = 0;\n }\n \n // decode the String\n int _next = next.length;\n int _i = firstThing;\n for (int i = 0; i < _next; i++) {\n _i = next[_i];\n System.out.print(t[_i]);\n } \n System.out.println();\n }", "public HuffmanNode(int freq, int ascii){\r\n this.freq = freq;\r\n this.ascii = ascii;\r\n }", "@Test\n public void testTransform() {\n InputStream standardIn = System.in;\n PrintStream standardOut = System.out;\n try {\n // setup new input\n System.setIn(new ByteArrayInputStream(DECODED_INPUT.getBytes()));\n // create new output stream as byte array and assign to standard\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n System.setOut(new PrintStream(baos));\n\n BurrowsWheeler.transform();\n byte[] encoded = baos.toByteArray();\n assertEquals(ENCODED_INPUT.length, encoded.length);\n for (int i = 0; i < encoded.length; i++) {\n assertEquals(ENCODED_INPUT[i], encoded[i]);\n }\n } finally {\n // return standard input and output\n System.setIn(standardIn);\n System.setOut(standardOut);\n }\n }", "public void buildHuffmanList(File inputFile){\n try{\n Scanner sc = new Scanner(inputFile);\n while(sc.hasNextLine()){\n\n String line = sc.nextLine();\n for(int i =0;i<line.length();i++){\n \n if(freqTable.isEmpty())\n freqTable.put(line.charAt(i),1);\n else{\n if(freqTable.containsKey(line.charAt(i)) == false)\n freqTable.put(line.charAt(i),1);\n else{\n int oldValue = freqTable.get(line.charAt(i));\n freqTable.replace(line.charAt(i),oldValue+1);\n }\n }\n }\n }\n }\n catch(FileNotFoundException e){\n System.out.println(\"Can't find the file\");\n }\n }", "public static void main(String[] args){\n huffmanCoder(args[0],args[1]);\n }", "public HuffmanCoding(String text) {\n\t\t// TODO fill this in.\n\t\ttextArray = text.toCharArray();\n\n\t\tPriorityQueue<Leaf> queue = new PriorityQueue<>(new Comparator<Leaf>() {\n\t\t\t@Override\n\t\t\tpublic int compare(Leaf a, Leaf b) {\n\t\t\t\tif (a.frequency > b.frequency) {\n\t\t\t\t\treturn 1;\n\t\t\t\t} else if (a.frequency < b.frequency) {\n\t\t\t\t\treturn -1;\n\t\t\t\t} else {\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tfor (char c : textArray) {\n\t\t\tif (chars.containsKey(c)) {\n\t\t\t\tint freq = chars.get(c);\n\t\t\t\tfreq = freq + 1;\n\t\t\t\tchars.remove(c);\n\t\t\t\tchars.put(c, freq);\n\t\t\t} else {\n\t\t\t\tchars.put(c, 1);\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(\"tree print\");\t\t\t\t\t\t\t\t// print method begin\n\n\t\tfor(char c : chars.keySet()){\n\t\t\tint freq = chars.get(c);\n\t\t\tSystem.out.println(c + \" \" + freq);\n\t\t}\n\n\t\tint total = 0;\n\t\tfor(char c : chars.keySet()){\n\t\t\ttotal = total + chars.get(c);\n\t\t}\n\t\tSystem.out.println(\"total \" + total);\t\t\t\t\t\t\t// ends\n\n\t\tfor (char c : chars.keySet()) {\n\t\t\tLeaf l = new Leaf(c, chars.get(c), null, null);\n\t\t\tqueue.offer(l);\n\t\t}\n\n\t\twhile (queue.size() > 1) {\n\t\t\tLeaf a = queue.poll();\n\t\t\tLeaf b = queue.poll();\n\n\t\t\tint frequency = a.frequency + b.frequency;\n\n\t\t\tLeaf leaf = new Leaf('\\0', frequency, a, b);\n\n\t\t\tqueue.offer(leaf);\n\t\t}\n\n\t\tif(queue.size() == 1){\n\t\t\tthis.root = queue.peek();\n\t\t}\n\t}", "public BitInputStream(final InputStream inner) {\n this.inner = inner;\n }", "public int uncompress(InputStream in, OutputStream out) throws IOException { \n int codeCount = 0;\n int code = 0;\n BitInputStream bitIn = new BitInputStream(in);\n StringBuilder codeString = new StringBuilder(0);\n\n\n // *** Bellow for building array of encoded values ****\n // ****************************************************\n // If the first character in the file is not a space, cannot decompress file\n codeCount = in.read();\n if(codeCount != 32){\n bitIn.close();\n return -1;\n }\n // Read in length of the code, then read the codes number of bits into the code array\n for (int i = 0; i < decodeArr.length; i++) {\n //read in number of bits (length of character code) \n codeCount = bitIn.read();\n \n // Create the code string (reads the number of bits found above)\n for (int j = 0; j < codeCount ; j++) {\n codeString.append(bitIn.readBits(1));\n }\n // Add the code string to the code array\n decodeArr[i] = codeString.toString();\n codeString = new StringBuilder(0);\n }\n // If the character has no code, make it null in array\n for (int i = 0; i < decodeArr.length; i++) {\n if(decodeArr[i].equals(\"0\")){decodeArr[i] = null;}\n }\n // ****************************************************\n // ****************************************************\n\n\n // ********** Bellow is the decoding process **********\n // ****************************************************\n // Slowly build a sting of binary comparing it to the codes in the map\n // Once a match is found, output the character associated with it.\n try{\n codeString = new StringBuilder(0);\n while (true) { \n // Read in one bit\n code = bitIn.readBits(1);\n // If -1 is returned, reached the end of file\n if(code == -1){break;}\n // Search the code array, writing the character of the code when found\n codeString.append(String.valueOf(code));\n for (int i = 0; i < decodeArr.length; i++) {\n if(decodeArr[i] != null){ // null means 0 count for a character\n // If the building code string matches a code in the map, write the associated character\n if(decodeArr[i].equals(codeString.toString())){\n out.write(i);\n // vv make ready for next code input\n codeString = new StringBuilder(0);\n }\n }\n }\n }\n }catch (IOException e){\n bitIn.close();\n throw e;\n }\n // ****************************************************\n // ****************************************************\n bitIn.close();\n return 0;\n }", "private static void printTree(HuffmanNode tree, String direction, FileWriter newVersion) throws IOException {\n\t\tif(tree.inChar != null) {\n\t\t\tnewVersion.write(tree.inChar + \": \" + direction + \" | \" + tree.frequency + System.getProperty(\"line.separator\"));\n\t\t\tresults[resultIndex][0] = tree.inChar;\n\t\t\tresults[resultIndex][1] = direction;\n\t\t\tresults[resultIndex][2] = tree.frequency;\n\t\t\tresultIndex++;\n\t\t}\n\t\telse {\n\t\t\tprintTree(tree.right, direction + \"1\", newVersion);\n\t\t\tprintTree(tree.left, direction + \"0\", newVersion);\n\t\t}\n\t}", "public static void main(String[] args) throws IOException {\r\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\r\n int t = Integer.parseInt(br.readLine().trim());\r\n while (t > 0) {\r\n\r\n int n = Integer.parseInt(br.readLine().trim());\r\n\r\n System.out.println(\"output: \"+setBits(n));\r\n\r\n t--;\r\n }\r\n }", "public static void main(String[] args) throws IOException {\n BufferedReader f = new BufferedReader(new InputStreamReader(System.in));\n PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));\n int T = Integer.parseInt(f.readLine());\n f.readLine();\n while(T-- > 0) {\n Stack<Character> stack = new Stack<>();\n String next;\n while((next = f.readLine()) != null && next.length() > 0) {\n char temp = next.charAt(0);\n if(temp >= '0' && temp <= '9') {\n out.print(temp);\n } else if(temp == ')') {\n while(stack.peek() != '(') {\n out.print(stack.pop());\n }\n stack.pop();\n } else {\n stack.push(temp);\n }\n }\n while(!stack.isEmpty()) {\n out.print(stack.pop());\n }\n out.println();\n }\n f.close();\n out.close();\n }", "private static void StackofStrings (Scanner in, PrintStream out) {\n StackofStrings stack = new StackofStrings();\n while(in.hasNext()){\n String s = in.next();\n if ((s.equals(\"-\"))){\n out.print(stack.pop()+ \" \");\n }else{\n stack.push(s);\n }\n }\n}", "public void printAllToStream(PrintStream stream) {\r\n\t\tif (left != null)\r\n\t\t\tleft.printAllToStream(stream);\r\n\r\n\t\tstream.println(value);\r\n\r\n\t\tif (right != null)\r\n\t\t\tright.printAllToStream(stream);\r\n\t}", "public HuffmanImage(String src) throws IOException {\n img = Files.readAllBytes(Paths.get(src));\n }", "static String loadStream(InputStream in) throws IOException { \n\t\tint ptr = 0; \n\t\tin = new BufferedInputStream(in); \n\t\tStringBuffer buffer = new StringBuffer(); \n\t\twhile( (ptr = in.read()) != -1 ) { \n\t\t\tbuffer.append((char)ptr); \n\t\t} \n\t\treturn buffer.toString(); \n\t}", "public void HuffmanCode()\n {\n String text=message;\n /* Count the frequency of each character in the string */\n //if the character does not exist in the list add it\n for(int i=0;i<text.length();i++)\n {\n if(!(c.contains(text.charAt(i))))\n c.add(text.charAt(i));\n } \n int[] freq=new int[c.size()];\n //counting the frequency of each character in the text\n for(int i=0;i<c.size();i++)\n for(int j=0;j<text.length();j++)\n if(c.get(i)==text.charAt(j))\n freq[i]++;\n /* Build the huffman tree */\n \n root= buildTree(freq); \n \n }", "public AKExtinguish(InputStream in) throws IOException {\n\t\tthis();\n\t\tread(in);\n\t}", "public static String showLogicalBitStreamGrouped(final List<Boolean> bits)\n {\n if(null == bits) { throw new IllegalArgumentException(); }\n if(5 != (bits.size() % 9)) { throw new IllegalArgumentException(\"unexpected size \" + bits.size() + \" % 9 = \"+(bits.size() % 9)); }\n\n final StringBuilder sb = new StringBuilder(2 + bits.size());\n sb.append('H');\n\n // Do header up to first 1...\n int index;\n for(index = 0; !bits.get(index); ++index) { sb.append('0'); }\n sb.append('1'); ++index;\n\n // Do groups of 9 bits for each original byte plus parity...\n while((bits.size() - index) > 9)\n {\n sb.append('-');\n for(int i = 0; i < 9; ++i)\n { sb.append(bits.get(index++) ? '1' : '0'); }\n }\n\n // Trailer...\n sb.append('T');\n for( ; index < bits.size(); )\n { sb.append(bits.get(index++) ? '1' : '0'); }\n\n return(sb.toString());\n }", "private void print() {\n printInputMessage();\n printFrequencyTable();\n printCodeTable();\n printEncodedMessage();\n }", "static void printPowerSet(char []set, \n int set_size) \n {\n long pow_set_size = \n (long)Math.pow(2, set_size); \n int counter, j; \n \n /*Run from counter 000..0 to \n 111..1*/\n for(counter = 0; counter < \n pow_set_size; counter++) \n { \n for(j = 0; j < set_size; j++) \n { \n /* Check if jth bit in the \n counter is set If set then \n print jth element from set */\n if((counter & (1 << j)) > 0) \n System.out.print(set[j]); \n } \n \n System.out.println(); \n } \n }", "private void inputBin(){\n\t\tSystem.out.println(\"Enter a binary number (32 bit or less/multiple of 4):\");\n\t\tpw.println(\"Enter a binary number (32 bit or less/multiple of 4):\");\n\t\tScanner sc = new Scanner(System.in);\n\t\tbinary = sc.next();\n\t\tpw.println(binary);\n\t\t\n\t}", "public static void main(String args[]) throws IOException {\n Scanner sc= new Scanner(System.in);\r\n String s= sc.next();\r\n char ch= s.charAt(0);\r\n switch (ch)\r\n {\r\n case 'P':\r\n case 'p': \r\n System.out.println(\"PrepBytes\");\r\n break;\r\n case 'Z':\r\n case 'z':\r\n System.out.println(\"Zenith\");\r\n break;\r\n case 'E':\r\n case 'e':\r\n System.out.println(\"Expert Coder\");\r\n break;\r\n case 'D':\r\n case 'd':\r\n System.out.println(\"Data Structure\");\r\n break;\r\n }\r\n }", "@Override\n\tpublic void print() {\n System.out.println(\"Leaf [isbn=\"+number+\", title=\"+title+\"]\");\n\t}", "private static final void printBitVectorOfStates(long vector)\r\n {\r\n System.out.println(bitVectorOfStatesToString(vector));\r\n }", "static String loadStream(InputStream in) throws IOException {\n int ptr = 0;\n in = new BufferedInputStream(in);\n StringBuffer buffer = new StringBuffer();\n while( (ptr = in.read()) != -1 ) {\n buffer.append((char)ptr);\n }\n return buffer.toString();\n }", "private void printSecondHalfAlphabetLowerCaseThenSecondHalfAlphabetUpperCase(ByteArrayInputStream inputStream) {\n int condition = inputStream.available();\n for (int i = 0; i < condition; ++i) {\n System.out.print((char) inputStream.read());\n }\n\n System.out.println(\"\");\n inputStream.reset(); // back to the mark()ed position\n\n for (int i = 0; i < condition; ++i) {\n System.out.print(Character.toUpperCase((char) inputStream.read()));\n }\n System.out.println(\"\");\n }", "public void readAndPrint(String str);", "public static void decode() {\n char[] seq = new char[R];\n\n for (int i = 0; i < R; i++)\n seq[i] = (char) i;\n\n while (!BinaryStdIn.isEmpty()) {\n int index = BinaryStdIn.readChar();\n char c = seq[index];\n BinaryStdOut.write(seq[index]);\n\n for (int i = index; i > 0; i--)\n seq[i] = seq[i - 1];\n seq[0] = c;\n }\n BinaryStdOut.close();\n }", "@Override\n public String decode(File fileName) throws IOException\n {\n HuffmanEncodedResult result = readFromFile(fileName);\n StringBuilder stringBuilder = new StringBuilder();\n\n BitSet bitSet = result.getEncodedData();\n\n for (int i = 0; bitSet.length() - 1 > i; )\n {\n Node currentNode = result.getRoot();\n while (!currentNode.isLeaf())\n {\n if (bitSet.get(i))\n {\n currentNode = currentNode.getLeftChild();\n }\n else\n {\n currentNode = currentNode.getRightChild();\n }\n i++;\n }\n stringBuilder.append(currentNode.getCharacter());\n }\n return stringBuilder.toString();\n }", "void writeBit(int bit) throws IOException;", "public void printOut() {\n System.out.println(\"\\t\" + result + \" = icmp \" + cond.toLowerCase() + \" \" + type + \" \" + op1 + \", \" + op2 );\n\n // System.out.println(\"\\t\" + result + \" = bitcast i1 \" + temp + \" to i32\");\n }", "T println(short data) throws PrintingException;", "@Before\n\tpublic void setUpStreams() {\n\t\tSystem.setOut(new PrintStream(outContent));\n\t}", "public static void printShortBinary(short s) {\n\t\tbyte t;\n\t\tbyte b;\n\t\t// Use bit shifting and masking (&) to save the first\n\t\t// 8 bits of s in one byte, and the second 8 bits of\n\t\t// s in the other byte\n\t\tt = (byte)(s>>8);\n\t\tb = (byte)(s&0b00001111);\n\t\t// Call printByteBinary twice using the two bytes\n\t\t// Make sure they are in the correct order\n\t\tprintByteBinary(t);\n\t\tprintByteBinary(b);\n\t}", "void dump(PrintStream x) {\n String str = buffer.toString();\n x.println(\"<beginning of \" + name + \" buffer>\");\n x.println(str);\n x.println(\"<end of buffer>\");\n }", "public static void encode()\n {\n \n String s = BinaryStdIn.readString();\n //String s = \"ABRACADABRA!\";\n int len = s.length();\n int key = 0;\n \n // generating rotating string table\n String[] table = new String[len];\n for (int i = 0 ; i < len; i++)\n {\n table[i] = rotate(s, i, len);\n }\n \n // sort the table\n String[] sorted = new String[len];\n for(int i = 0 ; i < len; i++)\n {\n sorted[i] = table[i];\n }\n sort(sorted, len);\n \n //generating encoded string\n StringBuilder result = new StringBuilder();\n for(int i = 0 ; i < len; i++)\n result.append(sorted[i].charAt(len-1));\n \n //find the key index \n for(int i = 0 ; i < table.length; i++)\n {\n if(sorted[i].equals(s))\n {\n key = i;\n break;\n }\n }\n \n // output part\n \n BinaryStdOut.write(key);\n \n for(int i = 0 ; i < len; i++)\n BinaryStdOut.write(result.charAt(i)); // generate the output character by character\n \n BinaryStdOut.close();\n \n }", "private String readIt(InputStream stream) throws IOException {\n BufferedReader reader = new BufferedReader(new InputStreamReader(stream, \"iso-8859-1\"), 128);\n StringBuilder sb = new StringBuilder();\n String line;\n while ((line = reader.readLine()) != null) {\n sb.append(line);\n }\n return sb.toString();\n }" ]
[ "0.6384284", "0.6106384", "0.546234", "0.5339089", "0.53252816", "0.5299567", "0.52955246", "0.52486557", "0.524701", "0.5220677", "0.5129601", "0.5087297", "0.5083725", "0.5067804", "0.50657815", "0.5050523", "0.5050468", "0.5042025", "0.50313705", "0.50218636", "0.5019801", "0.49842128", "0.4948855", "0.49456662", "0.4945308", "0.49164626", "0.49112657", "0.4908345", "0.49055478", "0.4905162", "0.48949102", "0.48880297", "0.48644635", "0.48558295", "0.48321983", "0.48241946", "0.482005", "0.481143", "0.47823235", "0.47798124", "0.47764805", "0.47427326", "0.4724264", "0.47232583", "0.47168148", "0.46936148", "0.46879715", "0.4682908", "0.46746156", "0.46672407", "0.46578828", "0.4635892", "0.46210232", "0.4617042", "0.46148282", "0.45759392", "0.4574587", "0.4558485", "0.45572188", "0.45551208", "0.45504183", "0.4546642", "0.45343122", "0.45337", "0.45278764", "0.44933575", "0.44922283", "0.44803822", "0.4474302", "0.44738147", "0.44671813", "0.44625896", "0.44612938", "0.44454056", "0.44314876", "0.44257772", "0.4418461", "0.44145602", "0.44112352", "0.4406566", "0.4401754", "0.4401683", "0.44005075", "0.44000646", "0.43995702", "0.43955103", "0.43938607", "0.43937138", "0.43680418", "0.43662113", "0.4359728", "0.43589646", "0.43433252", "0.4342296", "0.43418464", "0.43416432", "0.43385193", "0.43253186", "0.43219042", "0.43205798" ]
0.7509116
0
Instantiates a new Adresses.
public Adresses(String houseNo, String address, String postCode) { this.houseNo = houseNo; this.address = address; this.postCode = postCode; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public AdressBook() {\r\n addressEntryList = new LinkedList<>();\r\n }", "Adresse createAdresse();", "Address createAddress();", "public Address() {\n \t\n }", "public Address() {}", "public Address() {\n\t\tsuper();\n\n\t}", "public Address() {\n\t}", "public Address() {\r\n\t\tsuper();\r\n\t}", "public Address() {\n }", "public Address() {\n }", "public IPV4Address()\n {\n address = new int[4];\n\n address[0] = 0;\n address[1] = 0;\n address[2] = 0;\n address[3] = 0;\n }", "public Address createAddress(String address);", "abstract public Address createAddress(String addr);", "public StreetAddress() {}", "public Ads() {\n }", "public BsAddressExample() {\r\n\t\toredCriteria = new ArrayList<Criteria>();\r\n\t}", "private AddressBook() {\n addressList = new ArrayList<>();\n }", "public @NotNull Address newAddress();", "public AddressListAdapter(final List<Address> addresses, final OnAddressClickedListener listener) {\n mAddresses = addresses;\n mListener = listener;\n }", "private Account createAccount(byte[] address) {\n return new Account(address);\n }", "public AdressBook() {\n initComponents();\n file = new File(filePath);\n adressBook = new LinkedList();\n }", "@Override\n\tpublic Advertisement createNewAdvertisement(String applicationDetails) {\n\t\tAdvert a = new Advert(null, applicationDetails, null);\n\t\tadman.addAd(a);\n\t\treturn a;\n\t}", "public AddressDatabase() {\n\t\ttimes=new Vector ();\n\t\tcids=new Vector ();\n\t\taddresses=new Hashtable();\n\t\ttseqnums=new Hashtable();\n\t}", "void setAdress(String generator, String address);", "public abstract AttributeBasedAddress makeABA(String communityName);", "public Adsconfig() {\n this(\"AdsConfig\", null);\n }", "public AttributeRanges() {\n }", "public Address(\n int number, String street, String apartment, String town, String state, int zipcode) {\n\n this(number, street, town, state, zipcode); // call the general constructor\n this.apartment = apartment;\n }", "private void instantiate(){\n inputAddressList = new LinkedList<Address>();\n inputGroupList = new LinkedList<Group>();\n root = new Group(\"root\", 0);\n }", "public AddressBook() {\r\n contacts = new ArrayList<AddressEntry>();\r\n }", "public JSONClientAddress(int p, InetAddress a) {\n port = p;\n address = a;\n }", "public final void setAdresses(List<Address> addresses) {\r\n\t\tthis.addresses = addresses;\r\n\t}", "public Aliases( ) {\n\t}", "public IndividualAddress(final int address)\n\t{\n\t\tsuper(address);\n\t}", "public static Address addAddress() {\r\n\r\n\t\tSystem.out.println(\"Please enter the building number of the supplier:\");\r\n\r\n\t\tint bldNum = Validation.intValidation();\r\n\r\n\r\n\r\n\t\tSystem.out.println(\"Please enter the supplier's street name:\");\r\n\t\tString bldStreet = Validation.stringNoIntsValidation();\r\n\r\n\r\n\r\n\t\tSystem.out.println(\"Please enter the town the supplier is in:\");\r\n\t\tString bldTown = Validation.stringNoIntsValidation();\t\t\r\n\r\n\t\tSystem.out.println(\"Please enter the postcode for the supplier:\");\r\n\t\tString bldPCode = Validation.stringValidation();\r\n\r\n\t\tSystem.out.println(\"Please enter the country the supplier is in:\");\r\n\t\tString bldCountry = Validation.stringNoIntsValidation();\r\n\r\n\t\tAddress newAddress = new Address(bldNum, bldStreet, bldTown, bldPCode, bldCountry);\r\n\r\n\t\treturn newAddress;\r\n\r\n\t}", "public GoogleApiA() {}", "public AdsManager()\n\t{\n\t\t\n\t}", "public void setAddress(String adrs) {\n address = adrs;\n }", "public addressBean() {\n }", "public Person(String name, String address, String aadharId) {\n this.name = name;\n this.address = address;\n this.aadharId = aadharId;\n }", "public org.xmlsoap.schemas.wsdl.soap.TAddress addNewAddress()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.xmlsoap.schemas.wsdl.soap.TAddress target = null;\n target = (org.xmlsoap.schemas.wsdl.soap.TAddress)get_store().add_element_user(ADDRESS$0);\n return target;\n }\n }", "public IPv4Address(int address) {\n\t\tthis(address, null);\n\t}", "public Address(String street, String city, String zipCode, String country)\n {\n //reference the object classes constructors\n this.street = street;\n this.city = city;\n this.zipCode = zipCode;\n this.country = country;\n }", "public Address(NetworkParameters params, byte[] hash160) {\n\t\tsuper(params.getAddressHeader(), hash160);\n\t\tcheckArgument(hash160.length == 20, \"Addresses are 160-bit hashes, so you must provide 20 bytes\");\n\t}", "public Ingress() {\n }", "public CreateConnection(int portNumber, List<Integer> adjList, Integer key,int fromPeerid,Integer v2,int originate) //CreateConnection Constructor\n {\n this.portNumber=portNumber;\n this.adjList=adjList;\n this.key=key;\n this.fromPeerid=fromPeerid;\n this.v2=v2;\n this.originateId = originate;\n }", "public Address(Long id, String country, String city, String postcode, String street, String housenumber,\r\n\t\t\tint apartment) {\r\n\t\tsuper();\r\n\t\tthis.id = id;\r\n\t\tthis.country = country;\r\n\t\tthis.city = city;\r\n\t\tthis.postcode = postcode;\r\n\t\tthis.street = street;\r\n\t\tthis.housenumber = housenumber;\r\n\t\tthis.apartment = apartment;\r\n\t}", "public Almacen(){}", "private Approche(String identifiantRunway, ArrayList<LatitudeLongitude> balises) {\n super(\"APPR\", identifiantRunway, balises);\n }", "private InetAddressUtils()\n {\n }", "public void createBillingAddress() throws Exception{\n\t\t\n\t\ttype(firstNameTextBox,\"bob\");\n\t\ttype(lastNameTextBox,\"test\");\n\t\ttype(addressLine1TextBox,\"2716 Ocean Park Blvd Suite 1030\");\n\t\ttype(addressLine2TextBox,\"test house\");\n\t\ttype(cityTextBox,\"Santa Monica\");\n\t\ttype(zipcodeTextBox,\"90405\");\n\t\tselect(stateSelectBox,8);\n\t\ttype(phoneTextField,\"6666654686\");\n\t\ttype(companyTextField,\"test company\");\n\t\n\t}", "public Enderecos() {\n \n }", "public void addAddress(String Address, Coord coord);", "public Ad() {\r\n Ad.adsCount++;\r\n this.ID = Ad.adsCount;\r\n }", "public Aanbieder() {\r\n\t\t}", "private AddressList(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public static Address newAddress(final String address) throws AddressException,\r\n\t\tUnsupportedEncodingException\r\n\t{\r\n\t\treturn newAddress(address, null, null);\r\n\t}", "public Address(String streetNumbers, String city, StateCode state, String postalCode) {\n\t\tthis.streetNumbers = streetNumbers;\n\t\tthis.city = city;\n\t\tthis.state = state;\n\t\tthis.postalCode = postalCode;\n\t\tthis.hashCode = hashCode();\n\t}", "public NetworkAdapter() {\n }", "public Address() {\n\t\tthis.street = \"\";\n\t\tthis.city = \"\";\n\t\tthis.state= \"\";\n\t\tthis.zipCode = \"\";\n\t}", "public AddressCacheImpl() {\n\t\tthis(CACHE_SIZE_DEFAULT, 0L);\n\t}", "private Road()\n\t{\n\t\t\n\t}", "private InetSocketAddress createAddress(final InetAddress address) {\n if (address.isLoopbackAddress()) {\n return new InetSocketAddress(address, this.oslpPortClientLocal);\n }\n\n return new InetSocketAddress(address, this.oslpPortClient);\n }", "public A3Add(){}", "protected RouterObject(String m_address) {\n connectedDevices = new ArrayList<String>();\n rwThreads = new HashSet<ReadWriteThread>();\n messageIDs = new ArrayList<byte[]>();\n messages = new ArrayList<byte[]>();\n address = new byte[Constants.TARGET_ID_LEN];\n byte[] temp = m_address.getBytes();\n for(int i=0; i<Constants.TARGET_ID_LEN; i++){\n \taddress[i] = temp[i];\n }\n }", "public @NotNull Address newAddress(@NotNull @Size(min = 1, max = 255) final String street,\r\n\t\t\t@NotNull @Size(min = 1, max = 255) final String city, @NotNull final State state, @NotNull Integer zipcode);", "public AnchorPoints() {\n this(DSL.name(\"b2c_anchor_points\"), null);\n }", "public void add(AddrBean ad) {\n\t\taddrlist.add(ad);\n\t}", "public String[] createNewAddress(){\r\n byte[][] pairs=ECDSAgeneratePublicAndPrivateKey();\r\n byte[] afterhashing=RIPEMD160(SHA256hash(pairs[1]));\r\n byte[] checksum=getCheckSum(SHA256hash(SHA256hash(afterhashing)));\r\n byte[] bitcoinaddress=concateByteArray(afterhashing,checksum);\r\n return new String[]{toHex(pairs[0]), convertPrivateKeytoWIF(pairs[0]), base58encode(bitcoinaddress)};\r\n }", "public Address(String l1, String l2, String l3, String c, String s, String z, String t) {\n line1 = l1;\n line2 = l2;\n line3 = l3;\n city = c;\n state = s;\n zip = z;\n type = t;\n }", "public OneGStresses(Segment segment, double[] stresses) {\n\t\tsegment_ = segment;\n\t\tstresses_ = stresses;\n\t}", "public Address(int number, String street, String city, String country) {\n this.number = number;\n this.street = street;\n this.city = city;\n this.country = country;\n }", "public RoutingTable() {\n for(int i = 0; i < addressLength; i++) {\n routingTable[i] = new HashTable();\n bloomFilters[i] = new BloomFilter(k, m);\n }\n }", "public RoadTest()\n {\n }", "private OrdPerson initAddress(String id) {\n\t\t\r\n\t\tUserAddress userAddress = receiverUserServiceAdapter.queryAddressByAddressNo(id);\r\n\t\t \r\n\t\tif (userAddress == null) {\r\n\t\t\tthrow new NullPointerException(\"收件地址不存在\");\r\n\t\t}\r\n\t\t// 地址\r\n\t\tList<OrdAddress> addressList = new ArrayList<OrdAddress>();\r\n\t\tOrdAddress ordAddress = new OrdAddress();\r\n\t\tordAddress.setProvince(userAddress.getProvince());\r\n\t\tordAddress.setCity(userAddress.getCity());\r\n\t\tordAddress.setStreet(userAddress.getAddress());\r\n\t\tordAddress.setPostalCode(userAddress.getPostCode());\r\n\t\taddressList.add(ordAddress);\r\n\r\n\t\t// 游玩人\r\n\t\tOrdPerson ordPerson = new OrdPerson();\r\n\t\tordPerson.setFullName(userAddress.getUserName());\r\n\t\tordPerson.setMobile(userAddress.getMobileNumber());\r\n\t\tordPerson.setObjectType(\"ORD_INVOICE\");\r\n\t\tordPerson.setPersonType(IReceiverUserServiceAdapter.RECEIVERS_TYPE.ADDRESS.name());\r\n\t\tordPerson.setAddressList(addressList);\r\n\t\treturn ordPerson;\r\n\t}", "public AnchorPoints(Name alias) {\n this(alias, ANCHOR_POINTS);\n }", "public IndividualAddress(final byte[] address)\n\t{\n\t\tsuper(address);\n\t}", "public IndividualAddress(final int area, final int line, final int device)\n\t{\n\t\tinit(area, line, device);\n\t}", "protected BsAddressExample(BsAddressExample example) {\r\n\t\tthis.orderByClause = example.orderByClause;\r\n\t\tthis.oredCriteria = example.oredCriteria;\r\n\t}", "public void create(Alien a1) {\n\t\t\r\n\t\taliens.add(a1);\r\n\t}", "public Address add() {\n console.promptForPrintPrompt(\" ++++++++++++++++++++++++++++++++++++++++++++\");\n console.promptForPrintPrompt(\" + PLEASE ENTER INFORMATION FOR A NEW ENTRY +\");\n console.promptForPrintPrompt(\" ++++++++++++++++++++++++++++++++++++++++++++\");\n console.promptForString(\"\");\n String firstName = console.promptForString(\" FIRST NAME: \");\n String lastName = console.promptForString(\" LAST NAME: \");\n String street = console.promptForString(\" STREET: \");\n String city = console.promptForString(\" CITY: \");\n String state = console.promptForString(\" STATE: \");\n String zip = console.promptForString(\" ZIPCODE: \");\n\n Address add = new Address(utils.nameFormatter(firstName), utils.nameFormatter(lastName), street, city, state, zip);\n\n return add;\n }", "public Achterbahn() {\n }", "public Adsconfig(String alias) {\n this(alias, ADSCONFIG);\n }", "public LoyaltyCard(String theTitle, String theFirstName, \r\n String theLastName, String street, \r\n String town, String postcode, \r\n String theCardNumber, int thePoints)\r\n {\r\n title = theTitle;\r\n firstName = theFirstName;\r\n lastName = theLastName;\r\n address = new LoyaltyCardAddress(street, town, postcode);\r\n cardNumber = theCardNumber;\r\n points = thePoints; \r\n }", "public static AdresseAccess getInstance() {\n return SingletonHolder.instance;\n }", "public Address(String street, String city, String state){\n this.street=street;\n this.city=city;\n this.state=state;\n\n }", "public FetchAddressIntentService() {\n super(\"FetchAddressIntentService\");\n }", "public Household() {\n }", "@Override\r\n\tpublic Adress createAdress(Adress adress) {\n\t\tem.persist(adress);\r\n\t\treturn adress;\r\n\t}", "public RoutingC2A()\r\n\t{\r\n\t\tsuper();\r\n\t}", "@Override\n protected JBossControllerAddress createBlankInstance() {\n\n return new JBossControllerAddress(null, null, null, null);\n }", "public ClientManager(String ipAddress) {\n this.ipAddress = ipAddress;\n }", "public static Address createEntity(EntityManager em) {\n Address address = new Address()\n .addressLine1(DEFAULT_ADDRESS_LINE_1)\n .addressLine2(DEFAULT_ADDRESS_LINE_2)\n .postCode(DEFAULT_POST_CODE);\n return address;\n }", "public Address(String someStreetAddress, String someCity, String someState, int someZip) {\n this.streetAddress = someStreetAddress;\n this.city = someCity;\n this.state = someState;\n this.zipCode = someZip;\n }", "public TrafficRegions() {\n }", "public EthernetStaticIP() {\n }", "private void createPassenger() {\n account = new Account(\"driver\", \"password\", \"[email protected]\",\n \"Dan\", \"20 Howard Street\", 1234567, 64278182123L);\n }", "public Delivery(Intersection adress) {\r\n\t\tsuper();\r\n\t\tthis.duration = 0;\r\n\t\tthis.adress = adress;\r\n\t\tthis.id = 0;\r\n\t}", "public static com.ifl.rapid.customer.model.CRM_Trn_Address create(\n\t\tint AddressId) {\n\t\treturn getPersistence().create(AddressId);\n\t}", "public AccessPoint() {\n }" ]
[ "0.67018867", "0.6408339", "0.6146325", "0.6134087", "0.6061535", "0.599173", "0.59795856", "0.59685516", "0.5860405", "0.5860405", "0.5781933", "0.5713995", "0.56500036", "0.561469", "0.5596014", "0.5549257", "0.55250204", "0.5461836", "0.54302365", "0.54206735", "0.5408287", "0.5397957", "0.53899956", "0.534219", "0.5340876", "0.53342694", "0.5296433", "0.529611", "0.5263614", "0.52569914", "0.5242267", "0.52386296", "0.52180606", "0.5198833", "0.51604104", "0.5144248", "0.5131283", "0.5103518", "0.5097682", "0.50955045", "0.50850755", "0.50787306", "0.5077932", "0.50429374", "0.5036272", "0.50310725", "0.5029647", "0.4996617", "0.49959716", "0.49909", "0.4986865", "0.49867555", "0.49859866", "0.498134", "0.4979573", "0.49680036", "0.49618843", "0.49604535", "0.4952462", "0.49419013", "0.49339914", "0.49186647", "0.49020633", "0.48998114", "0.4896979", "0.4890255", "0.4889272", "0.4873492", "0.4867754", "0.48588505", "0.48475033", "0.484032", "0.48385116", "0.4833876", "0.48325393", "0.4821769", "0.48205107", "0.48128417", "0.48081478", "0.4800379", "0.4798026", "0.479514", "0.47941133", "0.47869828", "0.47826162", "0.47767705", "0.47746617", "0.47743818", "0.47719583", "0.4767158", "0.47667605", "0.4763372", "0.47600228", "0.47575322", "0.47548538", "0.47478038", "0.47414613", "0.47393835", "0.47352684", "0.47345847" ]
0.6339688
2
Created by Eigenaar on 27112016.
public interface GetPictureData { void display(); void setPictureGrade(int grade); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final void mo51373a() {\n }", "@Override\n public void func_104112_b() {\n \n }", "@Override\n public void perish() {\n \n }", "protected boolean func_70814_o() { return true; }", "private void m50366E() {\n }", "private stendhal() {\n\t}", "public void mo38117a() {\n }", "private static void cajas() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\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\tpublic void sacrifier() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n public int describeContents() { return 0; }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "private void poetries() {\n\n\t}", "private void kk12() {\n\n\t}", "@Override\n\tprotected void interr() {\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n public int retroceder() {\n return 0;\n }", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "public void method_4270() {}", "@Override\r\n\tpublic void rozmnozovat() {\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\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "private void m50367F() {\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\n\tpublic void anular() {\n\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "public void mo12628c() {\n }", "public void mo6081a() {\n }", "public abstract void mo70713b();", "public void mo21877s() {\n }", "@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "private Rekenhulp()\n\t{\n\t}", "protected void mo6255a() {\n }", "public void m23075a() {\n }", "@Override\n\tpublic void nghe() {\n\n\t}", "public void mo12930a() {\n }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "public void mo21779D() {\n }", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "private void init() {\n\n\t}", "@Override public int describeContents() { return 0; }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n protected void getExras() {\n }", "private void strin() {\n\n\t}", "@Override\n public void init() {\n\n }", "public void mo9848a() {\n }", "@Override\n\tpublic void einkaufen() {\n\t}", "public void mo21878t() {\n }", "public void skystonePos4() {\n }", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "protected boolean func_70041_e_() { return false; }", "private MetallicityUtils() {\n\t\t\n\t}", "public abstract void mo56925d();", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "public void mo21785J() {\n }", "public void mo55254a() {\n }", "public void mo21825b() {\n }", "public void mo21793R() {\n }", "public void mo115190b() {\n }", "@Override\n public void init() {\n }", "public final void mo91715d() {\n }", "@Override\r\n\tpublic void init() {}", "public void mo21787L() {\n }", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "private zza.zza()\n\t\t{\n\t\t}", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "public void mo21782G() {\n }", "@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 void mo21794S() {\n }", "@Override\n\tpublic void one() {\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}", "public void mo3376r() {\n }", "public void mo21792Q() {\n }", "@Override\n public void init() {}", "public void mo21783H() {\n }" ]
[ "0.5965574", "0.5889415", "0.5880938", "0.58727217", "0.58128166", "0.57841027", "0.5732559", "0.5693256", "0.5674267", "0.56401193", "0.56401193", "0.56384593", "0.5625079", "0.5619414", "0.559308", "0.5592083", "0.55889463", "0.5578046", "0.55750257", "0.5572501", "0.5550132", "0.55381835", "0.5536544", "0.5512857", "0.55123985", "0.5511641", "0.5506655", "0.54919994", "0.54919994", "0.54919994", "0.54919994", "0.54919994", "0.54919994", "0.54919994", "0.54768944", "0.54759157", "0.5475339", "0.5475339", "0.5475339", "0.5475339", "0.5475339", "0.5474276", "0.5473428", "0.54678386", "0.5464963", "0.54538226", "0.5452275", "0.54506046", "0.5449655", "0.5436827", "0.54309654", "0.5430363", "0.54260457", "0.54217935", "0.5415563", "0.5412721", "0.53964543", "0.5393225", "0.5378956", "0.5377959", "0.53640234", "0.53640234", "0.5357082", "0.53569496", "0.53540814", "0.5354017", "0.53482455", "0.5348201", "0.5345284", "0.53440267", "0.53392154", "0.53316224", "0.53297025", "0.5328779", "0.53238297", "0.5312656", "0.5311326", "0.5309346", "0.53077394", "0.53059447", "0.5299793", "0.529886", "0.52983886", "0.52937436", "0.52937436", "0.52937436", "0.5292001", "0.52919066", "0.52907836", "0.5276334", "0.5276334", "0.5276334", "0.52752763", "0.5275087", "0.5272274", "0.5272274", "0.5272274", "0.5271263", "0.52621007", "0.5259744", "0.5249939" ]
0.0
-1
private long backPressedTime; private Toast backToast;
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_web_view); webView = findViewById(R.id.webView); webView.setWebViewClient(new WebViewClient()); webView.getSettings().setJavaScriptEnabled(true); webView.getSettings().setJavaScriptCanOpenWindowsAutomatically(true); // webView.setWebChromeClient(new MyCustomChromeClient(this)); // webView.setWebViewClient(new MyCustomWebViewClient(this)); // webView.clearCache(true); // webView.clearHistory(); // webView.getSettings().setJavaScriptEnabled(true); // webView.getSettings().setJavaScriptCanOpenWindowsAutomatically(true); webView.loadUrl("https://uperfect.in/"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onBackPressed() {\n if (backPressedTime + 2000 > System.currentTimeMillis()) {\n backToast.cancel();\n super.onBackPressed();\n return;\n } else {\n backToast = Toast.makeText(getBaseContext(), \"Нажмите ещё раз, чтобы выйти\", Toast.LENGTH_SHORT);\n backToast.show();\n }\n backPressedTime = System.currentTimeMillis();\n }", "@Override\n\tpublic void onBackPressed() {\n\t\tif (lastClickTime <= 0) {\n\t\t\tToast.makeText(this, resources.getString(R.string.ToastPressAgain), Toast.LENGTH_SHORT).show();\n\t\t\tlastClickTime = System.currentTimeMillis();\n\t\t} else {\n\t\t\tlong currentClickTime = System.currentTimeMillis();\n\t\t\tif ((currentClickTime - lastClickTime) < 1000) {\n\t\t\t\t// 退出\n\t\t\t\t// finish();\n\t\t\t\t// 关闭整个程序\n\t\t\t\tSysApplication.getInstance().exit();\n\t\t\t} else {\n\t\t\t\tToast.makeText(this, resources.getString(R.string.ToastPressAgain), Toast.LENGTH_SHORT).show();\n\t\t\t\tlastClickTime = System.currentTimeMillis();\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void onBackPressed() {\n if (lastBackPressTime < System.currentTimeMillis() - 2500) {\n toast = Toast.makeText(this, R.string.toast_close_app, Toast.LENGTH_SHORT);\n toast.setGravity(Gravity.CENTER_VERTICAL, 0, 0);\n toast.show();\n lastBackPressTime = System.currentTimeMillis();\n return;\n } else {\n if (toast != null) {\n toast.cancel();\n }\n }\n super.onBackPressed();\n }", "@Override\n public void onBackPressed() {\n \tToast.makeText(mContext, R.string.rotate_device_to_go_back, Toast.LENGTH_LONG).show();\n }", "public void onBackPressed() {\r\n }", "@Override\r\n public void onBackPressed() {\r\n \t\r\n \tif( backPressedOnce == true ) {\r\n \t\ttoast.Cancel();\r\n \t\tsuper.onBackPressed();\r\n \t\treturn;\r\n \t}\r\n \t\r\n \tbackPressedOnce = true;\r\n String message = \"Press Back button twice to exit\";\r\n toast.Create(message,Toast.LENGTH_SHORT, this.getApplicationContext());\r\n toast.Show();\r\n \t\r\n \t// Resetting backPressedOnce flag to false\r\n \tRunnable resetBackFlag = new Runnable() {\r\n\t\t\t@Override\r\n\t\t\tpublic void run() {\r\n\t\t\t\tbackPressedOnce = false;\r\n\t\t\t}\r\n\t\t};\r\n\t\tnew Handler().postDelayed(resetBackFlag, TOAST_LENGTH_SHORT_DURATION);\r\n }", "void onGoBackButtonClick();", "@Override\n public void onBackPressed() { }", "@Override\n public void onBackPressed() {}", "public void onBackPressed()\n {\n }", "public static void onBackPressed()\n {\n }", "@Override\r\n public void onBackPressed() {\r\n\r\n if (backPressedTime + 2000 > System.currentTimeMillis()) {\r\n finish();\r\n } else {\r\n Toast.makeText(QuestionActivity.this, \"Press Back Again Close Quiz\", Toast.LENGTH_SHORT).show();\r\n }\r\n backPressedTime = System.currentTimeMillis();\r\n }", "@Override\n public void onBackPressed() {\n if (!isTaskRoot()) {\n super.onBackPressed();\n return;\n }\n\n if (mBackPressedTime + TheMovieDbConstants.TIME_INTERVAL_APP_EXIT >\n System.currentTimeMillis()) {\n super.onBackPressed();\n } else {\n Toast.makeText(this, getResources().getString(R.string.app_back_pressed_toast),\n Toast.LENGTH_SHORT).show();\n }\n mBackPressedTime = System.currentTimeMillis();\n }", "@Override\n public void onBackPressed() {\n }", "@Override\n public void onBackPressed() {\n }", "@Override\n public void onBackPressed() {\n }", "@Override\n public void onBackPressed() {\n }", "@Override\n public void onBackPressed() {\n }", "@Override\n public void onBackPressed() {\n }", "@Override\n public void onBackPressed() {\n }", "@Override\n public void onBackPressed() {\n }", "@Override\n public void onBackPressed() {\n }", "@Override\n public void onBackPressed() {\n }", "@Override\n public void onBackPressed() {\n }", "@Override\n public void onBackPressed() {\n }", "@Override\n public void onBackPressed() {\n }", "@Override\n public void onBackPressed() {\n }", "@Override\n public void onBackPressed() {\n }", "@Override\n public void onBackPressed() {\n }", "@Override\r\n public void onBackPressed() {\n }", "@Override\n \tpublic void onBackPressed() {\n \t}", "public void onBackPressed() {\n backbutton();\n }", "@Override\n\tpublic void onBackPressed() {\n\n\t}", "@Override\r\n\tpublic void onBackPressed() {\n\r\n\t}", "@Override\r\n\tpublic void onBackPressed() {\n\r\n\t}", "@Override\n public void onBackPressed() {\n timesBackPressed++;\n if (timesBackPressed > 1) {\n currentStateSaveToSharedPref();\n finish();\n } else\n Toast.makeText(getApplicationContext(), getResources().getString(R.string.leave_warning), Toast.LENGTH_LONG).show();\n }", "@Override\n\tpublic void onBackPressed() {\n\t\t\n\t}", "@Override\n\tpublic void onBackPressed() {\n\t}", "@Override\n\tpublic void onBackPressed() {\n\t}", "@Override\n\tpublic void onBackPressed() {\n\t}", "@Override\n\tpublic void onBackPressed() {\n\t}", "@Override\n public void onBackPressed()\n {\n\n }", "@Override\n public void onBackPressed()\n {\n onStop();\n super.onBackPressed();\n }", "public void onBackPressed(){\n }", "@Override\n public void onBackPressed(){\n }", "@Override\n\tpublic void onBackPressed()\n\t{\n\t}", "public void onBack(View w){\n onBackPressed();\n }", "@Override\n public void backPressed(){\n }", "public void goBack() {\n goBackBtn();\n }", "@Override\n public void onBackPressed() {\n LogHelper.logD(TAG, \"onBackPressed called\");\n }", "@Override\n public void onBackPressed() {\n backToHome();\n }", "public void onClickBack(View view){\n onBackPressed();\n }", "@Override\n public void onBackPressed(){\n System.out.println(\"---------------- No debe hacer nada -------------------------------\");\n }", "boolean onBackPressed();", "boolean onBackPressed();", "@Override\n\tpublic void onBackPressed() {\n\t\tif(isExit){\n\t\t\tfinish();\n\t\t}else{\n\t\t\tisExit=true;\n\t\t\tToast.makeText(MainActivity.this, \"�ٵ��һ���˳�\", 0).show();\n\t\t\ttimerTask=new TimerTask() {\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\tisExit=false;\n\t\t\t\t}\n\t\t\t};\n\t\t\ttimer.schedule(timerTask, 2000);\n\t\t}\n\t}", "@Override\n public void onBackPressed() {\n if (backPressed >= 1) {\n finishAffinity();\n super.onBackPressed();\n\n\n } else {\n // clean up\n backPressed = backPressed + 1;\n Toast.makeText(this, getString(R.string.press_back_exit),\n Toast.LENGTH_SHORT).show();\n }\n }", "@Override\n public void onBackPressed() {\n if (exit) {\n System.exit(0);\n } else {\n Toast.makeText(this, \"Press Back again to Exit.\",\n Toast.LENGTH_SHORT).show();\n exit = true;\n new Handler().postDelayed(new Runnable() { //3 sn içinde iki defa basıldı mı kontrolu için\n @Override\n public void run() {\n exit = false;\n }\n }, 3 * 1000);\n }\n }", "@Override\n public void onBackPressed() {\n getWindow().clearFlags(WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE);\n if (back_pressed + 2000 > System.currentTimeMillis()) {\n\n super.onBackPressed();\n this.finish();\n\n } else\n Toast.makeText(getBaseContext(), \"Press once again to exit!\", Toast.LENGTH_SHORT).show();\n back_pressed = System.currentTimeMillis();\n }", "@Override\n public void onBackPressed() {\n timer.cancel();\n // Tell the user that their data will be destroyed\n Toast.makeText(getApplicationContext(), \"Stopping and deleting recording...\", Toast.LENGTH_SHORT)\n .show();\n super.onBackPressed();\n }", "@Override\n public void handleOnBackPressed() {\n }", "@Override\n\tpublic void onBackPressed() {\n\t\tBack();\n\t}", "void onDismissByBackPressed();", "public void onBackPressed() {\n Toast.makeText(getActivity().getApplicationContext(), \"Back pressed\", Toast.LENGTH_SHORT).show();\n return;\n }", "@Override\n public void onBackPressed() {\n new goBack().execute(0);\n }", "@Override\n public void onBackPressed() {\n if (backClickOnce) {\n finishAffinity();\n } else {\n backClickOnce = true;\n Toast.makeText(this, R.string.click_back_again_to_exit, Toast.LENGTH_SHORT).show();\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n backClickOnce = false;\n }\n }, 2000);\n }\n }", "@Override\n public void backButton() {\n\n\n }", "@Override\n public void goBack() {\n\n }", "@Override\n public void onBackPressed() {\n super.onBackPressed();\n\n }", "@Override\n\tpublic void onBackPressed()\n\t\t{\n\t\tbackPressed();\n\t\t}", "@Override\n public void onBackPressed() {\n if (doubleBackToExitPressedOnce) {\n super.onBackPressed();\n PlaceHolderFragment.newInstance().clearVariables();\n return;\n }\n this.doubleBackToExitPressedOnce = true;\n Toast.makeText(this, Tag.BACK, Toast.LENGTH_SHORT).show();\n\n new Handler().postDelayed(new Runnable() {\n\n @Override\n public void run() {\n doubleBackToExitPressedOnce = false;\n }\n }, 3000);\n }", "public void clickBack(View view){\r\n onBackPressed();\r\n }", "@Override\n public void onClick(View view) {\n onBackPressed(); }", "@Override\n public void onBackPressed() {\n if (doubleBackToExitPressedOnce) {\n super.onBackPressed();\n updatePICstatus2();\n return;\n }\n this.doubleBackToExitPressedOnce = true;\n Toast.makeText(this, \"Please click Back again to exit\", Toast.LENGTH_SHORT).show();\n\n new Handler().postDelayed(new Runnable() {\n\n @Override\n public void run() {\n doubleBackToExitPressedOnce = false;\n }\n }, 3000);\n }", "@Override\n public void onBackPressed() {\n //super.onBackPressed();\n goBack();\n }", "@Override\n public void onBackPressed() {\n\n\n super.onBackPressed();\n\n }", "@Override\n public void onBackPressed() {\n super.onBackPressed();\n }", "@Override\n public void onBackPressed() {\n super.onBackPressed();\n }", "@Override\n public void onBackPressed() {\n super.onBackPressed();\n }", "@Override\n public void onBackPressed() {\n super.onBackPressed();\n }", "@Override\n public void onBackPressed() {\n super.onBackPressed();\n }", "@Override\n public void onBackPressed() {\n super.onBackPressed();\n }", "@Override\n public void onBackPressed() {\n super.onBackPressed();\n }", "@Override\n public void onBackPressed() {\n logBackPressed();\n finishOk();\n }", "@Override\n public void onBackPressed()\n {\n mIsBackButtonPressed = true;\n super.onBackPressed();\n \n }", "@Override\n // Detect when the back button is pressed\n public void onBackPressed() {\n\n // Let the system handle the back button\n\n super.onBackPressed();\n\n }", "@Override\n public void onBackPressed()\n {\n super.onBackPressed();\n }", "@Override\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\n\n\t\t\n\t}", "@Override\n public void onBackPressed() {\n Toast.makeText(getApplicationContext(), \"Please complete or cancel ride \", Toast.LENGTH_SHORT).show();\n\n }", "void setupBtnBack() {\n Intent intent = getIntent();\n Bundle bundle = intent.getExtras();\n String str = bundle.getString(\"str\");\n\n ToastTip(str);\n\n Button btn_back = (Button)findViewById(R.id.btn_btn_back);\n\n btn_back.setOnClickListener(back_listener);\n }", "@Override\r\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\r\n\t}", "@Override\r\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\r\n\t}", "@Override\r\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\r\n\t\tdoBack();\r\n\t}", "@Override\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\n\t}", "@Override\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\n\t}", "@Override\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\n\t}", "@Override\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\n\t}", "@Override\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\n\t}", "@Override\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\n\t}", "@Override\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\n\t}", "@Override\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\n\t}" ]
[ "0.823613", "0.79881483", "0.79466784", "0.77141964", "0.7535234", "0.747327", "0.74673504", "0.74619377", "0.74445724", "0.7443834", "0.74352115", "0.7434205", "0.7423433", "0.740898", "0.740898", "0.740898", "0.740898", "0.740898", "0.740898", "0.740898", "0.740898", "0.740898", "0.740898", "0.740898", "0.740898", "0.740898", "0.740898", "0.740898", "0.740898", "0.74071586", "0.73981655", "0.739269", "0.73903126", "0.7383798", "0.7383798", "0.73797405", "0.7376665", "0.7337749", "0.7337749", "0.7337749", "0.7337749", "0.73260146", "0.73222744", "0.7303327", "0.7271504", "0.7271055", "0.7260709", "0.7242115", "0.7229602", "0.7218817", "0.7206399", "0.72047037", "0.7204239", "0.7183317", "0.7183317", "0.7165814", "0.71534777", "0.71502763", "0.71385604", "0.7129015", "0.71194446", "0.7112267", "0.7091774", "0.7091031", "0.7079761", "0.70755535", "0.7074102", "0.7071616", "0.70670223", "0.7061408", "0.70576394", "0.7050968", "0.7050891", "0.7048733", "0.7032703", "0.70258677", "0.70253026", "0.70253026", "0.70253026", "0.70253026", "0.70253026", "0.70253026", "0.70253026", "0.7016392", "0.70058966", "0.70045114", "0.70025903", "0.7002421", "0.6991818", "0.6991457", "0.69684577", "0.69684577", "0.6960859", "0.69533813", "0.69533813", "0.69533813", "0.69533813", "0.69533813", "0.69533813", "0.69533813", "0.69533813" ]
0.0
-1
Process userTags string, prepares a Tag List and set in Question.
private void assembleTags(Question question, String userTags) { if (userTags != null && !userTags.isEmpty()) { String[] tagNames = userTags.split(Constants.COMMA_DELIMITER); if (tagNames.length > 0) { List<Tag> tags = new ArrayList<Tag>(); for (String tagName : tagNames) { Tag tag = new Tag(); tag.setName(tagName); tags.add(tag); } question.setTags(tags); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private List<String> getAllTagsOfUser(Integer userId){\n \t List<String> openTags = new ArrayList<String>();\n \t DataLayerFactory factory = new DataLayerFactory(db);\n \t PostDataLayer postDataLayer = factory.createPostDataLayer();\n \t List<Question> userQuestions = postDataLayer.getQuestionsOfUser(userId, OrderCriteria.CREATION_DATE);\n \t for (Question question : userQuestions) \n \t\t for (String tag : question.getTags()) {\n\t\t\t\tif (!openTags.contains(tag)) {\n\t\t\t\t\topenTags.add(tag);\n\t\t\t\t}\n\t\t\t}\n \t\t\t\n \t return openTags;\n \t\t}", "public void setTags(String tags) {\n this.tags = tags;\n }", "private SortedSet<String> FillTagList(String tags) {\n \tSortedSet<String> tagset = new TreeSet<String>();\n \tString[] tag_arr = tags.split(\" \");\n \tfor (int i = 0; i < tag_arr.length; i++) {\n \t\ttagset.add(tag_arr[i]);\n \t}\n \ttag_arr = new String[]{};\n \ttag_arr = tagset.toArray(tag_arr);\n\n\t\tm_taglist = new ArrayList < Map<String,String> >();\n\t\tm_taglistmap = new HashMap <String, Integer>();\n\t\tMap<String, String> m;\n\t\tfor (int i = 0; i < tag_arr.length; i++) {\n\t\t\tm = new HashMap<String, String>();\n\t\t\tm.put(\"tag_name\", tag_arr[i]);\n\t\t\tm.put(\"extra_info\", \"\");\n\t\t\tm_taglist.add(m);\n\t\t\tm_taglistmap.put(tag_arr[i],i);\n\t\t}\n\t\t\n\t\tListView lv = ((ListView)findViewById(R.id.ImageTagsList));\n lv.setAdapter(new SimpleAdapter(\n\t\t\t\t\t\t\tthis,\n\t\t\t\t\t\t\tm_taglist,\n\t\t\t\t\t\t\tR.layout.tags_list_item,\n\t\t\t\t\t\t\tnew String[]{\"tag_name\",\"extra_info\"},\n\t\t\t\t\t\t\tnew int[]{R.id.TagName, R.id.ExtraInfo}));\n \tlv.setTextFilterEnabled(true);\n \tlv.setOnItemClickListener(this);\n \t\n \treturn tagset;\n }", "public void FromStringToChecked(String sStringTagsToFill) \r\n\t{\n\t\tString[] separateTags = sStringTagsToFill.split(\", \");\r\n\t\t\r\n\t\t// for every recieved tag string\r\n\t\tfor (String tagName : separateTags) \r\n\t\t{\r\n\t\t\t// put the true value in the matching key in the hmTags hashmap\r\n\t\t\tthis.hmTags.put(tagName, true);\r\n\t\t}\r\n\t\t\r\n\t\tUpdateChecboxes();\r\n\t}", "private String[] extractTags(HttpServletRequest request)\n throws ServletException, IOException {\n String tagline = request.getParameter(\"tags\").toLowerCase();\n String[] tags = {};\n if (!tagline.isEmpty())\n tags = tagline.split(\" \");\n return tags;\n }", "public void setTags(ArrayList<String> tags){\n for(String s : tags){\n this.tags.add(s);\n }\n }", "public void setTags(String tags) {\n\t\tthis.tags = tags;\n\t}", "private static List<XMLTag> processTags(String line, int index, int length) {\n List<XMLTag> tempTags = new ArrayList<>();\n\n XMLTag xmlTag = new XMLTag();\n String value = line;\n\n xmlTag.setLine(index + 1);\n\n if (hasTag(value)) {\n // has a tag\n while (hasTag(value) || hasString(value)) {\n xmlTag = new XMLTag();\n xmlTag.setLine(index + 1);\n\n int startTag = value.indexOf(\"<\");\n int endTag = value.indexOf(\">\");\n boolean order = endTag > startTag;\n\n if (hasStringBeforeTag(value, startTag)) {\n xmlTag.setTagType(7);\n xmlTag.setEndIndex(startTag + length + 1);\n xmlTag.setStartIndex(0 + length + 1);\n xmlTag.setValue(value.substring(0, startTag));\n value = value.substring(startTag);\n\n } else if (startTag != -1) {\n // has <\n if (endTag != -1) {\n // has < and > ==> can be 1, 2, 3, 8\n if (order) {\n if (value.substring(startTag + 1, startTag + 2).equals(\"/\")) {\n // 2\n xmlTag.setTagType(2);\n String[] values = value.substring(startTag + 2, endTag).split(\" \");\n xmlTag.setqName(values[0]);\n } else if (value.substring(endTag - 1, endTag).equals(\"/\")) {\n // 3\n xmlTag.setTagType(3);\n String[] qName = value.substring(startTag + 1).split(\"/| \");// **needs to be //?\n xmlTag.setqName(qName[0]);\n\n } else if (value.substring(startTag + 1, startTag + 2).equals(\"?\")) {\n // 8\n xmlTag.setTagType(8);\n } else if (value.substring(startTag + 1, startTag + 2).equals(\"!\")) {\n // 7 <![CDATA[ ]]>\n xmlTag.setTagType(7);\n } else {\n // 1\n xmlTag.setTagType(1);\n String[] values = (value.substring(startTag + 1, endTag)).split(\" \");\n xmlTag.setqName(values[0]);\n }\n\n xmlTag.setEndIndex(endTag + length + 1);\n xmlTag.setStartIndex(startTag + length + 1);\n xmlTag.setValue(value.substring(startTag, endTag + 1));\n value = value.substring(endTag + 1);\n\n } else {\n\n if (endTag > 0 && value.substring(endTag - 1, endTag).equals(\"/\")) {\n xmlTag.setTagType(5);\n\n } else {\n if (value.substring(endTag - 1, endTag).equals(\"?\")) {\n xmlTag.setTagType(8);\n } else if (value.substring(endTag - 1, endTag).equals(\"]\")) {\n // 7 ]]>\n xmlTag.setTagType(7);\n } else {\n xmlTag.setTagType(6);\n }\n }\n xmlTag.setValue(value.substring(0, endTag + 1));\n xmlTag.setEndIndex(endTag + length + 1);\n xmlTag.setStartIndex(-1);\n value = value.substring(endTag + 1);\n }\n\n } else {\n // has < ==> can be 4 || can be 8\n if (value.substring(startTag + 1, startTag + 2).equals(\"?\")) {\n xmlTag.setTagType(8);\n } else if (value.substring(startTag + 1, startTag + 2).equals(\"!\")) {\n // 7 <![CDATA[\n xmlTag.setTagType(7);\n } else {\n xmlTag.setTagType(4);\n String[] values = (value.substring(startTag + 1)).split(\" \");\n xmlTag.setqName(values[0]);\n }\n xmlTag.setValue(value);\n xmlTag.setEndIndex(-1);\n xmlTag.setStartIndex(startTag + length + 1);\n value = \"\";\n }\n } else {\n // no <\n if (endTag != -1) {\n // has > ==> can be 5, 6\n\n if (endTag > 0 && value.substring(endTag - 1, endTag).equals(\"/\")) {\n xmlTag.setTagType(5);\n\n } else {\n if (endTag > 0 && value.substring(endTag - 1, endTag).equals(\"?\")) {\n xmlTag.setTagType(8);\n } else if (endTag > 0 && value.substring(endTag - 1, endTag).equals(\"]\")) {\n // 7 ]]>\n xmlTag.setTagType(7);\n } else {\n xmlTag.setTagType(6);\n }\n }\n xmlTag.setValue(value.substring(0, endTag + 1));\n xmlTag.setEndIndex(endTag + length + 1);\n xmlTag.setStartIndex(-1);\n value = value.substring(endTag + 1);\n\n } else {\n // no tags ==> 7\n xmlTag.setValue(value);\n xmlTag.setTagType(7);\n xmlTag.setEndIndex(-1);\n xmlTag.setStartIndex(-1);\n value = \"\";\n\n }\n }\n\n xmlTagsQueue.add(xmlTag);\n tempTags.add(xmlTag);\n }\n } else {\n // whole line has no tags\n xmlTag.setValue(value);\n xmlTag.setTagType(7);\n xmlTag.setEndIndex(-1);\n xmlTag.setStartIndex(-1);\n\n xmlTagsQueue.add(xmlTag);\n tempTags.add(xmlTag);\n\n return tempTags;\n }\n\n return tempTags;\n }", "@Headers({\n \"Content-Type:application/json\"\n })\n @POST(\"users/{user_id}/tags\")\n Call<Void> addUserTag(\n @retrofit2.http.Path(\"user_id\") Integer userId, @retrofit2.http.Body StringWrapper tag\n );", "public Tags (String tags) {\n set (tags);\n }", "public void setTags(String tags) {\n this.tags = tags == null ? null : tags.trim();\n }", "List<Tag> saveTags(String tags);", "public ArrayList<PomoTag> getTag(String userId) {\r\n PomoServer server = new PomoServer();\r\n String parameters = PomoServer.MODE_SELECT + \"&\" + \"userid=\" + userId;\r\n String url = PomoServer.DOMAIN_URL + PomoServer.SERVLET_TAG;\r\n String data = server.get(url, parameters);\r\n ArrayList<PomoTag> list = new ArrayList<>();\r\n if (data.equals(\"0\")) {\r\n return list;\r\n }\r\n String[] tags = data.split(\";\");\r\n for (String t : tags) {\r\n String[] attributes = t.split(\"&\");\r\n String id = attributes[0];\r\n String name = attributes[1];\r\n int plan = Integer.parseInt(attributes[2]);\r\n list.add(new PomoTag(id, name, plan, userId));\r\n }\r\n return list;\r\n }", "public void set(String inTags) {\n tags.delete (0, tags.length());\n merge (inTags);\n }", "public void setToTag(String tag) throws ParseException,NullPointerException;", "public static HashSet<Tag> parseTags(String t) throws DukeException {\n boolean isWhiteSpace = t.trim().isEmpty();\n if (isWhiteSpace) {\n throw new DukeException(MESSAGE_INVALID_TAG);\n }\n HashSet<Tag> tags = new HashSet<Tag>();\n String[] splitTags = t.split(\" \");\n Arrays.stream(splitTags).map(Tag::new).forEach(tags::add);\n return tags;\n }", "private synchronized void tags(ViewHolder holder, int position){\n holder.tagsLL.removeAllViews();\n\n int count = 0;\n while (count < 3) {\n String tagName = \"\";\n switch (count) {\n case 0:\n tagName = tag1ArrList.get(position);\n break;\n case 1:\n tagName = tag2ArrList.get(position);\n break;\n case 2:\n tagName = tag3ArrList.get(position);\n break;\n }\n if (! tagName.equals(\"\")) {\n final TextView tagTV = Tags.newTagView(context, userUIPreferences.textSize, userUIPreferences.tagsTextColor, userUIPreferences.tagsTVParams, userUIPreferences.tagsBackgroundDrawable,\n userUIPreferences.fontStyle, userUIPreferences.userSelectedFontTF);\n tagTV.setText(tagName.replaceAll(\"_\", \" \"));\n holder.tagsLL.addView(tagTV);\n }\n else{\n break;\n }\n count ++;\n }\n }", "public void addUserIdAndArtistNameToTag(String userId, String artistName, List<Tag> tagList) {\n for (int i = 0; i < tagList.size(); i++) {\n tagList.get(i).setUserId(userId);\n tagList.get(i).setArtistName(artistName);\n }\n }", "public void setTags(List<Tag> tags) {\n this.tags = tags;\n }", "private void addToListResponseOnKeyword(String userMessage) {\n List<String> splitWords = splitAndCleanMessage(userMessage);\n List<String> themes = findThemes(splitWords);\n themes.forEach(reserveThemeResponse::remove);\n findNormalKeywordsAnswers(themes);\n }", "@Override\n\tpublic void addTag(List<Tag> tags, String userName, String topicPath)\n\t\t\tthrows Exception {\n\n\t}", "public void setFromTag(String tag) throws ParseException,NullPointerException;", "public void parseInput(String userInput) {\n this.userIn = userInput;\n\n this.identifier = userIn.split(\" \")[0];\n\n switch (identifier) {\n case \"done\":\n completeTask();\n return;\n\n case \"list\":\n listAllTasks();\n return;\n\n case \"todo\":\n addToDo();\n return;\n\n case \"event\":\n addEvent();\n return;\n\n case \"deadline\":\n addDeadline();\n return;\n\n case \"delete\":\n deleteTask();\n return;\n\n case \"find\":\n findTask();\n return;\n\n default:\n ui.showListOfCommands();\n }\n }", "void addTag(String tag){tags.add(tag);}", "public void processCommand(String userInput){\n if (userInput.contains(\" \")){ \n processSingleToken(userInput.split(\" \")); //Splits strings based on \" \" \n }\n \n else{\n List<String> tempStore = new ArrayList<String>();\n tempStore.add(userInput);\n String[] token = tempStore.toArray(new String[tempStore.size()]);\n processSingleToken(token);\n }\n }", "public void onTagsReceived(Map<String, Object> tags);", "public void addtofriendcollection(String userNames){\n\tString [] taggedfriendsArray = userNames.split(\" \");\n\tfor(int indks=0;indks<taggedfriendsArray.length;indks++){\n\t\tIterator<User> itr = UserCollection.userlist.iterator();\n\t\twhile(itr.hasNext()){\n\t\t\tUser element = itr.next();\n\t\t\tif(taggedfriendsArray[indks].equals(element.getUserName())){\n\t\t\t\ttaggedFriends.add(element);\n\t\t\t}\n\t\t}\n\t}\n\t\n}", "public void merge (String inTags) {\n\n // Remove any rubbish and drop leading and trailing spaces\n String tags2 = StringUtils.purify(inTags).trim();\n if (tags2.equals(tags.toString())) {\n // No need to merge\n } else {\n // System.out.println (\"tags2 (purified) = \" + tags2);\n int e2 = 0;\n int s2 = indexOfNextWordStart (tags2, e2, slashToSeparate);\n // System.out.println (\"initial s2 = \" + String.valueOf(s2));\n int wordEnd2 = e2;\n char sep = ' ';\n while (s2 < tags2.length()) {\n // Process next tag from input\n StringBuilder next2 = new StringBuilder();\n sep = ' ';\n while (s2 < tags2.length() && (! isTagSeparator (sep))) {\n // Process next level in text tag from input\n e2 = indexOfNextSeparator (tags2, s2, true, true, slashToSeparate);\n // System.out.println (\"e2 and wordend both = \" + String.valueOf(e2));\n wordEnd2 = e2;\n while (wordEnd2 > 0 && Character.isWhitespace (tags2.charAt(wordEnd2 - 1))) {\n wordEnd2--;\n }\n if (next2.length() > 0) {\n next2.append (PREFERRED_LEVEL_SEPARATOR);\n }\n next2.append (tags2.substring (s2, wordEnd2));\n // System.out.println (\"appending \" + String.valueOf(s2) + \"-\"\n // + String.valueOf(e2) + \" from \" + tags2);\n if (e2 < tags2.length()) {\n sep = tags2.charAt (e2);\n }\n s2 = indexOfNextWordStart (tags2, e2, slashToSeparate);\n // System.out.println (\"s2 = \" + String.valueOf(s2));\n } // end while processing levels for next input tag\n\n // System.out.println (\"next2 = \" + next2.toString());\n\n // next2 now contains next tag from input string\n int s = indexOfNextWordStart (tags, 0, slashToSeparate);\n int e = 0;\n int compareResult = 1;\n while (s < tags.length() && (compareResult > 0)) {\n e = indexOfNextSeparator (tags, s, false, true, slashToSeparate);\n compareResult\n = (next2.toString().compareToIgnoreCase (tags.substring (s, e)));\n // System.out.println (\"s = \" + String.valueOf(s)\n // + \" e = \" + String.valueOf(e)\n // + \" compareResult = \" + String.valueOf(compareResult));\n if ((compareResult > 0) && (s < tags.length())) {\n s = indexOfNextWordStart (tags, e, slashToSeparate);\n }\n } // End while looking for a match or insertion point\n\n if (s >= tags.length()) {\n if (tags.length() > 0) {\n tags.append (PREFERRED_TAG_SEPARATOR);\n tags.append (' ');\n }\n tags.append (next2);\n // System.out.println (\"At end of tags, appending with result \"\n // + tags.toString());\n }\n else\n if (compareResult < 0) {\n tags.insert (s, next2);\n tags.insert (s + next2.length(), PREFERRED_TAG_SEPARATOR);\n tags.insert (s + next2.length() + 1, ' ');\n }\n s2 = indexOfNextWordStart (tags2, e2, slashToSeparate);\n } // end while more tags from input\n }\n }", "public void setSGMLtags (String[] tags) {\n\t\tSGMLtags = tags;\n\t}", "UniqueTagList getTags();", "public TagParser(String input, TaskList lines) {\n this.input = input;\n this.lines = lines;\n }", "public void addEntryToGUI(String tags, String entry) {\r\n String[] split = tags.split(\",\");\r\n for (int i = 0; i < split.length; i++) {\r\n if (!m_tags.contains(split[i].trim())) {\r\n m_tags.add(split[i].trim());\r\n }\r\n m_tagsMaster.add(split[i].trim());\r\n }\r\n Collections.sort(m_tags);\r\n this.tags.setListData(m_tags);\r\n }", "public List<Feature> process(String tag, String data);", "public static HashMap<String, String> simplifiedTags(List<List<TaggedWord>> taggedList) {\n HashMap<String, String> simplePOSTagged = new HashMap<>();\n for (List<TaggedWord> tags : taggedList) { // iterate over list\n for (TaggedWord taggedWord : tags) {//for each word in the sentence\n String word = taggedWord.toString().replaceFirst(\"/\\\\w+\", \"\");\n if (taggedWord.tag().equals(\"NN\") | taggedWord.tag().equals(\"NNS\") |\n taggedWord.tag().equals(\"NNP\") | taggedWord.tag().equals(\"NNPS\")) {\n simplePOSTagged.put(word, \"noun\");\n } else if (taggedWord.tag().equals(\"MD\") | taggedWord.tag().equals(\"VB\") |\n taggedWord.tag().equals(\"VBD\") | taggedWord.tag().equals(\"VBG\") |\n taggedWord.tag().equals(\"VBN\") | taggedWord.tag().equals(\"VBP\")\n | taggedWord.tag().equals(\"VBZ\")) {\n simplePOSTagged.put(word, \"verb\");\n } else if (taggedWord.tag().equals(\"JJ\") | taggedWord.tag().equals(\"JJR\") |\n taggedWord.tag().equals(\"JJS\")) {\n simplePOSTagged.put(word, \"adj\");\n } else if (taggedWord.tag().equals(\"PRP\") | taggedWord.tag().equals(\"PRP$\")) {\n simplePOSTagged.put(word, \"pron\");\n } else if (taggedWord.tag().equals(\"RB\") | taggedWord.tag().equals(\"RBR\") |\n taggedWord.tag().equals(\"RBS\")) {\n simplePOSTagged.put(word, \"adv\");\n } else if (taggedWord.tag().equals(\"CD\") | taggedWord.tag().equals(\"LS\")) {\n simplePOSTagged.put(word, \"num\");\n } else if (taggedWord.tag().equals(\"WDT\") | taggedWord.tag().equals(\"WP\") |\n taggedWord.tag().equals(\"WP$\") | taggedWord.tag().equals(\"WRB\")) {\n simplePOSTagged.put(word, \"wh\");\n } else if (taggedWord.tag().equals(\"DT\") | taggedWord.tag().equals(\"PDT\")) {\n simplePOSTagged.put(word, \"det\");\n } else if (taggedWord.tag().equals(\"CC\") | taggedWord.tag().equals(\"IN\")) {\n simplePOSTagged.put(word, \"prepconj\");\n } else {\n simplePOSTagged.put(word, \"other\");\n }\n }\n }\n return simplePOSTagged;\n }", "private String doTags(SlingHttpServletRequest request) {\n String[] tags = request.getParameterValues(\"sakai:tags\");\n if (tags != null) {\n StringBuilder sb = new StringBuilder();\n\n for (String t : tags) {\n sb.append(\"@sakai:tags=\\\"\");\n sb.append(t);\n sb.append(\"\\\" and \");\n }\n String tagClause = sb.toString();\n int i = tagClause.lastIndexOf(\" and \");\n if (i > -1) {\n tagClause = tagClause.substring(0, i);\n }\n if (tagClause.length() > 0) {\n tagClause = \" and (\" + tagClause + \")\";\n return tagClause;\n }\n }\n return \"\";\n }", "List<T> findWhitespaceSeparatedTagsAndCreateIfNotExists(String tags);", "void setTag(java.lang.String tag);", "private User parseUser(String parse[])\n {\n String username = null;\n String password = null;\n String name = null;\n Date birth = null;\n String address = null;\n String email = null;\n int balance = 0;\n\n /** Loop through each data and validate tag **/\n for (int i = 0; i < tagUser.length; i++)\n {\n String[] fields = parse[i].split(\" \", 2);\n String tag = fields[0].trim();\n String text = fields[1].trim();\n /** Check username **/\n if (tag.equals(tagUser[0]))\n username = text;\n \n /** Check password **/\n else if (tag.equals(tagUser[1]))\n password = text;\n \n /** Check name **/\n else if (tag.equals(tagUser[2]))\n name = text;\n \n /** Check birth date **/\n else if (tag.equals(tagUser[3]))\n birth = DateUtils.strToDate(text);\n \n /** Check address **/\n else if (tag.equals(tagUser[4]))\n address = text;\n \n /** Check email **/\n else if (tag.equals(tagUser[5]))\n email = text;\n \n /** Check balance account **/\n else if (tag.equals(tagUser[6]))\n balance = Integer.parseInt(text);\n \n /** Not in tag **/\n else\n return null;\n }\n User user = null;\n if(IOUtils.validateUser(username, password, name, birth, address, email))\n user = new User(username, password, name, birth, address, email);\n user.addMoney(balance);\n return user;\n }", "public com.babbler.ws.io.avro.model.BabbleValue.Builder setTags(java.util.List<java.lang.String> value) {\n validate(fields()[4], value);\n this.tags = value;\n fieldSetFlags()[4] = true;\n return this;\n }", "protected void arglist (Tag tag) throws HTMLParseException {\r\n String key = null;\r\n\r\n //System.err.println (\"parsing arglist for tag: '\" + tag + \"'\");\r\n while (true) {\r\n //System.err.println (\"nextToken: \" + nextToken + \" => \" + getTokenString (nextToken));\r\n switch (nextToken) {\r\n case MT:\r\n tagmode = false;\r\n // ok, this is kinda ugly but safer this way\r\n if (tag.getLowerCaseType () != null &&\r\n (tag.getLowerCaseType ().equals (\"script\") ||\r\n tag.getLowerCaseType ().equals (\"style\"))) {\r\n Token text = scanCommentUntilEnd (tag.getLowerCaseType ());\r\n if (text != null) {\r\n setPendingComment (text);\r\n } else {\r\n tagmode = false;\r\n return;\r\n }\r\n } else {\r\n match (MT);\r\n }\r\n return;\r\n case STRING:\r\n key = stringValue;\r\n match (STRING);\r\n String value = value ();\r\n tag.addArg (key, value, false);\r\n break;\r\n case END:\r\n return;\r\n case DQSTRING:\r\n String ttype = tag.getType ();\r\n if (ttype != null && ttype.charAt (0) == '!') {\r\n // Handle <!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\r\n // and similar cases.\r\n tag.addArg (stringValue, null, false);\r\n match (nextToken);\r\n } else {\r\n //System.err.println (\"hmmm, strange arglist..: \" + tag);\r\n // this is probably due to something like:\r\n // ... framespacing=\"0\"\">\r\n // we backstep and change the second '\"' to a blank and restart from that point...\r\n index -= stringValue.length ();\r\n pagepart[index] = (byte)' ';\r\n match (nextToken);\r\n tag.getToken ().setChanged (true);\r\n }\r\n break;\r\n case LT: // I consider this an error (in the html of the page) but handle it anyway.\r\n String type = tag.getLowerCaseType ();\r\n if (type == null || // <<</font.... etc\r\n (type.equals (\"table\") && // <table.. width=100% <tr>\r\n stringValue == null)) {\r\n tagmode = false;\r\n return;\r\n }\r\n // fall through.\r\n default:\r\n // this is probably due to something like:\r\n // <img src=someimagead;ad=40;valu=560>\r\n // we will break at '=' and split the tag to something like:\r\n // <img src=someimagead;ad = 40;valu=560> if we change it.\r\n // the html is already broken so should we fix it? ignore for now..\r\n if (stringValue != null)\r\n tag.addArg (stringValue, null, false);\r\n match (nextToken);\r\n }\r\n }\r\n }", "WithCreate withTags(Object tags);", "Update withTags(List<String> tags);", "public void setTag(List<Tag> tag)\n\t{\n\t\t this.addKeyValue(\"Tag\", tag);\n\n\t}", "public void splitUserInput(String userInput) {\n\t\tuserArgs = userInput.split(\" \");\n\t}", "void updateTags();", "private void processTags() {\r\n tagNames.stream().map(name -> {\r\n tags.get(name).checkMembers();\r\n return name;\r\n }).forEach(name -> {\r\n if (!tags.get(name).hasMembers()) {\r\n menu.remove(tags.get(name).getMenu());\r\n tags.remove(name);\r\n tagNames.remove(name);\r\n } else {\r\n menu.add(tags.get(name).getMenu());\r\n }\r\n });\r\n }", "public void parse(String userInput) {\n\t\tString[] args = toStringArray(userInput, ' ');\n\t\tString key = \"\";\n\t\tArrayList<String> filePaths = new ArrayList<String>();\n\t\tboolean caseSensitive = true;\n\t\tboolean fileName = false;\n\n\t\t// resolves the given args\n\t\tfor (int i = 0; i < args.length; i++) {\n\t\t\tif (args[i].equals(\"-i\")) {\n\t\t\t\tcaseSensitive = false;\n\t\t\t} else if (args[i].equals(\"-l\")) {\n\t\t\t\tfileName = true;\n\t\t\t} else if (args[i].contains(\".\")) {\n\t\t\t\tfilePaths.add(args[i]);\n\t\t\t} else {\n\t\t\t\tkey = args[i];\n\t\t\t}\n\t\t}\n\t\t// in the case of multiple files to parse this repeats until all files\n\t\t// have been searched\n\t\tfor (String path : filePaths) {\n\t\t\tthis.document = readFile(path);\n\t\t\tfindMatches(key, path, caseSensitive, fileName);\n\t\t}\n\t}", "public void setTags(java.util.Map<String, String> tags) {\n this.tags = tags;\n }", "public void setTags(java.util.Map<String, String> tags) {\n this.tags = tags;\n }", "public void setTags(java.util.Map<String, String> tags) {\n this.tags = tags;\n }", "public void setTags(java.util.Map<String, String> tags) {\n this.tags = tags;\n }", "private void parseProduct(User user) throws XMLStreamException, XMLParserException {\n\t\twhile(this.reader.next() == START_ELEMENT){\n\t\t\tuser.setProperty(this.reader.getLocalName(), this.getElementString());\n\t\t}\n\t}", "public interface TagService {\n\n boolean retagIdea(ArrayList<Tag> newTag, Idea idea, User user);\n\n /**\n * Saves the tags provided as a comma separate string.\n * It Parses the tag string and checks for de-dupe and finally save them\n * into data store.\n * \n * @param tags The String object representing the comma separated tag\n * strings.\n * @return list of saved tag objects.\n */\n List<Tag> saveTags(String tags);\n\n /**\n * Retrieves a list of Tags by keys.\n * \n * @param keys the collection of keys of Tag objects.\n * @return Returns the list of Tag objects corresponding to keys.\n */\n List<Tag> getTagsByKeys(Collection<String> keys);\n\n /**\n * Retrieves the tags staring with a specific string.\n * \n * @param startString the start string to be matched with the title of\n * the tags\n * @param retrievalInfo the {@link RetrievalInfo} object containing the\n * request parameters\n * \n * @return list of fetched tags\n */\n List<Tag> getTagsWithSpecificStartString(String startString, RetrievalInfo retrievalInfo);\n\n /**\n * Get the data for auto suggestion of tags.\n * \n * @param startString the start string for which the suggestions are to\n * be fetched.\n * @param retrievalInfo the {@link RetrievalInfo} object containing the\n * request parameters\n * @return the list of fetched tags\n */\n List<Tag> getTagsForAutoSuggestion(String startString, RetrievalInfo retrievalInfo);\n\n /**\n * Get the data for Tag Cloud.The tags returned are sorted alphabetically.\n * \n * @param retrievalInfo the {@link RetrievalInfo} object containing the\n * request parameters\n * @return the list of tags for tag cloud\n */\n List<Tag> getTagsForTagCloud(RetrievalInfo retrievalInfo);\n\n /**\n * Get the tag with title equal to the tagName param.\n * \n * @param tagName the title of the tag to be fetched\n * @return the {@link Tag} object\n */\n Tag getTagByName(String tagName);\n\n /**\n * Get the tags associated with ideas owned by a user.\n * \n * @param user the user whose tags are to be fetched\n * @return list of tags associated with ideas of the user\n */\n List<Tag> getMyTagCloud(User user);\n\n /**\n * Iterates through the list of objects and increment the weight if each Tag\n * {@link Tag} object.\n * \n * @param tags comma separated tags string.\n * @return list of tags for which, weight successfully incremented.\n */\n\n List<Tag> incrementWeights(String tags);\n\n /**\n * Save a tag\n * \n * @param tag the {@link Tag} object to be saved\n * @return the saved {@link Tag} object\n */\n Tag saveTag(Tag tag);\n\n /**\n * Iterates through the list of objects and decrement the weight of each Tag\n * {@link Tag} object.\n * \n * @param tags comma separated tags string.\n * @return list of tags for which, weight successfully decremented.\n */\n\n List<Tag> decrementWeights(String tags);\n\n /**\n * Remove tags with zero weight from the list\n * \n * @param tagList the list of {@link Tag} objects from which to remove\n * objects with zero weight\n * @return the filtered list\n */\n List<Tag> removeTagWithZeroWeight(List<Tag> tagList);\n}", "List<Tag> getMyTagCloud(User user);", "public void setTagValues(java.util.Collection<String> tagValues) {\n if (tagValues == null) {\n this.tagValues = null;\n return;\n }\n com.amazonaws.internal.ListWithAutoConstructFlag<String> tagValuesCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<String>(tagValues.size());\n tagValuesCopy.addAll(tagValues);\n this.tagValues = tagValuesCopy;\n }", "public void setFirstSentenceTags(Tag[] _firstSentenceTags)\n\t{ firstSentenceTags = _firstSentenceTags; }", "public void checkForTag(int i) {\n if (wordsOfInput[i].indexOf('#') == 0) {\n if ((!containsStartDate || !containsStartTime) && index > i) {\n index = i;\n tpsIndex = i;\n }\n String tag = wordsOfInput[i].substring(1);\n tags.add(tag);\n }\n }", "public void init(List<String> text, String tag) {\n if (null == this.text)\n this.text = text;\n else\n tags.getLast().text = text;\n tags.addLast(new Tag(tag));\n }", "public List<String> tag(List<String> text) {\n\n\t\t// Create a data container for a sentence\n\n\t\tString[] s = new String[text.size() + 1];\n\t\ts[0] = \"root\";\n\t\tfor (int j = 0; j < text.size(); j++)\n\t\t\ts[j + 1] = text.get(j);\n\t\ti.init(s);\n\t\t// System.out.println(EuroLangTwokenizer.tokenize(text));\n\n\t\t// lemmatizing\n\n\t\t// System.out.println(\"\\nReading the model of the lemmatizer\");\n\t\t// Tool lemmatizer = new\n\t\t// Lemmatizer(\"resources.spanish/CoNLL2009-ST-Spanish-ALL.anna-3.3.lemmatizer.model\");\n\t\t// // create a lemmatizer\n\n\t\t// System.out.println(\"Applying the lemmatizer\");\n\t\t// lemmatizer.apply(i);\n\n\t\t// System.out.print(i.toString());\n\t\t// System.out.print(\"Lemmata: \"); for (String l : i.plemmas)\n\t\t// System.out.print(l+\" \"); System.out.println();\n\n\t\t// morphologic tagging\n\n\t\t// System.out.println(\"\\nReading the model of the morphologic tagger\");\n\t\t// is2.mtag.Tagger morphTagger = new\n\t\t// is2.mtag.Tagger(\"resources.spanish/CoNLL2009-ST-Spanish-ALL.anna-3.3.morphtagger.model\");\n\n\t\t// System.out.println(\"\\nApplying the morpholoigc tagger\");\n\t\t// morphTagger.apply(i);\n\n\t\t// System.out.print(i.toString());\n\t\t// System.out.print(\"Morph: \"); for (String f : i.pfeats)\n\t\t// System.out.print(f+\" \"); System.out.println();\n\n\t\t// part-of-speech tagging\n\n\t\t// System.out.println(\"\\nReading the model of the part-of-speech tagger\");\n\n//\t\tSystem.out.println(\"Applying the part-of-speech tagger\");\n\t\ttagger.apply(i);\n\t\tList<String> tags = new ArrayList<String>(i.ppos.length - 1);\n\t\tfor (int j = 1; j < i.ppos.length; j++)\n\t\t\ttags.add(i.ppos[j]);\n\t\treturn tags;\n\t\t// System.out.println(\"Part-of-Speech tags: \");\n\t\t// for (String p : i.ppos)\n\t\t// System.out.print(p + \" \");\n\t\t// System.out.println();\n\n\t\t// parsing\n\n\t\t// System.out.println(\"\\nReading the model of the dependency parser\");\n\t\t// Tool parser = new Parser(\"models/prs-spa.model\");\n\n\t\t// System.out.println(\"\\nApplying the parser\");\n\t\t// parser.apply(i);\n\n\t\t// System.out.println(i.toString());\n\n\t\t// write the result to a file\n\n\t\t// CONLLWriter09 writer = new\n\t\t// is2.io.CONLLWriter09(\"example-out.txt\");\n\n\t\t// writer.write(i, CONLLWriter09.NO_ROOT);\n\t\t// writer.finishWriting();\n\n\t}", "protected void addDeviceTags(JSONArray args, final CallbackContext callbackContext) {\n\t\tLog.d(TAG, \"ADDTAGS\");\n\t\tArrayList<String> tagList = new ArrayList<String>();\n\t\ttry {\n\t\t\tJSONArray tags = args.getJSONArray(0);\n\t\t\tif (tags != null) {\n\t\t\t\tfor (int i = 0; i < tags.length(); i++) {\n\t\t\t\t\ttagList.add(tags.getString(i));\n\t\t\t\t}\n\t\t\t}\n\t\t\tNotificare.shared().addDeviceTags(tagList, new NotificareCallback<Boolean>() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onSuccess(Boolean result) {\n\t\t\t\t\tif (callbackContext == null) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tcallbackContext.success();\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onError(NotificareError error) {\n\t\t\t\t\tif (callbackContext == null) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tcallbackContext.error(error.getLocalizedMessage());\n\t\t\t\t}\n\t\t\t});\n\t\t} catch (JSONException e) {\n\t\t\tcallbackContext.error(\"JSON parse error\");\n\t\t}\n\t}", "public void setTags(java.util.Collection<Tag> tags) {\n if (tags == null) {\n this.tags = null;\n return;\n }\n\n this.tags = new java.util.ArrayList<Tag>(tags);\n }", "public void setTags(java.util.Collection<Tag> tags) {\n if (tags == null) {\n this.tags = null;\n return;\n }\n\n this.tags = new java.util.ArrayList<Tag>(tags);\n }", "public static void parseUserCommand (String userCommand) {\n ArrayList<String> commandTokens = new ArrayList<String>(Arrays.asList(userCommand.split(\" \")));\n \n\n /*\n * This switch handles a very small list of hard coded commands of known syntax.\n * You will want to rewrite this method to interpret more complex commands. \n */\n switch (commandTokens.get(0)) {\n \tcase \"show\":\n \t\tdisplay(userCommand);\n \t\tbreak;\n case \"select\":\n parseQueryString(userCommand);\n break;\n case \"drop\":\n System.out.println(\"STUB: Calling your method to drop items\");\n dropTable(userCommand);\n break;\n case \"create\":\n parseCreateString(userCommand);\n break;\n case \"insert\":\n parseInsertString(userCommand);\n break;\n case \"delete\":\n parseDeleteString(userCommand); \n break;\n case \"help\":\n help();\n break;\n case \"version\":\n displayVersion();\n break;\n case \"exit\":\n isExit = true;\n break;\n case \"quit\":\n isExit = true;\n break;\n default:\n System.out.println(\"Unknown command: \\\"\" + userCommand + \"\\\"\");\n break;\n }\n }", "public static ArrayList<String> extractTags(String tags) {\n\n // probably more efficent ways to do this.\n //\n // whitespace = re.compile('\\s')\n\n tags = tags.replaceAll(\"\\\\s\", \"\");\n String tagArray[] = tags.split(\",\");\n\n // let's clean it up, removing the empty string and removing dups\n ArrayList<String> cleaned = new ArrayList<>();\n for (String tag : tagArray) {\n if (!tag.equals(\"\") && !cleaned.contains(tag)) {\n cleaned.add(tag);\n }\n }\n\n return cleaned;\n }", "public void createTags(String[][] tagsData) {\t\t\n\t\tdConsole.getTagsTitle.click();\n\t\t/*String[][] tagsData = getData(\"TestData.xls\", \"TagsSheet\");*/\n\t\tfor (int i = 0; i < tagsData.length; i++) {\t\t\t\n\t\t\tfor (int j = 0; j <=1; j++) {\t\t\t\t\n\t\t\t\tif(j==0) {\n\t\t\t\t\tdConsole.getTagKeyCheckBox(Integer.toString(i+1)).sendKeys(tagsData[i][j]);\n\t\t\t\t\tdConsole.getValueLabel.click();\n\t\t\t\t} else if (j==1) {\n\t\t\t\t\tdConsole.getTagValueCheckBox(Integer.toString(i+1)).sendKeys(tagsData[i][j]);\n\t\t\t\t\tdConsole.getValueLabel.click();\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(i<tagsData.length-1) {\n\t\t\t\tdConsole.getAddNewLink.click();\n\t\t\t}\n\t\t}\t\t\n\t}", "public static String[] parseTagArray(String tagsInfo) {\n String[] tags = new String[]{};\n if (!StringUtils.isEmpty(tagsInfo)) {\n tags = ArrayUtils.normalize(tagsInfo.split(\",\"));\n }\n return tags;\n }", "public static boolean tag(String taggerString, String taggedString, String gamecode){\n \tboolean failed = !Server.checkGameExisits(gamecode);\n \tUser tagger = Server.getUser(taggerString, gamecode);\n \tUser tagged = Server.getUser(taggedString, gamecode);\n \tPlayer human = null;\n \tPlayer zombie= null;\n \tif (tagger == null || tagged == null){\n \t\tfailed = true;\n \t}\n \tif (!failed && (tagger.isAdmin || tagged.isAdmin)){\n \t\tfailed = true;\n \t}\n \tif (!failed){\n \t\tif (((Player) tagger).isZombie){\n \t\t\tzombie = (Player) tagger;\n \t\t}\n \t\telse{\n \t\t\thuman = (Player) tagger;\n \t\t}\n \t\t\n \t\tif (((Player) tagged).isZombie) {\n \t\t\tzombie = (Player) tagged;\n \t\t}\n \t\telse{\n \t\t\thuman = (Player) tagged;\n \t\t}\n \t}\n \tif (human == null || zombie == null){\n \t\tfailed = true;\n \t}\n \t\n \tif (!failed){\n \t\ttry {\n\t\t\t\tif (DBHandler.getcooldown(taggerString, gamecode, c) < 0){\n\t\t\t\t\tfailed = true;\n\t\t\t\t}\n\t\t\t\tif (DBHandler.getcooldown(taggedString, gamecode, c) < 0){\n\t\t\t\t\tfailed = true;\n\t\t\t\t}\n\t\t\t} catch (SQLException e) {\n\t\t\t\tfailed = true;\n\t\t\t}\n \t}\n \t\n \t//human stuns zombie\n \tif (!failed && human == (Player) tagger){\n \t\ttry {\n\t\t\t\tDBHandler.tag(taggerString, taggedString, gamecode, 0, c);\n\t\t\t\tDBHandler.setcooldown(taggedString, gamecode, c);\n\t\t\t} catch (SQLException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n \t}\n \t//zombie tags player\n \telse if (!failed){\n \t\ttry {\n \t\t\tDBHandler.makeZombie(human.feedcode, gamecode, c);\n\t\t\t\tDBHandler.tag(taggerString, taggedString, gamecode, 1, c);\n\t\t\t\tDBHandler.setcooldown(taggedString, gamecode, c);\n\t\t\t} catch (SQLException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n \t}\n \t\n \treturn !failed;\n }", "protected void setupTags() {\r\n\t\t// Dataset information: one per file\r\n\t\tmetaTags.put(\"^dataset\", \"id\");\r\n\t\tmetaTags.put(\"!dataset_title\", \"title\");\r\n\t\tmetaTags.put(\"!dataset_update_date\", \"date\");\r\n\t\tmetaTags.put(\"!dataset_pubmed_id\", \"pmid\");\r\n\t\tmetaTags.put(\"!dataset_description\", \"description\");\r\n\t\tmetaTags.put(\"!dataset_sample_count\", \"sampleCount\");\r\n\r\n\t\t// Platform information: possibly multiple per file\r\n\t\tmetaTags.put(\"!dataset_platform_organism\", \"organisms\");\r\n\t\tmetaTags.put(\"!dataset_sample_organism\", \"organisms\");\r\n\t\tmetaTags.put(\"!dataset_platform\", \"platformIDs\");\t\t\t\r\n\t\tmetaTags.put(\"!dataset_platform_technology_type\", \"platformTitles\");\r\n\t\tmetaTags.put(\"!dataset_feature_count\", \"rowCounts\");\r\n\r\n\t\t// Sample information: possibly multiple per file\r\n\t\tmetaTags.put(\"!subset_sample_id\", \"sampleIDs\");\r\n\t\tmetaTags.put(\"!subset_description\", \"sampleTitles\");\t\t \r\n\t\tmetaTags.put(\"!dataset_channel_count\", \"channelCounts\");\r\n\t\tmetaTags.put(\"!dataset_value_type\", \"valueTypes\");\r\n\r\n\t\tif (! checkTags()) {\r\n\t\t\tthrow new RuntimeException(\"Tags not initialized properly\");\r\n\t\t}\r\n\t}", "private void addToListResponseOnWordPattern(String userMessage) {\n List<String> splitWords = splitAndCleanMessage(userMessage);\n List<String> pronounsAll = findPronouns(splitWords);\n if (pronounsAll.contains(splitWords.get(0))) {\n String localUserMessage = userMessage.replaceAll(\"I am\",\"you are\").replaceAll(\"I\",\"you\");\n responsesList.add(new Response(getRandomElementFromList(additionalDB.get(\"answersToVerbs\")), localUserMessage));\n }\n pronounsAll.forEach(reserveThemeResponse::remove);\n }", "public void setTags(java.util.Collection<Tag> tags) {\n if (tags == null) {\n this.tags = null;\n return;\n }\n\n this.tags = new com.amazonaws.internal.SdkInternalList<Tag>(tags);\n }", "public void setTags(java.util.Collection<Tag> tags) {\n if (tags == null) {\n this.tags = null;\n return;\n }\n\n this.tags = new com.amazonaws.internal.SdkInternalList<Tag>(tags);\n }", "public void setTags(java.util.Collection<Tag> tags) {\n if (tags == null) {\n this.tags = null;\n return;\n }\n\n this.tags = new com.amazonaws.internal.SdkInternalList<Tag>(tags);\n }", "public void setTags(java.util.Collection<Tag> tags) {\n if (tags == null) {\n this.tags = null;\n return;\n }\n\n this.tags = new com.amazonaws.internal.SdkInternalList<Tag>(tags);\n }", "public void setTags(java.util.Collection<Tag> tags) {\n if (tags == null) {\n this.tags = null;\n return;\n }\n\n this.tags = new com.amazonaws.internal.SdkInternalList<Tag>(tags);\n }", "private String tagText(String s)throws IOException{\n//\tMaxentTagger tagger = new MaxentTagger(\"english-left3words-distsim.tagger\");\n\tString s1=null;\n\tSystem.out.println(\"here starts the process\");\n\ts1 = tagger.tagString(s);\n\treturn s1;\n}", "public static List<List<TaggedWord>> getTaggedWordListString(String str) {\n\t\treturn getTaggedWordListReader(new StringReader(str));\n\t}", "public void setTagSet(Tag [] TagSet) {\n this.TagSet = TagSet;\n }", "List<UserContributedTags> selectUserTags(String userName, String tagText,\n\t\t\tint status, int offset, int rows, String sort)\n\t\t\tthrows DataAccessException, UnsupportedEncodingException;", "public static void setTag(String string) {\n\t\ttags.put(last[0], string);\n\t}", "public MyTuple<String, HashMap<String,String>> generateTags(String text){\n\t\t\n\t\tHashMap<String, String> wordsTags = new HashMap<String, String>();\n\t\tArrayList<String> filteredWords = new ArrayList<String>();\n\t\t\n\t\tStringReader sr = new StringReader(text);\n\t\tTokenStream ts = this.tokenStream(\"\", sr);\n\t\tCharTermAttribute term = ts.addAttribute(CharTermAttribute.class);\n\t\tStringBuilder sb = new StringBuilder();\n\t\t\n\t\ttry{\n\t\t\tts.reset();\n\t\t\t while (ts.incrementToken()) {\n\t\t\t\t String toAdd = term.toString().replaceAll(\"[^A-za-z-']\", \"\");\n\t\t\t\t if(toAdd != \"\"){//if the word to add is valid, add it to list of filtered words and append it to the string builder\n\t\t\t\t\t filteredWords.add(toAdd);\n\t\t\t\t\t sb.append(toAdd + \" \");\n\t\t\t\t }\n\t\t }\n\t\t ts.end();\n\t\t} catch(IOException e){\n\t\t\te.printStackTrace();\n\t\t} finally{\n\t\t\ttry {\n\t\t\t\tts.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\n\t\tString [] words = filteredWords.toArray(new String [filteredWords.size()]);\n\t\tString [] tags = tagger.tag(words);\n\t\t//populate the tagMap with the tags of the filtered words. \n\t\tfor(int i = 0; i< tags.length; i++){\n\t\t\twordsTags.put(words[i], tags[i]);\n\t\t}\n\t\t\n\t\tMyTuple<String, HashMap<String, String>> retVal = new MyTuple<>(sb.toString(), wordsTags);\n\t\t\n\t\treturn retVal;\n\t}", "public AndroidModel tags(List<String> tags) {\n this.tags = tags;\n return this;\n }", "public void tagSelectedEntities(String tags) {\n RTGraphComponent.RenderContext myrc = (RTGraphComponent.RenderContext) (getRTComponent().rc); if (myrc == null) return;\n if (tags != null && tags.equals(\"\") == false) {\n getRTParent().setSelectedEntities(myrc.filterEntities(getRTParent().getSelectedEntities()));\n getRTParent().tagSelectedEntities(tags, myrc.bs.ts0(), myrc.bs.ts1());\n }\n }", "public void setTag(String tag);", "public static void parseUserCommand(String userCommand) throws FileNotFoundException {\n ArrayList<String> commandTokens = new ArrayList<String>(Arrays.asList(userCommand.split(\" \")));\n\n\n\t\t/*\n\t\t* This switch handles a very small list of hardcoded commands of known syntax.\n\t\t* You will want to rewrite this method to interpret more complex commands.\n\t\t*/\n switch (commandTokens.get(0)) {\n case \"select\":\n parseQueryString(userCommand);\n break;\n case \"drop\":\n System.out.println(\"STUB: Calling your method to drop items\");\n dropTable(userCommand);\n break;\n case \"create\":\n parseCreateString(userCommand, false);\n break;\n case \"insert\":\n parseInsertString(userCommand);\n break;\n case \"help\":\n help();\n break;\n case \"version\":\n displayVersion();\n break;\n case \"exit\":\n isExit = true;\n break;\n case \"quit\":\n isExit = true;\n default:\n System.out.println(\"I didn't understand the command: \\\"\" + userCommand + \"\\\"\");\n break;\n }\n }", "protected void tag (int ltagStart) throws HTMLParseException {\r\n Tag tag = new Tag ();\r\n Token token = new Token (tag, false);\r\n switch (nextToken) {\r\n case STRING:\r\n tag.setType (stringValue);\r\n match (STRING);\r\n arglist (tag);\r\n if (tagmode) {\r\n block.setRest (lastTagStart);\r\n } else {\r\n token.setStartIndex (ltagStart);\r\n //block.addToken (token);\r\n // 2009.05.28 by in-koo cho\r\n addTokenCheck(token);\r\n }\r\n break;\r\n case MT:\r\n tagmode = false;\r\n match (MT);\r\n break;\r\n case END:\r\n block.setRest (lastTagStart);\r\n tagmode = false;\r\n return;\r\n default:\r\n arglist (tag);\r\n }\r\n }", "private void applySpinner(final String[] taglist, Spinner sp_name, String tag_string) {\n AddContactActivity.spinnerAdapter adapterRepeateDaily = new AddContactActivity.spinnerAdapter(getActivity(), android.R.layout.simple_list_item_1);\r\n adapterRepeateDaily.add(tag_string);\r\n adapterRepeateDaily.addAll(taglist);\r\n adapterRepeateDaily.add(tag_string);\r\n sp_name.setAdapter(adapterRepeateDaily);\r\n sp_name.setSelection(adapterRepeateDaily.getCount());\r\n sp_name.setEnabled(true);\r\n }", "private HashMap<String, StringBuilder> parseTags(String str) {\n\n\t\tHashMap<String, StringBuilder> fieldMap = new HashMap<String, StringBuilder>();\n\n\t\tfor (int i = 0; i < fieldNames.length; i++) {\n\n\t\t\tfieldMap.put(fieldNames[i], new StringBuilder(\"\"));\n\n\t\t}\n\n\t\tString[][] content = new String[fieldNames.length][];\n\n\t\tfor (int i = 0; i < fieldNames.length; i++) {\n\n\t\t\tcontent[i] = StringUtils.substringsBetween(str, \"<\" + fieldNames[i]\n\t\t\t\t\t+ \">\", \"</\" + fieldNames[i] + \">\");\n\t\t}\n\n\t\tfor (int i = 0; i < content.length; i++) {\n\n\t\t\tStringBuilder temp = new StringBuilder(\" \");\n\t\t\tif (content[i] != null) {\n\n\t\t\t\tfor (int j = 0; j < content[i].length; j++) {\n\n\t\t\t\t\ttemp.append(content[i][j]);\n\n\t\t\t\t\tif (content[i].length - 1 > j)\n\t\t\t\t\t\ttemp.append(\" \");\n\t\t\t\t}\n\n\t\t\t\tfieldMap.put(fieldNames[i], temp);\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn fieldMap;\n\t}", "private void makeTag(String query, String tag) {\n\t\t\n\t\tString Originalquery = savedSearches.getString(tag, null);\n\t\t\n\t\t// Getting Sharedprefernces.editor to store new tag/query pair\n\t\tSharedPreferences.Editor preferncesEditor = savedSearches.edit();\n\t\tpreferncesEditor.putString(tag, query);\n\t\tpreferncesEditor.apply(); // Stores the updated prefernces\n\t\t\n\t\tif (Originalquery==null) {\n\t\t\trefreshButtons(tag); // Adds new button for this tag\n\t\t}\n\t\t\n\t\t\n\t}", "public final void setAlgoTags(Set<BrokerAlgoTag> inAlgoTags)\n {\n algoTags = inAlgoTags;\n }", "public void setTags(List<Tag> tags) {\n this.tags.clear();\n if (tags != null) {\n this.tags.addAll(tags);\n }\n }", "Set<String> tags();", "public void setTag(String tagName, Object value);", "@Override\n\tpublic void onSetTags(Context context, int errorCode,\n\t\t\tList<String> sucessTags, List<String> failTags, String requestId) {\n\t\t\n\t}", "int getTotalTags(String userName);", "public void addTags(Tag[] newTags){\r\n\t\tString tagName;\r\n\t\tfor (int i = 0; i < newTags.length; i++){\r\n\t\t\ttagName = newTags[i].getName();\r\n\t\t\tif (!tags.containsKey(tagName)){ //checks if photo is already tagged with the tag\r\n\t\t\t\ttags.put(tagName, newTags[i]);\r\n\t\t\t\taddObserver(newTags[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tsetName();\r\n\t}", "private void tagDataType()\n {\n List<DataTypeInfo> dtList = myDataTypesSupplier.get();\n if (!dtList.isEmpty())\n {\n List<DataTypeInfoDisplayNameProxy> pxyList = DataTypeInfoDisplayNameProxy.toProxyList(dtList, null);\n Object selected = JOptionPane.showInputDialog(myToolbox.getUIRegistry().getMainFrameProvider().get(),\n CHOOSE_DATA_TYPE, CHOOSE_DATA_TYPE, JOptionPane.QUESTION_MESSAGE, null, pxyList.toArray(), pxyList.get(0));\n\n if (selected != null)\n {\n DataTypeInfoDisplayNameProxy proxy = (DataTypeInfoDisplayNameProxy)selected;\n StringBuilder sb = new StringBuilder(128);\n sb.append(\"Data Type: \").append(proxy.getItem().getDisplayName()).append(\"\\n\" + \"Current Tags Are:\\n \")\n .append(proxy.getItem().getTags().toString())\n .append(\"\\n\\n\" + \"Add a tag by typing in a NEW string that is not in the list.\\n\"\n + \"Remove a tag by typing in an EXISTING tag name.\");\n String result = JOptionPane.showInputDialog(myToolbox.getUIRegistry().getMainFrameProvider(), sb.toString());\n if (result != null)\n {\n if (proxy.getItem().hasTag(result))\n {\n proxy.getItem().removeTag(result, this);\n }\n else\n {\n proxy.getItem().addTag(result, this);\n }\n }\n }\n }\n }", "public void parseUserQuery(String userQuery) {\n\t\tuserQuery = userQuery.toUpperCase();\n\t\tString[] selectStage;\n\t\tselectStage = userQuery.split(\"SELECT\\\\s*|\\\\s*FROM\\\\s*\");\n\t\tcolumnNames = new ArrayList<String>(Arrays.asList(selectStage[1].split(\",\\\\s*\")));\n\t\tString[] fromStage = selectStage[2].split(\"\\\\s*WHERE\\\\s*\");\n\t\tfromStage[0] = fromStage[0].replaceAll(\";\", \"\");\n\t\ttableNames = new ArrayList<String>(Arrays.asList(fromStage[0].split(\",\\\\s\")));\n\t\tif (fromStage.length > 1) {\n\t\t\tfromStage[1] = fromStage[1].replaceAll(\";\", \"\");\n\t\t\tList<String> conditions = new ArrayList<String>(Arrays.asList(fromStage[1].split(\"\\\\sAND\\\\s\")));\n\t\t\tseparateConditions(conditions);\n\t\t}\n\t}", "public static Set<ReadingTipTag> prepareTags(ReadingTipTagRepository readingTipTagRepository, String[] tagNames) {\n Set<ReadingTipTag> tags = new HashSet<>();\n if (readingTipTagRepository == null) {\n return tags;\n }\n \n for (String rawTagName: tagNames) {\n String tagName = truncateString(rawTagName.trim(), MAXIMUM_TAG_LENGTH);\n if (!tagName.isEmpty()) {\n ReadingTipTag tag = readingTipTagRepository.findByName(tagName);\n if (tag == null) {\n tag = new ReadingTipTag(tagName);\n readingTipTagRepository.save(tag);\n }\n tags.add(tag);\n }\n }\n return tags;\n }", "Update withTags(Object tags);", "@Override\n\tpublic List<String> getAllTagName(String strQuery, String userAndTopicId)\n\t\t\tthrows Exception {\n\t\treturn null;\n\t}" ]
[ "0.5789505", "0.55778664", "0.5562045", "0.5480797", "0.5428707", "0.54199576", "0.5413593", "0.53776836", "0.5358706", "0.5356125", "0.52964133", "0.52325636", "0.5225812", "0.52230376", "0.51949334", "0.51912254", "0.5184465", "0.518152", "0.51729256", "0.5144928", "0.5122788", "0.51222897", "0.5071384", "0.50574607", "0.50542766", "0.501186", "0.4993637", "0.4963814", "0.49458298", "0.49196684", "0.4917636", "0.49146032", "0.48950195", "0.4871839", "0.48712736", "0.48556787", "0.4814993", "0.47864836", "0.4759316", "0.47527692", "0.47471923", "0.47466058", "0.47386467", "0.47362974", "0.4733012", "0.47305262", "0.47125396", "0.47072437", "0.47072437", "0.47072437", "0.47072437", "0.47038504", "0.46897656", "0.4682344", "0.46725592", "0.46664578", "0.46539706", "0.46492317", "0.46486056", "0.46484116", "0.46417373", "0.46417373", "0.46272597", "0.46171463", "0.46135688", "0.46022812", "0.4596603", "0.4587004", "0.45869887", "0.45781553", "0.45781553", "0.45781553", "0.45781553", "0.45781553", "0.4568016", "0.4560118", "0.4555444", "0.45497796", "0.45467237", "0.454327", "0.45416325", "0.45373252", "0.45232853", "0.4506621", "0.4499758", "0.44981253", "0.44908705", "0.44845638", "0.44657245", "0.4464563", "0.44564506", "0.44554487", "0.4443931", "0.4438688", "0.44365317", "0.44349214", "0.44328249", "0.44204843", "0.4417861", "0.4411499" ]
0.80175996
0
Get the query string for querying preferred MGI markers
public String getQuery() { /** * gets mouse marker information from MGD * includes interim and official nomenclature only */ String stmt = "select a.accID, m.symbol, m.name, m.chromosome, " + "t.name as type, a._Object_key " + "from ACC_Accession a, MRK_Marker m, MRK_Types t " + "where m._Organism_key = 1 " + "and m._Marker_Status_key = 1 " + "and m._Marker_key = a._Object_key " + "and a._MGIType_key = 2 " + "and a._LogicalDB_key = 1 " + "and a.prefixPart = 'MGI:' " + "and a.preferred = 1 " + "and m._Marker_Type_key = t._Marker_Type_key"; return stmt; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getQueryString ();", "java.lang.String getQuery();", "java.lang.String getQuery();", "String getQuery();", "public String getQueryString() {\n // We use the encoding which should be used according to the HTTP spec, which is UTF-8\n return getQueryString(EncoderCache.URL_ARGUMENT_ENCODING);\n }", "public String getQueryString() {\n // We use the encoding which should be used according to the HTTP spec, which is UTF-8\n return getQueryString(EncoderCache.URL_ARGUMENT_ENCODING);\n }", "private String getQueryHint() {\n return ApiProperties.getProperty(\n \"api.bigr.library.\" + ApiFunctions.shortClassName(getClass().getName()) + \".hint\");\n }", "public String getQuery()\n\t{\n\t\tVRL loc=getLocation();\n\t\t\n\t\tif (loc==null)\n\t\t\treturn null;\n\t\t\n\t\treturn loc.getQuery();\n\t}", "pb4server.QueryInfoByWorldAskReq getQueryInfoByWorldAskReq();", "private String getQueryStringFromParser() {\n return (getString() == null) ? \"\" : getString();\n }", "private String getRequestUrl(String query) {\n\n StringBuilder builder = new StringBuilder();\n float lat, lng;\n\n // check for location, if not found, check for locally saved location\n if (location != null) {\n lat = location.lat;\n lng = location.lng;\n } else {\n lat = SharedPrefs.get(C.sp_last_lat);\n lng = SharedPrefs.get(C.sp_last_long);\n }\n String locationStr;\n // if even that is not found, search near Bangalore\n if (lat == -1 || lng == -1) {\n locationStr = \"near=Bengaluru\";\n } else {\n locationStr = \"ll=\" + lat + \",\" + lng;\n }\n\n builder.append(C.API_SEARCH)\n .append(\"client_id=\").append(C.FS_CLIENT_ID).append(\"&\")\n .append(\"client_secret=\").append(C.FS_CLIENT_SECRET).append(\"&\")\n .append(\"v=20191231&\")\n .append(\"limit=20&\")\n .append(\"intent=checkin&\")\n .append(locationStr);\n\n if (query != null) {\n builder.append(\"&query=\").append(query);\n }\n\n return builder.toString();\n\n }", "public java.lang.String getQueryString() {\n return bugQuery.getQueryString();\n }", "public String getQueryString() {\n\t\tif (query.isEmpty())\n\t\t\treturn null;\n\n\t\tif (queryString == null)\n\t\t\tqueryString = mapToString(query, \"&\");\n\n\t\treturn queryString;\n\t}", "@SuppressWarnings(\"boxing\")\n @Override\n protected String getCustomQueryStringVariables() {\n String unitsParam = \"\";\n if (radiusUnitOverride != null) {\n unitsParam = String.format(\"&spatialUnits=%s\", SharpEnum.value(radiusUnitOverride));\n }\n return String.format(Constants.getDefaultLocale(), \"queryShape=%s&spatialRelation=%s&spatialField=%s&distErrPrc=%.5f%s\", UrlUtils.escapeDataString(queryShape), SharpEnum.value(spatialRelation), spatialFieldName,\n distanceErrorPercentage, unitsParam);\n }", "public String generateQueryParams() {\n if (petition.getParamsMap().entrySet().size() == 0)\n return \"\";\n else {\n boolean first = true;\n StringBuffer queryParams = new StringBuffer(\"?\");\n Iterator<Map.Entry<String, String>> it = petition.getParamsMap()\n .entrySet().iterator();\n // just iterate the map and fill the httpParams with its content\n while (it.hasNext()) {\n if (!first)\n queryParams.append(\"&\");\n else\n first = false;\n Map.Entry<String, String> e = (Entry<String, String>) it.next();\n String key = URLEncoder.encode(e.getKey());\n String value = URLEncoder.encode(e.getValue());\n queryParams.append(String.format(\"%s=%s\", key, value));\n\n }\n return queryParams.toString();\n }\n }", "@Override\n\t\tpublic String getQueryString() {\n\t\t\treturn null;\n\t\t}", "@Override\n public String getQueryString() {\n return queryString;\n }", "String query();", "private static String getQuery() {\n String scope = \"\";\n generateState();\n\n for (String s : SCOPES) {\n scope += \"+\" + s;\n }\n\n return \"?response_type=code&redirect_uri=\" + REDIRECT_URL +\n \"&client_id=\" + CLIENT_KEY +\n \"&scope=\" + scope +\n \"&STATE=\" + STATE;\n }", "public String g() {\n StringBuffer stringBuffer = new StringBuffer();\n stringBuffer.append(\"output=json\");\n stringBuffer.append(\"&page=\");\n stringBuffer.append(((DistrictSearchQuery) this.f6441a).getPageNum());\n stringBuffer.append(\"&offset=\");\n stringBuffer.append(((DistrictSearchQuery) this.f6441a).getPageSize());\n stringBuffer.append(\"&showChild=\");\n stringBuffer.append(((DistrictSearchQuery) this.f6441a).isShowChild());\n if (((DistrictSearchQuery) this.f6441a).isShowBoundary()) {\n stringBuffer.append(\"&extensions=all\");\n } else {\n stringBuffer.append(\"&extensions=base\");\n }\n if (((DistrictSearchQuery) this.f6441a).checkKeyWords()) {\n String c2 = c(((DistrictSearchQuery) this.f6441a).getKeywords());\n stringBuffer.append(\"&keywords=\");\n stringBuffer.append(c2);\n }\n stringBuffer.append(\"&key=\" + bf.f(this.f6444d));\n return stringBuffer.toString();\n }", "java.lang.String getQueryName();", "public String createQueryString() {\r\n\t\tStringBuffer sb = new StringBuffer();\r\n\r\n\t\tSet<Map.Entry<String, Object>> set = queryParams.entrySet();\r\n\t\tEnumeration<Map.Entry<String, Object>> en = Collections.enumeration(set);\r\n\t\ttry\r\n\t\t{\r\n\t\t\twhile (en.hasMoreElements())\r\n\t\t\t{\r\n\t\t\t\tMap.Entry<String, Object> entry = en.nextElement();\r\n\t\t\t\tString key = entry.getKey();\r\n\t\t\t\tObject val = entry.getValue();\r\n\t\t\t\tif (val instanceof String)\r\n\t\t\t\t{\r\n\t\t\t\t\tString s = null;\r\n\t\t\t\t\ts = (String) val;\r\n\t\t\t\t\ts = URLEncoder.encode(s, \"US-ASCII\");\r\n\t\t\t\t\tsb.append(\"&\").append(key).append(\"=\").append(s);\r\n\t\t\t\t}\r\n\t\t\t\telse if (val instanceof String[])\r\n\t\t\t\t\tsb.append(\"&\").append(getNameValueString(key, (String[]) val));\r\n\t\t\t}\r\n\t\t} catch (UnsupportedEncodingException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tthrow new RuntimeException(e);\r\n\t\t}\r\n\r\n\t\treturn sb.substring(1);\r\n\t}", "public String getQueryRequest()\n {\n return m_queryRequest;\n }", "String getPublicationsCentralGraphQuery();", "private String getGeoAdminRequest(String searchName){\n return (GeoAdminApi.URL_MAP_SERVER.value +\n GeoAdminApi.FIND_REQUEST.value +\n GeoAdminApi.LAYER_NAMES.value +\n GeoAdminApi.AND.value +\n GeoAdminApi.SEARCH_TEXT.value +\n searchName +\n GeoAdminApi.AND.value +\n GeoAdminApi.SEARCH_FIELD.value);\n }", "public String queryString(int what) {\n return argonEGL.eglQueryString(argonGLDisplay, what);\n }", "public String customQueryString() {\n return this.customQueryString;\n }", "String getQueryRequestUrl();", "@Override\n public String toString() {\n if (this.map.getMap().isEmpty()) return \"\";\n final StringBuilder param = new StringBuilder(this.map.getMap().size() * 40);\n for (final Map.Entry<String, String> entry: entrySet()) {\n param.append(MultiProtocolURL.escape(entry.getKey()))\n .append('=')\n .append(MultiProtocolURL.escape(entry.getValue()))\n .append('&');\n }\n param.setLength(param.length() - 1);\n return param.toString();\n }", "public String getQuery() {\r\n\t\treturn query;\r\n\t}", "public String getQueryString() {\n return _query;\n }", "public Map<String, String> getQueryParams(QueryInfo queryInfo) {\n Map<String, String> queryParams = super.getQueryParams(queryInfo);\n String str = queryParams.get(\"query\");\n if (!TextUtils.isEmpty(str)) {\n String queryExtras = SearchConfig.get().getSuggestionConfig().getQueryExtras(str);\n if (!TextUtils.isEmpty(queryExtras)) {\n queryParams.put(\"extraInfo\", queryExtras);\n Log.d(\"SearchSource\", \"On append extra [%s] to query [%s]\", queryExtras, str);\n }\n }\n queryParams.remove(\"enableShortcut\");\n return queryParams;\n }", "public java.lang.String getQuery() {\r\n return query;\r\n }", "public String getQuery() {\r\n return query;\r\n }", "protected String getCurrentLocaleQueryParam() {\n return LocaleInfo.getCurrentLocale().getLocaleQueryParam();\n }", "public Map<String, String> getInitialQuery() {\n return mInitialQuery;\n }", "public String queryLocationInfo(String[] query) {\n LocationInterface location = queryLocation(query);\n if (location == null) {\n return \"Destination not found!\";\n }\n return location.toString();\n }", "public String getQuery() {\n return query;\n }", "protected String getSearchHint() {\n if (!isMessageListReady()) {\n return \"\";\n }\n Account account = getMessageListFragment().getAccount();\n Mailbox mailbox = getSearchableMailbox();\n\n if (mailbox == null) {\n return \"\";\n }\n\n if (shouldDoGlobalSearch(account, mailbox)) {\n return mActivity.getString(R.string.search_hint);\n }\n\n // Regular mailbox, or IMAP - search within that mailbox.\n String mailboxName = FolderProperties.getInstance(mActivity).getDisplayName(mailbox);\n return String.format(\n mActivity.getString(R.string.search_mailbox_hint),\n mailboxName);\n }", "protected abstract String createSnpSearchQueryStr(HashMap<String,String> paramMap);", "public String getQueryString() {\n return queryString;\n }", "@NonNull\n public String getQueryParameters() throws UnsupportedEncodingException {\n return getPostDataString(Collections.singletonList(\"alt\"), Collections.singletonList(\"media\"), true);\n }", "protected String getQueryIdentifier() {\n \t\treturn null;\n \t}", "public String getQueryString() {\n\t\treturn queryString;\n\t}", "public static String getQueryString(String key) {\n String value = Http.Context.current().request().getQueryString(key);\n if (value != null) {\n value = value.trim();\n }\n return value;\n }", "public java.lang.String getQuery() {\n java.lang.Object ref = query_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref).toStringUtf8();\n query_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getQuery() {\n return query;\n }", "public String getQuery() {\n return query;\n }", "public String getQuery() {\n return query;\n }", "public String getSearchHint();", "@NonNull\n public String getQuery() {\n return searchView.getQuery().toString();\n }", "public java.lang.CharSequence getQuery() {\n return query;\n }", "public java.lang.CharSequence getQuery() {\n return query;\n }", "public java.lang.String getQuery() {\n java.lang.Object ref = query_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n query_ = s;\n }\n return s;\n }\n }", "public Map<String, String> getQuery() {\n\t\treturn Collections.unmodifiableMap(query);\n\t}", "String getQuery() throws RemoteException;", "public String getQueryString() {\n return m_queryString;\n }", "java.lang.String getQueryId();", "String getUserGuideLocation() throws SearchServiceException;", "protected String getLocaleQueryParam() {\n return LocaleInfo.getLocaleQueryParam();\n }", "protected String getQuery(String query) {\r\n\t\treturn query;\r\n\t}", "public String getQueryString(){\n return this.queryString;\n }", "public String getQueryParamsAsString() {\n\t\tStringBuffer params = new StringBuffer(30);\n\t\tString key, value;\n\t\tfor (Iterator it = validQueryParams.keySet().iterator(); it.hasNext();) {\n\t\t\tkey = (String) it.next();\n\t\t\tvalue = (String) validQueryParams.get(key);\n\t\t\tparams.append(key).append(\"=\").append(value);\n//\t\t\tif (it.hasNext()) {\n\t\t\t\tparams.append(\"&\");\n//\t\t\t}\n\t\t}\n\t\t// add extral value(used in web page)\n\t\tparams.append(\"hasQueried=true\");\n\t\treturn params.toString();\n\t}", "String getQuery(HashMap<String, String> params) throws UnsupportedEncodingException {\n StringBuilder query=new StringBuilder();\n boolean first = true;\n for (Map.Entry<String, String> entry : params.entrySet()) {\n if (first)\n first=false;\n else\n query.append('&');\n\n String key=entry.getKey();\n Log.d(\"NetworkCall\",key);\n query.append(URLEncoder.encode(key, \"UTF-8\"));\n query.append(\"=\");\n query.append(URLEncoder.encode(entry.getValue(), \"UTF-8\"));\n }\n return query.toString();\n }", "public String getQuery() {\n return _query;\n }", "public java.lang.String getQuery()\n {\n return this.query;\n }", "public final String getQuery() {\n return this.query;\n }", "public String getWhereString()\n {\n String outString = \n \"WHERE lid = '\" + lid + \"'\" \n + \" AND agency_code = '\" + agency_code + \"'\" \n + \" AND office = '\" + office + \"'\" \n ;\n return outString;\n }", "public String getUnspecified(final String query) {\n try {\n String url = getApiUrl(\"\");\n return url + URLEncoder.encode(query, \"utf-8\") + \"&Key=\" + ACCESS_KEY;\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n return null;\n }\n }", "CampusSearchQuery generateQuery();", "public String getQuery() {\n return this.query;\n }", "com.cmpe275.grpcComm.QueryParams getQueryParams();", "pb4server.QueryInfoByWorldAskReqOrBuilder getQueryInfoByWorldAskReqOrBuilder();", "public String getQuery(){\n return this.query;\n }", "public String query() {\n return this.query;\n }", "public static Map<String, String> getQueryMap(String query) { \n Map<String, String> qmap = new HashMap<String, String>(); \n if (StringUtils.isEmpty(query)) {\n return qmap;\n }\n String[] params = query.split(\"&\"); \n for (String param : params) {\n String[] pair = param.split(\"=\");\n String name = pair[0];\n String value = \"\";\n if (pair.length > 1) {\n value = StringUtil.urlDecode(pair[1]);\n }\n qmap.put(name, value); \n } \n return qmap; \n }", "String getQueryConstant()\n\t{\n\t\treturn QUERY_CONST[value];\n\t}", "String getQueryResultsUrl();", "public String toQueryUrl() {\n StringBuilder urlBuilder = new StringBuilder();\n Set<Map.Entry<String, Object>> entrySet = params.entrySet();\n int i = entrySet.size();\n for (Map.Entry<String, Object> entry : entrySet) {\n try {\n if (null != entry.getValue()) {\n urlBuilder.append(entry.getKey()).append('=')\n .append(URLEncoder.encode(String.valueOf(entry.getValue()), DEFAULT_ENC));\n if (i > 1) {\n urlBuilder.append('&');\n }\n }\n i--;\n } catch (UnsupportedEncodingException e) {\n throw new RuntimeException(e);\n }\n }\n \n return urlBuilder.toString();\n }", "private String generateQueryString(Map<String, String> args) {\n StringBuilder url = new StringBuilder();\n\n // Create the query string (?foo=bar&key1=val1\n url.append(\"?\");\n for (Iterator<Map.Entry<String, String>> it = args.entrySet().iterator(); it.hasNext(); ) {\n Map.Entry<String, String> entry = it.next();\n\n url.append(urlEncode(entry.getKey()));\n url.append(\"=\");\n url.append(urlEncode(entry.getValue()));\n if (it.hasNext()) {\n // More parameters are coming, add a separator\n url.append(\"&\");\n }\n }\n\n return url.toString();\n }", "public static String getQueryString(Map<String,String> params) throws IOException {\r\n\t\tif (params == null || params.size() == 0) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tString urlParams = null;\r\n\t\tfor (String chave : params.keySet()) {\r\n\t\t\tObject objValor = params.get(chave);\r\n\t\t\tif (objValor != null) {\r\n\t\t\t\tString valor = objValor.toString();\r\n\t\t\t\turlParams = urlParams == null ? \"\" : urlParams + \"&\";\r\n\t\t\t\turlParams += chave + \"=\" + valor;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn urlParams;\r\n\t\r\n\t}", "String getJournalsCentralGraphQuery();", "String getBarcharDataQuery();", "private String getQuery(ArrayList<NameValuePair> params) throws Exception\n\t{\n\t StringBuilder keyvalpair = new StringBuilder();\n\t boolean firstparam = true;\n\t for (NameValuePair pair : params)\n\t {\n\t if (!firstparam) {\n\t \tkeyvalpair.append(\"&\");\n\t }\n\t else {\n\t firstparam = false;\n\t }\n\t keyvalpair.append(URLEncoder.encode(pair.getName(), \"UTF-8\"));\n\t keyvalpair.append(\"=\");\n\t keyvalpair.append(URLEncoder.encode(pair.getValue(), \"UTF-8\"));\n\t }\n\n\t return keyvalpair.toString();\n\t}", "private static String getInputQuery() throws IOException {\n\n String inputQuery = \"\";\n\n System.out.print(\"Please enter a search term: \");\n BufferedReader bReader = new BufferedReader(new InputStreamReader(System.in));\n inputQuery = bReader.readLine();\n\n if (inputQuery.length() < 1) {\n // Use the string \"YouTube Developers Live\" as a default.\n inputQuery = \"YouTube Developers Live\";\n }\n return inputQuery;\n }", "String getRetrieveResourceQuery();", "public String getWhereString()\n {\n String outString = \n \"WHERE recip = '\" + recip + \"'\" \n ;\n return outString;\n }", "private static String buildUrl(LatLng minPoint, LatLng maxPoint, int page){\n Uri.Builder uriBuilder = END_POINT.buildUpon()\n .appendQueryParameter(\"method\", SEARCH_METHOD)\n .appendQueryParameter(\"bbox\", minPoint.longitude + \",\" + minPoint.latitude + \",\" + maxPoint.longitude + \",\" + maxPoint.latitude) // box in which we are searching\n .appendQueryParameter(\"extras\", \"geo, url_o, url_c, url_m, url_s, description\") // extra additional parameters\n .appendQueryParameter(\"page\", \"\" + page); // page number to return\n return uriBuilder.build().toString();\n }", "public String getReqCurLocLng() {\n return reqCurLocLng;\n }", "public String getReqCurLocLngTrim() {\n return reqCurLocLngTrim;\n }", "@Override\n protected Map<String, String> getParams() throws AuthFailureError {\n Map<String, String> params = new HashMap<>();\n params.put(\"location\", value_cord);\n\n return params;\n }", "public String getSearchKeyword() {\n return SharedPrefsUtils.getStringPreference(application.getApplicationContext(), \"KEY\");\n }", "public String getEncodedSearchPagePath() {\r\n \treturn getEncodedPagePath(this.searchPagePath);\r\n }", "@Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"uid\", uid);\n params.put(\"title\", title);\n params.put(\"suggest\", suggest);\n\n return params;\n }", "String getOnlineHelpLocation();", "public static String createQueryForAMapOfIResource(Map<String,Object> map, String oldQuery){\r\n \t\t\r\n \t\tif(oldQuery == null)\r\n \t\t\toldQuery = \"\";\r\n \t\tif(oldQuery.equals(\"empty\") && map.size()>0)\r\n \t\t\toldQuery = \"\";\r\n \t\tif(oldQuery.length() > 0)\r\n \t\t\toldQuery += QUERY_DELIMITER;\r\n \t\t\r\n \t\tString res = oldQuery;\r\n \t\t//find all Java files \r\n \t\tList<String> classes = getJavasSourceCodeFiels(map);\r\n \t\t//find all Packages\r\n \t\t//List<String> pack = getJavaPackages(map);\r\n \t\t\r\n \t\t\r\n \t\t//extending the old Query\r\n \t\tif(classes != null)\r\n \t\t\tfor(String s : classes){\r\n \t\t\t\tres = res + s + QUERY_DELIMITER;\r\n \t\t\t}\r\n \t\t\r\n \t\t/*for(String s : pack){\r\n \t\t\tres = res + s + \",\";\r\n \t\t}*/\r\n \t\tif(res.length() >= QUERY_DELIMITER.length())\r\n \t\t\tres = res.substring(0, res.length()-QUERY_DELIMITER.length());\r\n\t\t\r\n\t\tif(res.equals(\"\"))\r\n\t\t\treturn res;\r\n\t\telse\r\n\t\t\treturn res + \"\\n\";\n \t}", "public interface SearchParams {\r\n\r\n\tpublic static final String LYRICS_FOR = \"lyrics for\";\r\n\tpublic static final String SITES = \"site:\";\r\n}", "public String getQuerySequencesString() {\n \t\treturn null;\n \t}", "@Override \n public String getRequestURI() {\n if (requestURI != null) {\n return requestURI;\n }\n\n StringBuilder buffer = new StringBuilder();\n buffer.append(getRequestURIWithoutQuery());\n if (super.getQueryString() != null) {\n buffer.append(\"?\").append(super.getQueryString());\n }\n return requestURI = buffer.toString();\n }", "static String qs(String query) {\n\t\tif (StringUtils.isBlank(query) || \"*\".equals(query.trim())) {\n\t\t\treturn \"*\";\n\t\t}\n\t\tquery = query.trim();\n\t\tif (query.length() > 1 && query.startsWith(\"*\")) {\n\t\t\tquery = query.substring(1);\n\t\t}\n\t\ttry {\n\t\t\tStandardQueryParser parser = new StandardQueryParser();\n\t\t\tparser.setAllowLeadingWildcard(false);\n\t\t\tparser.parse(query, \"\");\n\t\t} catch (Exception ex) {\n\t\t\tlogger.warn(\"Failed to parse query string '{}'.\", query);\n\t\t\tquery = \"*\";\n\t\t}\n\t\treturn query.trim();\n\t}" ]
[ "0.6105049", "0.6071015", "0.6071015", "0.6046089", "0.59510946", "0.59510946", "0.5911985", "0.59044576", "0.5850648", "0.58502704", "0.58420277", "0.57877773", "0.5715903", "0.57079595", "0.5667014", "0.5564005", "0.5560118", "0.5551356", "0.5492632", "0.54709214", "0.54614025", "0.5456601", "0.5455089", "0.54528415", "0.5446538", "0.54013234", "0.5390986", "0.53595763", "0.53265744", "0.5325948", "0.5325858", "0.53170174", "0.5304905", "0.52842903", "0.5281827", "0.5279973", "0.5279414", "0.52786773", "0.5268505", "0.5251313", "0.5249117", "0.5235881", "0.523349", "0.52250284", "0.5202165", "0.51989347", "0.5197936", "0.5197936", "0.5197936", "0.5187992", "0.51856464", "0.5170003", "0.5169036", "0.5168738", "0.5159877", "0.51593953", "0.51478124", "0.51330686", "0.51320183", "0.5124559", "0.5107357", "0.5098695", "0.50779074", "0.50608116", "0.50474405", "0.50373864", "0.5000422", "0.4997131", "0.49921957", "0.49874577", "0.49846184", "0.49830094", "0.49815762", "0.4975777", "0.49743795", "0.49742284", "0.49585682", "0.4943522", "0.4937509", "0.49263212", "0.49212128", "0.4919454", "0.49129063", "0.49028376", "0.4899652", "0.48835695", "0.4864888", "0.48562104", "0.48534653", "0.48456627", "0.48246038", "0.4801534", "0.4799768", "0.47978497", "0.4787927", "0.4781713", "0.4780445", "0.4777313", "0.4772326", "0.4771975" ]
0.62422335
0
get a RowDataInterpreter for creating MGIMarker objects from the query results
public RowDataInterpreter getRowDataInterpreter() { class Interpreter implements RowDataInterpreter { public Object interpret(RowReference row) throws DBException { // create MGIMarker object - this sets the preferred MGI ID as // a Bucketizable ID attribute MGIMarker marker = new MGIMarker(row.getString(1)); // set the preferred MGI ID as a MGIMarker attribute marker.mgiID = row.getString(1); marker.symbol = row.getString(2); marker.name = row.getString(3); marker.chromosome = row.getString(4); marker.type = row.getString(5); marker.key = row.getInt(6); // adds the the preferred MGI ID to the set of all MGI Ids // for this MGIMarker // adds the preferred MGI ID to the Bucketizable SVASet marker.addMGIID(new SequenceAccession(marker.mgiID, SequenceAccession.MGI)); /** * obtain sequence associations AND non-preferred MGI ids for the * marker */ try { // sequences also contains non-preferred MGI IDs Vector sequences = sequenceLookup.lookup(marker.key); if (sequences == null) return marker; for (int i = 0; i < sequences.size(); i++) { SequenceAccession acc = (SequenceAccession)sequences.get(i); String seq = acc.getAccid(); String seqCategory = accidClassifier.classify(seq); if (seqCategory.equals(Constants.GENBANK)) { // set bucketizable data marker.addGenBankSequence(acc); } else if (seqCategory.equals(Constants.XM)) { // set bucketizable data marker.addXMSequence(acc); } else if (seqCategory.equals(Constants.XR)) { // set bucketizable data marker.addXRSequence(acc); } else if (seqCategory.equals(Constants.XP)) { // set bucketizable data marker.addXPSequence(acc); } else if (seqCategory.equals(Constants.NM)) { // set bucketizable data marker.addNMSequence(acc); } else if (seqCategory.equals(Constants.NR)) { // set bucketizable data marker.addNRSequence(acc); } else if (seqCategory.equals(Constants.NP)) { // set bucketizable data marker.addNPSequence(acc); } else if (seqCategory.equals(Constants.NG)) { // set bucketizable data marker.addNGSequence(acc); } else if (seqCategory.equals(Constants.NT)) { // set bucketizable data marker.addNTSequence(acc); } else if (seqCategory.equals(Constants.NW)) { // set bucketizable data marker.addNWSequence(acc); } else if (seqCategory.equals(Constants.MGIID)) { // set bucketizable data marker.addMGIID(acc); } } } catch (CacheException e) { DBExceptionFactory eFactory = new DBExceptionFactory(); DBException e2 = (DBException) eFactory.getException(DBExceptionFactory.ConfigErr, e); throw e2; } return marker; } } return new Interpreter(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static ResultInterpreter createResultInterpreter(final Intent data){\n return new ResultInterpreter(data);\n }", "protected abstract Object mapRow(ResultSet rs) throws SQLException;", "@Override\n\t\t\tpublic Tmly mapRow(ResultSet result, int i) throws SQLException {\n\t\t\t\tTmly tmly = new Tmly();\n\t\t\t\ttmly.setId(result.getInt(\"id_\"));\n\t\t\t\ttmly.setTitle(result.getString(\"title\"));\n\t\t\t\ttmly.setContent(result.getString(\"content\"));\n\t\t\t\treturn tmly;\n\t\t\t}", "T getRowData(int rowNumber);", "public abstract List<V> makeRowData();", "@Override\n protected ViewRowImpl createRowFromResultSet(Object qc, ResultSet resultSet) {\n ViewRowImpl value = super.createRowFromResultSet(qc, resultSet);\n return value;\n }", "Rows createRows();", "public interface NotationMapper {\n @Results({ @Result(property = \"notationId\", column = \"NOTATION_ID\"),\n @Result(property = \"title\", column = \"TITLE\"),\n @Result(property = \"subtitle\", column = \"SUBTITLE\"),\n @Result(property = \"bio\", column = \"BIO\"),\n @Result(property = \"notationUrl\", column = \"NOTATION_URL\"),\n @Result(property = \"bmgUrl\", column = \"BMG_URL\"),\n @Result(property = \"authorUrl\", column = \"AUTHOR_URL\"),\n @Result(property = \"accTitle\", column = \"ACC_TITLE\"),\n @Result(property = \"accUrl\", column = \"ACC_URL\"),\n @Result(property = \"type\", column = \"TYPE\"),\n @Result(property = \"resourceUrl\", column = \"RESOURCE_URL\"),\n @Result(property = \"createTime\", column = \"CREATETIME\") })\n @Select({\"<script>SELECT NOTATION_ID,TITLE,SUBTITLE,BIO,NOTATION_URL,BMG_URL,AUTHOR_URL,ACC_TITLE,ACC_URL,TYPE,RESOURCE_URL,CREATETIME FROM NOTATION \",\n \"<if test='type != \\\"\\\"'>WHERE TYPE = #{type}, </if>\",\n \"</script>\"})\n List<JSONObject> getNotationList(@Param(\"type\") String type);\n @Results({ @Result(property = \"notationId\", column = \"NOTATION_ID\"),\n @Result(property = \"title\", column = \"TITLE\"),\n @Result(property = \"subtitle\", column = \"SUBTITLE\"),\n @Result(property = \"bio\", column = \"BIO\"),\n @Result(property = \"notationUrl\", column = \"NOTATION_URL\"),\n @Result(property = \"bmgUrl\", column = \"BMG_URL\"),\n @Result(property = \"authorUrl\", column = \"AUTHOR_URL\"),\n @Result(property = \"accTitle\", column = \"ACC_TITLE\"),\n @Result(property = \"accUrl\", column = \"ACC_URL\"),\n @Result(property = \"type\", column = \"TYPE\"),\n @Result(property = \"resourceUrl\", column = \"RESOURCE_URL\"),\n @Result(property = \"createTime\", column = \"CREATETIME\") })\n @Select({\"SELECT NOTATION_ID,TITLE,SUBTITLE,BIO,NOTATION_URL,BMG_URL,AUTHOR_URL,ACC_TITLE,ACC_URL,TYPE,RESOURCE_URL,CREATETIME \",\n \"FROM NOTATION WHERE LOCATE(#{title},TITLE) OR LOCATE(#{title},SUBTITLE)\"\n })\n List<JSONObject> fuzzyByTitle(@Param(\"title\")String title);\n\n @Insert({\"INSERT INTO NOTATION (TITLE,SUBTITLE,BIO,NOTATION_URL,BMG_URL,AUTHOR_URL,ACC_TITLE,ACC_URL,TYPE,RESOURCE_URL,CREATETIME)\" +\n \"VALUES(#{title},#{subtitle},#{bio},#{notationUrl},#{bmgUrl},#{authorUrl},#{accTitle},#{accUrl},#{type},\" +\n \"#{resourceUrl},#{createTime})\"})\n void addNotation(JSONObject reqJson);\n}", "ArrayList<Map<String,Object>> parseQueryResult(Object result) { return null;}", "public QueryResult<T> getResult();", "java.util.List<io.dstore.engine.procedures.MiCheckPerformanceAd.Response.Row> \n getRowList();", "ExpDataClass getDataClass(int rowId);", "@SuppressLint(\"NewApi\")\n private ObjectNode getRowsResultFromQuery(Cursor cur) {\n ObjectNode rowsResult = objectMapper.createObjectNode();\n\n ArrayNode rowsArrayResult = rowsResult.putArray(\"rows\");\n\n if (cur.moveToFirst()) {\n // query result has rows\n int colCount = cur.getColumnCount();\n \n // Build up JSON result object for each row\n do {\n ObjectNode row = objectMapper.createObjectNode();\n for (int i = 0; i < colCount; ++i) {\n String key = cur.getColumnName(i);\n \n // for old Android SDK remove lines from HERE:\n if (android.os.Build.VERSION.SDK_INT >= 11) {\n putValueBasedOnType(cur, row, key, i);\n // to HERE.\n } else {\n row.put(key, cur.getString(i));\n }\n }\n \n rowsArrayResult.add(row);\n \n } while (cur.moveToNext());\n }\n\n return rowsResult;\n }", "RowValues createRowValues();", "public abstract DynamicDataRow makeUIRowData();", "public abstract String render (String data, String type, T row);", "public Row call(String line) throws Exception {\n\t\t\tList<String> tags = new ArrayList<String>();\n\t\t\tPattern pattern;\n\t\t\tMatcher matcher;\n\t\t\t\n\t\t\t//获取年龄\n\t\t\tpattern = Pattern.compile(\"<age>(.*?)</age>\");\n\t\t\tmatcher = pattern.matcher(line);\n\t\t\tif(matcher.find()){\n\t\t\t\ttags.add(matcher.group(1));\n\t\t\t}\n\t\t\t\n\t\t\t//获取性别\n\t\t\tpattern = Pattern.compile(\"<sex>(.*?)</sex>\");\n\t\t\tmatcher = pattern.matcher(line);\n\t\t\tif(matcher.find()){\n\t\t\t\ttags.add(matcher.group(1));\n\t\t\t}\n\t\t\t\n\t\t\t//获取地区\n\t\t\tpattern = Pattern.compile(\"<area>(.*?)</area>\");\n\t\t\tmatcher = pattern.matcher(line);\n\t\t\tif(matcher.find()){\n\t\t\t\ttags.add(matcher.group(1));\n\t\t\t}\n\t\t\t\n\t\t\t//获取加入的群组\n\t\t\tpattern = Pattern.compile(\"<group>(.*?)</group>\");\n\t\t\tmatcher = pattern.matcher(line);\n\t\t\tif(matcher.find()){\n\t\t\t\tString group = matcher.group(1);\n\t\t\t\tString[] groupTags = group.split(\",\");\n\t\t\t\tfor(String tag: groupTags){\n\t\t\t\t\ttags.add(tag);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//获取收藏\n\t\t\tpattern = Pattern.compile(\"<collection>(.*?)</collection>\");\n\t\t\tmatcher = pattern.matcher(line);\n\t\t\tif(matcher.find()){\n\t\t\t\tString collects = matcher.group(1);\n\t\t\t\tString[] collectTags = collects.split(\",\");\n\t\t\t\tfor(String tag: collectTags){\n\t\t\t\t\ttags.add(tag);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn RowFactory.create(tags);\n\t\t}", "protected abstract T createEntityFromResult (final ResultSet result) throws SQLException;", "private Object[] buildResult(RowMetaInterface rowMeta, Object[] rowData) throws KettleValueException\n { Deleting objects: we need to create a new object array\n\t\t// It's useless to call RowDataUtil.resizeArray\n\t\t//\n\t\tObject[] outputRowData = RowDataUtil.allocateRowData( data.outputRowMeta.size() );\n\t\tint outputIndex = 0;\n\t\t\n\t\t// Copy the data from the incoming row, but remove the unwanted fields in the same loop...\n\t\t//\n\t\tint removeIndex=0;\n\t\tfor (int i=0;i<rowMeta.size();i++) {\n\t\t\tif (removeIndex<data.removeNrs.length && i==data.removeNrs[removeIndex]) {\n\t\t\t\tremoveIndex++;\n\t\t\t} else\n\t\t\t{\n\t\t\t\toutputRowData[outputIndex++]=rowData[i];\n\t\t\t}\n\t\t}\n\n // Add the unpivoted fields...\n\t\t//\n for (int i=0;i<data.targetResult.length;i++)\n {\n Object resultValue = data.targetResult[i];\n DenormaliserTargetField field = meta.getDenormaliserTargetField()[i];\n switch(field.getTargetAggregationType())\n {\n case DenormaliserTargetField.TYPE_AGGR_AVERAGE :\n long count = data.counters[i];\n Object sum = data.sum[i];\n if (count>0)\n {\n \tif (sum instanceof Long) resultValue = (long)((Long)sum / count);\n \telse if (sum instanceof Double) resultValue = (double)((Double)sum / count);\n \telse if (sum instanceof BigDecimal) resultValue = ((BigDecimal)sum).divide(new BigDecimal(count));\n \telse resultValue = null; // TODO: perhaps throw an exception here?<\n }\n break;\n case DenormaliserTargetField.TYPE_AGGR_COUNT_ALL :\n if (resultValue == null) resultValue = Long.valueOf(0);\n if (field.getTargetType() != ValueMetaInterface.TYPE_INTEGER)\n {\n resultValue = data.outputRowMeta.getValueMeta(outputIndex).convertData(new ValueMeta(\"num_values_aggregation\", ValueMetaInterface.TYPE_INTEGER), resultValue);\n }\n break;\n default: break;\n }\n outputRowData[outputIndex++] = resultValue;\n }\n \n return outputRowData;\n }", "public Object interpret(RowReference row)\n throws DBException\n {\n MGIMarker marker = new MGIMarker(row.getString(1));\n\t // set the preferred MGI ID as a MGIMarker attribute\n marker.mgiID = row.getString(1);\n\t \n marker.symbol = row.getString(2);\n marker.name = row.getString(3);\n marker.chromosome = row.getString(4);\n marker.type = row.getString(5);\n marker.key = row.getInt(6);\n\n // adds the the preferred MGI ID to the set of all MGI Ids\n\t // for this MGIMarker\n // adds the preferred MGI ID to the Bucketizable SVASet\n marker.addMGIID(new SequenceAccession(marker.mgiID,\n SequenceAccession.MGI));\n\n /**\n * obtain sequence associations AND non-preferred MGI ids for the \n\t * marker\n */\n try\n {\n\t\t // sequences also contains non-preferred MGI IDs\n Vector sequences = sequenceLookup.lookup(marker.key);\n if (sequences == null)\n return marker;\n for (int i = 0; i < sequences.size(); i++)\n {\n SequenceAccession acc =\n (SequenceAccession)sequences.get(i);\n String seq = acc.getAccid();\n String seqCategory = accidClassifier.classify(seq);\n\n if (seqCategory.equals(Constants.GENBANK))\n {\n // set bucketizable data\n marker.addGenBankSequence(acc);\n }\n else if (seqCategory.equals(Constants.XM))\n {\n // set bucketizable data\n marker.addXMSequence(acc);\n }\n else if (seqCategory.equals(Constants.XR))\n {\n // set bucketizable data\n marker.addXRSequence(acc);\n }\n else if (seqCategory.equals(Constants.XP))\n\t\t {\n\t\t\t // set bucketizable data\n marker.addXPSequence(acc);\n\t\t }\n else if (seqCategory.equals(Constants.NM))\n\t\t {\n\t\t\t // set bucketizable data\n marker.addNMSequence(acc);\n\t\t }\n else if (seqCategory.equals(Constants.NR))\n\t\t {\n\t\t // set bucketizable data\n marker.addNRSequence(acc);\n\t\t }\n else if (seqCategory.equals(Constants.NP))\n\t\t {\n\t\t\t // set bucketizable data\n marker.addNPSequence(acc);\n\t\t }\n else if (seqCategory.equals(Constants.NG))\n\t\t {\n\t\t\t // set bucketizable data\n marker.addNGSequence(acc);\n\t\t }\n\t\t else if (seqCategory.equals(Constants.NT))\n {\n // set bucketizable data\n marker.addNTSequence(acc);\n }\n\t\t else if (seqCategory.equals(Constants.NW))\n {\n // set bucketizable data\n marker.addNWSequence(acc);\n }\n else if (seqCategory.equals(Constants.MGIID))\n {\n // set bucketizable data\n marker.addMGIID(acc);\n }\n }\n }\n catch (CacheException e)\n {\n DBExceptionFactory eFactory = new DBExceptionFactory();\n DBException e2 = (DBException)\n eFactory.getException(DBExceptionFactory.ConfigErr, e);\n throw e2;\n }\n\n return marker;\n }", "io.dstore.engine.procedures.MiCheckPerformanceAd.Response.Row getRow(int index);", "public Object extractData(ResultSet resultSet) throws SQLException\n\t{\n\t\tGPERecordDataModel record = new GPERecordDataModel();\n\t\trecord.setIdentifier(resultSet.getString(1).trim());\n\t\trecord.setDescription(resultSet.getString(2).trim());\n\t\trecord.setAutomaticOrManualApply(resultSet.getString(3).trim());\n\t\trecord.setPropagateToAllUnits(resultSet.getString(4).trim());\n\n\t\treturn record;\n\t}", "T deserializeData(R r) throws SQLException;", "public Object mapRow(ResultSet rs, int rowNum) throws SQLException \n\t\t{\n\t\t\tTema tema = new Tema();\n\t\t\ttema.setTema_id(rs.getInt(\"tema_id\"));\n\t\t\ttema.setTitulo(rs.getString(\"titulo\"));\n\t\t\treturn tema;\n\t\t}", "public interface TableQueryResult extends Catalog, TableModel {\n\n /**\n * Returns the Vector of Vectors that contains the table's data values.\n * The vectors contained in the outer vector are each a single row of values.\n */\n Vector<Vector<Object>> getDataVector();\n\n /** Return a description of the ith table column field */\n FieldDesc getColumnDesc(int i);\n\n /** Return the table column index for the given column name */\n int getColumnIndex(String name);\n\n /** Return a vector of column headings for this table. */\n List<String> getColumnIdentifiers();\n\n /** Return true if the table has coordinate columns, such as (ra, dec) */\n boolean hasCoordinates();\n\n /**\n * Return a Coordinates object based on the appropriate columns in the given row,\n * or null if there are no coordinates available for the row.\n */\n Coordinates getCoordinates(int rowIndex);\n\n /**\n * Return an object describing the columns that can be used to search\n * this catalog.\n */\n RowCoordinates getRowCoordinates();\n\n /**\n * Return the center coordinates for this table from the query arguments,\n * if known, otherwise return the coordinates of the first row, or null\n * if there are no world coordinates available.\n */\n WorldCoordinates getWCSCenter();\n\n /**\n * Return the object representing the arguments to the query that resulted in this table,\n * if known, otherwise null.\n */\n QueryArgs getQueryArgs();\n\n /**\n * Set the object representing the arguments to the query that resulted in this table.\n */\n void setQueryArgs(QueryArgs queryArgs);\n\n /** Return true if the result was truncated and more data would have been available */\n boolean isMore();\n\n /**\n * Return the catalog used to create this table,\n * or a dummy, generated catalog object, if not known.\n */\n Catalog getCatalog();\n\n /**\n * Return a possible SiderealTarget for the row i\n */\n Option<SiderealTarget> getSiderealTarget(int i);\n\n}", "public Interpretation(I systemsResult) { \n this.columns = new ArrayList<>();\n if (systemsResult.getAttributeNames() != null) this.columns.addAll(systemsResult.getAttributeNames());\n\n this.rows = new ArrayList<List<String>>();\n for (Collection<String> r: systemsResult.getRows())\n this.rows.add(new ArrayList<String>(r));\n\n this.network = new ArrayList<>();\n if (systemsResult.getNetworks() != null) this.network.addAll(systemsResult.getNetworks());\n \n this.query = systemsResult.getQuery();\n }", "private QueryResult performMappedQuery() throws VizException {\n\n if (database == null) {\n throw new VizException(\"Database not specified for query\");\n }\n if (query == null) {\n throw new VizException(\"Cannot execute null query\");\n }\n\n QlServerRequest request = new QlServerRequest(query);\n request.setDatabase(database);\n request.setType(QueryType.QUERY);\n request.setParamMap(paramMap);\n\n // set the mode so the handler knows what to do\n if (queryLanguage == null) {\n throw new VizException(\"Query language not specified\");\n } else if (queryLanguage.equals(QueryLanguage.HQL)) {\n request.setLang(QlServerRequest.QueryLanguage.HQL);\n } else {\n request.setLang(QlServerRequest.QueryLanguage.SQL);\n }\n\n // create request object\n QueryResult retVal = null;\n // get result\n AbstractResponseMessage response = (AbstractResponseMessage) ThriftClient\n .sendRequest(request);\n\n if (response instanceof ResponseMessageGeneric) {\n retVal = (QueryResult) ((ResponseMessageGeneric) response)\n .getContents();\n\n } else if (response instanceof ResponseMessageError) {\n ResponseMessageError rme = (ResponseMessageError) response;\n VizServerSideException innerException = new VizServerSideException(\n rme.toString());\n throw new VizServerSideException(rme.getErrorMsg(), innerException);\n }\n\n return retVal;\n }", "public ResultSet getFactory(){\n ResultSet rs = null;\r\n try {\r\n rs = conn.getResultSetF();\r\n ResultSetMetaData rsmetadata = rs.getMetaData();\r\n int column = rsmetadata.getColumnCount();\r\n // String[] factoryString = null;\r\n\r\n for(int i=1; i<=column; i++){\r\n data_raws.add(rsmetadata.getColumnName(i));\r\n }\r\n //dtm.setColumnIdentifiers(columns_name);\r\n\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ApplicationData.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n\r\n return rs;\r\n }", "public Object mapRow(ResultSet rs, int rowNum) throws SQLException \n\t\t{\n\t\t\tTema tema = new Tema();\n\t\t\t\n\t\t\ttema.setData_inicio(rs.getDate(\"data_inicio\"));\n\t\t\ttema.setData_fim(rs.getDate(\"data_fim\"));\t\t\t\n\t\t\ttema.setTitulo(rs.getString(\"titulo\"));\n\t\t\ttema.setNota(rs.getInt(\"nota\"));\n\t\t\ttema.setDescription(rs.getString(\"description\"));\n\t\t\ttema.setTema_id(rs.getInt(\"tema_id\"));//Apagar\n\t\t\ttema.setSupervisorName(rs.getString(\"supervisorName\"));\n\t\t\ttema.setSituation(rs.getString(\"situation\"));\n\t\t\ttema.setUser_id(rs.getInt(\"user_id\"));\n\t\t\ttema.setFullName(rs.getString(\"fullName\"));\n\t\t\treturn tema;\n\t\t}", "@Override\n protected void initResultTable() {\n }", "interface RowFormatter {\n char[] NULL_STRING = new char[]{'\\\\', 'N'};\n char[] EMPTY_STRING = new char[0];\n\n String format(char[][] row);\n\n String getFormat();\n\n static RowFormatter newInstance(String format, ResultSetSchema rsSchema) throws SQLException {\n if (format.equals(\"csv\")) return new CSVRowFormatter(rsSchema.getColumnTypes().size());\n if (format.equals(\"tsv\")) return new TSVRowFormatter(rsSchema.getColumnTypes().size());\n if (format.equals(\"json\")) return new JSONRowFormatter(rsSchema);\n throw new IllegalArgumentException(\"\\\"\" + format + \"\\\" is not supported. Use csv, tsv or json.\");\n }\n}", "public static Row createRow() {\n\t\treturn new Row(fsco,criteria,columns);\n\t}", "@Override\n\t\t\t\t\tpublic Tkfl mapRow(ResultSet result, int i)\n\t\t\t\t\t\t\tthrows SQLException {\n\t\t\t\t\t\tTkfl tkfl = new Tkfl();\n\t\t\t\t\t\ttkfl.setId(result.getInt(\"id_\"));\n\t\t\t\t\t\ttkfl.setParentId(result.getInt(\"parent_id\"));\n\t\t\t\t\t\ttkfl.setTkmc(result.getString(\"tkmc\"));\n\t\t\t\t\t\ttkfl.setMs(result.getString(\"ms\"));\n\t\t\t\t\t\treturn tkfl;\n\t\t\t\t\t}", "@Override\n\t\t\tpublic Tkfl mapRow(ResultSet result, int i) throws SQLException {\n\t\t\t\tTkfl tkfl = new Tkfl();\n\t\t\t\ttkfl.setId(result.getInt(\"id_\"));\n\t\t\t\ttkfl.setParentId(result.getInt(\"parent_id\"));\n\t\t\t\ttkfl.setTkmc(result.getString(\"tkmc\"));\n\t\t\t\ttkfl.setMs(result.getString(\"ms\"));\n\t\t\t\treturn tkfl;\n\t\t\t}", "public interface ResultSetGetter {\n\n /**\n * Perform the right getter on a ResultSet and returns the value as an\n * Object. A mapper class is needed to achieve this pattern. See\n * ResultSetterFactory.\n *\n * @see ResultSetterFactory\n * @param rs The sql ResultSet that currently points to the cell of the the\n * record that you want to retrieve.\n * @param columnName The name of the columns in the sql database of which\n * you want to retrieve the value.\n * @return The value of the of the cell where the given ResultSet points to.\n * @throws SQLException Something with getting the data from the ResultSet\n * went wrong.\n */\n public Object getResult(ResultSet rs, String columnName) throws SQLException;\n\n}", "public abstract void emitRawRow();", "protected abstract E parseEntity(ResultSet rs) throws DAOException;", "private QueryResult mapResultSet(ResultSet rs) throws SQLException {\n QueryResult results = new QueryResult();\n\n ResultSetMetaData metadata = rs.getMetaData();\n\n int columnCount = metadata.getColumnCount();\n for (int i = 0; i < columnCount; i++) {\n results.addColumnName(metadata.getColumnLabel(i + 1), i);\n }\n\n List<QueryResultRow> rows = new ArrayList<QueryResultRow>();\n while (rs.next()) {\n Object[] columnValues = new Object[columnCount];\n for (int i = 1; i <= columnCount; i++) {\n columnValues[i - 1] = rs.getObject(i);\n\n }\n rows.add(new QueryResultRow(columnValues));\n }\n results.setRows(rows.toArray(new QueryResultRow[] {}));\n return results;\n }", "private RowMapper<Object[]> getInitalWorkerMapper () {\n\t\treturn new RowMapper<Object[]>() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic Object[] mapRow(ResultSet rs, int rowIndex) throws SQLException {\n\t\t\t\t\n\t\t\t\tResultSetMetaData rsMeta = rs.getMetaData();\n\t\t\t\t\n\t\t\t\tcolCount = rsMeta.getColumnCount() ;\n\t\t\t\tObject[] retval = new Object[colCount];\n\t\t\t\tanalizeQueryResultMetaData(rsMeta, metaData.getDecimalColumns()); \n\t\t\t\tsetRowMapper(getNormalWorkerMapper());\n\t\t\t\tfor ( int i=0 ; i < colCount;i++){\n\t\t\t\t\tretval[i] = rs.getObject(i+1);\n\t\t\t\t}\n\t\t\t\treturn retval;\n\t\t\t}\n\t\t};\n\t}", "@RegisterRowMapper(OptionKecamatanO.Mapper.class)\npublic interface OptionKecamatanR {\n \n /**\n * Select data dari table Surabayaa\n */\n @SqlQuery(\"SELECT gid, name AS text from sby\")\n List<OptionKecamatanO> option();\n\n @SqlQuery(\"SELECT gid, name AS text from sby WHERE name ILIKE :keyword\")\n List<OptionKecamatanO> optionByName(String keyword);\n\n}", "protected DBRow(ResultSet p_set) throws DBException\n\t{\n\t\t_MetaData = new DBMetaDataSet();\n\t\t_RowData = new TreeMap<String, DBColumn>(String.CASE_INSENSITIVE_ORDER);\n\t\t_Parent = null;\n\t\t\n\t\ttry\n\t\t{\n\t\t\tResultSetMetaData metaData = p_set.getMetaData();\n\n\t\t\tfor (int i = 1; i <= metaData.getColumnCount(); i++)\n\t\t\t{\n\t\t\t\tDBColumnMetaData colMeta = new DBColumnMetaData(metaData.getColumnName(i), metaData.getColumnType(i));\n\t\t\t\t\n\t\t\t\t_MetaData.addColumnMetaData(colMeta.getName(), colMeta);\n\t\t\t\t_RowData.put(colMeta.getName(), DBTools.newDBValue(colMeta, this, p_set.getObject(i)));\n\t\t\t}\t\t\t\n\t\t} \n\t\tcatch (Exception e)\n\t\t{\n\t\t\tthrow new DBException(e, \"unable to create DBRow object\");\n\t\t}\n\t}", "private Playlist processRow(ResultSet resultSet) throws SQLException {\n Playlist playlist = new Playlist();\n playlist.setId(resultSet.getString(\"ID\"));\n playlist.setName(resultSet.getString(\"Name\"));\n playlist.setAuthor(resultSet.getString(\"UserID\"));\n playlist.setDate(resultSet.getString(\"Date\"));\n playlist.setLikes(resultSet.getInt(\"Likes\"));\n playlist.setVisibility(resultSet.getString(\"Visibility\"));\n\n return playlist;\n }", "Row createRow();", "public RelNode genScriptPlan(\n HiveParserASTNode trfm, HiveParserQB qb, List<RexNode> operands, RelNode input)\n throws SemanticException {\n boolean isAllRexRef = operands.stream().allMatch(node -> node instanceof RexInputRef);\n int[] transformFieldIndices;\n if (!isAllRexRef) {\n input =\n LogicalProject.create(\n input, Collections.emptyList(), operands, (List<String>) null);\n transformFieldIndices = IntStream.range(0, operands.size()).toArray();\n HiveParserRowResolver rowResolver = new HiveParserRowResolver();\n // record the column info for the project node\n for (int i = 0; i < operands.size(); i++) {\n ColumnInfo oColInfo =\n new ColumnInfo(\n getColumnInternalName(i),\n HiveParserTypeConverter.convert(operands.get(i).getType()),\n null,\n false);\n rowResolver.put(null, getColumnInternalName(i), oColInfo);\n }\n relToRowResolver.put(input, rowResolver);\n } else {\n transformFieldIndices =\n operands.stream()\n .flatMapToInt(node -> IntStream.of(((RexInputRef) node).getIndex()))\n .toArray();\n }\n\n ArrayList<ColumnInfo> inputSchema = relToRowResolver.get(input).getColumnInfos();\n\n // If there is no \"AS\" clause, the output schema will be \"key,value\"\n ArrayList<ColumnInfo> outputCols = new ArrayList<>();\n int inputSerDeNum = 1, inputRecordWriterNum = 2;\n int outputSerDeNum = 4, outputRecordReaderNum = 5;\n int outputColsNum = 6;\n boolean outputColNames = false, outputColSchemas = false;\n int execPos = 3;\n boolean defaultOutputCols = false;\n\n // Go over all the children\n if (trfm.getChildCount() > outputColsNum) {\n HiveParserASTNode outCols = (HiveParserASTNode) trfm.getChild(outputColsNum);\n if (outCols.getType() == HiveASTParser.TOK_ALIASLIST) {\n outputColNames = true;\n } else if (outCols.getType() == HiveASTParser.TOK_TABCOLLIST) {\n outputColSchemas = true;\n }\n }\n\n // If column type is not specified, use a string\n if (!outputColNames && !outputColSchemas) {\n // output schema will be \"key, value\"\n String[] outputAlias = new String[] {\"key\", \"value\"};\n for (int i = 0; i < outputAlias.length; i++) {\n String intName = getColumnInternalName(i);\n ColumnInfo colInfo =\n new ColumnInfo(intName, TypeInfoFactory.stringTypeInfo, null, false);\n colInfo.setAlias(outputAlias[i]);\n outputCols.add(colInfo);\n }\n defaultOutputCols = true;\n } else {\n // column name or type is specified\n HiveParserASTNode collist = (HiveParserASTNode) trfm.getChild(outputColsNum);\n int ccount = collist.getChildCount();\n Set<String> colAliasNamesDuplicateCheck = new HashSet<>();\n for (int i = 0; i < ccount; i++) {\n ColumnInfo colInfo =\n getColumnInfoInScriptTransform(\n (HiveParserASTNode) collist.getChild(i),\n outputColSchemas,\n i,\n colAliasNamesDuplicateCheck);\n outputCols.add(colInfo);\n }\n }\n\n // input schema info\n StringBuilder inpColumns = new StringBuilder();\n StringBuilder inpColumnTypes = new StringBuilder();\n for (int i = 0; i < transformFieldIndices.length; i++) {\n if (i != 0) {\n inpColumns.append(\",\");\n inpColumnTypes.append(\",\");\n }\n inpColumns.append(inputSchema.get(transformFieldIndices[i]).getInternalName());\n inpColumnTypes.append(\n inputSchema.get(transformFieldIndices[i]).getType().getTypeName());\n }\n\n // output schema info\n StringBuilder outColumns = new StringBuilder();\n StringBuilder outColumnTypes = new StringBuilder();\n List<RelDataType> outDataTypes = new ArrayList<>();\n List<String> outColNames = new ArrayList<>();\n HiveParserRowResolver scriptRR = new HiveParserRowResolver();\n RelDataTypeFactory dtFactory = cluster.getRexBuilder().getTypeFactory();\n for (int i = 0; i < outputCols.size(); i++) {\n if (i != 0) {\n outColumns.append(\",\");\n outColumnTypes.append(\",\");\n }\n\n outColumns.append(outputCols.get(i).getInternalName());\n outColumnTypes.append(outputCols.get(i).getType().getTypeName());\n\n scriptRR.put(\n qb.getParseInfo().getAlias(), outputCols.get(i).getAlias(), outputCols.get(i));\n\n outDataTypes.add(HiveParserUtils.toRelDataType(outputCols.get(i).getType(), dtFactory));\n outColNames.add(outputCols.get(i).getInternalName());\n }\n\n String serdeName = LazySimpleSerDe.class.getName();\n int fieldSeparator = Utilities.tabCode;\n if (HiveConf.getBoolVar(hiveConf, HiveConf.ConfVars.HIVESCRIPTESCAPE)) {\n fieldSeparator = Utilities.ctrlaCode;\n }\n\n // Input and Output Serdes\n HiveParserBaseSemanticAnalyzer.SerDeClassProps inSerDeClassProps;\n if (trfm.getChild(inputSerDeNum).getChildCount() > 0) {\n // use user specified serialize class and properties\n HiveParserASTNode inputSerDeNode = (HiveParserASTNode) trfm.getChild(inputSerDeNum);\n inSerDeClassProps =\n HiveParserBaseSemanticAnalyzer.SerDeClassProps.analyzeSerDeInfo(\n (HiveParserASTNode) inputSerDeNode.getChild(0),\n inpColumns.toString(),\n inpColumnTypes.toString(),\n false);\n } else {\n // use default serialize class and properties\n Map<String, String> inSerdeProps =\n HiveParserBaseSemanticAnalyzer.SerDeClassProps.getDefaultSerDeProps(\n serdeName,\n String.valueOf(fieldSeparator),\n inpColumns.toString(),\n inpColumnTypes.toString(),\n false,\n true);\n inSerDeClassProps =\n new HiveParserBaseSemanticAnalyzer.SerDeClassProps(serdeName, inSerdeProps);\n }\n HiveParserBaseSemanticAnalyzer.SerDeClassProps outSerDeClassProps;\n if (trfm.getChild(outputSerDeNum).getChildCount() > 0) {\n // use user specified deserialize class and properties\n HiveParserASTNode outSerDeNode = (HiveParserASTNode) trfm.getChild(outputSerDeNum);\n outSerDeClassProps =\n HiveParserBaseSemanticAnalyzer.SerDeClassProps.analyzeSerDeInfo(\n (HiveParserASTNode) outSerDeNode.getChild(0),\n outColumns.toString(),\n outColumnTypes.toString(),\n false);\n } else {\n // use default deserialize class and properties\n Map<String, String> outSerdeProps =\n HiveParserBaseSemanticAnalyzer.SerDeClassProps.getDefaultSerDeProps(\n serdeName,\n String.valueOf(fieldSeparator),\n outColumns.toString(),\n outColumnTypes.toString(),\n defaultOutputCols,\n true);\n outSerDeClassProps =\n new HiveParserBaseSemanticAnalyzer.SerDeClassProps(serdeName, outSerdeProps);\n }\n\n // script input record writer\n Tree recordWriterASTNode = trfm.getChild(inputRecordWriterNum);\n String inRecordWriter =\n recordWriterASTNode.getChildCount() == 0\n ? TextRecordWriter.class.getName()\n : unescapeSQLString(recordWriterASTNode.getChild(0).getText());\n\n // script output record readers\n Tree recordReaderASTNode = trfm.getChild(outputRecordReaderNum);\n String outRecordReader =\n recordReaderASTNode.getChildCount() == 0\n ? TextRecordReader.class.getName()\n : unescapeSQLString(recordReaderASTNode.getChild(0).getText());\n\n RelDataType rowDataType = dtFactory.createStructType(outDataTypes, outColNames);\n\n String script = unescapeSQLString(trfm.getChild(execPos).getText());\n\n ScriptTransformIOInfo inputOutSchema =\n new ScriptTransformIOInfo(\n inSerDeClassProps.getSerdeClassName(),\n inSerDeClassProps.getProperties(),\n outSerDeClassProps.getSerdeClassName(),\n outSerDeClassProps.getProperties(),\n inRecordWriter,\n outRecordReader,\n new JobConfWrapper(new JobConf(hiveConf)));\n\n LogicalScriptTransform scriptTransform =\n LogicalScriptTransform.create(\n input, transformFieldIndices, script, inputOutSchema, rowDataType);\n\n relToHiveColNameCalcitePosMap.put(scriptTransform, buildHiveToCalciteColumnMap(scriptRR));\n relToRowResolver.put(scriptTransform, scriptRR);\n\n // todo\n // Add URI entity for transform script. script assumed t be local unless downloadable\n return scriptTransform;\n }", "com.rpg.framework.database.Protocol.ResponseCode getResult();", "com.rpg.framework.database.Protocol.ResponseCode getResult();", "com.rpg.framework.database.Protocol.ResponseCode getResult();", "com.rpg.framework.database.Protocol.ResponseCode getResult();", "com.rpg.framework.database.Protocol.ResponseCode getResult();", "private RowData() {\n initFields();\n }", "public void createQueryProcessor() throws IOException {\n\t\tfor(int i=0; i<=payload.getnumber_of_grouping_variables();i++) {\n\t\t\tlistMapsAggregates.add(new HashMap<String, String>());\n\t\t}\n\t\tfor(int i=0;i<payload.getnumber_of_aggregate_functions();i++) {\n\t\t\tString[] temp = payload.getaggregate_functions().get(i).split(\"_\",3);\n\t\t\tlistMapsAggregates.get(Integer.parseInt(temp[0])).put(temp[1], temp[2]);//(key,value) -> (aggregate function , column name)\n\t\t}\n\t\tStringBuilder fileData = new StringBuilder();\n\t\tfileData.append(\"package dbmsProject;\\r\\n\\r\\n\" + \n\t\t\t\t\"import java.io.FileOutputStream;\\r\\n\" + \n\t\t\t\t\"import java.io.IOException;\\r\\n\" + \n\t\t\t\t\"import java.text.DateFormat;\\r\\n\" + \n\t\t\t\t\"import java.text.DecimalFormat;\\r\\n\" + \n\t\t\t\t\"import java.text.SimpleDateFormat;\\r\\n\" + \n\t\t\t\t\"import java.util.ArrayList;\\r\\n\" + \n\t\t\t\t\"import java.util.Calendar;\\r\\n\" + \n\t\t\t\t\"import java.util.HashMap;\\r\\n\");\n\t\tfileData.append(\"\\r\\npublic class QueryProcessor{\\n\");\n\t\tfileData.append(\"\tprivate SalesTable salesTable;\\n\");\n\t\tfileData.append(\"\tprivate ExpTree expTree;\\n\");\n\t\tfileData.append(\"\tprivate Payload payload;\\n\");\n\t\tfileData.append(\"\tprivate Helper helper;\\n\");\n\t\tfileData.append(\"\tprivate ArrayList<HashMap<String,String>> listMapsAggregates;\\r\\n\" + \n\t\t\t\t\t\t\"\tprivate HashMap<String, Double> aggregatesMap;\\r\\n\" + \n\t\t\t\t\t\t\"\tprivate ArrayList<HashMap<String, ArrayList<InputRow>>> allGroups;\\r\\n\" + \n\t\t\t\t\t\t\"\tprivate ArrayList<ArrayList<String>> allGroupKeyStrings;\\r\\n\" + \n\t\t\t\t\t\t\"\tprivate ArrayList<ArrayList<InputRow>> allGroupKeyRows;\\n\");\n\t\tfileData.append(\"\\r\\n\tpublic QueryProcessor(SalesTable salesTable, Payload payload){\\n\");\n\t\tfileData.append(\"\t\tthis.aggregatesMap = new HashMap<String, Double>();\\n\");\n\t\tfileData.append(\"\t\tthis.salesTable=salesTable;\\n\");\n\t\tfileData.append(\"\t\tthis.payload=payload;\\n\");\n\t\tfileData.append(\"\t\tthis.expTree=new ExpTree();\\n\");\n\t\tfileData.append(\"\t\tthis.helper=new Helper();\\n\"\n\t\t\t\t\t\t+ \"\t\tthis.allGroupKeyRows = new ArrayList<ArrayList<InputRow>>();\\r\\n\" + \n\t\t\t\t\t\t\"\t\tthis.allGroupKeyStrings = new ArrayList<ArrayList<String>>();\\r\\n\" + \n\t\t\t\t\t\t\"\t\tthis.listMapsAggregates = new ArrayList<HashMap<String,String>>();\\r\\n\"\t+\n\t\t\t\t\t\t\"\t\tthis.allGroups = new ArrayList<HashMap<String, ArrayList<InputRow>>>();\\n\");\n\t\tfileData.append(\"\t}\\n\");\n\t\tfileData.append(\"\\r\\n\tpublic ArrayList<InputRow> createInputSet(){\\n\");\n\t\tfileData.append(\"\t\tArrayList<InputRow> inputResultSet = new ArrayList<InputRow>();\\n\");\n\t\tfileData.append(\"\t\tfor(SalesTableRow row: salesTable.getResultSet()) {\\n\");\n\t\tfileData.append(\"\t\t\tInputRow ir=new InputRow();\\n\");\n\t\tfor(String var: this.projectionVars) {\n\t\t\tfileData.append(\"\t\t\tir.set\"+varPrefix+var+\"(row.get\"+var+\"());\\n\");\n\t\t}\n\t\tfileData.append(\"\t\t\tinputResultSet.add(ir);\\n\");\n\t\tfileData.append(\"\t\t}\\n\");\n\t\tfileData.append(\"\t\treturn inputResultSet;\\n\");\n\t\tfileData.append(\"\t}\\n\");\n\t\t\n//OUTPUT ROW CREATION LOGIC\n\t\tfileData.append(\"\\r\\n\tpublic OutputRow convertInputToOutputRow(InputRow inputRow, String str, ArrayList<String> strList){\\n\");\n\t\tfileData.append(\"\t\tString temp=\\\"\\\";\\n\");\n\t\tfileData.append(\"\t\tOutputRow outputRow = new OutputRow();\\n\");\n\t\tfor(String select: payload.getselect_variables()) {\n\t\t\tif(helper.columnMapping.containsKey(select)) {\n\t\t\t\tfileData.append(\"\t\toutputRow.set\"+varPrefix+select+\"(inputRow.get\"+varPrefix+select+\"());\\n\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\tString temp=select;\n\t\t\t\tif(select.contains(\"/\")) select=select.replaceAll(\"/\", \"_divide_\");\n\t\t\t\tif(select.contains(\"*\")) select=select.replaceAll(\"*\", \"_multiply_\");\n\t\t\t\tif(select.contains(\"+\")) select=select.replaceAll(\"+\", \"_add_\");\n\t\t\t\tif(select.contains(\"-\")) select=select.replaceAll(\"-\", \"_minus_\");\n\t\t\t\tif(select.contains(\")\")) select=select.replaceAll(\"[)]+\", \"\");\n\t\t\t\tif(select.contains(\"(\")) select=select.replaceAll(\"[(]+\", \"\");\n\t\t\t\tfileData.append(\"\t\ttemp = prepareClause(inputRow, inputRow, \\\"\"+temp+\"\\\", str, strList);\\n\");\n\t\t\t\tfileData.append(\"\t\tif(temp.contains(\\\"(\\\")) temp = expTree.execute(temp);\\r\\n\");\n\t\t\t\tfileData.append(\"\t\tif(temp.equals(\\\"discard_invalid_entry\\\")) return null;\\n\");\n\t\t\t\tfileData.append(\"\t\toutputRow.set\"+varPrefix+select+\"(Double.parseDouble(temp));\\n\");\n\t\t\t}\n\t\t}\n\t\tfileData.append(\"\t\treturn outputRow;\\n\");\n\t\tfileData.append(\"\t}\\n\");\n\t\t\n//WHERE CLAUSE EXECUTOR\n\t\tfileData.append(\"\\r\\n\tpublic ArrayList<InputRow> executeWhereClause(ArrayList<InputRow> inputResultSet) {\\r\\n\" + \n\t\t\t\t\"\t\tint i=0;\\r\\n\" + \n\t\t\t\t\"\t\twhile(i<inputResultSet.size()) {\\r\\n\" + \n\t\t\t\t\"\t\t\tString condition=prepareClause(inputResultSet.get(i), inputResultSet.get(i), payload.getWhereClause(), \\\"\\\", new ArrayList<String>());\\r\\n\" + \n\t\t\t\t\"\t\t\tif(condition.equals(\\\"discard_invalid_entry\\\") || !Boolean.parseBoolean(expTree.execute(condition))){\\r\\n\" + \n\t\t\t\t\"\t\t\t\tinputResultSet.remove(i);\\r\\n\" + \n\t\t\t\t\"\t\t\t\tcontinue;\\r\\n\" + \n\t\t\t\t\"\t\t\t}\\r\\n\" + \n\t\t\t\t\"\t\t\ti++;\\r\\n\" + \n\t\t\t\t\"\t\t}\\r\\n\" + \n\t\t\t\t\"\t\treturn inputResultSet;\\r\\n\" + \n\t\t\t\t\"\t}\\n\");\n\n//REFINE CLAUSE FOR PROCESSING\n\t\tfileData.append(\"\\r\\n\tpublic String prepareClause(InputRow row, InputRow rowZero, String condition, String str, ArrayList<String> strList) {\\r\\n\" + \n\t\t\t\t\"\t\tfor(int i=0;i<strList.size();i++) {\\r\\n\" + \n\t\t\t\t\"\t\t\tif(condition.contains(i+\\\"_\\\")) {\\r\\n\" + \n\t\t\t\t\"\t\t\t\tboolean flag=false;\\r\\n\" + \n\t\t\t\t\"\t\t\t\tfor(String ag : payload.getaggregate_functions()) {\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tif(!ag.contains(i+\\\"\\\")) continue;\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tif(condition.contains(ag)) flag=true;\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tcondition=condition.replaceAll(ag, ag+\\\"_\\\"+strList.get(i));\\r\\n\" + \n\t\t\t\t\"\t\t\t\t}\\r\\n\" + \n\t\t\t\t\"\t\t\t\tif(flag) {\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tboolean changeFlag=false;\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tfor(String key : aggregatesMap.keySet()) {\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\t\tif(condition.contains(key)) changeFlag=true;\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\t\tcondition = condition.replaceAll(key, Double.toString(aggregatesMap.get(key)));\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\t}\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tif(!changeFlag) return \\\"discard_invalid_entry\\\";\\r\\n\" + \n\t\t\t\t\"\t\t\t\t}\\r\\n\" + \n\t\t\t\t\"\t\t\t}\\r\\n\" + \n\t\t\t\t\"\t\t}\\r\\n\" + \n\t\t\t\t\"\t\t\\r\\n\" + \n\t\t\t\t\"\t\tif(condition.contains(\\\".\\\")) {\\r\\n\");\n\t\tfor(String var: projectionVars) {\n\t\t\tif(helper.columnMapping.get(var)==0 || helper.columnMapping.get(var)==1 || helper.columnMapping.get(var)==5)\n\t\t\t\tfileData.append(\"\t\t\tcondition=condition.replaceAll(\\\"[0-9]+\\\\\\\\.\"+var+\"\\\", row.get\"+varPrefix+var+\"());\\r\\n\");\n\t\t\telse\n\t\t\t\tfileData.append(\"\t\t\tcondition=condition.replaceAll(\\\"[0-9]+\\\\\\\\.\"+var+\"\\\", Integer.toString(row.get\"+varPrefix+var+\"()));\\r\\n\");\n\t\t}\n\t\tfileData.append(\"\t\t}\\n\");\n\t\t\n\t\tfor(String var: projectionVars) {\n\t\t\tif(helper.columnMapping.get(var)==0 || helper.columnMapping.get(var)==1 || helper.columnMapping.get(var)==5)\n\t\t\t\tfileData.append(\"\t\tcondition=condition.replaceAll(\\\"\"+var+\"\\\", rowZero.get\"+varPrefix+var+\"());\\r\\n\");\n\t\t\telse\n\t\t\t\tfileData.append(\"\t\tcondition=condition.replaceAll(\\\"\"+var+\"\\\", Integer.toString(rowZero.get\"+varPrefix+var+\"()));\\r\\n\");\n\t\t}\n\t\t\n\t\tfileData.append(\n\t\t\t\t\"\t\tcondition=condition.replaceAll(\\\"\\\\\\\\s+\\\", \\\"\\\");\\r\\n\" + \n\t\t\t\t\"\t\tcondition=condition.replaceAll(\\\"\\\\\\\"\\\", \\\"\\\");\\r\\n\" + \n\t\t\t\t\"\t\tcondition=condition.replaceAll(\\\"\\\\'\\\", \\\"\\\");\\r\\n\" + \n\t\t\t\t\"\t\t\\r\\n\" + \n\t\t\t\t\"\t\treturn condition;\\r\\n\" + \n\t\t\t\t\"\t}\\n\");\n\n//CREATE GROUPS\t\t\n\t\tfileData.append(\"\\r\\n\tpublic void createListsBasedOnSuchThatPredicate(ArrayList<InputRow> inputResultSet) {\\r\\n\" + \n\t\t\t\t\"\t\t\\r\\n\" + \n\t\t\t\t\"\t\tfor(int i=0;i<=payload.getnumber_of_grouping_variables();i++) {\\r\\n\" + \n\t\t\t\t\"\t\t\tArrayList<String> groupKeyStrings = new ArrayList<String>();\\r\\n\" + \n\t\t\t\t\"\t\t\tArrayList<InputRow> groupKeyRows = new ArrayList<InputRow>();\\r\\n\" + \n\t\t\t\t\"\t\t\tfor(InputRow row : inputResultSet) {\\r\\n\" + \n\t\t\t\t\"\t\t\t\tStringBuilder temp=new StringBuilder();\\r\\n\" + \n\t\t\t\t\"\t\t\t\tInputRow groupRow = new InputRow();\\r\\n\" + \n\t\t\t\t\"\t\t\t\tfor(String group: payload.getGroupingAttributesOfAllGroups().get(i)) {\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tint col = helper.columnMapping.get(group);\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tswitch(col) {\\r\\n\");\n\t\tfor(String var: projectionVars) {\n\t\t\tfileData.append(\"\t\t\t\t\t\tcase \"+helper.columnMapping.get(var)+\":\"+\"{temp.append(row.get\"+varPrefix+var+\"()+\\\"_\\\"); groupRow.set\"+varPrefix+ var+ \"(row.get\"+varPrefix+var+\"()); break;}\\r\\n\");\n\t\t}\n\t\tfileData.append(\"\t\t\t\t\t}\\n\"+\n\t\t\t\t\"\t\t\t\t}\\r\\n\" + \n\t\t\t\t\"\t\t\t\tString s=temp.toString();\\r\\n\" + \n\t\t\t\t\"\t\t\t\tif(s.charAt(s.length()-1)=='_') s=s.substring(0, s.length()-1);\\r\\n\" + \n\t\t\t\t\"\t\t\t\tif( !groupKeyStrings.contains(s) ) {\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tgroupKeyStrings.add(s);\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tgroupKeyRows.add(groupRow);\\r\\n\" + \n\t\t\t\t\"\t\t\t\t}\\r\\n\" + \n\t\t\t\t\"\t\t\t}\\r\\n\" + \n\t\t\t\t\"\t\t\tallGroupKeyRows.add(groupKeyRows);\\r\\n\" + \n\t\t\t\t\"\t\t\tallGroupKeyStrings.add(groupKeyStrings);\\r\\n\" + \n\t\t\t\t\"\t\t}\\r\\n\" + \n\t\t\t\t\"\t\t\\r\\n\" + \n\t\t\t\t\"\t\tfor(int i=0;i<=payload.getnumber_of_grouping_variables();i++) {\\r\\n\" + \n\t\t\t\t\"\t\t\tHashMap<String, ArrayList<InputRow>> res = new HashMap<String, ArrayList<InputRow>>();\\r\\n\" + \n\t\t\t\t\"\t\t\tString suchThat = payload.getsuch_that_predicates().get(i);\\r\\n\" + \n\t\t\t\t\"\t\t\tfor(int j=0;j<allGroupKeyRows.get(i).size();j++) {\\r\\n\" + \n\t\t\t\t\"\t\t\t\tInputRow zeroRow = allGroupKeyRows.get(i).get(j);\\r\\n\" + \n\t\t\t\t\"\t\t\t\tArrayList<InputRow> groupMember = new ArrayList<InputRow>();\\r\\n\" + \n\t\t\t\t\"\t\t\t\tfor(InputRow salesRow : inputResultSet) {\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tString condition = prepareClause(salesRow, zeroRow, suchThat, \\\"\\\", new ArrayList<String>());\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tif(Boolean.parseBoolean(expTree.execute(condition))) {\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\t\tgroupMember.add(salesRow);\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\t}\\r\\n\" + \n\t\t\t\t\"\t\t\t\t}\\r\\n\" + \n\t\t\t\t\"\t\t\t\tres.put(allGroupKeyStrings.get(i).get(j), new ArrayList<InputRow>(groupMember));\\r\\n\" + \n\t\t\t\t\"\t\t\t}\\r\\n\" + \n\t\t\t\t\"\t\t\tallGroups.add(new HashMap<String, ArrayList<InputRow>>(res));\\r\\n\" + \n\t\t\t\t\"\t\t}\\r\\n\" + \n\t\t\t\t\"\t}\\n\");\n\t\t\n//GETGROUPING VARIABLE METHOD\n\t\tfileData.append(\"\\r\\n\tpublic String getGroupingVariable(int i, InputRow row) {\\r\\n\" + \n\t\t\t\t\"\t\tswitch(i) {\\r\\n\");\n\t\tfor(String var: projectionVars) {\n\t\t\tif(helper.columnMapping.get(var)==0||helper.columnMapping.get(var)==1||helper.columnMapping.get(var)==5)\n\t\t\t\tfileData.append(\"\t\t\tcase \"+helper.columnMapping.get(var)+\": return row.get\"+varPrefix+var+\"();\\r\\n\");\n\t\t\telse if(helper.columnMapping.get(var)==7)\n\t\t\t\tfileData.append(\"\t\t\tcase \"+helper.columnMapping.get(var)+\": return \\\"all\\\"\");\n\t\t\telse\n\t\t\t\tfileData.append(\"\t\t\tcase \"+helper.columnMapping.get(var)+\": return Integer.toString(row.get\"+varPrefix+var+\"());\\r\\n\");\n\t\t}\n\t\tfileData.append(\"\t\t}\\r\\n\");\n\t\tfileData.append(\"\t\treturn \\\"__Garbage__\\\";\\r\\n\");\n\t\tfileData.append(\"\t}\\n\");\n\t\t\n//COMPUTE AGGREGATES METHOD\n\t\tfileData.append(\"\\r\\n\tpublic void computeAggregates(ArrayList<InputRow> inputResultSet) {\t\\r\\n\" + \n\t\t\t\t\"\t\tdouble val=0;\\r\\n\"+\n\t\t\t\t\"\t\tfor(int i=0; i<=payload.getnumber_of_grouping_variables();i++) {\\r\\n\" + \n\t\t\t\t\"\t\t\tlistMapsAggregates.add(new HashMap<String, String>());\\r\\n\" + \n\t\t\t\t\"\t\t}\\r\\n\" + \n\t\t\t\t\"\t\tfor(int i=0;i<payload.getnumber_of_aggregate_functions();i++) {\\r\\n\" + \n\t\t\t\t\"\t\t\tString[] temp = payload.getaggregate_functions().get(i).split(\\\"_\\\",3);\\r\\n\" + \n\t\t\t\t\"\t\t\tlistMapsAggregates.get(Integer.parseInt(temp[0])).put(temp[1], temp[2]);//(key,value) -> (aggregate function , column name)\\r\\n\" + \n\t\t\t\t\"\t\t}\\r\\n\"+\n\t\t\t\t\"\t\tint nGroupingVariables=0;\\r\\n\"+\n\t\t\t\t\"\t\taggregatesMap = new HashMap<>();\\r\\n\"+\n\t\t\t\t\"\t\tHashMap<String,Double> tempAggregatesMap;\\r\\n\");\n\t\t\n\t\tfor(int nGroupingVariables=0;nGroupingVariables<=payload.getnumber_of_grouping_variables();nGroupingVariables++) {\n\t\t\tfileData.append(\"\\n\t\tnGroupingVariables=\"+nGroupingVariables+\";\\r\\n\");\n\t\t\tfileData.append(\n\t\t\t\t\t\t\t\"\t\ttempAggregatesMap = new HashMap<String,Double>();\\r\\n\" + \n\t\t\t\t\t\t\t\"\t\t\\r\\n\" + \n\t\t\t\t\t\t\t\"\t\tfor(int i=0;i<allGroupKeyRows.get(nGroupingVariables).size(); i++) {\\r\\n\" + \n\t\t\t\t\t\t\t\"\t\t\tInputRow zeroRow = allGroupKeyRows.get(nGroupingVariables).get(i);\\r\\n\" );\n\t\t\t\n\t\t\t//MFvsEMF\n\t\t\tif(isGroupMF(nGroupingVariables)) fileData.append(\"\t\t\tfor(InputRow row: allGroups.get(nGroupingVariables).get(allGroupKeyStrings.get(nGroupingVariables).get(i)))\t{\\r\\n\");\n\t\t\telse fileData.append(\"\t\t\tfor(InputRow row: inputResultSet) {\\r\\n\");\n\t\t\t\n\t\t\tfileData.append(\"\t\t\t\tString condition = payload.getsuch_that_predicates().get(nGroupingVariables);\\r\\n\" + \n\t\t\t\t\t\t\t\"\t\t\t\tString str = allGroupKeyStrings.get(nGroupingVariables).get(i);\\r\\n\" + \n\t\t\t\t\t\t\t\"\t\t\t\tArrayList<String> strList = new ArrayList<String>();\\r\\n\" + \n\t\t\t\t\t\t\t\"\t\t\t\tfor(int j=0;j<=payload.getnumber_of_grouping_variables();j++) strList.add(str);\\r\\n\" +\n\t\t\t\t\t\t\t\"\t\t\t\tcondition= prepareClause(row, zeroRow, condition, str, strList);\\r\\n\" + \n\t\t\t\t\t\t\t\"\t\t\t\tif(condition.equals(\\\"discard_invalid_entry\\\") || !Boolean.parseBoolean(expTree.execute(condition))) continue;\\r\\n\"\n\t\t\t\t\t\t\t);\n\t\t\tString key1 = nGroupingVariables+\"_sum_\"+listMapsAggregates.get(nGroupingVariables).get(\"sum\");\n\t\t\tString key2 = nGroupingVariables+\"_avg_\"+listMapsAggregates.get(nGroupingVariables).get(\"avg\");\n\t\t\tString key3 = nGroupingVariables+\"_min_\"+listMapsAggregates.get(nGroupingVariables).get(\"min\");\n\t\t\tString key4 = nGroupingVariables+\"_max_\"+listMapsAggregates.get(nGroupingVariables).get(\"max\");\n\t\t\tString key5 = nGroupingVariables+\"_count_\"+listMapsAggregates.get(nGroupingVariables).get(\"count\");\n\t\t\tString key6 = nGroupingVariables+\"_count_\"+listMapsAggregates.get(nGroupingVariables).get(\"avg\");\n\t\t\t\n\t\t\tif(listMapsAggregates.get(nGroupingVariables).containsKey(\"sum\")) \n\t\t\t\tfileData.append(\"\t\t\t\tString key1=\\\"\"+key1+\"\\\";\\r\\n\");\n\t\t\tif(listMapsAggregates.get(nGroupingVariables).containsKey(\"avg\")) {\n\t\t\t\tfileData.append(\"\t\t\t\tString key2=\\\"\"+key2+\"\\\";\\r\\n\");\n\t\t\t\tfileData.append(\"\t\t\t\tString key6=\\\"\"+key6+\"\\\";\\r\\n\");\n\t\t\t}\n\t\t\tif(listMapsAggregates.get(nGroupingVariables).containsKey(\"min\"))\n\t\t\t\tfileData.append(\"\t\t\t\tString key3=\\\"\"+key3+\"\\\";\\r\\n\");\n\t\t\tif(listMapsAggregates.get(nGroupingVariables).containsKey(\"max\"))\n\t\t\t\tfileData.append(\"\t\t\t\tString key4=\\\"\"+key4+\"\\\";\\r\\n\");\n\t\t\tif(listMapsAggregates.get(nGroupingVariables).containsKey(\"count\"))\n\t\t\t\tfileData.append(\"\t\t\t\tString key5=\\\"\"+key5+\"\\\";\\r\\n\");\n\t\t\t\n\t\t\tfileData.append(\"\t\t\t\tfor(String ga: payload.getGroupingAttributesOfAllGroups().get(nGroupingVariables)) {\\r\\n\");\n\t\t\tif(listMapsAggregates.get(nGroupingVariables).containsKey(\"sum\")) \n\t\t\t\tfileData.append(\"\t\t\t\t\tkey1=key1+\\\"_\\\"+ getGroupingVariable(helper.columnMapping.get(ga), zeroRow);\\r\\n\");\n\t\t\tif(listMapsAggregates.get(nGroupingVariables).containsKey(\"avg\")) {\n\t\t\t\tfileData.append(\"\t\t\t\t\tkey2=key2+\\\"_\\\"+ getGroupingVariable(helper.columnMapping.get(ga), zeroRow);\\r\\n\");\n\t\t\t\tfileData.append(\"\t\t\t\t\tkey6=key6+\\\"_\\\"+ getGroupingVariable(helper.columnMapping.get(ga), zeroRow);\\r\\n\");\n\t\t\t}\n\t\t\tif(listMapsAggregates.get(nGroupingVariables).containsKey(\"min\"))\n\t\t\t\tfileData.append(\"\t\t\t\t\tkey3=key3+\\\"_\\\"+ getGroupingVariable(helper.columnMapping.get(ga), zeroRow);\\r\\n\");\n\t\t\tif(listMapsAggregates.get(nGroupingVariables).containsKey(\"max\"))\n\t\t\t\tfileData.append(\"\t\t\t\t\tkey4=key4+\\\"_\\\"+ getGroupingVariable(helper.columnMapping.get(ga), zeroRow);\\r\\n\");\n\t\t\tif(listMapsAggregates.get(nGroupingVariables).containsKey(\"count\"))\n\t\t\t\tfileData.append(\"\t\t\t\t\tkey5=key5+\\\"_\\\"+ getGroupingVariable(helper.columnMapping.get(ga), zeroRow);\\r\\n\");\n\t\t\tfileData.append(\"\t\t\t\t}\\r\\n\");\n\t\t\t\n\t\t\tif(listMapsAggregates.get(nGroupingVariables).containsKey(\"sum\")) {\n\t\t\t\tfileData.append(\"\t\t\tval=tempAggregatesMap.getOrDefault(key1, 0.0)+Double.parseDouble(getGroupingVariable(helper.columnMapping.get(listMapsAggregates.get(nGroupingVariables).get(\\\"sum\\\")), row));\\r\\n\" + \n\t\t\t\t\"\t\t\ttempAggregatesMap.put(key1, val);\\r\\n\");\n\t\t\t}\n\t\t\tif(listMapsAggregates.get(nGroupingVariables).containsKey(\"avg\")) {\n\t\t\t\tfileData.append(\"\t\t\tval=tempAggregatesMap.getOrDefault(key2, 0.0)+Double.parseDouble(getGroupingVariable(helper.columnMapping.get(listMapsAggregates.get(nGroupingVariables).get(\\\"avg\\\")), row));\\r\\n\"+\n\t\t\t\t\"\t\t\ttempAggregatesMap.put(key2, val);\\r\\n\"+\n\t\t\t\t\"\t\t\ttempAggregatesMap.put(key6, tempAggregatesMap.getOrDefault(key6, 0.0)+1);\\r\\n\");\n\t\t\t}\n\t\t\tif(listMapsAggregates.get(nGroupingVariables).containsKey(\"min\")) {\n\t\t\t\tfileData.append(\"\t\t\tval=Math.min( tempAggregatesMap.getOrDefault(key3, Double.MAX_VALUE) , Double.parseDouble(getGroupingVariable(helper.columnMapping.get(listMapsAggregates.get(nGroupingVariables).get(\\\"min\\\")), row)));\\r\\n\"+\n\t\t\t\t\"\t\t\ttempAggregatesMap.put(key3, val);\\r\\n\");\n\t\t\t}\n\t\t\tif(listMapsAggregates.get(nGroupingVariables).containsKey(\"max\")) {\n\t\t\t\tfileData.append(\"\t\t\tval=Math.max( tempAggregatesMap.getOrDefault(key4, Double.MIN_VALUE) , Double.parseDouble(getGroupingVariable(helper.columnMapping.get(listMapsAggregates.get(nGroupingVariables).get(\\\"max\\\")), row)));\\r\\n\"+\n\t\t\t\t\"\t\t\ttempAggregatesMap.put(key4, val);\");\n\t\t\t}\n\t\t\tif(listMapsAggregates.get(nGroupingVariables).containsKey(\"count\")) {\n\t\t\t\tfileData.append(\"\t\t\ttempAggregatesMap.put(key5, tempAggregatesMap.getOrDefault(key5, 0.0)+1);\\r\\n\");\n\t\t\t}\n\t\t\tfileData.append(\"\t\t\t}\\r\\n\");\n\t\t\tfileData.append(\"\t\t}\\r\\n\");\n\t\t\tif(listMapsAggregates.get(nGroupingVariables).containsKey(\"avg\")) {\n\t\t\t\tfileData.append(\n\t\t\t\t\"\t\tfor(String key: tempAggregatesMap.keySet()) {\\r\\n\"+\n\t\t\t\t\"\t\t\tif(key.contains(\\\"_avg_\\\"))\\r\\n\"+\n\t\t\t\t\"\t\t\t\ttempAggregatesMap.put(key, tempAggregatesMap.get(key)/tempAggregatesMap.get(key.replace(\\\"_avg_\\\", \\\"_count_\\\")));\\r\\n\"+\n\t\t\t\t\"\t\t}\\r\\n\");\n\t\t\t}\n\t\t\tfileData.append(\"\t\taggregatesMap.putAll(tempAggregatesMap);\\r\\n\");\n\t\t}\n\t\t\n\t\tfileData.append(\"\t}\\n\");\n\n//PREPARE THE RESULTS AND ADD THEM TO A LIST OF OUTPUTROW\n\t\tfileData.append(\"\\r\\n\tpublic ArrayList<OutputRow> createOutputResultSet() {\\r\\n\" + \n\t\t\t\t\"\t\tArrayList<OutputRow> outputRowList = new ArrayList<OutputRow>();\\r\\n\"+\n\t\t\t\t\"\t\tfor(int i=0; i<allGroupKeyRows.get(0).size();i++) {\\r\\n\" + \n\t\t\t\t\"\t\t\tString str=allGroupKeyStrings.get(0).get(i);\\r\\n\" + \n\t\t\t\t\"\t\t\tString[] tempStr = str.split(\\\"_\\\");\\r\\n\" + \n\t\t\t\t\"\t\t\tArrayList<String> strList = new ArrayList<String>();\\r\\n\" + \n\t\t\t\t\"\t\t\tfor(int j=0; j<=payload.getnumber_of_grouping_variables(); j++) {\\r\\n\" + \n\t\t\t\t\"\t\t\t\tString ss = \\\"\\\";\\r\\n\" + \n\t\t\t\t\"\t\t\t\tint k=0;\\r\\n\" + \n\t\t\t\t\"\t\t\t\tfor(String gz: payload.getgrouping_attributes()) {\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\tif(payload.getGroupingAttributesOfAllGroups().get(j).contains(gz)) ss=ss+tempStr[k++]+\\\"_\\\";\\r\\n\" + \n\t\t\t\t\"\t\t\t\t\telse k++;\\r\\n\" + \n\t\t\t\t\"\t\t\t\t}\\r\\n\" + \n\t\t\t\t\"\t\t\t\tstrList.add(ss.substring(0, ss.length()-1));\\r\\n\" + \n\t\t\t\t\"\t\t\t}\\r\\n\" + \n\t\t\t\t\"\t\t\t//having check\\r\\n\" + \n\t\t\t\t\"\t\t\tif(payload.isHavingClause()) {\\r\\n\" + \n\t\t\t\t\"\t\t\t\tString condition= prepareClause(allGroupKeyRows.get(0).get(i), allGroupKeyRows.get(0).get(i), payload.getHavingClause(), str, strList);\\r\\n\" + \n\t\t\t\t\"\t\t\t\tif(condition.equals(\\\"discard_invalid_entry\\\") || !Boolean.parseBoolean(expTree.execute(condition))) continue;\\r\\n\" + \n\t\t\t\t\"\t\t\t}\\r\\n\" + \n\t\t\t\t\"\\r\\n\" + \n\t\t\t\t\"\t\t\tOutputRow outputRow= convertInputToOutputRow(allGroupKeyRows.get(0).get(i), str, strList);\\r\\n\"+\n\t\t\t\t\"\t\t\tif(outputRow!=null){\\r\\n\" + \n\t\t\t\t\"\t\t\t\toutputRowList.add(outputRow);\\r\\n\"+\n\t\t\t\t\"\t\t\t}\\r\\n\"+\t\n\t\t\t\t\"\t\t}\\r\\n\" + \n\t\t\t\t\"\t\treturn outputRowList;\\r\\n\"+\n\t\t\t\t\"\t}\\n\");\n\t\t\n//PRINT THE OUTPUT ROW\n\t\tfileData.append(\"\\r\\n\tpublic void printOutputResultSet(ArrayList<OutputRow> outputResultSet) throws IOException{\\r\\n\");\n\t\tfileData.append(\"\t\tCalendar now = Calendar.getInstance();\\r\\n\" + \n\t\t\t\t\"\t\tDateFormat dateFormat = new SimpleDateFormat(\\\"MM/dd/yyyy HH:mm:ss\\\");\\r\\n\" + \n\t\t\t\t\"\t\tStringBuilder fileData = new StringBuilder();\\r\\n\" + \n\t\t\t\t\"\t\tfileData.append(\\\"TIME (MM/dd/yyyy HH:mm:ss)::::\\\"+dateFormat.format(now.getTime())+\\\"\\\\r\\\\n\\\");\\r\\n\" + \n\t\t\t\t\"\t\tString addDiv = \\\" -------------- \\\";\\r\\n\" + \n\t\t\t\t\"\t\tString divide = \\\"\\\";\\r\\n\" + \n\t\t\t\t\"\t\tString header=\\\"\\\";\"+\n\t\t\t\t\"\t\tfor(String select: payload.getselect_variables()) {\\r\\n\" + \n\t\t\t\t\"\t\t\tif(select.contains(\\\"0_\\\")) select=select.substring(2);\\r\\n\" + \n\t\t\t\t\"\t\t\theader=header+\\\" \\\"+select;\\r\\n\" + \n\t\t\t\t\"\t\t\tfor(int i=0;i<14-select.length();i++) header=header+\\\" \\\";\\r\\n\" + \n\t\t\t\t\"\t\t\tdivide=divide+addDiv;\\r\\n\"+\n\t\t\t\t\"\t\t}\\r\\n\" + \n\t\t\t\t\"\t\tSystem.out.println(divide); fileData.append(divide+\\\"\\\\r\\\\n\\\");\\r\\n\" + \n\t\t\t\t\"\t\tSystem.out.println(header); fileData.append(header+\\\"\\\\r\\\\n\\\");\\r\\n\" + \n\t\t\t\t\"\t\tSystem.out.println(divide); fileData.append(divide+\\\"\\\\r\\\\n\\\");\\r\\n\" + \n\t\t\t\t//\"\t\tSystem.out.println(); fileData.append(\\\"\\\\r\\\\n\\\");\\r\\n\" + \n\t\t\t\t\"\t\tString ansString=\\\"\\\";\\r\\n\" + \n\t\t\t\t\"\t\tDecimalFormat df = new DecimalFormat(\\\"#.####\\\");\\r\\n\");\n\t\tfileData.append(\"\t\tfor(OutputRow outputRow: outputResultSet) {\\r\\n\");\n\t\tfileData.append(\"\t\t\tString answer=\\\"\\\";\\r\\n\");\n\t\t\n\t\tfor(String select: payload.getselect_variables()) {\n\t\t\tif(helper.columnMapping.containsKey(select)) {\n\t\t\t\tint col = helper.columnMapping.get(select);\n\t\t\t\tif(col==0|| col==1|| col==5) {\n\t\t\t\t\t//string\n\t\t\t\t\tfileData.append(\"\t\t\tansString=outputRow.get\"+varPrefix+select+\"();\\r\\n\");\n\t\t\t\t\tfileData.append(\"\t\t\tanswer=answer+\\\" \\\"+ansString;\\r\\n\");\n\t\t\t\t\tfileData.append(\"\t\t\tfor(int k=0;k<14-ansString.length();k++) answer=answer+\\\" \\\";\\r\\n\");\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t//int\n\t\t\t\t\tfileData.append(\"\t\t\tansString = Integer.toString(outputRow.get\"+varPrefix+select+\"());\\r\\n\");\n\t\t\t\t\tfileData.append(\"\t\t\tfor(int k=0;k<12-ansString.length();k++) answer=answer+\\\" \\\";\\r\\n\");\n\t\t\t\t\tfileData.append(\"\t\t\tanswer=answer+ansString+\\\" \\\";\\r\\n\");\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//double\n\t\t\t\tif(select.contains(\"/\")) select=select.replaceAll(\"/\", \"_divide_\");\n\t\t\t\tif(select.contains(\"*\")) select=select.replaceAll(\"*\", \"_multiply_\");\n\t\t\t\tif(select.contains(\"+\")) select=select.replaceAll(\"+\", \"_add_\");\n\t\t\t\tif(select.contains(\"-\")) select=select.replaceAll(\"-\", \"_minus_\");\n\t\t\t\tif(select.contains(\")\")) select=select.replaceAll(\"[)]+\", \"\");\n\t\t\t\tif(select.contains(\"(\")) select=select.replaceAll(\"[(]+\", \"\");\n\t\t\t\tfileData.append(\"\t\t\tansString = df.format(outputRow.get\"+varPrefix+select+\"());\\r\\n\");\n\t\t\t\tfileData.append(\"\t\t\tfor(int k=0;k<12-ansString.length();k++) answer=answer+\\\" \\\";\\r\\n\");\n\t\t\t\tfileData.append(\"\t\t\tanswer=answer+ansString+\\\" \\\";\\r\\n\");\n\t\t\t}\n\t\t}\n\t\tfileData.append(\"\t\t\tSystem.out.println(answer); fileData.append(answer+\\\"\\\\r\\\\n\\\");\\r\\n\");\n\t\tfileData.append(\"\t\t}\\r\\n\");\n\t\tfileData.append(\"\t\tFileOutputStream fos = new FileOutputStream(\\\"queryOutput/\"+payload.fileName+\"\\\");\\r\\n\" + \n\t\t\t\t\"\t\tfos.write(fileData.toString().getBytes());\\r\\n\" + \n\t\t\t\t\"\t\tfos.flush();\\r\\n\" + \n\t\t\t\t\"\t\tfos.close();\\r\\n\");\n\t\tfileData.append(\"\t}\\r\\n\");\n\t\t\n\t\t\n//DRIVER METHOD OF THE QUERY PROCESSOR\n\t\tfileData.append(\"\\r\\n\tpublic void process() throws IOException{\\r\\n\" + \n\t\t\t\t\"\t\tArrayList<InputRow> inputResultSet = createInputSet();\\r\\n\" + \n\t\t\t\t\"\t\tif(payload.getIsWhereClause()) inputResultSet = executeWhereClause(inputResultSet);\\r\\n\" + \n\t\t\t\t\"\t\tif(payload.getnumber_of_grouping_variables()>0) createListsBasedOnSuchThatPredicate(inputResultSet);\\r\\n\" + \n\t\t\t\t\"\t\tcomputeAggregates(inputResultSet);\\r\\n\" + \n\t\t\t\t\"\t\tArrayList<OutputRow> outputResultSet = createOutputResultSet();\\r\\n\" + \n\t\t\t\t\"\t\tprintOutputResultSet(outputResultSet);\\r\\n\"+\n\t\t\t\t\"\t}\\n\");\n\t\t\n\t\tfileData.append(\"}\");\n\t\tFileOutputStream fos = new FileOutputStream(\"src/dbmsProject/QueryProcessor.java\");\n\t\tfos.write(fileData.toString().getBytes());\n\t\tfos.flush();\n\t\tfos.close();\n\t}", "protected abstract List<?> getRowValues(T dataObject);", "public interface QuerySql extends ConditionAble, Stream {\n\n\t/**\n\t * Add parameters to your SQL to replace the question mark?This is a more\n\t * recommended way to replace string splices\n\t * \n\t * @param paramers\n\t * @return\n\t */\n\tQuerySql addParamer(Object... paramers);\n\n\tint update();\n\n\t/**\n\t * \n\t * <p>\n\t * If you need to return a result set instead of a single item; The return type\n\t * is automatically determined by the constructor. If you want to return an\n\t * entity type, add the entity type before the {@link #list(Class)} method\n\t * \n\t * <p>\n\t * The method is equivalent to the integrator of two methods\n\t * \n\t * @see #entities(Class)\n\t * @see #maps()\n\t * \n\t */\n\t<T> List<T> list();\n\n\t<T> List<T> list(Class<T> entityClass);\n\n\t/**\n\t * \n\t * @return Returns a collection of entity class mappings.\n\t */\n\t<T> List<T> entities(Class<T> entityClass);\n\n\t/**\n\t * The result set encapsulated in the form of\n\t * {@code List<Map<String,Object>>}<br>\n\t * This will be an acceptable way to get the mapping of SQL result sets\n\t * \n\t * @return {@link List}{@code <}{@link Map}{@code <}\n\t * {@link String},{@link Object}{@code >}{@code >}\n\t */\n\tList<Map<String, Object>> maps();\n\n\t/**\n\t * \n\t * @param alias - Aliased key-value pairs, returned as aliased key-value if\n\t * matched\n\t * @return\n\t * @since 2.24\n\t */\n\tList<Map<String, Object>> maps(HashMap<String, String> alias);\n\n\t/**\n\t * The result set encapsulated in the form of {@code Map<String,Object>}<br>\n\t * This will be an acceptable way to get the mapping of SQL result sets\n\t * \n\t * @return {@link Map}{@code <} {@link String},{@link Object}{@code >}\n\t */\n\tMap<String, Object> map();\n\n\t/**\n\t * Returns a single result;The return type is automatically determined based on\n\t * the constructor, and if you want to return an entity type, add before that\n\t * \n\t * @return\n\t */\n\t<T> T unique();\n\n\t\n\t/**\n\t * Specify entity class mappings\n\t * @param entityClass - Be sure to include an {@link Id} annotation to declare the primary key\n\t * @return\n\t */\n\t<T> T unique(Class<T> entityClass);\n\t\n\t<T> T entity(Class<T> entityClass);\n\n\t/**\n\t * Gets the columns contained in the query result.\n\t * \n\t * @return\n\t */\n\tList<Column> getQueryColumns();\n\n\t@Override\n\tQuerySql addCondition(Condition cond);\n\n\t@Override\n\tQuerySql addCondition(String fieldName, Cs cs);\n\n\t@Override\n\tQuerySql addCondition(String fieldName, Cs cs, Object value);\n\n\t@Override\n\tQuerySql addCondition(Consumer<List<Condition>> conds);\n\n\t/**\n\t * An extension to the {@link Stream} interface,Returns the specified number of\n\t * results from the SQL statement\n\t * \n\t * @param count\n\t */\n\tList<Map<String, Object>> stream(int count);\n\n}", "public interface MultiValueTableAdapter {\n\t//public void setComplexTable( ComplexTable table );\n\tpublic Object[] extract( Object o );\n\tpublic Object extractEvenNoValueExist( Object o );\n\tpublic void combine( Object o, Object[] extractValues );\n\tpublic ObjectNewer getObjectNewer();\n}", "@Override\n\t public mesconfig mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t mesconfig mes = new mesconfig();\n\t mes.setTitle(rs.getString(1));\n\t mes.setKeyword(rs.getString(2));\n\t mes.setDescription(rs.getString(3));\n\n\t return mes;\n\t }", "java.util.List<io.dstore.engine.procedures.FoModifyForumsInCategoriesAd.Response.Row> \n getRowList();", "@POST\n public String SendQueryResult(String data) throws JsonProcessingException {\n ObjectMapper objectMapper = new ObjectMapper();\n InputQueryData inputQueryData = new ObjectMapper().readValue(data, InputQueryData.class);\n// System.out.println(inputQueryData.getTableName());\n// System.out.println(inputQueryData.getSelectedColumns());\n// System.out.println(inputQueryData.getWhereConditionSelectedColumns());\n// System.out.println(inputQueryData.getWhereConditionSelectedValues());\n\n\n ManageFact manageFact = new ManageFact();\n\n String resultQuery = manageFact.QueryGenerator(inputQueryData.getTableName(), inputQueryData.getSelectedColumns(), inputQueryData.getWhereConditionSelectedColumns(), inputQueryData.getWhereConditionSelectedValues(),inputQueryData.getGroupByColumns());\n\n\n\n\n return objectMapper.writeValueAsString(resultQuery);\n }", "protected abstract ParsedStudySetModel parseOutStudySetModel(List<String> row);", "public interface LocalResultSet {\n\n public boolean next();\n public int getInt(String fldname);\n public String getString(String fldname);\n public LocalMetaData getMetaData();\n public void close();\n}", "public abstract Statement queryToRetrieveData();", "Row<K, C> execute();", "public Object mapRow(ResultSet rs, int rowNumber) throws SQLException {\n\t\tObject result;\n\t\ttry {\n\t\t\tresult = this.defaultConstruct.newInstance((Object[]) null);\n\t\t}\n\t\tcatch (IllegalAccessException e) {\n\t\t\tthrow new DataAccessResourceFailureException(\"Failed to load class \" + this.mappedClass.getName(), e);\n\t\t}\n\t\tcatch (InvocationTargetException e) {\n\t\t\tthrow new DataAccessResourceFailureException(\"Failed to load class \" + this.mappedClass.getName(), e);\n\t\t}\n\t\tcatch (InstantiationException e) {\n\t\t\tthrow new DataAccessResourceFailureException(\"Failed to load class \" + this.mappedClass.getName(), e);\n\t\t}\n\t\tResultSetMetaData meta = rs.getMetaData();\n\t\tint columns = meta.getColumnCount();\n\t\tfor (int i = 1; i <= columns; i++) {\n\t\t\tString field = meta.getColumnName(i).toLowerCase();\n\t\t\tPersistentField fieldMeta = (PersistentField) this.mappedFields.get(field);\n\t\t\tif (fieldMeta != null) {\n\t\t\t\ttry {\n\t\t\t\t\tObject value = null;\n\t\t\t\t\tClass fieldType = fieldMeta.getJavaType();\n\t\t\t\t\tMethod m = result.getClass().getMethod(setterName(fieldMeta.getColumnName()), new Class[]{fieldType});\n\t\t\t\t\tif (fieldType.equals(String.class)) {\n\t\t\t\t\t\tvalue = rs.getString(field);\n\t\t\t\t\t}\n\t\t\t\t\telse if (fieldType.equals(byte.class) || fieldType.equals(Byte.class)) {\n\t\t\t\t\t\tvalue = new Byte(rs.getByte(field));\n\t\t\t\t\t}\n\t\t\t\t\telse if (fieldType.equals(short.class) || fieldType.equals(Short.class)) {\n\t\t\t\t\t\tvalue = new Short(rs.getShort(field));\n\t\t\t\t\t}\n\t\t\t\t\telse if (fieldType.equals(int.class) || fieldType.equals(Integer.class)) {\n\t\t\t\t\t\tvalue = new Integer(rs.getInt(field));\n\t\t\t\t\t}\n\t\t\t\t\telse if (fieldType.equals(long.class) || fieldType.equals(Long.class)) {\n\t\t\t\t\t\tvalue = new Long(rs.getLong(field));\n\t\t\t\t\t}\n\t\t\t\t\telse if (fieldType.equals(float.class) || fieldType.equals(Float.class)) {\n\t\t\t\t\t\tvalue = new Float(rs.getFloat(field));\n\t\t\t\t\t}\n\t\t\t\t\telse if (fieldType.equals(double.class) || fieldType.equals(Double.class)) {\n\t\t\t\t\t\tvalue = new Double(rs.getDouble(field));\n\t\t\t\t\t}\n\t\t\t\t\telse if (fieldType.equals(BigDecimal.class)) {\n\t\t\t\t\t\tvalue = rs.getBigDecimal(field);\n\t\t\t\t\t}\n\t\t\t\t\telse if (fieldType.equals(boolean.class) || fieldType.equals(Boolean.class)) {\n\t\t\t\t\t\tvalue = (rs.getBoolean(field)) ? Boolean.TRUE : Boolean.FALSE;\n\t\t\t\t\t}\n\t\t\t\t\telse if (fieldType.equals(Date.class)) {\n\t\t\t\t\t\tif (fieldMeta.getSqlType() == Types.DATE) {\n\t\t\t\t\t\t\tvalue = rs.getDate(field);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (fieldMeta.getSqlType() == Types.TIME) {\n\t\t\t\t\t\t\tvalue = rs.getTime(field);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tvalue = rs.getTimestamp(field);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (m != null) {\n\t\t\t\t\t\tm.invoke(result, new Object[]{value});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch (NoSuchMethodException e) {\n\t\t\t\t\tthrow new DataAccessResourceFailureException(new StringBuffer().append(\"Failed to map field \").append(fieldMeta.getFieldName()).append(\".\").toString(), e);\n\t\t\t\t}\n\t\t\t\tcatch (IllegalAccessException e) {\n\t\t\t\t\tthrow new DataAccessResourceFailureException(new StringBuffer().append(\"Failed to map field \").append(fieldMeta.getFieldName()).append(\".\").toString(), e);\n\t\t\t\t}\n\t\t\t\tcatch (InvocationTargetException e) {\n\t\t\t\t\tthrow new DataAccessResourceFailureException(new StringBuffer().append(\"Failed to map field \").append(fieldMeta.getFieldName()).append(\".\").toString(), e);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "private List<Object> handleResult(List<Object> resultSet)\n {\n List<Object> result = new ArrayList<>();\n final Expression[] grouping = compilation.getExprGrouping();\n if (grouping != null)\n {\n Comparator<Object> c = new Comparator<>()\n {\n public int compare(Object arg0, Object arg1)\n {\n for (int i = 0; i < grouping.length; i++)\n {\n state.put(candidateAlias, arg0);\n Object a = grouping[i].evaluate(evaluator);\n state.put(candidateAlias, arg1);\n Object b = grouping[i].evaluate(evaluator);\n\n // Put any null values at the end\n if (a == null && b == null)\n {\n return 0;\n }\n else if (a == null)\n {\n return -1;\n }\n else if (b == null)\n {\n return 1;\n }\n else\n {\n int result = ((Comparable)a).compareTo(b);\n if (result != 0)\n {\n return result;\n }\n }\n }\n return 0;\n }\n };\n \n List<List<Object>> groups = new ArrayList<>();\n List<Object> group = new ArrayList<>();\n if (!resultSet.isEmpty())\n {\n groups.add(group);\n }\n for (int i = 0; i < resultSet.size(); i++)\n {\n if (i > 0)\n {\n if (c.compare(resultSet.get(i - 1), resultSet.get(i)) != 0)\n {\n group = new ArrayList<>();\n groups.add(group);\n }\n }\n group.add(resultSet.get(i));\n }\n\n // Apply the result to the generated groups\n for (int i = 0; i < groups.size(); i++)\n {\n group = groups.get(i);\n result.add(result(group));\n }\n }\n else\n {\n boolean aggregates = false;\n Expression[] resultExprs = compilation.getExprResult();\n if (resultExprs.length > 0 && resultExprs[0] instanceof CreatorExpression)\n {\n Expression[] resExpr = ((CreatorExpression)resultExprs[0]).getArguments().toArray(\n new Expression[((CreatorExpression)resultExprs[0]).getArguments().size()]);\n for (int i = 0; i < resExpr.length; i++)\n {\n if (resExpr[i] instanceof InvokeExpression)\n {\n String method = ((InvokeExpression) resExpr[i]).getOperation().toLowerCase();\n if (method.equals(\"count\") || method.equals(\"sum\") || method.equals(\"avg\") || method.equals(\"min\") || method.equals(\"max\"))\n {\n aggregates = true;\n }\n }\n }\n }\n else\n {\n for (int i = 0; i < resultExprs.length; i++)\n {\n if (resultExprs[i] instanceof InvokeExpression)\n {\n String method = ((InvokeExpression)resultExprs[i]).getOperation().toLowerCase();\n if (method.equals(\"count\") || method.equals(\"sum\") || method.equals(\"avg\") || method.equals(\"min\") || method.equals(\"max\"))\n {\n aggregates = true;\n }\n }\n }\n }\n \n if (aggregates)\n {\n result.add(result(resultSet));\n }\n else\n {\n for (int i = 0; i < resultSet.size(); i++)\n {\n result.add(result(resultSet.get(i)));\n }\n }\n }\n\n if (!result.isEmpty() && ((Object[])result.get(0)).length == 1)\n {\n List r = result;\n result = new ArrayList<>();\n for (int i = 0; i < r.size(); i++)\n {\n result.add(((Object[]) r.get(i))[0]);\n }\n }\n return result;\n }", "private Sql returnsRows(boolean unordered, String[] rows) {\n try (Planner planner = createPlanner()) {\n final RelNode convert;\n if (relFn != null) {\n convert = withRelBuilder(relFn);\n } else {\n SqlNode parse = planner.parse(sql);\n SqlNode validate = planner.validate(parse);\n final RelRoot root = planner.rel(validate);\n convert = project ? root.project() : root.rel;\n }\n final MyDataContext dataContext =\n new MyDataContext(rootSchema, convert);\n assertInterpret(convert, dataContext, unordered, rows);\n return this;\n } catch (ValidationException\n | SqlParseException\n | RelConversionException e) {\n throw Util.throwAsRuntime(e);\n }\n }", "protected RowMapper<Project> getRowMapper() {\n\t\treturn new ProjectMapper();\n\t}", "java.util.List<io.dstore.engine.procedures.StGetPageVisitsAd.Response.Row> \n getRowList();", "public BooleanQueryResultParser getParser() {\r\n\t\treturn new BooleanTextParser();\r\n\t}", "private GeneralQueryFormat createQueryFromRow(int rowNum) {\n String fname = this.employee_first_name.get(rowNum);\n String lname = this.employee_last_name.get(rowNum);\n String mname = this.employee_middle_initial.get(rowNum);\n String ssn = this.employee_ssn.get(rowNum);\n String address = this.employee_address.get(rowNum);\n String address2 = this.employee_address2.get(rowNum);\n String city = this.employee_city.get(rowNum);\n String state = this.employee_state.get(rowNum);\n String zip = this.employee_zip.get(rowNum);\n String phone = this.employee_phone.get(rowNum);\n String phone2 = this.employee_phone2.get(rowNum);\n String pager = this.employee_pager.get(rowNum);\n String cell = this.employee_cell.get(rowNum);\n String email = this.employee_email.get(rowNum);\n String bdate = this.employee_birthdate.get(rowNum);\n String branchId = this.branch.getBranchId() + \"\";\n String hireDate = this.employee_hire_date.get(rowNum);\n \n ssn = ssn.replaceAll(\"-\", \"\");\n if(bdate.equals(\"\")) bdate = \"01/01/1000\";\n if(hireDate.equals(\"\")) hireDate = \"NOW()\";\n \n employee_save_query query = new employee_save_query();\n query.setCompany(company.getName());\n //query.update(fname, lname, mname, phone, phone2, cell, pager, address, address2, city, state, zip, ssn, email, hireDate, \"2100-10-10\",\n // \"(CASE WHEN (SELECT (MAX(employee_id) + 1) From employee) IS NULL THEN 1 ELSE (SELECT (MAX(employee_id) + 1) From employee) END)\",\n // \"0\", false, bdate, this.branch.getId());\n return query;\n }", "public ResourceReferenceDt getInterpreter() { \n\t\tif (myInterpreter == null) {\n\t\t\tmyInterpreter = new ResourceReferenceDt();\n\t\t}\n\t\treturn myInterpreter;\n\t}", "@Override\n\tpublic final Iterable<R> execute() {\n\t\t\n\t\treturn new Iterable<R>() {\n\t\t\t\n\t\t\t@Override \n\t\t\tpublic Iterator<R> iterator() {\n\t\t\t\t\n\t\t\t\treturn AbstractMultiQuery.this.iterator();\n\t\t\t\t\n\t\t\t}\n\t\t};\n\t\t\n\t}", "public interface RowMetadataCallbackHandler extends RowCallbackHandler {\n\n\t/**\n\t * set lobHandler for QueryService Ria.\n\t * \n\t * @param lobHandler\n\t */\n\tvoid setLobHandler(LobHandler lobHandler);\n\n\t/**\n\t * set nullCheckInfos for QueryService Ria.\n\t * \n\t * @param nullCheckInfos\n\t */\n\tvoid setNullCheckInfos(Map<String, String> nullCheckInfos);\n\n\t// added for Gauce (2008-04-15)\n\t/**\n\t * added for meta data, processMetaData must be called within extractData of\n\t * ResultSetExtractor(Anyframe extended) just delegate to makeMeta.\n\t * \n\t * @param rs\n\t * resultset\n\t */\n\tvoid processMetaData(ResultSet rs) throws SQLException;\n\n\t/**\n\t * define whether to need to get db column information.\n\t * \n\t * @param needColumnInfo\n\t * whether to need to get db column information\n\t */\n\tvoid setNeedColumnInfo(boolean needColumnInfo);\n\n\t/**\n\t * transmits whether to need to get db column information.\n\t * \n\t * @return whether to need to get db column information\n\t */\n\tboolean isNeedColumnInfo();\n\n\t// added for RiaQueryService (2009-06-18)\n\t/**\n\t * set paging information for QueryService Ria.\n\t * \n\t * @param pagination\n\t */\n\tvoid setPagination(Pagination pagination);\n}", "private List<T> singleRowResult( final Rows<R, C> result ) {\n\n if (logger.isTraceEnabled()) logger.trace( \"Only a single row has columns. Parsing directly\" );\n\n for ( R key : result.getKeys() ) {\n final ColumnList<C> columnList = result.getRow( key ).getColumns();\n\n final int size = columnList.size();\n\n if ( size > 0 ) {\n\n final List<T> results = new ArrayList<>(size);\n\n for(Column<C> column: columnList){\n results.add(columnParser.parseColumn( column ));\n }\n\n return results;\n\n\n }\n }\n\n //we didn't have any results, just return nothing\n return Collections.<T>emptyList();\n }", "public interface TaskCommentQueryMapper {\n\n @SelectProvider(type = TaskCommentQuerySqlProvider.class, method = \"queryTaskComments\")\n @Result(property = \"id\", column = \"ID\")\n @Result(property = \"taskId\", column = \"TASK_ID\")\n @Result(property = \"textField\", column = \"TEXT_FIELD\")\n @Result(property = \"creator\", column = \"CREATOR\")\n @Result(property = \"creatorFullName\", column = \"FULL_NAME\")\n @Result(property = \"created\", column = \"CREATED\")\n @Result(property = \"modified\", column = \"MODIFIED\")\n List<TaskCommentImpl> queryTaskComments(\n TaskCommentQueryImpl taskCommentQuery, RowBounds rowBounds);\n\n @SelectProvider(type = TaskCommentQuerySqlProvider.class, method = \"countQueryTaskComments\")\n Long countQueryTaskComments(TaskCommentQueryImpl taskCommentQuery);\n\n @SelectProvider(type = TaskCommentQuerySqlProvider.class, method = \"queryTaskCommentColumnValues\")\n List<String> queryTaskCommentColumnValues(TaskCommentQueryImpl taskCommentQuery);\n}", "public Object valueFromRow(AbstractRecord row, JoinedAttributeManager joinManager, ObjectBuildingQuery sourceQuery, AbstractSession executionSession) throws DatabaseException {\n ContainerPolicy cp = this.getContainerPolicy();\n\n Object fieldValue = row.getValues(this.getField());\n\n // BUG#2667762 there could be whitespace in the row instead of null\n if ((fieldValue == null) || (fieldValue instanceof String)) {\n return cp.containerInstance();\n }\n\n Vector nestedRows = this.getReferenceDescriptor().buildNestedRowsFromFieldValue(fieldValue, executionSession);\n if (nestedRows == null) {\n return cp.containerInstance();\n }\n\n Object result = cp.containerInstance(nestedRows.size());\n for (Enumeration stream = nestedRows.elements(); stream.hasMoreElements();) {\n \tAbstractRecord nestedRow = (AbstractRecord)stream.nextElement();\n\n ClassDescriptor descriptor = this.getReferenceDescriptor();\n if (descriptor.hasInheritance()) {\n Class newElementClass = descriptor.getInheritancePolicy().classFromRow(nestedRow, executionSession);\n descriptor = this.getReferenceDescriptor(newElementClass, executionSession);\n }\n\n Object element = buildCompositeObject(descriptor, nestedRow, sourceQuery, joinManager);\n if (hasConverter()) {\n element = getConverter().convertDataValueToObjectValue(element, executionSession);\n }\n cp.addInto(element, result, sourceQuery.getSession());\n }\n return result;\n }", "public JELActivator( TopcatModel tcModel, String expression ) \n throws CompilationException {\n tcModel_ = tcModel;\n expression_ = expression;\n\n /* Get a RowReader. */\n rowReader_ = tcModel_.createJELRowReader();\n\n /* Compile the expression. */\n Library lib = TopcatJELUtils.getLibrary( rowReader_, true );\n compEx_ = Evaluator.compile( expression, lib, null );\n\n /* Determine the result type. */\n Class clazz = new Parser( expression, lib ).parse( null ).resType;\n if ( clazz.isPrimitive() ) {\n clazz = TopcatJELUtils.wrapPrimitiveClass( clazz );\n }\n resultType = clazz;\n }", "RowValue createRowValue();", "ExpDataClass getDataClass(@NotNull Container scope, @NotNull User user, int rowId);", "public void createInputRow() throws IOException {\n\t\tStringBuilder fileData = new StringBuilder();\n\t\tfileData.append(\"package dbmsProject;\\n\");\n\t\tfileData.append(\"public class InputRow{\\n\");\n\t\tArrayList<String> list = new ArrayList<String>( Arrays.asList(new String[]{\"cust\", \"prod\", \"day\", \"month\", \"year\", \"state\", \"quant\"}));\n\t\tfor(int i=0;i<list.size();i++ ) {\n\t\t\tString select = list.get(i);\n\t\t\tboolean found=false;\n\t\t\tfor(String str: payload.getselect_variables()) {\n\t\t\t\tif(str.contains(select)) {\n\t\t\t\t\tprojectionVars.add(select);\n\t\t\t\t\tfileData=createrSetterGetter(fileData, helper.columnMapping.get(select), select);\n\t\t\t\t\tfound=true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(found) continue;\n\t\t\tfor(String str: payload.getgrouping_attributes()) {\n\t\t\t\tif(str.contains(select)) {\n\t\t\t\t\tprojectionVars.add(select);\n\t\t\t\t\tfileData=createrSetterGetter(fileData, helper.columnMapping.get(select), select);\n\t\t\t\t\tfound=true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(found) continue;\n\t\t\tfor(String str: payload.getaggregate_functions()) {\n\t\t\t\tif(str.contains(select)) {\n\t\t\t\t\tprojectionVars.add(select);\n\t\t\t\t\tfileData=createrSetterGetter(fileData, helper.columnMapping.get(select), select);\n\t\t\t\t\tfound=true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(found) continue;\n\t\t\tfor(String str: payload.getsuch_that_predicates()) {\n\t\t\t\tif(str.contains(select)) {\n\t\t\t\t\tprojectionVars.add(select);\n\t\t\t\t\tfileData=createrSetterGetter(fileData, helper.columnMapping.get(select), select);\n\t\t\t\t\tfound=true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(found) continue;\n\t\t\tif(payload.isHavingClause() && payload.getHavingClause().contains(select)) {\n\t\t\t\tprojectionVars.add(select);\n\t\t\t\tfileData=createrSetterGetter(fileData, helper.columnMapping.get(select), select);\n\t\t\t\tfound=true;\n\t\t\t}\n\t\t\tif(found) continue;\n\t\t\tif(payload.getIsWhereClause() && payload.getWhereClause().contains(select)) {\n\t\t\t\tprojectionVars.add(select);\n\t\t\t\tfileData=createrSetterGetter(fileData, helper.columnMapping.get(select), select);\n\t\t\t}\n\t\t}\n\t\t\n\t\tfileData.append(\"}\\n\");\n\t\tFileOutputStream fos = new FileOutputStream(\"src/dbmsProject/InputRow.java\");\n\t\tfos.write(fileData.toString().getBytes());\n\t\tfos.flush();\n\t\tfos.close();\n\t}", "protected abstract E handleRow(ResultSet rs) throws SQLException;", "@Override\n\tpublic ResultHolder<Statement> parse(final String content) {\n\t\t// Initializes error list.\n\t\tList<String> parserErrorList = new ArrayList<>();\n\t\t\n\t\t// Splits the content string into lines.\n\t\tString[] records = content.split(\"\\\\r?\\\\n\");\n\n\t\tList<Transaction> transactionList = Arrays.stream(records)\n\t\t\t\t\t\t\t\t\t\t\t .skip(1)\n\t\t\t\t\t\t\t\t\t\t\t .map(line -> this.populateRow(line, parserErrorList))\n\t\t .filter(Objects::nonNull)\n\t\t\t\t\t\t\t\t\t\t\t .collect(Collectors.toList());\n\n\t\tStatement statement = new Statement();\n\t\tstatement.setTransactions(transactionList);\n\t\treturn new ResultHolder<>(statement, parserErrorList);\n\t}", "@Test void testInterpretTable() {\n sql(\"select * from \\\"hr\\\".\\\"emps\\\" order by \\\"empid\\\"\")\n .returnsRows(\"[100, 10, Bill, 10000.0, 1000]\",\n \"[110, 10, Theodore, 11500.0, 250]\",\n \"[150, 10, Sebastian, 7000.0, null]\",\n \"[200, 20, Eric, 8000.0, 500]\");\n }", "ExpDataClass getDataClass(@NotNull Container definitionContainer, int rowId);", "<R> ProcessOperation<R> map(RowMapper<R> rowMapper);", "private HashMap<String, String> getHashMapfromResultSetRow(ResultSet resultset)\n/* */ {\n/* 1406 */ return getHashMapfromResultSetRow(resultset, new ArrayList());\n/* */ }", "public List<List<Object>> rows() {\n List<List<Object>> rows = new ArrayList<List<Object>>();\n for (List<String> rawRow : getRawRows()) {\n List<Object> newRow = new ArrayList<Object>();\n for (int i = 0; i < rawRow.size(); i++) {\n newRow.add(transformCellValue(i, rawRow.get(i)));\n }\n rows.add(newRow);\n }\n return rows;\n }", "public List<String> getRows();", "public <E extends Retrievable> ResultSet read(CharSequence sql, Object... objects);", "ArrayList<HashMap<String,Object>> processQueryResult(Object result,String collectionName) {\n ArrayList<Map<String,Object>> rawRows = parseQueryResult(result);\n if (rawRows == null || rawRows.size()==0) return null;\n ArrayList<HashMap<String,Object>> resultRows = new ArrayList<>();\n for (Map<String,Object> rawRow: rawRows) {\n HashMap<String,Object> resultRow = processQueryResultRow(rawRow,collectionName);\n if (resultRow.size()>0) resultRows.add(resultRow);\n }\n return resultRows;\n }", "public abstract AbstractGenesisModel getRow(String id);", "java.util.List<io.dstore.engine.procedures.OmModifyCampaignsAd.Response.Row> \n getRowList();", "public Object[] toRow() {\n String dbType = this.getClass().getSimpleName().replace(\"Database\", \"\");\n dbType = dbType.substring(0, 1) + dbType.substring(1).toLowerCase();\n\n return new Object[] {dbType, getDbHost(), getDbName(), getDbUsername(), getDbPassword(), getUniqueId()};\n }", "@Override\n public Object[] createRow() {\n ObjectDescriptor.TypeObject newTypeObjectInstance = ObjectDescriptor.newInstance();\n List<PropertyDescriptor> descriptors = typeObjectDescriptor.getObjectProperties();\n InitValuesFiller.fill(newTypeObjectInstance, descriptors);\n\n return new Object[]{ StringUtils.EMPTY, newTypeObjectInstance };\n }", "@Override\r\n\t\tpublic List<Boimpl> extractData(ResultSet rs) throws SQLException, DataAccessException {\n\t\t\tdata = new ArrayList<Boimpl>();\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\t// | id | name | address | city | sallary | job | DEPARTMENT\r\n\r\n\t\t\t\tBoimpl obj = new Boimpl();\r\n\t\t\t\tobj.setId(rs.getInt(\"id\"));\r\n\t\t\t\tobj.setName(rs.getString(\"name\"));\r\n\t\t\t\tobj.setAddress(rs.getString(\"address\"));\r\n\t\t\t\tobj.setJob(rs.getString(\"job\"));\r\n\t\t\t\tobj.setSallary(rs.getFloat(\"sallary\"));\r\n\t\t\t\tobj.setDEPARTMENT(rs.getString(\"DEPARTMENT\"));\r\n\t\t\t\tobj.setCity(rs.getString(\"city\"));\r\n\t\t\t\tdata.add(obj);\r\n\t\t\t}\r\n\t\t\treturn data;\r\n\t\t}", "public interface CrmDmDbsBmsMapper {\n public static String TABLENAME = \"crm_dm_bds_bms\";\n @Select(\"select * from \"+TABLENAME+\" WHERE staff_city_id=#{cityId, jdbcType=BIGINT} limit 10 \")\n @Results({\n @Result(column=\"id\", property=\"id\", jdbcType= JdbcType.BIGINT, id=true),\n @Result(column=\"Saler_id\", property=\"salerId\", jdbcType= JdbcType.BIGINT),\n @Result(column=\"Saler_name\", property=\"salerName\", jdbcType= JdbcType.BIGINT)\n })\n public List<CrmDmBdsBms> findSalerListByCityId(@Param(\"cityId\") Long cityId);\n}", "@Override\n\t\tpublic KhachHang mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\t\tKhachHang kh=new KhachHang();\n\t\t\tkh.setMaKH(rs.getString(1));\n\t\t\tkh.setAddress(rs.getString(2));\n\t\t\tkh.setName(rs.getString(3));\n\t\t\tkh.setPhoneNum(rs.getString(4));\n\t\t\treturn kh;\n\t\t}", "@Override\n\tpublic PreviewTransformationActionResult extractResult(Response response) {\n\t\tJSONObject json = JSONParser.parseLenient(response.getText()).isObject();\n\t\tString phenotypeTable_str = json.get(\"transformationTable\").isString().stringValue();\n\t\tDouble spPval = json.get(\"sp_pval\").isNumber().doubleValue();\n\t\tDataTable transformationDataTable = DataTable.create(JSONParser.parseLenient(phenotypeTable_str).isObject().getJavaScriptObject());\n\t\treturn new PreviewTransformationActionResult(transformationDataTable,spPval);\n\t}", "@Override\n\tpublic BaseVo loadFromRS(ResultSet rs) {\n\t\t\n\t\tGatherIndicators gatherIndicators = new GatherIndicators();\n\t\ttry {\n\t\t\tgatherIndicators.setId(rs.getInt(\"id\"));\n\t\t\tgatherIndicators.setName(rs.getString(\"name\"));\n\t\t\tgatherIndicators.setType(rs.getString(\"type\"));\n\t\t\tgatherIndicators.setSubtype(rs.getString(\"subtype\"));\n\t\t\tgatherIndicators.setAlias(rs.getString(\"alias\"));\n\t\t\tgatherIndicators.setDescription(rs.getString(\"description\"));\n\t\t\tgatherIndicators.setCategory(rs.getString(\"category\"));\n\t\t\tgatherIndicators.setIsDefault(rs.getString(\"isDefault\"));\n\t\t\tgatherIndicators.setIsCollection(rs.getString(\"isCollection\"));\n\t\t\tgatherIndicators.setPoll_interval(rs.getString(\"poll_interval\"));\n\t\t\tgatherIndicators.setInterval_unit(rs.getString(\"interval_unit\"));\n\t\t\tgatherIndicators.setClasspath(rs.getString(\"classpath\"));\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\treturn gatherIndicators;\n\t}", "@Override\n\tpublic List<WanchengPO> mapRow(ResultSet rs) throws Exception {\n\t\treturn null;\n\t}", "public interface QueryCallback<T> {\n T mappingRow(ResultSet resultSet) throws SQLException;\n}", "@Override\n public Object mapRow(ResultSet rs, int rowNum) throws SQLException {\n \treturn rs.getString(\"mid\");\n }" ]
[ "0.5782936", "0.5525723", "0.5431126", "0.53794503", "0.5374877", "0.53563267", "0.53361213", "0.5336066", "0.5292743", "0.52825373", "0.52825147", "0.52695173", "0.52642614", "0.5245048", "0.5211075", "0.5201223", "0.5156703", "0.514889", "0.5148286", "0.51132864", "0.51070535", "0.5098987", "0.50980985", "0.5089669", "0.5064609", "0.50613433", "0.50463367", "0.5030637", "0.50271314", "0.5008527", "0.4992332", "0.49891955", "0.49853942", "0.49837086", "0.4980002", "0.49725613", "0.49706233", "0.49690083", "0.49610588", "0.49609074", "0.49535176", "0.49491164", "0.4938796", "0.49290082", "0.491981", "0.491981", "0.49197862", "0.49194154", "0.49194154", "0.4918749", "0.49125385", "0.49103004", "0.4888148", "0.48765594", "0.48619393", "0.48522347", "0.48498967", "0.48450726", "0.4839614", "0.4838706", "0.4822864", "0.4805257", "0.480235", "0.47962123", "0.47935367", "0.47909516", "0.4786568", "0.47817016", "0.47800848", "0.47676983", "0.47622156", "0.4760718", "0.47593895", "0.47571802", "0.47541767", "0.47519547", "0.47489133", "0.4748024", "0.4741096", "0.473758", "0.47362193", "0.47320214", "0.47309804", "0.47238445", "0.47222745", "0.47075054", "0.47022513", "0.4697421", "0.46942988", "0.4692956", "0.4684927", "0.46828467", "0.46806717", "0.4676115", "0.46739143", "0.4667551", "0.4666318", "0.46653208", "0.46649137", "0.4663826" ]
0.7038449
0
create MGIMarker object this sets the preferred MGI ID as a Bucketizable ID attribute
public Object interpret(RowReference row) throws DBException { MGIMarker marker = new MGIMarker(row.getString(1)); // set the preferred MGI ID as a MGIMarker attribute marker.mgiID = row.getString(1); marker.symbol = row.getString(2); marker.name = row.getString(3); marker.chromosome = row.getString(4); marker.type = row.getString(5); marker.key = row.getInt(6); // adds the the preferred MGI ID to the set of all MGI Ids // for this MGIMarker // adds the preferred MGI ID to the Bucketizable SVASet marker.addMGIID(new SequenceAccession(marker.mgiID, SequenceAccession.MGI)); /** * obtain sequence associations AND non-preferred MGI ids for the * marker */ try { // sequences also contains non-preferred MGI IDs Vector sequences = sequenceLookup.lookup(marker.key); if (sequences == null) return marker; for (int i = 0; i < sequences.size(); i++) { SequenceAccession acc = (SequenceAccession)sequences.get(i); String seq = acc.getAccid(); String seqCategory = accidClassifier.classify(seq); if (seqCategory.equals(Constants.GENBANK)) { // set bucketizable data marker.addGenBankSequence(acc); } else if (seqCategory.equals(Constants.XM)) { // set bucketizable data marker.addXMSequence(acc); } else if (seqCategory.equals(Constants.XR)) { // set bucketizable data marker.addXRSequence(acc); } else if (seqCategory.equals(Constants.XP)) { // set bucketizable data marker.addXPSequence(acc); } else if (seqCategory.equals(Constants.NM)) { // set bucketizable data marker.addNMSequence(acc); } else if (seqCategory.equals(Constants.NR)) { // set bucketizable data marker.addNRSequence(acc); } else if (seqCategory.equals(Constants.NP)) { // set bucketizable data marker.addNPSequence(acc); } else if (seqCategory.equals(Constants.NG)) { // set bucketizable data marker.addNGSequence(acc); } else if (seqCategory.equals(Constants.NT)) { // set bucketizable data marker.addNTSequence(acc); } else if (seqCategory.equals(Constants.NW)) { // set bucketizable data marker.addNWSequence(acc); } else if (seqCategory.equals(Constants.MGIID)) { // set bucketizable data marker.addMGIID(acc); } } } catch (CacheException e) { DBExceptionFactory eFactory = new DBExceptionFactory(); DBException e2 = (DBException) eFactory.getException(DBExceptionFactory.ConfigErr, e); throw e2; } return marker; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public BaseStoreGrnM (java.lang.Integer id) {\n\t\tthis.setId(id);\n\t\tinitialize();\n\t}", "public void setBucketID(long param){\n localBucketIDTracker = true;\n \n this.localBucketID=param;\n \n\n }", "private MAID(int maID){\n\t\t\n\t\t\n\t\tthis.id = maID;\n\t}", "public br.unb.cic.bionimbus.avro.gen.JobInfo.Builder setId(java.lang.String value) {\n validate(fields()[0], value);\n this.id = value;\n fieldSetFlags()[0] = true;\n return this; \n }", "public Garage() {\n\t\tid = generateId();\n\t}", "public abstract int getBucketID();", "public String getMetaversalID();", "public Object setID(int iD)\r\n/* */ {\r\n\t\t\t\tlogger.info(count++ + \" About to setId : \" + \"Agent\");\r\n/* 51 */ \tthis.myID = iD;\r\n/* 52 */ \treturn this;\r\n/* */ }", "public java.lang.Integer getMetaId();", "private void updateMediaPackageID(MediaPackage mp, InputStream is) throws IOException {\n DublinCoreCatalog dc = DublinCores.read(is);\n EName en = new EName(DublinCore.TERMS_NS_URI, \"identifier\");\n String id = dc.getFirst(en);\n if (id != null) {\n mp.setIdentifier(new IdImpl(id));\n }\n }", "public void setId(String i) {\n\t\tid = i;\n\t}", "@Override\r\n\tpublic void setId(final K id) {\n\t\tsuper.setId(id);\r\n\t}", "public void setID() throws IOException;", "public int getMakerId();", "public void setID() {\n\t\tthis.ID = UUID.randomUUID().toString();\n\t}", "@ApiModelProperty(example = \"D1E3B83E-99A3-4AF3-B95B-3DC2913EDDC2\", required = true, value = \"ID of this mapping set\")\n\n public String getId() {\n return id;\n }", "@Override\n\tpublic void setUniqueId(int id) {}", "@Override\n protected String getIDPrefix() {\n return \"bc\";\n }", "public void setMinerId(int i){\n this.minerId = i;\n }", "public GIPIQuoteItemMC()\t{\n \t}", "@ZAttr(id=1)\n public Map<String,Object> setId(String zimbraId, Map<String,Object> attrs) {\n if (attrs == null) attrs = new HashMap<String,Object>();\n attrs.put(Provisioning.A_zimbraId, zimbraId);\n return attrs;\n }", "ExternalIdBundleMapper(final String uniqueIdScheme) {\n _idSupplier = new UniqueIdSupplier(uniqueIdScheme);\n }", "public void setMetaId(java.lang.Integer metaId);", "@Override\n public void setIdInstagram(String idInstagram) {\n this.idInstagram = idInstagram;\n }", "protected void createMimoentslotAnnotations() {\n\t\tString source = \"mimo-ent-slot\";\n\t\taddAnnotation\n\t\t (getInvoiceAttribute_Invoice(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceAttribute_AttrName(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceContactMech_Invoice(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceContactMech_ContactMech(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceContactMech_ContactMechPurposeType(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceContent_Invoice(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceContent_Content(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceContent_InvoiceContentType(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceContent_FromDate(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceItem_Invoice(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceItem_InvoiceItemSeqId(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceItem_OverrideGlAccount(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"help\", \"used to specify the override or actual glAccountId used for the invoice, avoids problems if configuration changes after initial posting, etc\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceItem_OverrideOrgParty(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"help\", \"Used to specify the organization override rather than using the payToPartyId\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceItemAssoc_InvoiceItemAssocType(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceItemAssoc_FromDate(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceItemAssoc_InvoiceIdFrom(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceItemAssoc_InvoiceIdTo(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceItemAssoc_InvoiceItemSeqIdFrom(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceItemAssoc_InvoiceItemSeqIdTo(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceItemAttribute_AttrName(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceItemAttribute_InvoiceId(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceItemAttribute_InvoiceItemSeqId(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceItemTypeAttr_InvoiceItemType(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceItemTypeAttr_AttrName(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceItemTypeGlAccount_InvoiceItemType(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceItemTypeGlAccount_OrganizationParty(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceItemTypeMap_InvoiceType(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceItemTypeMap_InvoiceItemMapKey(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceNote_Invoice(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceRole_Invoice(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceRole_Party(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceRole_RoleType(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceStatus_Status(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceStatus_Invoice(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceStatus_StatusDate(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceTermAttribute_InvoiceTerm(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceTermAttribute_AttrName(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceTypeAttr_InvoiceType(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceTypeAttr_AttrName(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t}", "public Builder mbid(String mbid) {\n obj.setMbid(mbid);\n return this;\n }", "public static C2703g m4547k(IBinder iBinder) {\n if (iBinder == null) {\n return null;\n }\n IInterface queryLocalInterface = iBinder.queryLocalInterface(\"com.google.android.gms.maps.model.internal.IMarkerDelegate\");\n return queryLocalInterface instanceof C2703g ? (C2703g) queryLocalInterface : new C2705i(iBinder);\n }", "public String getAssetId();", "public void setID(String idIn) {this.id = idIn;}", "private static int generateMarkerId(){\n return snextMarkerId.incrementAndGet();\n\n }", "public long getBucketID(){\n return localBucketID;\n }", "public void setId(User user) {\n this.id = new GoogleInfoKey(user);\n }", "void setID(java.lang.String id);", "public ObjectID() {\n UUID u = UUID.randomUUID();\n data = storeData(u, IDVersion.SIMPLE);\n }", "public Group(String id) {\n super(id);\n setConstructor(SvgType.GROUP);\n }", "public void generateID()\n {\n ID = this.hashCode();\n }", "public void setGid(Integer gid) {\r\n this.gid = gid;\r\n }", "public Builder setMnpId(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n mnpId_ = value;\n onChanged();\n return this;\n }", "@Override\r\n\tpublic void setId(String id) {\n\t\t\r\n\t}", "@ApiModelProperty(value = \"Unique identifier for the group\")\n @JsonProperty(\"id\")\n public Long getId() {\n return id;\n }", "@Override\r\n\t\tpublic void setId(String id)\r\n\t\t\t{\n\t\t\t\t\r\n\t\t\t}", "public Builder setMapID(int value) {\n bitField0_ |= 0x00000400;\n mapID_ = value;\n onChanged();\n return this;\n }", "private void setID(gw.pl.persistence.core.Key value) {\n __getInternalInterface().setFieldValue(ID_PROP.get(), value);\n }", "private void setID(gw.pl.persistence.core.Key value) {\n __getInternalInterface().setFieldValue(ID_PROP.get(), value);\n }", "private void setID(gw.pl.persistence.core.Key value) {\n __getInternalInterface().setFieldValue(ID_PROP.get(), value);\n }", "public Builder setMapID(int value) {\n bitField0_ |= 0x00000010;\n mapID_ = value;\n onChanged();\n return this;\n }", "public String getAmiId() {\n return this.amiId;\n }", "@JsProperty(name = \"id\")\n public native void setId(String value);", "public maestro.payloads.FlyerFeaturedItem.Builder setId(int value) {\n validate(fields()[1], value);\n this.id = value;\n fieldSetFlags()[1] = true;\n return this;\n }", "public void setGid(Integer gid) {\n this.gid = gid;\n }", "@Override\n\tpublic void setId(Integer arg0) {\n\n\t}", "public interface IDs {\n\n static final String SERIES_STANDARD_ID = \"c7fb8441-d5db-4113-8af0-e4ba0c3f51fd\";\n static final String EPISODE_STANDARD_ID = \"a99a8588-93df-4811-8403-fe22c70fa00a\";\n static final String FILE_STANDARD_ID = \"c5919cbf-fbf3-4250-96e6-3fefae51ffc5\";\n static final String RECORDING_STANDARD_ID = \"4a40811d-c067-467f-8ff6-89f37eddb933\";\n static final String ZAP2IT_STANDARD_ID = \"545c4b00-5409-4d92-9cda-59a44f0ec7a9\";\n}", "public abstract String getIdPrefix();", "public JdwpId (byte tag)\r\n {\r\n _tag = tag;\r\n }", "@Transient\n\tpublic String getAggregatorId() {\n\t\treturn mAggregatorId;\n\t}", "@Override\n\tprotected String _id(String id) {\n\t\tif (id != null) {\n\t\t\tid = id.replaceAll(\"([^a-zA-Z0-9_]{1,1})\", \"_\");\n\n\t\t\tString cacheIdPrefix = (String)_options.get(\"cache_id_prefix\");\n\t\t\tif (cacheIdPrefix != null) {\n\t\t\t\tid = cacheIdPrefix + id;\n\t\t\t}\n\t\t}\n\n\t\treturn id;\n\t}", "@Override\n\t\tpublic void setId(final String identifier) {\n\t\t}", "protected void createMimoentslotAnnotations() {\n\t\tString source = \"mimo-ent-slot\";\n\t\taddAnnotation\n\t\t (getPartyQual_Party(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getPartyQual_PartyQualType(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getPartyQual_FromDate(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getPartyQual_Status(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"help\", \"Status e.g. completed, part-time etc.\"\n\t\t });\n\t\taddAnnotation\n\t\t (getPartyQual_Title(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"help\", \"Title of degree or job\"\n\t\t });\n\t\taddAnnotation\n\t\t (getPartyQual_VerifStatus(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"help\", \"Verification done for this entry if any\"\n\t\t });\n\t\taddAnnotation\n\t\t (getPartySkill_Party(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getPartySkill_SkillType(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getPerfReview_EmployeeParty(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getPerfReview_EmployeeRoleTypeId(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getPerfReview_PerfReviewId(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getPerfReviewItem_EmployeeParty(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getPerfReviewItem_EmployeeRoleTypeId(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getPerfReviewItem_PerfReviewId(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getPerfReviewItem_PerfReviewItemSeqId(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getPerformanceNote_Party(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getPerformanceNote_FromDate(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getPerformanceNote_RoleTypeId(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getPersonTraining_Party(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getPersonTraining_TrainingClassType(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getPersonTraining_FromDate(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t}", "public CloudinsRegionRecord(Long id, String name, Long managerId, String managerName, String hostIp, String hostUsername, String hostPassword, String company, String remark) {\n super(CloudinsRegion.CLOUDINS_REGION);\n\n set(0, id);\n set(1, name);\n set(2, managerId);\n set(3, managerName);\n set(4, hostIp);\n set(5, hostUsername);\n set(6, hostPassword);\n set(7, company);\n set(8, remark);\n }", "public Builder setMapID(int value) {\n bitField0_ |= 0x00000008;\n mapID_ = value;\n onChanged();\n return this;\n }", "public Builder setMapID(int value) {\n bitField0_ |= 0x00000008;\n mapID_ = value;\n onChanged();\n return this;\n }", "public Builder setMapID(int value) {\n bitField0_ |= 0x00000008;\n mapID_ = value;\n onChanged();\n return this;\n }", "@Override\n\tpublic void setId(String id)\n\t{\n\t\t\n\t}", "@Override\r\n\tpublic String getPID() {\n\t\treturn \"GY\"+getID();\r\n\t}", "@Test\n\tpublic void setIdTest() {\n\t\tProductScanImageURIKey key = getDefaultKey();\n\t\tkey.setId(OTHER_ID);\n\t\tAssert.assertEquals(OTHER_ID, key.getId());\n\t}", "public void setId(String idIn) {\n this.id = idIn;\n }", "public void setId(String id) {\n }", "public String getKid() {\n return kid;\n }", "public Builder setMapID(int value) {\n bitField0_ |= 0x00000004;\n mapID_ = value;\n onChanged();\n return this;\n }", "public String getBadgeid(){\r\n return id;\r\n }", "public Builder setMapID(int value) {\n bitField0_ |= 0x00000004;\n mapID_ = value;\n onChanged();\n return this;\n }", "void setId(String id);", "void setId(String id);", "void setId(String id);", "@ZAttr(id=1)\n public void setId(String zimbraId) throws com.zimbra.common.service.ServiceException {\n HashMap<String,Object> attrs = new HashMap<String,Object>();\n attrs.put(Provisioning.A_zimbraId, zimbraId);\n getProvisioning().modifyAttrs(this, attrs);\n }", "public Builder setMapID(int value) {\n bitField0_ |= 0x00000001;\n mapID_ = value;\n onChanged();\n return this;\n }", "public Builder setMapID(int value) {\n bitField0_ |= 0x00000001;\n mapID_ = value;\n onChanged();\n return this;\n }", "@Override\r\n\tpublic void setID(String id) {\n\t\tsuper.id=id;\r\n\t}", "public Builder setMapID(int value) {\n bitField0_ |= 0x00000001;\n mapID_ = value;\n onChanged();\n return this;\n }", "public Builder setMapID(int value) {\n bitField0_ |= 0x00000001;\n mapID_ = value;\n onChanged();\n return this;\n }", "public Builder setMapID(int value) {\n bitField0_ |= 0x00000001;\n mapID_ = value;\n onChanged();\n return this;\n }", "public ID(String id) {\n this.type = id.charAt(0);\n this.UID = id;\n }", "public Builder setMapID(int value) {\n bitField0_ |= 0x00000002;\n mapID_ = value;\n onChanged();\n return this;\n }", "AtomID ID();", "public Builder setBbgGlobalId(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000800;\n bbgGlobalId_ = value;\n onChanged();\n return this;\n }", "public void setID(final char iid) {\n this.id = iid;\n }", "public JobID() {\n super();\n }", "@Override\n public String getId() {\n return \"1\";\n }", "public void setId (String id);", "public static void setImei(Object imei) {\n\t\t\n\t}", "private void generateID(){\n\t\tStringBuilder sb = new StringBuilder();\n\t\tfor (String t : terms.keySet())\n\t\t\tsb.append(t.replaceAll(\"\\\\W\", \"\")\n\t\t\t\t\t.substring(0, Math.min(4, t.replaceAll(\"\\\\W\", \"\").length())) + \"-\");\n\t\tfor (String s : sources)\n\t\t\tsb.append(s.replaceAll(\"\\\\W\", \"\")\n\t\t\t\t\t.substring(0, Math.min(4, s.replaceAll(\"\\\\W\", \"\").length())) + \"-\");\n\t\tsb.deleteCharAt(sb.length()-1);\n\t\tif (yearFrom > -1) sb.append(\"_\" + yearFrom);\n\t\tif (yearTo > -1) sb.append(\"_\" + yearTo);\n\t\tif (useCompounds) sb.append(\"_COMP\");\n\t\tif (useStopwords) sb.append(\"_STOP\");\n\t\tsb.append(\"_CNT\" + contextSize);\n\t\tsb.append(\"_\" + System.currentTimeMillis());\n\t\tthis.id = sb.toString();\n\t}", "public String getKid() {\r\n\t\treturn kid;\r\n\t}", "protected void setID(int i){\r\n\t\tthis.ID = i;\r\n\t}", "void setId(java.lang.String id);", "public void setId(byte id){this.id = id;}", "public IMTag createOpeningMTag (String id,\r\n\t\tString type);", "java.lang.String getID();", "public void setBundleID(long param){\n localBundleIDTracker = true;\n \n this.localBundleID=param;\n \n\n }", "public void setInstanceMetadataId(InstanceMetadataId imi)\n\t{\n\t\tthis.imi = imi;\n\t}", "protected void setId(short id) {\n this.id = id;\n }" ]
[ "0.5367176", "0.5286606", "0.5258712", "0.5217762", "0.5201397", "0.5186327", "0.5183147", "0.5162598", "0.50598264", "0.5032675", "0.4965666", "0.49633187", "0.49598506", "0.49389637", "0.49287075", "0.48697168", "0.48601496", "0.48180187", "0.48061123", "0.47818285", "0.4777563", "0.4751285", "0.47451213", "0.4732485", "0.47159106", "0.47127756", "0.46944767", "0.46865523", "0.4686025", "0.46751627", "0.46736398", "0.46675333", "0.4659239", "0.46580774", "0.46520436", "0.46435624", "0.46415538", "0.4627992", "0.46212694", "0.46109644", "0.4604888", "0.46039444", "0.45857725", "0.45857725", "0.45857725", "0.45853448", "0.4583287", "0.45826718", "0.4580726", "0.45791396", "0.4578408", "0.45775244", "0.4576228", "0.45760357", "0.45751247", "0.45702523", "0.45676315", "0.45663708", "0.45590982", "0.45527032", "0.45527032", "0.45525995", "0.4551222", "0.45499232", "0.45385668", "0.45380524", "0.453718", "0.4533454", "0.45222783", "0.4522275", "0.45217505", "0.45202023", "0.45202023", "0.45202023", "0.45160848", "0.4514598", "0.4514598", "0.4514142", "0.4511798", "0.4511798", "0.4511798", "0.45107105", "0.45096943", "0.45050466", "0.45017076", "0.45005018", "0.44991735", "0.44984993", "0.4498341", "0.44976553", "0.44956598", "0.44951487", "0.44933262", "0.44930217", "0.44917807", "0.44897515", "0.448157", "0.44802952", "0.44800022", "0.4473934" ]
0.5747298
0
first touch event that is called is onDown() before all others, if return false all other listener methods get ignored returning true tells the system that the method will handle the event, otherwise it gets passed down the View hierarchy
public boolean onDown(MotionEvent e) { return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic boolean onDown(MotionEvent arg0) {\n\t\treturn false; // was false\n\t}", "@Override\n public boolean onDown(MotionEvent arg0) {\n return false;\n }", "@Override\n\t\tpublic boolean onDown(MotionEvent e) {\n\t\t\treturn false;\n\t\t}", "@Override //abstract method from OnGestureListener\n\tpublic boolean onDown(MotionEvent e){\n\t\treturn true;\n\t}", "@Override\n\t\t\tpublic boolean onDown(MotionEvent arg0)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}", "@Override\n\t\t\t\tpublic boolean onDown(MotionEvent e) {\n\t\t\t\t\treturn false;\n\t\t\t\t}", "@Override\r\n\tpublic boolean onDown(MotionEvent e) {\n\t\treturn false;\r\n\t}", "@Override\r\n\tpublic boolean onDown(MotionEvent e) {\n\t\treturn false;\r\n\t}", "@Override\n\tpublic boolean onDown(MotionEvent arg0) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean onDown(MotionEvent arg0) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean onDown(MotionEvent arg0) {\n\t\treturn false;\n\t}", "@Override\r\n\tpublic boolean onDown(MotionEvent arg0) {\n\t\tSystem.out.println(\"onDown\");\r\n\t\treturn false;\r\n\t}", "@Override\n\tpublic boolean onDown(MotionEvent e) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean onDown(MotionEvent e) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean onDown(MotionEvent e) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean onDown(MotionEvent e) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean onDown(MotionEvent e) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean onDown(MotionEvent e) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean onDown(MotionEvent e) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean onDown(MotionEvent e) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean onDown(MotionEvent e) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean onDown(MotionEvent e) {\n\t\treturn false;\n\t}", "@Override\n public boolean onDown(MotionEvent e) {\n return true;\n }", "@Override\r\n public boolean onDown(MotionEvent e)\r\n {\n return false;\r\n }", "@Override\r\n public boolean onDown(MotionEvent e) {\n return false;\r\n }", "@Override\n public boolean onDown(MotionEvent e) {\n return false;\n }", "@Override\n public boolean onDown(MotionEvent motionEvent) {\n return false;\n }", "@Override\n public void onDownMotionEvent() {\n \n }", "@Override\n\tpublic boolean touchDown(int arg0, int arg1, int arg2, int arg3) {\n\t\n\t\treturn true;\n\t}", "public boolean onDown(MotionEvent e) {\n\t\tfinish();\n\t\treturn false;\n\t}", "@Override\n public boolean onTouchEvent( MotionEvent event )\n {\n if ( gesture_detector.onTouchEvent( event ) )\n {\n return true;\n }\n else\n {\n return super.onTouchEvent( event );\n }\n }", "@Override\n\tpublic boolean onTouchEvent(MotionEvent event) {\n\t\tint action = event.getAction();\n\t\tswitch (action) {\n\t\t\tcase MotionEvent.ACTION_DOWN:\n\t\t\t\t//Log.i(\"MainActivity\", \"MainActivity-onTouchEvent action = action down\");\n\t\t\t\tbreak;\n\n\t\t\tcase MotionEvent.ACTION_UP:\n\t\t\t\t//Log.i(\"MainActivity\", \"MainActivity-onTouchEvent action = action up\");\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn super.onTouchEvent(event);\n\t}", "@Override\n public boolean onTouchEvent(MotionEvent e) {\n final boolean ret = super.onTouchEvent(e);\n\n int action = e.getActionMasked();\n if (action == MotionEvent.ACTION_UP) {\n if (!mWasFlingCalledForGesture) {\n ((CarLayoutManager) getLayoutManager()).settleScrollForFling(this, 0);\n }\n mWasFlingCalledForGesture = false;\n }\n\n return ret;\n }", "@Override\n\tpublic boolean touchDown(float x, float y, int pointer, int button) {\n\t\treturn false;\n\t}", "@Override\n public boolean onTouchEvent(MotionEvent event) {\n boolean result = mDetector.onTouchEvent(event);\n\n // If the GestureDetector doesn't want this event, do some custom processing.\n // This code just tries to detect when the user is done scrolling by looking\n // for ACTION_UP events.\n if (!result) {\n if (event.getAction() == MotionEvent.ACTION_UP) {\n // User is done scrolling, it's now safe to do things like autocenter\n stopScrolling();\n result = true;\n }\n }\n return result;\n }", "@Override\r\n\tpublic boolean isTouchLeftDown() {\n\t\treturn false;\r\n\t}", "@Override\n\t\tpublic boolean onSingleTapUp(MotionEvent e) {\n\t\t\treturn false;\n\t\t}", "@Override\r\n\tpublic boolean onSingleTapUp(MotionEvent e) {\n\t\treturn false;\r\n\t}", "@Override\r\n\tpublic boolean onSingleTapUp(MotionEvent e) {\n\t\treturn false;\r\n\t}", "@Override\n public boolean onTouchEvent(MotionEvent e) {\n return gestureDetector.onTouchEvent(e);\n }", "@Override\n\t\t\t\tpublic boolean touchDown(com.badlogic.gdx.scenes.scene2d.InputEvent event, float x, float y, int pointer, int button) {\n\t\t\t\t\treturn true;\n\t\t\t\t}", "@Override\n\t\t\tpublic boolean onTouch(View v, MotionEvent event) {\n\t\t\t\treturn false;\n\t\t\t}", "@Override\r\n public boolean onSingleTapUp(MotionEvent e)\r\n {\n return false;\r\n }", "@Override\n\t\t\t\tpublic boolean onSingleTapUp(MotionEvent e) {\n\t\t\t\t\treturn false;\n\t\t\t\t}", "@Override\n public boolean onSingleTapUp(MotionEvent e) {\n return false;\n }", "@Override\r\n\t\t\t\t\tpublic boolean onTouch(View v, MotionEvent event) {\n\t\t\t\t\t\t\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}", "@Override\n\tpublic boolean onSingleTapUp(MotionEvent e) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean onSingleTapUp(MotionEvent e) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean onSingleTapUp(MotionEvent e) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean onSingleTapUp(MotionEvent e) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean onSingleTapUp(MotionEvent e) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean onSingleTapUp(MotionEvent e) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean onSingleTapUp(MotionEvent e) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean onSingleTapUp(MotionEvent e) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean onSingleTapUp(MotionEvent e) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean onSingleTapUp(MotionEvent e) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean onSingleTapUp(MotionEvent e) {\n\t\treturn false;\n\t}", "@Override\n public boolean onTouchEvent(MotionEvent ev) {\n return mDetector.onTouchEvent(ev) || super.onTouchEvent(ev);\n }", "@Override\n public void onUpOrCancelMotionEvent() {\n \n }", "@Override\n\tpublic boolean onTouch(View v, MotionEvent event) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean onTouch(View v, MotionEvent event) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean onTouch(View v, MotionEvent event) {\n\t\treturn false;\n\t}", "@Override\n public boolean onTouchEvent(MotionEvent event) {\n gestureDetectorCompat.onTouchEvent(event);\n // Return true to tell android OS that event has been consumed, do not pass it to other event list\n // eners.\n return true;\n }", "@Override\n public boolean onTouch(View v, MotionEvent event) {\n final int Y = (int) event.getRawY();\n\n // Switch on motion event type\n switch (event.getAction() & MotionEvent.ACTION_MASK) {\n\n case MotionEvent.ACTION_DOWN:\n // save default base layout height\n defaultViewHeight = layout.getHeight();\n\n // Init finger and view position\n previousFingerPosition = Y;\n //baseLayoutPosition = (int) layout.getY();\n break;\n\n case MotionEvent.ACTION_MOVE:\n if(!isClosing){\n //int currentYPosition = (int) layout.getY();\n if (previousFingerPosition < Y){\n\n // First time android rise an event for \"down\" move\n if(!isScrollingDown){\n isScrollingDown = true;\n }\n\n // Change base layout size and position (must change position because view anchor is top left corner)\n layout.setY(layout.getY() + (Y - previousFingerPosition));\n layout.getLayoutParams().height = layout.getHeight() - (Y - previousFingerPosition);\n layout.requestLayout();\n }\n\n // Update position\n previousFingerPosition = Y;\n }\n break;\n case MotionEvent.ACTION_UP: {\n\n int currentYPosition = (int) layout.getY();\n\n if (currentYPosition < defaultViewHeight / 5) {\n layout.setY(0);\n layout.getLayoutParams().height = defaultViewHeight;\n layout.requestLayout();\n }\n else{\n closeActivity(currentYPosition);\n }\n break;\n }\n }\n return true;\n }", "@Override\n public boolean onTouchEvent(MotionEvent event) {\n\n boolean spend = needTouch;\n switch (event.getAction()) {\n case MotionEvent.ACTION_DOWN:\n dx = event.getX();\n dy = event.getY();\n rdx = event.getRawX();\n rdy = event.getRawY();\n spend = touchDown(dx, dy);\n break;\n case MotionEvent.ACTION_MOVE:\n float cx = event.getX();\n float cy = event.getY();\n rcx = event.getRawX();\n rcy = event.getRawY();\n spend = touchMove(cx, cy);\n break;\n case MotionEvent.ACTION_UP:\n rcx = event.getRawX();\n rcy = event.getRawY();\n touchUp();\n break;\n case MotionEvent.ACTION_CANCEL:\n rcx = event.getRawX();\n rcy = event.getRawY();\n touchCancel();\n break;\n }\n if(mOnClickListener != null){\n return super.onTouchEvent(event);\n }\n\n invalidate();\n return spend;\n }", "@Override\n\t\t\tpublic boolean onTouch(View arg0, MotionEvent arg1) {\n\t\t\t\treturn true;\n\t\t\t}", "@Override\r\n\tpublic boolean onSingleTapUp(MotionEvent arg0) {\n\t\treturn false;\r\n\t}", "@Override\r\n public boolean onTouch(View v, MotionEvent event) {\n\treturn mGestureDetector.onTouchEvent(event);\r\n }", "boolean onGestureStarted();", "@Override\n public boolean onTouch(View v, MotionEvent event) {\n return false;\n }", "@Override\r\n\tpublic boolean onTouchEvent(final MotionEvent e) {\n\t\t\r\n\t\treturn true;\r\n\t}", "@Override\r\n public boolean onTouchEvent(MotionEvent event) {\n \t\r\n \tif(!enableScrollFlag) return false;\r\n\r\n if (mVelocityTracker == null) {\r\n mVelocityTracker = VelocityTracker.obtain();\r\n }\r\n mVelocityTracker.addMovement(event);\r\n\r\n final int action = event.getAction();\r\n final float x = event.getX();\r\n final float y = event.getY();\r\n \r\n\r\n switch (action) {\r\n case MotionEvent.ACTION_DOWN:\r\n \t\r\n if (!mScroller.isFinished()) {\r\n mScroller.abortAnimation();\r\n }\r\n mLastMotionX = x;\r\n mTouchState = TOUCH_STATE_SCROLLING;\r\n break;\r\n case MotionEvent.ACTION_MOVE:\r\n \t\r\n if (mTouchState == TOUCH_STATE_SCROLLING) {\r\n // Scroll to follow the motion event\r\n final int deltaX = (int) (mLastMotionX - x);\r\n mLastMotionX = x;\r\n\r\n final int scrollX = getScrollX();\r\n\r\n if (deltaX < 0) {\r\n if (scrollX > 0) {\r\n \t\r\n \tif(mLeftViewAvailable) {\r\n \t\tscrollBy(Math.max(-scrollX, deltaX), 0);\r\n } else if(scrollX > getChildAt(0).getRight()) {\r\n \tscrollBy(Math.max(-(scrollX - getChildAt(0).getRight()), deltaX), 0);\r\n }\r\n }\r\n } else if (deltaX > 0) {\r\n int availableToScroll = 0;\r\n if(mRightViewAvailable) {\r\n \tavailableToScroll = getChildAt(getChildCount() - 1).getRight() - scrollX - getWidth();\r\n } else {\r\n \tavailableToScroll = getChildAt(1).getRight() - scrollX - getWidth();\r\n }\r\n \r\n if (availableToScroll > 0) {\r\n scrollBy(Math.min(availableToScroll, deltaX), 0);\r\n }\r\n }\r\n }\r\n \r\n if(Math.abs(onClickDownX - x) > 50 || Math.abs(onClickDownY - y) > 50) {\r\n \tonClickAble = false;\r\n }\r\n \r\n \r\n break;\r\n case MotionEvent.ACTION_UP:\r\n \t\r\n \tboolean clickHandle = false;\r\n \tlong deltaTime = System.currentTimeMillis() - onClickStartTime;\r\n \tif(mCurrentScreen != 1 && onClickAble && deltaTime < 2000) {\r\n \t\tif(mCurrentScreen == 0) {\r\n \t\t\tif(x > getWidth() - mSlideLength) {\r\n \t\t\t\tsnapToScreen(1);\r\n \t\t\t\tclickHandle = true;\r\n \t\t\t}\r\n \t\t} else if(mCurrentScreen == 2) {\r\n \t\t\tif(x < mSlideLength) {\r\n \t\t\t\tsnapToScreen(1);\r\n \t\t\t\tclickHandle = true;\r\n \t\t\t}\r\n \t\t}\r\n \t}\r\n \t\r\n if (mTouchState == TOUCH_STATE_SCROLLING) {\r\n \t\r\n \tif(!clickHandle) {\r\n \t\tfinal VelocityTracker velocityTracker = mVelocityTracker;\r\n velocityTracker.computeCurrentVelocity(1000, mMaximumVelocity);\r\n int velocityX = (int) velocityTracker.getXVelocity();\r\n\r\n if (velocityX > SNAP_VELOCITY && mCurrentScreen > 0) {\r\n // Fling hard enough to move left\r\n snapToScreen(mCurrentScreen - 1);\r\n } else if (velocityX < -SNAP_VELOCITY && mCurrentScreen < getChildCount() - 1) {\r\n // Fling hard enough to move right\r\n snapToScreen(mCurrentScreen + 1);\r\n } else {\r\n snapToDestination();\r\n }\r\n \t}\r\n\r\n if (mVelocityTracker != null) {\r\n mVelocityTracker.recycle();\r\n mVelocityTracker = null;\r\n }\r\n }\r\n \r\n break;\r\n case MotionEvent.ACTION_CANCEL:\r\n mTouchState = TOUCH_STATE_REST;\r\n break;\r\n }\r\n \r\n if(scrollingListener != null) {\r\n \tint scrollX = getScrollX();\r\n \tif(scrollX == (getWidth() - mSlideLength)) {\r\n \t\tscrollingListener.scrolling(scrollX, 0);\r\n \t} else if(scrollX < (getWidth() - mSlideLength)) {\r\n \t\tscrollingListener.scrolling(scrollX, -1);\r\n \t} else {\r\n \t\tscrollingListener.scrolling(scrollX, 1);\r\n \t}\r\n }\r\n \r\n return true;\r\n }", "@Override\n public boolean onTouchEvent(MotionEvent event) {\n\n mGestureDetector.onTouchEvent(event);\n\n final int action = event.getActionMasked();\n final int x = (int) event.getRawX();\n final int y = (int) event.getRawY();\n\n switch (action) {\n case MotionEvent.ACTION_DOWN:\n mDownX = x;\n mDownY = y;\n mLastX = x;\n mLastY = y;\n mDragStarted = false;\n setPressed(true);\n break;\n\n case MotionEvent.ACTION_MOVE:\n int dx = x - mLastX;\n int dy = y - mLastY;\n mLastX = x;\n mLastY = y;\n\n if (!mDragStarted) {\n if (Math.abs(x - mDownX) > mTouchSlop || Math.abs(y - mDownY) > mTouchSlop) {\n mDragStarted = true;\n if (mCallbacks != null) {\n mCallbacks.onDragStart(x, y);\n }\n }\n }\n\n if (mDragStarted) {\n if (mCallbacks != null) {\n mCallbacks.onDrag(dx, dy);\n }\n }\n break;\n\n case MotionEvent.ACTION_CANCEL:\n case MotionEvent.ACTION_UP:\n setPressed(false);\n if (mCallbacks != null) {\n mCallbacks.onDragEnd(x, y);\n }\n break;\n\n default:\n break;\n }\n\n return true;\n }", "@Override\n\t\tpublic boolean onSingleTapUp(MotionEvent e) {\n\t\t\tLog.i(TAG, \"onSingleTapUp\");\n\t\t\treturn false;\n\t\t}", "@Override\n public boolean onTouch(View v, MotionEvent event) {\n return false;\n }", "@Override\n\tpublic boolean onSingleTapUp(MotionEvent arg0) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean onSingleTapUp(MotionEvent arg0) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean onSingleTapUp(MotionEvent arg0) {\n\t\treturn false;\n\t}", "@Override\n public boolean onTouchEvent(MotionEvent event)\n {\n return gestureDetector.onTouchEvent(event);\n }", "@Override\r\n\t\t\tpublic boolean onTouch(View arg0, MotionEvent event) {\n\t\t\t\tint action = event.getAction();\r\n\t\t\t\tswitch (action) {\r\n\t\t\t\tcase MotionEvent.ACTION_DOWN:\r\n\t\t\t\t\tmLastDownY = (int) event.getY();\r\n\t\t\t\t\tSystem.err.println(\"ACTION_DOWN=\" + mLastDownY);\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t\t\r\n\t\t\t\tcase MotionEvent.ACTION_UP:\r\n\t\t\t\t\tmCurryY = (int) event.getY();\r\n\t\t\t\t\tmDelY = mCurryY - mLastDownY;\r\n\t\t\t\t\tif (mDelY > 0) {\r\n\t\t\t\t\t\tpullDoorView.setVisibility(View.VISIBLE);\r\n\t\t\t\t\t\tstartBounceAnim(pullDoorView.getmScreenHeigh(), -pullDoorView.getmScreenHeigh(), 1000);\r\n\t\t\t\t\t\tpullDoorView.setmCloseFlag(false);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\treturn false;\r\n\t\t\t}", "@Override\n public boolean onTouch(View view, MotionEvent motionEvent) {\n return true;\n }", "@Override\n public boolean onTouch(View view, MotionEvent motionEvent) {\n return true;\n }", "@Override\r\n\t\tpublic void onTouchButtonDown(View arg0, MotionEvent arg1) {\n\r\n\t\t}", "private boolean isActionDown(MotionEvent event){\n\n return event.getAction() == MotionEvent.ACTION_DOWN;\n }", "@Override\n\t\t\tpublic boolean onSingleTapUp(MotionEvent arg0)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}", "@Override public boolean onTouchEvent(MotionEvent event) {\n super.onTouchEvent(event);\n boolean clickCaptured = processTouchEvent(event);\n boolean scrollCaptured = scroller != null && scroller.onTouchEvent(event);\n boolean singleTapCaptured = getGestureDetectorCompat().onTouchEvent(event);\n return clickCaptured || scrollCaptured || singleTapCaptured;\n }", "@Override\r\n public void onDownMotionEvent() {\n mFirstScroll = mDragging = true;\r\n }", "@Override\n public boolean onTouchEvent(final MotionEvent event) {\n final Scene scene = mScene;\n if (!mEnabled || scene == null) {\n return false;\n }\n\n final int action = event.getActionMasked();\n final int pointerIndex = (event.getAction() & MotionEvent.ACTION_POINTER_INDEX_MASK) >> MotionEvent.ACTION_POINTER_INDEX_SHIFT;\n final PointF touchedPoint = scene.getTouchedPoint(pointerIndex);\n\n if (action == MotionEvent.ACTION_DOWN || action == MotionEvent.ACTION_POINTER_DOWN) {\n if (!mFocus && hitTest(touchedPoint.x, touchedPoint.y)) {\n // keep pointer id\n mTouchPointerID = event.getPointerId(pointerIndex);\n // flag focus\n mFocus = true;\n setState(STATE_DOWN);\n\n // event\n if (mTouchListener != null) {\n mTouchListener.onTouchDown(this);\n }\n\n // take control\n return true;\n }\n } else if (action == MotionEvent.ACTION_UP || action == MotionEvent.ACTION_POINTER_UP) {\n if (mFocus && event.getPointerId(pointerIndex) == mTouchPointerID) {\n mTouchPointerID = -1;\n // unflag focus\n mFocus = false;\n\n // hit test\n final boolean hit = hitTest(touchedPoint.x, touchedPoint.y);\n // local callback\n onTouchUp(hit);\n\n setState(STATE_UP);\n\n // event\n if (mTouchListener != null) {\n mTouchListener.onTouchUp(this, hit);\n }\n if (hit) {\n // take control\n return true;\n }\n }\n } else if (action == MotionEvent.ACTION_MOVE) {\n final int touchPointerIndex = event.findPointerIndex(mTouchPointerID);\n if (mFocus && touchPointerIndex >= 0) {\n final PointF movePoint = scene.getTouchedPoint(touchPointerIndex);\n if (hitTest(movePoint.x, movePoint.y)) {\n setState(STATE_DOWN);\n } else {\n setState(STATE_UP);\n }\n }\n }\n\n return false;\n }", "@Override\r\n\tpublic boolean onTouchEvent(MotionEvent event) {\n\t\treturn false;\r\n\t}", "@SuppressLint(\"ClickableViewAccessibility\")\n @Override\n public boolean onTouchEvent(MotionEvent event) {\n return gestureHandler.onTouchEvent(event);\n }", "@Override\n public boolean onSingleTapConfirmed(MotionEvent e) {\n return false;\n }", "@Override\n public boolean onTouch(View view, MotionEvent motionEvent) {\n return true;\n }", "@Override\r\n\tpublic boolean isTouchRightDown() {\n\t\treturn false;\r\n\t}", "@Override\r\n\tpublic boolean onSingleTapConfirmed(MotionEvent e) {\n\t\treturn false;\r\n\t}", "@Override\r\n\t\tpublic boolean onTouchEvent(MotionEvent event) {\n\r\n\t\t\treturn true;\r\n\t\t}", "@Override\n public boolean onDown(MotionEvent event) {\n boolean retValue = false;\n //Log.d(TAG, \"Action onDown \" + MotionEvent.actionToString(event.getActionMasked()) + \" PC \" + event.getPointerCount());\n\n // Reset thee previous scroll event.\n PickNavigateController.this.oPointCoordinate.set(event.getX(), event.getY());\n PickNavigateController.this.oPreviousScrollEventPosition = null;\n\n if(event.getPointerCount() == 1) {\n PickNavigateController.this.pick(event); // Pick the object(s) at the tap location\n } else {\n Log.e(TAG, \"This should NEVER happen Action onDown clear pick list\");\n PickNavigateController.this.oFeaturePickList.clear();\n PickNavigateController.this.isDragging = false;\n PickNavigateController.this.dragDownEvent = null;\n }\n\n return retValue; // By not consuming this event, we allow it to pass on to the navigation gesture handlers\n }", "public boolean onTouch (View v, MotionEvent event){\n //\t\tif(!keepSilent){\n //\t\t\tswitch(event.getAction()){\n //\t\t\tcase MotionEvent.ACTION_MOVE:\n //\t\t\t\t\n //\t\t\t\tbreak;\n //\t\t\tcase MotionEvent.ACTION_CANCEL:\n //\t\t\tcase MotionEvent.ACTION_UP:\n //\t\t\t\t//mLastExceedingY = 0;\n //\t\t\t\tbreak;\n //\t\t\t}\n //\t\t}\t\t\n \t\t\n \t\treturn this.keepSilent;\n \t}", "@Override\n\tpublic boolean onTouchEvent(MotionEvent event) {\n\t\treturn false;\n\t}", "@Override\n public boolean onTouchEvent(MotionEvent event) {\n manager.receiveTouch(event);\n\n return true;\n }", "@Override\n public boolean touchDown(int screenX, int screenY, int pointer, int button) {\n return false;\n }" ]
[ "0.79503226", "0.7829187", "0.781155", "0.7810086", "0.7786219", "0.7764537", "0.7762168", "0.7762168", "0.7739921", "0.7739921", "0.7739921", "0.7719159", "0.7711689", "0.7711689", "0.7711689", "0.7711689", "0.7711689", "0.7711689", "0.7711689", "0.7711689", "0.7711689", "0.7711689", "0.7683801", "0.76813656", "0.7677012", "0.7642013", "0.75186735", "0.72969174", "0.728562", "0.7208728", "0.717791", "0.71015686", "0.7064573", "0.7061018", "0.70512986", "0.7040231", "0.70390683", "0.7026858", "0.7026858", "0.7026133", "0.70176196", "0.7014708", "0.69989663", "0.6996581", "0.6995204", "0.6987531", "0.6985095", "0.6985095", "0.6985095", "0.6985095", "0.6985095", "0.6985095", "0.6985095", "0.6985095", "0.6985095", "0.6985095", "0.6985095", "0.69730365", "0.69596034", "0.69372", "0.69372", "0.69372", "0.693435", "0.693123", "0.69268537", "0.69266564", "0.6925945", "0.69174033", "0.6917182", "0.6899455", "0.68982685", "0.68955004", "0.68838495", "0.688132", "0.6875365", "0.6874896", "0.6874896", "0.6874896", "0.6874774", "0.6867094", "0.68661726", "0.68661726", "0.6859113", "0.6858583", "0.68554807", "0.68466336", "0.6845424", "0.6839654", "0.68203086", "0.6807906", "0.6783544", "0.6769537", "0.6760051", "0.67502123", "0.6747509", "0.67463523", "0.67426157", "0.6738691", "0.67371327", "0.67348665" ]
0.78909814
1
onSingleTapConfirmed makes sure its just a single tap, not followed by a double tap.
public boolean onSingleTapConfirmed(MotionEvent e) { hideSystemUI(); return super.onSingleTapConfirmed(e); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onSingleTapConfirmed(MotionEvent e) {\n return true;\n }", "@Override\n\tpublic boolean onSingleTapConfirmed(MotionEvent e) {\n\t\treturn false;\n\t}", "@Override\r\n\tpublic boolean onSingleTapConfirmed(MotionEvent e) {\n\t\treturn false;\r\n\t}", "@Override\n\tpublic boolean onSingleTapConfirmed(MotionEvent arg0) {\n\t\treturn false;\n\t}", "@Override\n public boolean onSingleTapConfirmed(MotionEvent e) {\n return false;\n }", "@Override\n public boolean onSingleTapConfirmed(MotionEvent event) {\n return PickNavigateController.this.onSingleTapHandler(event);\n }", "@Override\n public boolean onSingleTapConfirmed(MotionEvent e) {\n if (mEventRects != null && mEventClickListener != null) {\n List<EventRect> reversedEventRects = mEventRects;\n Collections.reverse(reversedEventRects);\n for (EventRect eventRect : reversedEventRects) {\n if (eventRect.event.getId() != mNewEventId && eventRect.rectF != null && e.getX() > eventRect.rectF.left && e.getX() < eventRect.rectF.right && e.getY() > eventRect.rectF.top && e.getY() < eventRect.rectF.bottom) {\n mEventClickListener.onEventClick(eventRect.originalEvent, eventRect.rectF);\n playSoundEffect(SoundEffectConstants.CLICK);\n return super.onSingleTapConfirmed(e);\n }\n }\n }\n\n // If the tap was on add new Event space, then trigger the callback\n if (mAddEventClickListener != null && mNewEventRect != null && mNewEventRect.rectF != null && e.getX() > mNewEventRect.rectF.left && e.getX() < mNewEventRect.rectF.right && e.getY() > mNewEventRect.rectF.top && e.getY() < mNewEventRect.rectF.bottom) {\n mAddEventClickListener.onAddEventClicked(mNewEventRect.event.getStartTime(), mNewEventRect.event.getEndTime());\n return super.onSingleTapConfirmed(e);\n }\n\n // If the tap was on an empty space, then trigger the callback.\n if ((mEmptyViewClickListener != null || mAddEventClickListener != null) && e.getX() > mHeaderColumnWidth && e.getY() > (mHeaderHeight + mHeaderRowPadding * 2 + mHeaderMarginBottom)) {\n Calendar selectedTime = getTimeFromPoint(e.getX(), e.getY());\n List<EventRect> tempEventRects = new ArrayList<>(mEventRects);\n mEventRects = new ArrayList<EventRect>();\n if (selectedTime != null) {\n if (mNewEventRect != null) {\n tempEventRects.remove(mNewEventRect);\n mNewEventRect = null;\n }\n\n playSoundEffect(SoundEffectConstants.CLICK);\n if (mEmptyViewClickListener != null)\n mEmptyViewClickListener.onEmptyViewClicked(selectedTime);\n\n if (mAddEventClickListener != null) {\n //round selectedTime to resolution\n int unroundedMinutes = selectedTime.get(Calendar.MINUTE);\n int mod = unroundedMinutes % mNewEventTimeResolutionInMinutes;\n selectedTime.add(Calendar.MINUTE, mod < Math.ceil(mNewEventTimeResolutionInMinutes / 2) ? -mod : (mNewEventTimeResolutionInMinutes - mod));\n\n Calendar endTime = (Calendar) selectedTime.clone();\n endTime.add(Calendar.MINUTE, Math.min(mNewEventLengthInMinutes, (24 - selectedTime.get(Calendar.HOUR_OF_DAY)) * 60 - selectedTime.get(Calendar.MINUTE)));\n WeekViewEvent newEvent = new WeekViewEvent(mNewEventId, \"\", null, selectedTime, endTime);\n\n int marginTop = mHourHeight * mMinTime;\n float top = selectedTime.get(Calendar.HOUR_OF_DAY) * 60;\n top = mHourHeight * top / 60 + mCurrentOrigin.y + mHeaderHeight + mHeaderRowPadding * 2 + mHeaderMarginBottom + mTimeTextHeight / 2 + mEventMarginVertical - marginTop;\n float bottom = endTime.get(Calendar.HOUR_OF_DAY) * 60;\n bottom = mHourHeight * bottom / 60 + mCurrentOrigin.y + mHeaderHeight + mHeaderRowPadding * 2 + mHeaderMarginBottom + mTimeTextHeight / 2 - mEventMarginVertical - marginTop;\n\n // Calculate left and right.\n float left = 0;\n float right = left + mWidthPerDay;\n // Draw the event and the event name on top of it.\n if (left < right &&\n left < getWidth() &&\n top < getHeight() &&\n right > mHeaderColumnWidth &&\n bottom > 0\n ) {\n RectF dayRectF = new RectF(left, top, right, bottom);\n newEvent.setColor(mNewEventColor);\n mNewEventRect = new EventRect(newEvent, newEvent, dayRectF);\n tempEventRects.add(mNewEventRect);\n }\n }\n }\n computePositionOfEvents(tempEventRects);\n invalidate();\n }\n return super.onSingleTapConfirmed(e);\n }", "@Override\n public void onTwoFingerSingleTap() {\n showToast(\"两个手指点击\");\n LogUtil.e(\"onTwoFingerSingleTap\");\n }", "public boolean onSingleTapHandler(MotionEvent oEvent) {\n\n try {\n this.generateUserInteractionEvent(UserInteractionEventEnum.CLICKED, oEvent);\n } catch (IllegalArgumentException e) {\n // We have seen this during wall paper launch\n Log.e(TAG, \"singleTapHandler \", e);\n }\n this.oFeaturePickList.clear();\n\n return true;\n }", "@Override\n public boolean onDoubleTap(MotionEvent event) {\n mDoubleTapDetected = true;\n return false;\n }", "void onSingleClick( View view);", "@Override\n public boolean onDoubleTap(MotionEvent e) {\n if(gestureDetector.isLastActionFromStatusBar() || BuildConfig.ENABLE_EXTENDED_TAP_TARGETS) {\n goToSleep();\n gestureDetector.resetTapStates();\n }\n return true;\n }", "@Override\n public void onThreeFingerSingleTap() {\n showToast(\"三个手指点击\");\n LogUtil.e(\"onThreeFingerSingleTap\");\n }", "@Override\n\t\tpublic boolean onSingleTapUp(MotionEvent e) {\n\t\t\tLog.i(TAG, \"onSingleTapUp\");\n\t\t\treturn false;\n\t\t}", "public void onConfirmPressed(Uri uri) {\n if (mListener != null) {\n mListener.onFragmentInteraction(0);\n }\n }", "public final boolean isConfirmed() {\n return isConfirmed;\n }", "boolean isConfirmed();", "boolean onDoubleTap(MotionEvent event, int policyFlags);", "@Override\n\t\tpublic boolean onSingleTapUp(MotionEvent ev) {\n\n\t\t\t Toast.makeText(getActivity(),\"onSingleTapUp\",Toast.LENGTH_LONG).show();\n\n\t\t\t clickMyActivities();\n\t\t\treturn true;\n\t\t}", "public void setConfirmed(boolean confirmed) {\n this.confirmed = confirmed;\n }", "@Override\n public boolean onDoubleTapEvent(MotionEvent e) {\n Log.d(TAG, \"onDoubleTapEvent\");\n return true;\n }", "public abstract boolean isConfirmed();", "@Override\n public boolean onDoubleTap(MotionEvent e) {\n float x = e.getX();\n float y = e.getY();\n\n GomsLog.d(\"Double Tap\", \"Tapped at: (\" + x + \",\" + y + \")\");\n isDoubleTap = true;\n return true;\n }", "@Override\n\t\tpublic boolean onDoubleTap(MotionEvent e) {\n\t\t\treturn false;\n\t\t}", "@Override\n public boolean onSingleTapUp(MotionEvent e) {\n return false;\n }", "@Override\n public boolean onDoubleTap(MotionEvent e) {\n float x = e.getX();\n float y = e.getY();\n\n Log.d(\"Double Tap\", \"Tapped at: (\" + x + \",\" + y + \")\");\n showToolbar();\n\n return true;\n }", "@Override\n public void onSingleTap(SKScreenPoint point) {\n\n }", "@Override\n\t\tpublic boolean onSingleTapUp(MotionEvent e) {\n\t\t\treturn false;\n\t\t}", "public boolean isConfirmed() {\n return confirmed;\n }", "protected final void setConfirmed(final boolean confirmed) {\n isConfirmed = confirmed;\n }", "@Override\r\n\t\t\tpublic boolean onDoubleTap(MotionEvent e) {\n\t\t\t\treturn false;\r\n\t\t\t}", "@Override\n public boolean onDoubleTap(MotionEvent e) {\n float x = e.getX();\n float y = e.getY();\n\n Log.d(\"Double Tap\", \"Tapped at: (\" + x + \",\" + y + \")\");\n\n return true;\n }", "@Override\r\n public boolean onSingleTapUp(MotionEvent e)\r\n {\n return false;\r\n }", "abstract public void onSingleItemClick(View view);", "private void onDeleteConfirmed() {\n stopService();\n\n Intent intent = new Intent(this, StartRecordingActivity.class);\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(intent);\n finish();\n }", "@Override\n\t\tpublic boolean onDoubleTapEvent(MotionEvent e) {\n\t\t\treturn false;\n\t\t}", "@Override\n\t\t\t\tpublic boolean onSingleTapUp(MotionEvent e) {\n\t\t\t\t\treturn false;\n\t\t\t\t}", "boolean isConfirmed(){\n\t\treturn confirmed;\n\t}", "@Override\n public void getFingerResult(Boolean aBoolean) {\n\n if (aBoolean) {\n popup.closePopup();\n firebase.setGCM(FirebaseInstanceId.getInstance().getToken());\n firebase.setLogin(true);\n startActivity(new Intent(getActivity(), MainActivity.class));\n }\n }", "@Override //abstract method from OnDoubleTapListener\n\tpublic boolean onDoubleTapEvent(MotionEvent e){\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onDoubleTapEvent(MotionEvent e) {\n\t\treturn false;\r\n\t}", "@Override\r\n\tpublic boolean onSingleTapUp(MotionEvent e) {\n\t\treturn false;\r\n\t}", "@Override\r\n\tpublic boolean onSingleTapUp(MotionEvent e) {\n\t\treturn false;\r\n\t}", "@Override\n\tpublic boolean onSingleTapUp(MotionEvent e) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean onSingleTapUp(MotionEvent e) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean onSingleTapUp(MotionEvent e) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean onSingleTapUp(MotionEvent e) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean onSingleTapUp(MotionEvent e) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean onSingleTapUp(MotionEvent e) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean onSingleTapUp(MotionEvent e) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean onSingleTapUp(MotionEvent e) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean onSingleTapUp(MotionEvent e) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean onSingleTapUp(MotionEvent e) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean onSingleTapUp(MotionEvent e) {\n\t\treturn false;\n\t}", "public final native void setSingleEvents(boolean singleEvents) /*-{\n this.setSingleEvents(singleEvents);\n }-*/;", "@Override\n public boolean onDoubleTap(MotionEvent event) {\n return PickNavigateController.this.onDoubleTapHandler(event);\n }", "@Override\r\n\tprotected boolean onTap(int index) {\r\n\t\treturn true;\r\n\t}", "@Override\n\tpublic boolean onDoubleTapEvent(MotionEvent e) {\n\t\treturn false;\n\t}", "protected void setConfirmed(boolean confirmed) {\n this.confirmed = confirmed;\n }", "@Override\r\n\tpublic void onDoubleTap() {\n\t\t\r\n\t}", "@Override\n public boolean onSingleTapUp(MotionEvent e) {\n if (view.isMouseTrackingActive()) return false;\n\n doUIToggle((int) e.getX(), (int) e.getY(), view.getVisibleWidth(), view.getVisibleHeight());\n return true;\n }", "public void setInstantConfirmation(boolean value) {\n this.instantConfirmation = value;\n }", "private void onSignOutConfirmed() {\n Login.logout(this, e -> {\n Toast.makeText(this, \"Logged out successfully\", Toast.LENGTH_SHORT).show();\n });\n\n Intent intent = new Intent(this, MainActivity.class);\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); // add this flag so that we return to an existing MainActivity if it exists rather than creating a new one\n Login.setManualLogin(true);\n Login.forceLogin(); // force re-login so that when we sign-out we are brought to the login screen. Login.logout() occurs asynchronously so without calling this, we may not go to the login screen\n\n startActivity(intent);\n }", "@Override\n public void onClick(View v) {\n\n\n Toast.makeText(MainSOSActivity.this, \"Stay Safe and Confirm the Message!\", Toast.LENGTH_SHORT).show();\n\n }", "void onDoubleTapEvent();", "public boolean isFullyConfirmed()\n\t{\n\t\treturn getTargetQty().compareTo(getConfirmedQty()) == 0;\n\t}", "@Override\n public void onClick(View v) {\n\n\n Toast.makeText(MainSOSActivity.this, \"Stay Safe and Confirm the Message! Your emergnecy conctacts will be notified!\", Toast.LENGTH_SHORT).show();\n\n }", "@Override\n\tpublic boolean onDoubleTapEvent(MotionEvent arg0) {\n\t\treturn false;\n\t}", "public boolean isInstantConfirmation() {\n return instantConfirmation;\n }", "@Override\n public void confirm(CorrelationData correlationData, boolean isAck, String cause) {\n System.out.println(\"ack = \" + isAck);\n// System.out.println(\"cause = \" + cause);\n// System.out.println(\"=======ConfirmCallback=========\");\n }", "@Override\n\tpublic void setIsSingleMatch(boolean isSingleMatch) {\n\t\t_esfTournament.setIsSingleMatch(isSingleMatch);\n\t}", "private void hookSingleClickAction() {\n\t\tthis.addSelectionChangedListener(new ISelectionChangedListener() {\n\t\t\tpublic void selectionChanged(SelectionChangedEvent event) {\n\t\t\t\tsingleClickAction.run();\n\t\t\t}\n\t\t});\n\t}", "public boolean IsFirstCellGreenAfterClick() {\n return IsCellGreenAfterClick(firstCell);\n }", "public void showTestDoneNotification() {\n Intent intent = new Intent(this, MainActivity.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);\n Notification notification = new NotificationCompat.Builder(getApplicationContext())\n .setContentIntent(PendingIntent.getActivity(this, 0, intent, 0))\n .setSmallIcon(R.drawable.ic_launcher)\n .setContentText(getText(R.string.local_service_test_done))\n .setContentTitle(getText(R.string.local_service_notification)).build();\n notificationManager.notify(NOTIFICATION, notification);\n status = new Status(getString(R.string.ready), false);\n sendStatusMessage();\n }", "public boolean onTap(PointF pointF) {\n long execute = new MarkerHitResolver(this.mapboxMap).execute(getMarkerHitFromTouchArea(pointF));\n if (execute != -1 && isClickHandledForMarker(execute)) {\n return true;\n }\n Annotation execute2 = new ShapeAnnotationHitResolver(this.shapeAnnotations).execute(getShapeAnnotationHitFromTap(pointF));\n if (execute2 == null || !handleClickForShapeAnnotation(execute2)) {\n return false;\n }\n return true;\n }", "public boolean onDoubleTap(MotionEvent e) {\n MotionEvent mappedEvent = mapTouchEvent(e);\n if (GlobalSettings.isFlag()) {\n sessionViewListener.onSessionViewLeftTouch((int) mappedEvent.getX(), (int) mappedEvent.getY(), true);\n sessionViewListener.onSessionViewLeftTouch((int) mappedEvent.getX(), (int) mappedEvent.getY(), false);\n\n } else {\n pointerView.setLeftClick();\n\n }\n\n return true;\n }", "@Override\n public void confirm(AppointmentBean appointmentBean, AppointmentDetailPresenter presenter) {\n AppointmentStateTypeBean type = presenter.getAppointmentStateTypeBean(1);\n type.setAppointmentState(new AppointmentStateNew());\n appointmentBean.setAppointmentStateType(type);\n }", "protected void onConfirmation(int confirmationId, Object anObject) {\r\n\r\n\t}", "@Override\r\n\tpublic boolean onSingleTapUp(MotionEvent arg0) {\n\t\treturn false;\r\n\t}", "public void subscribeActual(SingleObserver<? super R> singleObserver) {\n try {\n this.source.subscribe(new ReduceSeedObserver(singleObserver, this.reducer, ObjectHelper.requireNonNull(this.seedSupplier.call(), \"The seedSupplier returned a null value\")));\n } catch (Throwable th) {\n Exceptions.throwIfFatal(th);\n EmptyDisposable.error(th, singleObserver);\n }\n }", "@Override\n\tpublic boolean onSingleTapUp(MotionEvent arg0) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean onSingleTapUp(MotionEvent arg0) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean onSingleTapUp(MotionEvent arg0) {\n\t\treturn false;\n\t}", "@Override public boolean onTouchEvent(MotionEvent event) {\n super.onTouchEvent(event);\n boolean clickCaptured = processTouchEvent(event);\n boolean scrollCaptured = scroller != null && scroller.onTouchEvent(event);\n boolean singleTapCaptured = getGestureDetectorCompat().onTouchEvent(event);\n return clickCaptured || scrollCaptured || singleTapCaptured;\n }", "public void handleShowCMEmergency() {\n this.mIsCMSingleClicking = false;\n updateIndication();\n }", "public void subscribeActual(SingleObserver<? super T> singleObserver) {\n this.source.subscribe(new DoFinallyObserver(singleObserver, this.onFinally));\n }", "public void onConfirmFavouriteDeletion();", "@Override\r\n\tpublic boolean onSingleTapUp(MotionEvent e) {\n\t\tSystem.out.println(\"onSingleTapUp\");\r\n\r\n\t\tChoices choices = new Choices(SINGLECLICK, Choices.TYPE_NUM);\r\n\t\ttry {\r\n\t\t\toutputStream.writeObject(choices);\r\n\t\t} catch (IOException e1) {\r\n\t\t\te1.printStackTrace();\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}", "@Override\n\t\t\tpublic boolean onSingleTapUp(MotionEvent arg0)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}", "boolean onGestureCompleted(int gestureId);", "private void onConfirm() {\n if (canConfirm) {\n onMoveConfirm(gridView.selectedX, gridView.selectedY);\n this.setConsoleState();\n }\n }", "public boolean onMiddleClicked() {\n int i = this.mBarState;\n if (i == 0) {\n this.mView.post(this.mPostCollapseRunnable);\n return false;\n } else if (i != 1) {\n if (i == 2 && !this.mQsExpanded) {\n this.mStatusBarStateController.setState(1);\n }\n return true;\n } else {\n if (!this.mDozingOnDown) {\n if (this.mKeyguardBypassController.getBypassEnabled()) {\n this.mUpdateMonitor.requestFaceAuth();\n } else {\n this.mLockscreenGestureLogger.write(188, 0, 0);\n startUnlockHintAnimation();\n }\n }\n return true;\n }\n }", "protected boolean dealWithMouseDoubleClicked(IFigure figure,\n int button,\n int x,\n int y,\n int state)\n {\n setUpMouseState(MOUSE_DOUBLE_CLICKED);\n return true;\n }", "@Override\n public void onSure() {\n\n }", "@Override\n\tpublic boolean onSingleTapUp(MotionEvent e) {\n\t\tstr.add(\"tap\");\n\t\ttext1.setText(str.toString());\n\t\treturn true;\n\t}", "@OnClick(R.id.buttonConfirmSymptoms)\n public void buttonConfirmSymptoms() {\n if (sharedPreferences.getInt(\"symptomCounter\", 0) == 0) {\n Toast.makeText(ExaminationActivity.this, getString(R.string.not_enough), Toast.LENGTH_SHORT).show();\n } else {\n startActivity(new Intent(ExaminationActivity.this, DiagnoseActivity.class));\n finish();\n }\n }", "public void simpleEvent() {\n AdGyde.onSimpleEvent(\"SimpleEventID\");\n Toast.makeText(this, \"Simple event clicked\", Toast.LENGTH_SHORT).show();\n }", "boolean onGestureStarted();", "@Override\n\tpublic boolean isIsSingleMatch() {\n\t\treturn _esfTournament.isIsSingleMatch();\n\t}", "@Override\n public void onCorrect() {\n System.out.println(\"correct\");\n }" ]
[ "0.7309933", "0.7054076", "0.70464826", "0.69695866", "0.68704855", "0.6751113", "0.5998742", "0.5618855", "0.55036575", "0.53860724", "0.5328654", "0.51601905", "0.51128197", "0.5110579", "0.51069784", "0.50650245", "0.502466", "0.4974216", "0.49435872", "0.4943492", "0.49258366", "0.4916785", "0.48924065", "0.4873402", "0.4842006", "0.48313457", "0.48267362", "0.48240334", "0.4789718", "0.47881252", "0.4788101", "0.47859836", "0.47856313", "0.4783575", "0.47810376", "0.4763702", "0.47595647", "0.47497615", "0.47389647", "0.47344905", "0.47321892", "0.47292063", "0.47292063", "0.47168925", "0.47168925", "0.47168925", "0.47168925", "0.47168925", "0.47168925", "0.47168925", "0.47168925", "0.47168925", "0.47168925", "0.47168925", "0.47042704", "0.4691119", "0.4689941", "0.46870267", "0.46802682", "0.46770567", "0.4652423", "0.46413705", "0.46177146", "0.4586813", "0.4572606", "0.4570317", "0.4559482", "0.45279396", "0.45192578", "0.4514029", "0.45092285", "0.45059374", "0.4502939", "0.4498871", "0.44866097", "0.44709352", "0.44440922", "0.44427624", "0.4408812", "0.44063848", "0.43990925", "0.43990925", "0.43990925", "0.43890342", "0.43819228", "0.43796453", "0.43783486", "0.43675765", "0.43496758", "0.43489596", "0.4305749", "0.42981067", "0.4286362", "0.4267068", "0.42579752", "0.42501113", "0.4243256", "0.4242283", "0.4228123", "0.42278814" ]
0.66214764
6
onResume() is called whenever the app regains focus
protected void onResume(){ super.onResume(); hideSystemUI(); if (!coreView.isGamePaused()) //only resume game if there wasn't a manual pause prior to losing focus coreView.resume(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void onResume();", "public void onResume() {\n }", "void onResume();", "public void onResume() {\n super.onResume();\n }", "public void onResume() {\n super.onResume();\n }", "@Override\n public void onResume() {\n }", "@Override\r\n\tpublic void onResume() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void onResume() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void onResume() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void onResume() {\n\t\t\r\n\t}", "protected void onResume ()\n\t{\n\t\tsuper.onResume ();\n\t}", "@Override\n\tpublic void onResume() {\n\n\t}", "@Override\n\tpublic void onResume() {\n\n\t}", "@Override\r\n\tpublic void onResume() {\n\t\tsuper.onResume();\r\n\t}", "@Override\r\n\tpublic void onResume() {\n\t\tsuper.onResume();\r\n\t}", "@Override\r\n\tpublic void onResume() {\n\t\tsuper.onResume();\r\n\t}", "@Override\n protected void onResume() {\n super.onResume();\n MobclickAgent.onResume(this);\n // JPushInterface.onResume(this);\n isForeground = true;\n\n }", "@Override\r\n\tprotected void onResume() {\n\t\t\r\n\t}", "@Override\n\tprotected void onResume() {\n\n\t\tsuper.onResume();\n\t\tApplicationStatus.activityResumed();\n\t}", "@Override\r\n\tprotected void onResume() {\n\t\tsuper.onResume();\r\n\r\n\t}", "@Override\r\n\tprotected void onResume() {\n\t\tsuper.onResume();\r\n\r\n\t}", "protected abstract void onResume();", "@Override\n public void onResume() {\n\n super.onResume();\n }", "@Override\n protected void onResume(){\n super.onResume();\n Log.d(TAG_INFO,\"application resumed\");\n }", "@Override\n protected void onResume(){\n super.onResume();\n Log.d(TAG_INFO,\"application resumed\");\n }", "@Override\r\n protected void onResume() {\n super.onResume();\r\n Log.i(TAG, \"onResume\");\r\n\r\n }", "@Override\r\n\tpublic void onResume() {\n\t\tsuper.onResume();\r\n\t\t\r\n\t}", "@Override\r\n\tprotected void onResume() {\n\t\tsuper.onResume();\r\n\t}", "@Override\r\n\tprotected void onResume() {\n\t\tsuper.onResume();\r\n\t}", "@Override\r\n\tprotected void onResume() {\n\t\tsuper.onResume();\r\n\t}", "@Override\r\n\tprotected void onResume() {\n\t\tsuper.onResume();\r\n\t}", "@Override\r\n\tprotected void onResume() {\n\t\tsuper.onResume();\r\n\t}", "@Override\r\n\tprotected void onResume() {\n\t\tsuper.onResume();\r\n\t}", "@Override\r\n\tprotected void onResume() {\n\t\tsuper.onResume();\r\n\t}", "@Override\r\n\tprotected void onResume() {\n\t\tsuper.onResume();\r\n\t}", "@Override\r\n\tprotected void onResume() {\n\t\tsuper.onResume();\r\n\t}", "@Override\r\n\tprotected void onResume() {\n\t\tsuper.onResume();\r\n\t}", "protected void onResume () {\n super.onResume();\n this.verifyPreferences ();\n }", "@Override\n\tpublic void onResume() {\n\t\tsuper.onResume();\n\t\tLog.i(TAG, \"onResume\");\n\t}", "@Override\n\tpublic void onResume() {\n\t\tsuper.onResume();\n\n\t}", "@Override\n\tpublic void onResume() {\n\t\tsuper.onResume();\n\n\t}", "@Override\n public void onResume() {\n super.onResume();\n }", "@Override\n public void onResume() {\n super.onResume();\n }", "@Override\n public void onResume() {\n super.onResume();\n }", "@Override\n public void onResume() {\n super.onResume();\n }", "@Override\n public void onResume() {\n super.onResume();\n }", "public void onResume() {\n super.onResume();\n C8006j.m18079r();\n }", "@Override\n\tpublic void onResume() {\n\t\tsuper.onResume();\n\t}", "@Override\n\tpublic void onResume() {\n\t\tsuper.onResume();\n\t}", "@Override\n\tpublic void onResume() {\n\t\tsuper.onResume();\n\t}", "@Override\n\tpublic void onResume() {\n\t\tsuper.onResume();\n\t}", "@Override\n\tpublic void onResume() {\n\t\tsuper.onResume();\n\t}", "@Override\n\tpublic void onResume() {\n\t\tsuper.onResume();\n\t}", "@Override\n\tpublic void onResume() {\n\t\tsuper.onResume();\n\t}", "@Override\n public void onResume() {\n \tsuper.onResume();\n \tLog.i(\"ONRESUME\", \"ONRESUME\");\n \treloadSavedState();\n }", "protected void onResume() {\n\t\t// Reset textfield (will display history)\n\t\tif (!flagConfigurationChanged)\n\t\t\tsearchEditText.setText(\"\");\n\n\t\t// Display keyboard\n\t\tnew Handler().postDelayed(new Runnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tsearchEditText.requestFocus();\n\t\t\t\tInputMethodManager mgr = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\n\t\t\t\tmgr.showSoftInput(searchEditText,\n\t\t\t\t\t\tInputMethodManager.SHOW_IMPLICIT);\n\t\t\t}\n\t\t}, 50);\n\n\t\tsuper.onResume();\n\t}", "@Override\r\n\tprotected void onResume() {\n\t\tsuper.onResume();\r\n\t\t\r\n\t}", "@Override\r\n\tprotected void onResume() {\n\t\tsuper.onResume();\r\n\t\t\r\n\t}", "public void onResume() {\n super.onResume();\n this.eventDelegate.onResume();\n }", "@Override\n protected void onResume() {\n super.onResume();\n active = true;\n }", "@Override\n protected void onResume() {\n super.onResume();\n active = true;\n }", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t\t\n\t}", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t\t \n\t}", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\n\t}", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\n\t}", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\n\t}", "public void onResume() {\n\t\tSession session = Session.getActiveSession();\n\t\tif (session != null && (session.isOpened() || session.isClosed())) {\n\t\t\tonSessionStateChange(session, session.getState(), null);\n\t\t}\n\t\tuiHelper.onResume();\n\t}", "@Override\n\tprotected void onResume() \n\t{\n\t\tsuper.onResume();\n\t}", "@Override\n protected void onResume() {\n super.onResume();\n Log.d(TAG, \"onResume() called\");\n }", "@Override\n\tprotected void onResume() {\n\n\t\tsuper.onResume();\n\t}", "@Override\n public void onResume(Activity activity) {\n }", "@Override\r\n protected void onResume() {\r\n Log.i(TAG, \"onResume()\");\r\n \r\n super.onResume();\r\n }", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t\tLog.e(TAG, \"onResume\");\n\t}", "@Override\n protected void onResume() {\n super.onResume();\n Log.d(msg, \"The onResume() event\");\n }", "@Override\n protected void onResume() {\n super.onResume();\n Log.d(msg, \"The onResume() event\");\n }", "@Override\n\tprotected void onResume()\n\t{\n\t\tsuper.onResume();\n\n\t}", "@Override\n protected void onResume() {\n super.onResume();\n\n Log.d(LOG_TAG, \"onResume()\");\n\n\n\n }", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t}", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t}", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t}", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t}", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t}", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t}", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t}", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t}", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t}", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t}", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t}", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t}", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t}", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t}", "@Override\n protected void onResume() {\n super.onResume();\n }", "@Override\n protected void onResume() {\n super.onResume();\n }", "@Override\n protected void onResume() {\n super.onResume();\n }", "@Override\n protected void onResume() {\n super.onResume();\n }", "@Override\n protected void onResume() {\n Log.i(\"G53MDP\", \"Main onResume\");\n super.onResume();\n }", "@Override\n\t\tprotected void onResume() {\n\t\t\tsuper.onResume();\n\t\t}", "@Override\n\tprotected void onResume()\n\t{\n\t\tsuper.onResume();\n\t}", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\t\t\t\n\t\t\t\t\n\t}", "@Override\r\n\tprotected void onResume() {\n\t\tsuper.onResume();\r\n\t\tLog.d(\"maintab\", \"maintab_MainActivity------onResume\");\r\n\r\n\t}", "@Override\n protected void onResume() {\n super.onResume();\n Log.v(TAG, \"Invoked onResume()\");\n\n }" ]
[ "0.85155416", "0.84582466", "0.84305626", "0.8205287", "0.8205287", "0.8140441", "0.8118674", "0.8118674", "0.8118674", "0.8118674", "0.8089513", "0.80394274", "0.80394274", "0.7995657", "0.7995657", "0.7995657", "0.79886484", "0.7984463", "0.79769444", "0.796233", "0.796233", "0.7940659", "0.7940404", "0.7929087", "0.7929087", "0.79266655", "0.79246706", "0.79243404", "0.79243404", "0.79243404", "0.79243404", "0.79243404", "0.79243404", "0.79243404", "0.79243404", "0.79243404", "0.79243404", "0.790724", "0.7905465", "0.79035217", "0.79035217", "0.7868009", "0.7868009", "0.7868009", "0.7868009", "0.7868009", "0.7863188", "0.7857255", "0.7857255", "0.7857255", "0.7857255", "0.7857255", "0.7857255", "0.7857255", "0.78538895", "0.7851552", "0.78458375", "0.78458375", "0.783327", "0.7831507", "0.7831507", "0.78290606", "0.7827976", "0.78237355", "0.78237355", "0.78237355", "0.7823238", "0.78227323", "0.7816772", "0.78140414", "0.78092074", "0.7808496", "0.78084785", "0.78082573", "0.78082573", "0.7804439", "0.7796782", "0.77928704", "0.77928704", "0.77928704", "0.77928704", "0.77928704", "0.77928704", "0.77928704", "0.77928704", "0.77928704", "0.77928704", "0.77928704", "0.77928704", "0.77928704", "0.77928704", "0.7792783", "0.7792783", "0.7792783", "0.7792783", "0.778464", "0.7784617", "0.7779295", "0.7778483", "0.7775663", "0.7770217" ]
0.0
-1
onPause() is called whenever the app loses focus (e.g. user interacts with the navigation bar or status bar, a dialog box pops up) any heavy saving should be done in onStop() (app is hidden), not onPause().
protected void onPause(){ super.onPause(); showSystemUI(); if (coreView.isRunning()) coreView.pause(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tprotected void onPause() {\n\t\t// TODO Auto-generated method stub\n\t\tsuper.onPause();\n\n\t\tsavePreferences();\n\t}", "@Override\n public void onPause() {\n AppEventsLogger.deactivateApp(this);\n isResumed = false;\n\n super.onPause();\n uiHelper.onPause();\n }", "protected void onPause(Bundle savedInstanceState) {\r\n\t\t\r\n\t}", "public void onPause();", "@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t\tApplicationStatus.activityPaused();\n\t}", "protected void onPause() {\n\t\tsuper.onPause();\n\t\tfinish();\n\t}", "@Override\r\n\tprotected void onPause() {\n\t\tsuper.onPause();\r\n\t\tonPause = true;\r\n\t}", "protected void onPause ()\n\t{\n\t\tsuper.onPause ();\n\t}", "@Override\r\n\tprotected void onPause() {\n\t\tsuper.onPause();\r\n\t}", "@Override\r\n\tprotected void onPause() {\n\t\tsuper.onPause();\r\n\t}", "@Override\r\n\tprotected void onPause() {\n\t\tsuper.onPause();\r\n\t}", "@Override\r\n\tprotected void onPause() {\n\t\tsuper.onPause();\r\n\t}", "@Override\r\n\tprotected void onPause() {\n\t\tsuper.onPause();\r\n\t}", "protected void onPause() {\n super.onPause();\n }", "@Override\r\n\tpublic void onPause() {\n\t\tsuper.onPause();\r\n\t}", "@Override\r\n\tpublic void onPause() {\n\t\tsuper.onPause();\r\n\t}", "@Override\r\n\tpublic void onPause() {\n\t\tsuper.onPause();\r\n\t}", "public void onPause() {\n super.onPause();\n }", "public void onPause() {\n super.onPause();\n }", "public void onPause() {\n super.onPause();\n }", "public void onPause() {\n super.onPause();\n }", "public void onPause() {\n super.onPause();\n }", "public void onPause() {\n super.onPause();\r\n }", "@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t}", "@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t}", "@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t}", "@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t}", "@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t}", "@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t}", "@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t}", "@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t}", "@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t}", "@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t}", "@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t}", "@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t}", "@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t}", "@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t}", "@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t}", "@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t}", "@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t}", "@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t}", "@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t}", "@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t}", "@Override\n\tprotected void onPause()\n\t{\n\t\tsuper.onPause();\n\t}", "@Override\n protected void onPause() {\n Log.i(\"G53MDP\", \"Main onPause\");\n super.onPause();\n }", "@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t\t\n\t}", "@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t\t\n\t}", "@Override\n\tpublic void onPause() {\n\t\tsuper.onPause();\n\t}", "@Override\n\tpublic void onPause() {\n\t\tsuper.onPause();\n\t}", "@Override\n\tpublic void onPause() {\n\t\tsuper.onPause();\n\t}", "@Override\n\tpublic void onPause() {\n\t\tsuper.onPause();\n\t}", "@Override\n\tpublic void onPause() {\n\t\tsuper.onPause();\n\t}", "@Override\n\tpublic void onPause() {\n\t\tsuper.onPause();\n\t}", "@Override\n\tpublic void onPause() {\n\t\tsuper.onPause();\n\t}", "@Override\n public void onPause() {\n super.onPause();\n uiHelper.onPause();\n }", "public void onPause()\n {\n\n }", "@Override\n\tpublic void onPause() {\n\t\tsuper.onPause();\n\n\t}", "@Override\n\tprotected void onPause()\n\t{\n\t\tsuper.onPause();\n\n\t}", "@Override\r\n\tprotected void onPause() {\n\t\tsuper.onPause();\r\n\t\tfinish();\r\n\t}", "@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\n\t}", "@Override\n protected void onPause() {\n isRunning = false;\n super.onPause();\n }", "@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t\tLog.e(\"Ganxiayong\", \"-----------onPause()---------\");\n\t\tfinish();\n\t}", "protected void onPause()\n {\n super.onPause();\n\n if (mGlView != null)\n {\n mGlView.setVisibility(View.INVISIBLE);\n mGlView.onPause();\n }\n\n if (mEstadoActualAPP == EstadoAPP.CAMERA_RUNNING)\n {\n actualizarEstadoAplicacion(EstadoAPP.CAMERA_STOPPED);\n }\n\n if (mFlash)\n {\n mFlash = false;\n setFlash(mFlash);\n }\n\n QCAR.onPause();\n }", "@Override\n\t\tprotected void onPause() {\n\t\t\tsuper.onPause();\n\t\t}", "@Override\r\n\tprotected void onPause() {\r\n\t\tsuper.onPause();\r\n\t\t\r\n\t\t\t\t\r\n\t}", "@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t\tfinish();\n\t}", "@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t\tfinish();\n\t}", "@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t\tfinish();\n\t}", "@Override\r\n\tprotected void onPause() {\n\t\tif (SystemCheckTools.isApplicationSentToBackground(AppStartToMainActivity.this) == true) {\r\n\t\t\tExitApp.getInstance().exit();\r\n\t\t}\r\n\t\tsuper.onPause();\r\n\t}", "public void onPause() {\n }", "@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t\tisFlag = false;\n\t}", "@Override\n protected void onPause(){\n super.onPause();\n Log.d(TAG_INFO,\"application paused\");\n }", "@Override\n protected void onPause(){\n super.onPause();\n Log.d(TAG_INFO,\"application paused\");\n }", "public void onPause() {\n LOG.mo8825d(\"[onPause]\");\n super.onPause();\n }", "@Override\r\n\tprotected void onPause() {\n\t\tsuper.onPause();\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "protected void onPause() {\n super.onPause();\n finish();\n }", "@Override\n \tprotected void onPause() {\n \t\tsuper.onPause();\n \t}", "@Override\n \tprotected void onPause() {\n \t\tsuper.onPause();\n \t}", "@Override\n protected void onPause() {\n super.onPause();\n }", "@Override\n protected void onPause() {\n super.onPause();\n }", "@Override\n protected void onPause() {\n super.onPause();\n }", "@Override\n protected void onPause() {\n super.onPause();\n }", "@Override\n protected void onPause() {\n super.onPause();\n }", "@Override\n protected void onPause() {\n super.onPause();\n }", "@Override\n protected void onPause() {\n super.onPause();\n }", "@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t\tSalinlahiFour.getBgm().pause();\n\t}", "@Override\r\n protected void onPause() {\n super.onPause();\r\n Log.i(TAG, \"onPause\");\r\n }", "public void onPause () {\n\t\t\n\t}", "@Override\n public void onPause() {\n super.onPause();\n }", "@Override\n public void onPause() {\n super.onPause();\n }", "@Override\n public void onPause() {\n super.onPause();\n }", "@Override\n public void onPause() {\n super.onPause();\n }", "@Override\n public void onPause() {\n super.onPause();\n }", "@Override\n public void onPause() {\n super.onPause();\n }", "@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t\tLogger.d(TAG, \"onStop.....\");\n\t}", "@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t\t//finish();\n\t}", "@Override\n\tpublic void onPause() {\n\n\t}", "@Override\r\n\tprotected void onPause() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void onPause() {\n\t\tsuper.onPause();\r\n\t\tLog.e(TAG, \"onpause\");\r\n\t}", "@Override\r\n\tpublic void onPause() {\n\t\tsuper.onPause();\r\n\t\tLog.e(TAG, \"onpause\");\r\n\t}", "@Override\n protected void onPause() {\n super.onPause();\n Log.i(TAG, \"onPause\");\n }" ]
[ "0.8314643", "0.82946545", "0.8288962", "0.8267997", "0.8203349", "0.8198659", "0.81781334", "0.81447405", "0.811065", "0.811065", "0.811065", "0.811065", "0.811065", "0.811062", "0.8107465", "0.8107465", "0.8107465", "0.8093331", "0.8093331", "0.8093331", "0.8093331", "0.8093331", "0.808337", "0.8074606", "0.8074606", "0.8074606", "0.8074606", "0.8074606", "0.8074606", "0.8074606", "0.8074606", "0.8074606", "0.8074606", "0.8074606", "0.8074606", "0.8074606", "0.8074606", "0.8074606", "0.8074606", "0.8074606", "0.8074606", "0.8074606", "0.8074606", "0.8070266", "0.8070163", "0.8070071", "0.8070071", "0.80657125", "0.80657125", "0.80657125", "0.80657125", "0.80657125", "0.80657125", "0.80657125", "0.8054359", "0.8033028", "0.8022339", "0.80205864", "0.80195004", "0.8017335", "0.8010096", "0.8008434", "0.80026186", "0.80011946", "0.7994289", "0.7984664", "0.7984664", "0.7984664", "0.798411", "0.7975289", "0.7963734", "0.795284", "0.795284", "0.795117", "0.7947628", "0.79389393", "0.7933888", "0.7933888", "0.793086", "0.793086", "0.793086", "0.793086", "0.793086", "0.793086", "0.793086", "0.79241204", "0.7918835", "0.79162717", "0.79160655", "0.79160655", "0.79160655", "0.79160655", "0.79160655", "0.79160655", "0.79067427", "0.7906334", "0.7904527", "0.790062", "0.7899669", "0.7899669", "0.78928477" ]
0.0
-1
1) Llamamos a la otra actividad pasando un texto para editar
public void editTitle(View view) { Intent intent = new Intent(this, EditActivity.class); intent.putExtra("text", title); startActivityForResult(intent, EDIT_TITLE);//CTRL+ALT+C per canviar de 0 a una variable }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void edit() {\n\n\t}", "public String editar()\r\n/* 59: */ {\r\n/* 60: 74 */ if ((getMotivoLlamadoAtencion() != null) && (getMotivoLlamadoAtencion().getIdMotivoLlamadoAtencion() != 0)) {\r\n/* 61: 75 */ setEditado(true);\r\n/* 62: */ } else {\r\n/* 63: 77 */ addInfoMessage(getLanguageController().getMensaje(\"msg_info_seleccionar\"));\r\n/* 64: */ }\r\n/* 65: 79 */ return \"\";\r\n/* 66: */ }", "@Override\r\n\tpublic void edit() {\n\t\t\r\n\t}", "void setEditore(String editore);", "String getEditore();", "public void editOperation() {\n\t\t\r\n\t}", "public void setTextUsuarioModificacionEd(String text) { doSetText(this.$element_UsuarioModificacionEd, text); }", "private void setToEdit(String input){\n ToEdit = input;\n }", "public abstract void edit();", "void onEditClicked();", "public void editarData(){\n\t\talunoTurmaService.inserirAlterar(alunoTurmaAltera);\n\t\t\n\t\t\n\t\tmovimentacao.setDataMovimentacao(alunoTurmaAltera.getDataMudanca());\n\t\tmovimentacaoService.inserirAlterar(movimentacao);\n\t\t\n\t\tFecharDialog.fecharDialogDATAAluno();\n\t\tExibirMensagem.exibirMensagem(Mensagem.SUCESSO);\n\t\talunoTurmaAltera = new AlunoTurma();\n\t\tmovimentacao = new Movimentacao();\n\t\t\n\t\tatualizarListas();\n\t}", "@Override\n //nhan ket qua man hinh khac tra ve Main\n protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {\n if (requestCode == REQUEST_CODE_EDIT && resultCode == RESULT_OK && data != null){\n String name = data.getStringExtra(\"New\");\n txtName.setText(name);\n }\n super.onActivityResult(requestCode, resultCode, data);\n }", "private void editName() {\n Routine r = list.getSelectedValue();\n\n String s = (String) JOptionPane.showInputDialog(\n this,\n \"Enter the new name:\",\n \"Edit name\",\n JOptionPane.PLAIN_MESSAGE,\n null, null, r.getName());\n\n if (s != null) {\n r.setName(s);\n }\n }", "public String edit() {\n return \"edit\";\n }", "private void edit() {\n if (String.valueOf(tgl_pengobatanField.getText()).equals(null)\n || String.valueOf(waktu_pengobatanField.getText()).equals(null)) {\n Toast.makeText(getApplicationContext(),\n \"Ada Yang Belum Terisi\", Toast.LENGTH_SHORT).show();\n } else {\n SQLite.update(Integer.parseInt(idField.getText().toString().trim()),nama_pasien2,nama_dokter2, tgl_pengobatanField.getText().toString().trim(),waktu_pengobatanField.getText().toString(),\n keluhan_pasienField.getText().toString().trim(),hasil_diagnosaField.getText().toString().trim(),\n biayaField.getText().toString().trim());\n blank();\n finish();\n }\n }", "@Override\n\tpublic void editAction(int id) {\n\t\t\n\t}", "public void edit() throws Exception {\n\t\topenPrimaryButtonDropdown();\n\t\tgetControl(\"editButton\").click();\n\t}", "public void setEditButtonText(String text) {\n/*Generated! Do not modify!*/ replyDTO.getVariablesToSet().add(\"overviewSmall_editButton_propertyText\");\n/*Generated! Do not modify!*/ if (text == null) {\n/*Generated! Do not modify!*/ replyDTO.getVariableValues().remove(\"overviewSmall_editButton_propertyText\");\n/*Generated! Do not modify!*/ } else {\n/*Generated! Do not modify!*/ replyDTO.getVariableValues().put(\"overviewSmall_editButton_propertyText\", text);\n/*Generated! Do not modify!*/ }\n/*Generated! Do not modify!*/ if (recordMode){\n/*Generated! Do not modify!*/ addRecordedAction(\"setEditButtonText(\" + escapeString(text) + \");\");\n/*Generated! Do not modify!*/ }\n/*Generated! Do not modify!*/ }", "private void edit() {\n mc.displayGuiScreen(new GuiEditAccount(selectedAccountIndex));\n }", "public void editPrioritaet(int prioID, String bezeichnung) throws Exception;", "public String loadMainEdit(){\r\n\t\treturn \"edit\";\r\n }", "public String editar()\r\n/* 86: */ {\r\n/* 87:112 */ if (getDimensionContable().getId() != 0)\r\n/* 88: */ {\r\n/* 89:113 */ this.dimensionContable = this.servicioDimensionContable.cargarDetalle(this.dimensionContable.getId());\r\n/* 90:114 */ String[] filtro = { \"indicadorValidarDimension\" + getDimension(), \"true\" };\r\n/* 91:115 */ this.listaCuentaContableBean.agregarFiltro(filtro);\r\n/* 92:116 */ this.listaCuentaContableBean.setIndicadorSeleccionarTodo(true);\r\n/* 93:117 */ verificaDimension();\r\n/* 94:118 */ setEditado(true);\r\n/* 95: */ }\r\n/* 96: */ else\r\n/* 97: */ {\r\n/* 98:120 */ addInfoMessage(getLanguageController().getMensaje(\"msg_info_seleccionar\"));\r\n/* 99: */ }\r\n/* 100:123 */ return \"\";\r\n/* 101: */ }", "protected TextGuiTestObject edittext() \n\t{\n\t\treturn new TextGuiTestObject(\n getMappedTestObject(\"edittext\"));\n\t}", "public void setTextUsuarioInsercionEd(String text) { doSetText(this.$element_UsuarioInsercionEd, text); }", "public int getAddEditMenuText();", "private void editComic() {\n mainActivity.ISSUE_ID = comic.getComicID();\n\n //Load the edit fragment\n mainActivity.loadEditComicFragment();\n }", "@Override\r\n public void actionPerformed(ActionEvent e) {\n String texto = tf.getText();\r\n //lo seteo como texto en el Label\r\n lab.setText(texto);\r\n //refresco los componentes de la ventana\r\n validate();\r\n //combierto a mayuscula el texto del textfield\r\n tf.setText(texto.toUpperCase());\r\n //lo selecciono todo\r\n tf.selectAll();\r\n }", "public void setTextEstadoEd(String text) { doSetText(this.$element_EstadoEd, text); }", "public void editar() {\n try {\n ClienteDao fdao = new ClienteDao();\n fdao.Atualizar(cliente);\n\n JSFUtil.AdicionarMensagemSucesso(\"Cliente editado com sucesso!\");\n\n } catch (RuntimeException e) {\n JSFUtil.AdicionarMensagemErro(\"ex.getMessage()\");\n e.printStackTrace();\n }\n }", "public void editEmployeeInformationName(String text) {\n\t\tthis.name=text;\n\t\tResourceCatalogue resCat = new ResourceCatalogue();\t\t\n\t\tresCat.getResource(rid).editResource(name, this.sectionId);\n\t\tHashMap<String, String> setVars = new HashMap<String, String>();\n\t\tsetVars.put(\"empname\", \"\\'\"+name+\"\\'\");\n\t\tsubmitToDB(setVars);\n\n\t}", "public void editarAlimento(int id_alimento, String nombre, String estado, float caloria, float proteinas,float grasas ,float hidratos_de_carbono, float H20, float NE, float vitamina_a, float vitamina_B1, float vitamina_B2, float vitamina_C, float Niac, float sodio, float potasio, float calcio, float magnesio, float cobre, float hierro, float fosforo, float azufre, float cloro, float Fen, float Ileu, float Leu, float Lis, float Met, float Tre, float Tri, float Val, float Acid, float AlCAL);", "private void performDirectEdit() {\n\t}", "public void updateEmpresa() {\n Empresa empresa = empresaDAO.load(config.getApplicationEmpresaId());\n this.textTitle.setText(MessageFormat.format(resource.getString(\"main.title\"), empresa.getNome()));\n }", "@Override\n\tpublic String editPriyom(String priyom) {\n\t\treturn null;\n\t}", "@Override\r\n\tpublic Loja editar(String nomeResponsavel, int telefoneEmpresa, String rua, String cidade, String estado, String pais,\r\n\t\t\tint cep, int cnpj, String razaoSocial, String email, String nomeEmpresa, String senha) {\n\t\treturn null;\r\n\t}", "public void editarArtista() {\n\t\tArrayList<String> listString = new ArrayList<>();\r\n\t\tArrayList<ArtistaMdl> listArtista = new ArrayList<>();\r\n\t\tString[] possibilities = pAController.getArtista();\r\n\t\tfor (String s : possibilities) {\r\n\t\t\tString text = s.replaceAll(\".*:\", \"\");\r\n\t\t\tlistString.add(text);\r\n\t\t\tif (s.contains(\"---\")) {\r\n\t\t\t\tArtistaMdl artista = new ArtistaMdl();\r\n\t\t\t\tartista.setNome(listString.get(1));\r\n\t\t\t\tlistArtista.add(artista);\r\n\t\t\t\tlistString.clear();\r\n\t\t\t}\r\n\t\t}\r\n\t\tString[] possibilities2 = new String[listArtista.size()];\r\n\t\tfor (int i = 0; i < listArtista.size(); i++) {\r\n\t\t\tpossibilities2[i] = listArtista.get(i).getNome();\r\n\t\t}\r\n\t}", "public Editar_Entrada() {\n initComponents();\n this.setLocationRelativeTo(null);\n this.setResizable(false);\n this.setTitle(\"CPU System Service S.A.S - FACTURAS DE ENTRADA\");\n //CargarCmbCliente();\n txtSec.setEnabled(false);\n txtIdCli.setEnabled(false);\n traerDatos();\n txtEstado.setEnabled(false);\n txtGarantia.setEnabled(false);\n }", "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 edit() {\r\n if (String.valueOf(txt_name.getText()).equals(\"\") || String.valueOf(txt_bagian.getText()).equals(\"\")|| String.valueOf(txt_address.getText()).equals(\"\")|| String.valueOf(txt_telp.getText()).equals(\"\")) {\r\n Toast.makeText(getApplicationContext(),\r\n \"Anda belum memasukan Nama atau ALamat ...\", Toast.LENGTH_SHORT).show();\r\n } else {\r\n SQLite.update(Integer.parseInt(txt_id.getText().toString().trim()),txt_name.getText().toString().trim(),\r\n txt_bagian.getText().toString().trim(),\r\n txt_address.getText().toString().trim(),\r\n txt_telp.getText().toString().trim());\r\n Toast.makeText(getApplicationContext(),\"Data berhasil di Ubah\",Toast.LENGTH_SHORT).show();\r\n blank();\r\n finish();\r\n }\r\n }", "private void modi() { \n try {\n cvo.getId_cliente();\n cvo.setNombre_cliente(vista.txtNombre.getText());\n cvo.setApellido_cliente(vista.txtApellido.getText());\n cvo.setDireccion_cliente(vista.txtDireccion.getText());\n cvo.setCorreo_cliente(vista.txtCorreo.getText());\n cvo.setClave_cliente(vista.txtClave.getText());\n cdao.actualizar(cvo);\n vista.txtNombre.setText(\"\");\n vista.txtApellido.setText(\"\");\n vista.txtDireccion.setText(\"\");\n vista.txtCorreo.setText(\"\");\n vista.txtClave.setText(\"\");\n JOptionPane.showMessageDialog(null, \"Registro Modificado\");\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"Debe ingresar Datos para Modificar registro!\");\n }\n }", "public void onClick(View view) {\n Log.d(\"Edit1\",\"EDITED1\");\n\n }", "protected abstract void editItem();", "@Override\r\n\tprotected void editarObjeto() throws ClassNotFoundException {\n\t\tif (tbJustificaciones.getSelectedRow() != -1\r\n\t\t\t\t&& tbJustificaciones.getValueAt(tbJustificaciones.getSelectedRow(), 0) != null) {\r\n\t\t\tthis.setTitle(\"PROCESOS - PERMISOS INDIVIDUALES (MODIFICANDO)\");\r\n\t\t\tthis.opcion = 2;\r\n\t\t\tactivarFormulario();\r\n\t\t\tcargarDatosModificar();\r\n\t\t\ttxtCedula.setEnabled(false);\r\n\t\t\tlimpiarTabla();\r\n\t\t\tthis.panelBotones.habilitar();\r\n\t\t} else {\r\n\t\t\tJOptionPane.showMessageDialog(null, GlobalUtil.MSG_ITEM_NO_SELECCIONADO, \"ATENCION\",\r\n\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\r\n\t\t}\r\n\t}", "@Override\n\tpublic void editar(Contato contato) {\n\t\tthis.dao.editar(contato);\n\t\t\n\t}", "public void editText(String t, Context ctx){\n\t\t\tChildInteraction cDb = new ChildInteraction(ctx);\t// For Writing to the database\n\t\t\ttext = t;\t\t\t\t\t\t\t\t\t\t\t// set the text\n\t\t\tfor(String key : numbers.keySet())\t\t\t\t\t// for all the numbers\n\t\t\t\tcDb.ChildEditMessage(numbers.get(key), text);\t// edit the text in the db\n\t\t\tcDb.Cleanup();\t\t\t\t\t\t\t\t\t\t// clean up the cursor\n\t\t}", "public void setTextCodigoPoaEd(String text) { doSetText(this.$element_CodigoPoaEd, text); }", "@FXML\r\n private void editar(ActionEvent event) {\n selecionado = tabelaCliente.getSelectionModel()\r\n .getSelectedItem();\r\n\r\n //Se tem algum cliente selecionado\r\n if (selecionado != null) { //tem clienteonado\r\n //Pegar os dados do cliente e jogar nos campos do\r\n //formulario\r\n textFieldNumeroCliente.setText(\r\n String.valueOf( selecionado.getIdCliente() ) );\r\n textfieldNome.setText( selecionado.getNome() ); \r\n textFieldEmail.setText(selecionado.getEmail());\r\n textFieldCpf.setText(selecionado.getCpf());\r\n textFieldRg.setText(selecionado.getRg());\r\n textFieldRua.setText(selecionado.getRua());\r\n textFieldCidade.setText(selecionado.getCidade());\r\n textFieldBairro.setText(selecionado.getBairro());\r\n textFieldNumeroCasa.setText(selecionado.getNumeroCasa());\r\n textFieldDataDeNascimento.setValue(selecionado.getDataNascimemto());\r\n textFieldTelefone1.setText(selecionado.getTelefone1());\r\n textFieldTelefone2.setText(selecionado.getTelefone2());\r\n textFieldCep.setText(selecionado.getCep());\r\n \r\n \r\n \r\n }else{ //não tem cliente selecionado na tabela\r\n mensagemErro(\"Selecione um cliente.\");\r\n }\r\n\r\n }", "public boolean setEditView(int editViewID, String text){\n try {\n EditText editview = (EditText) findViewById(editViewID);\n editview.setText(text);\n Log.i(\"MenuAndDatabase\",\"setEditText: \" + editViewID + \", message: \" + text);\n return false;\n }\n catch(Exception e){\n Log.e(\"MenuAndDatabase\", \"error setting editText: \" + e.toString());\n return true;\n }\n }", "public void onClick(View view) {\n Log.d(\"Edit\",\"EDITED\");\n }", "@Override\n public void edit(){\n Integer Pointer=0;\n FileWriter editDetails = null;\n ArrayList<String> lineKeeper = saveText();\n\n /* Search into the list to find the Username, if it founds it, changes the\n * old information with the new information.\n * Search*/\n if(lineKeeper.contains(getUsername())){\n Pointer=lineKeeper.indexOf(getUsername());\n\n //Write the new information\n lineKeeper.set(Pointer+1, getPassword());\n lineKeeper.set(Pointer+2, getFirstname());\n lineKeeper.set(Pointer+3, getLastname());\n lineKeeper.set(Pointer+4, DMY.format(getDoB()));\n lineKeeper.set(Pointer+5, getContactNumber());\n lineKeeper.set(Pointer+6, getEmail());\n lineKeeper.set(Pointer+7, String.valueOf(getSalary()));\n lineKeeper.set(Pointer+8, getPositionStatus());\n Pointer=Pointer+9;\n homeAddress.edit(lineKeeper,Pointer);\n }//end if\n\n try{\n editDetails= new FileWriter(\"employees.txt\",false);\n for( int i=0;i<lineKeeper.size();i++){\n editDetails.append(lineKeeper.get(i));\n editDetails.append(System.getProperty(\"line.separator\"));\n }//end for\n editDetails.close();\n editDetails = null;\n }//end try\n catch (IOException ioe) {}//end catch\n }", "private void showThatEditable() {\n\t\tTextView tv = new TextView(this);\n\t\ttv.setText(\"You may now edit this recipe!\");\n\t\tAlertDialog.Builder alert = new AlertDialog.Builder(this);\n\t\talert.setTitle(\"Edit Mode\");\n\t\talert.setView(tv);\n\t\talert.setNegativeButton(\"OK\", new DialogInterface.OnClickListener() {\n\t\t\tpublic void onClick(DialogInterface dialog, int whichButton) {\n\t\t\t}\n\t\t});\n\t\talert.show();\n\t}", "private void editar(){\n String codigo = getIntent().getStringExtra(\"codigo\");\n Intent otra = new Intent(this, MainActivity.class);\n otra.putExtra(\"codigo\", codigo);\n otra.putExtra(\"nombre\", nombre.getText().toString());\n otra.putExtra(\"raza\", raza.getText().toString());\n otra.putExtra(\"clase\", clase.getText().toString());\n otra.putExtra(\"nv\", nv.getText().toString());\n otra.putExtra(\"exp\", exp.getText().toString());\n otra.putExtra(\"pg\", String.valueOf(pgValue));\n otra.putExtra(\"pgMax\", String.valueOf(pgMaxValue));\n otra.putExtra(\"ca\", ca.getText().toString());\n otra.putExtra(\"vel\", vel.getText().toString());\n\n String[] statsValue = new String[stats.length];\n for(int i = 0; i < statsValue.length; i++){\n statsValue[i] = stats[i].getText().toString();\n }\n otra.putExtra(\"stats\", statsValue);\n\n otra.putExtra(\"salvBonus\", String.valueOf(salvBonus));\n\n otra.putExtra(\"statsSalv\", salvacionCb);\n\n otra.putExtra(\"habBonus\", String.valueOf(habBonus));\n\n otra.putExtra(\"habilidadesCb\", habilidadesCb);\n\n startActivity(otra);\n }", "void actionEdit(int position);", "@Override\n\t\tpublic void afterTextChanged(Editable arg0) {\n\t\t\tdata.get(position).setTejia(viewHolder.et_tejia.getText().toString());\n\t\t\tsavemodel.SaveMod(data);\n\t\t}", "public String editarRutina(Rutina tp) {\n\t\t//newRutina = ts;\n\t\tvEditing = true;\n\t\tvTitulo = \"EDITAR\";\n\t\treturn \"nueva-rutina?faces-redirect=true&id=\"+tp.getIdRutina();\n\t}", "public void switchToEdit() {\n if (isReadOnly || deckPanel.getVisibleWidget() == TEXTAREA_INDEX) {\n return;\n }\n\n textArea.setText(getValue());\n deckPanel.showWidget(TEXTAREA_INDEX);\n textArea.setFocus(true);\n }", "private void editElement(int position) {\n Intent intent = new Intent(this, NewNoteActivity.class);\n Task t = this.printedTasks.get(position);\n intent.putExtra(\"id\", t.getUid());\n intent.putExtra(\"intitule\", t.getIntitule());\n intent.putExtra(\"description\", t.getDescription());\n intent.putExtra(\"duree\", t.getDuree());\n intent.putExtra(\"date\", t.getDate());\n intent.putExtra(\"color\", t.getColor());\n intent.putExtra(\"url\", t.getUrl());\n intent.putExtra(\"position\", position);\n\n // Send boolean -> edit mode\n intent.putExtra(\"edit\", true);\n startActivityForResult(intent, SECOND_ACTIVITY_REQUEST);\n\n reloadWidget();\n }", "@Override\n\tpublic void editar(Cliente cliente) throws ExceptionUtil {\n\t\t\n\t}", "@Override\n public void updateAlumno(String contenido) {\n txtRecibido.setText(contenido);\n clienteServer.enviar(buscarKardex(contenido));\n }", "public void editDoc(View view) {\n Intent intent = new Intent(this, EditActivity.class);\n intent.putExtra(\"text\", doc);\n startActivityForResult(intent, EDIT_DOC);//CTRL+ALT+C per canviar de 0 a una variable\n }", "private void modificarFuente(){\n\n if(campoDeTexto.getText().toString().length()>5){\n Editable txtEditable = campoDeTexto.getText();\n\n //modifica el tipo de fuente\n txtEditable.setSpan(new TypefaceSpan(\"sans-serif-condensed\"),0, txtEditable.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);\n\n //modifica el color de la fuente\n txtEditable.setSpan(new ForegroundColorSpan(Color.YELLOW),0, txtEditable.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);\n\n //modifica el estilo de fuente\n txtEditable.setSpan(new StyleSpan(android.graphics.Typeface.BOLD), 0, txtEditable.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);\n\n //modifica el tamaño de la fuente. El valor boleano es para indicar la independencia del tamaño agregado\n //con respecto a la densida depixeles del dispositivo\n txtEditable.setSpan(new AbsoluteSizeSpan(30, true), 0, txtEditable.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);\n }\n }", "public EditarVenda() {\n initComponents();\n URL caminhoIcone = getClass().getResource(\"/mklivre/icone/icone2.png\");\n Image iconeTitulo = Toolkit.getDefaultToolkit().getImage(caminhoIcone);\n this.setIconImage(iconeTitulo);\n conexao = ModuloConexao.conector();\n codigoCliente.setEnabled(false);\n lucro.setEnabled(false);\n valorLiquidoML.setEnabled(false);\n }", "@Override\r\n\t\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\t\tbe.setNom(textFieldMarque.getText());\r\n\t\t\t\t\t\tbe.setPrenom(textFieldModele.getText());\r\n\t\t\t\t\t\tbe.setAge(Integer.valueOf(textFieldAge.getText()));\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tbs.update(be);\r\n\t\t\t\t\t\t} catch (DaoException e1) {\r\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tdispose();\r\n\t\t\t\t\t}", "public void modifyText(ModifyEvent e) {\n Text redefineText = (Text) e.getSource();\n coll.set_value(Key, redefineText.getText());\n\n OtpErlangObject re = parent.getIdeBackend(parent.confCon, coll.type, coll.coll_id, Key, redefineText.getText());\n String reStr = Util.stringValue(re);\n //ErlLogger.debug(\"Ll:\"+document.getLength());\n try {\n parent.document.replace(0, parent.document.getLength(), reStr);\n } catch (BadLocationException e1) {\n // TODO Auto-generated catch block\n e1.printStackTrace();\n }\n }", "public void beforeEdit(Librerias.ZafTblUti.ZafTblEvt.ZafTableEvent evt) {\n// strEstCncDia=tblDat.getValueAt(tblDat.getSelectedRow(), INT_TBL_DAT_EST_CON)==null?\"\":tblDat.getValueAt(tblDat.getSelectedRow(), INT_TBL_DAT_EST_CON).toString();\n// if(strEstCncDia.equals(\"S\")){\n// mostrarMsgInf(\"<HTML>La cuenta ya fue conciliada.<BR>Desconcilie la cuenta en el documento a modificar y vuelva a intentarlo.</HTML>\");\n//// fireAsiDiaListener(new ZafAsiDiaEvent(this), INT_BEF_EDI_CEL);\n// objTblCelEdiTxtVcoCta.setCancelarEdicion(true);\n// }\n// else if(strEstCncDia.equals(\"B\")){\n// mostrarMsgInf(\"<HTML>No se puede cambiar el valor de la cuenta<BR>Este valor proviene de la transferencia ingresada.</HTML>\");\n// objTblCelEdiTxtVcoCta.setCancelarEdicion(true);\n// }\n// else{\n// //Permitir de manera predeterminada la operaci�n.\n// blnCanOpe=false;\n// //Generar evento \"beforeEditarCelda()\".\n// fireAsiDiaListener(new ZafAsiDiaEvent(this), INT_BEF_EDI_CEL);\n// //Permitir/Cancelar la edici�n de acuerdo a \"cancelarOperacion\".\n// if (blnCanOpe)\n// {\n// objTblCelEdiTxtVcoCta.setCancelarEdicion(true);\n// }\n// }\n }", "public void editarProveedor() {\n try {\n proveedorFacadeLocal.edit(proTemporal);\n this.proveedor = new Proveedor();\n FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, \"Proveedor editado\", \"Proveedor editado\"));\n } catch (Exception e) {\n \n }\n\n }", "@Override\r\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\ttx.setText(editText.getText().toString());\r\n\t\t\t\t\t}", "private void btnEditActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnEditActionPerformed\n boolean flag = this.cutiController.save(txtCutiID.getText(), (txtTglAwal.getText()), (txtTglAkhir.getText()),\n txtKet.getText(), cmbCutiKhususID.getSelectedIndex());\n String message = \"Failed to edit data\";\n if (flag){\n message = \"Success to edit data\";\n }\n JOptionPane.showMessageDialog(this, message, \"Notification\", JOptionPane.INFORMATION_MESSAGE);\n bindingTable();\n reset();\n }", "public void editHandler(View v) {\n LinearLayout vwParentRow = (LinearLayout)v.getParent();\n TextView id =(TextView) vwParentRow.findViewById(R.id._id);\n Intent intent = new Intent(Hates.this, Formulario.class);\n\n intent.putExtra(C_MODO, C_EDITAR);\n intent.putExtra(C_TIPO, love_hate);\n intent.putExtra(mDbHelper.ID, Long.valueOf((String)id.getText()));\n\n\n this.startActivityForResult(intent, C_EDITAR);\n }", "public void modifyComment(String text){\n if (activeEmployee.hasLicence(202)){\n DB.modifyComment(getData().id_comment, getData().id_task, text);\n update();\n } //consideramos que solo se puede modificar el texto no las id\n }", "@FXML\n void handleEdit(ActionEvent event) {\n if (checkFields()) {\n\n try {\n //create a pseudo new environment with the changes but same id\n Environment newEnvironment = new Environment(oldEnvironment.getId(), editTxtName.getText(), editTxtDesc.getText(), editClrColor.getValue());\n\n //edit the oldenvironment\n Environment.edit(oldEnvironment, newEnvironment);\n } catch (SQLException exception) {\n //failed to save a environment, IO with database failed\n Manager.alertException(\n resources.getString(\"error\"),\n resources.getString(\"error.10\"),\n this.dialogStage,\n exception\n );\n }\n //close the stage\n dialogStage.close();\n } else {\n //fields are not filled valid\n Manager.alertWarning(\n resources.getString(\"add.invalid\"),\n resources.getString(\"add.invalid\"),\n resources.getString(\"add.invalid.content\"),\n this.dialogStage);\n }\n Bookmark.refreshBookmarksResultsProperty();\n }", "private void editar(HttpPresentationComms comms) throws HttpPresentationException, KeywordValueException {\n/* 149 */ int idRecurso = 0;\n/* */ try {\n/* 151 */ idRecurso = Integer.parseInt(comms.request.getParameter(\"idRecurso\"));\n/* */ }\n/* 153 */ catch (Exception e) {}\n/* */ \n/* */ \n/* 156 */ PrcRecursoDAO ob = new PrcRecursoDAO();\n/* 157 */ PrcRecursoDTO reg = ob.cargarRegistro(idRecurso);\n/* 158 */ if (reg != null) {\n/* 159 */ this.pagHTML.getElementIdRecurso().setValue(\"\" + reg.getIdRecurso());\n/* 160 */ this.pagHTML.getElementDescripcionRecurso().setValue(\"\" + reg.getDescripcionRecurso());\n/* 161 */ this.pagHTML.getElementUsuarioInsercion().setValue(\"\" + reg.getUsuarioInsercion());\n/* 162 */ this.pagHTML.getElementFechaInsercion().setValue(\"\" + reg.getFechaInsercion());\n/* 163 */ this.pagHTML.getElementUsuarioModificacion().setValue(\"\" + reg.getUsuarioModificacion());\n/* 164 */ this.pagHTML.getElementFechaModificacion().setValue(\"\" + reg.getFechaModificacion());\n/* 165 */ HTMLSelectElement combo = this.pagHTML.getElementIdTipoRecurso();\n/* 166 */ comboMultivalores(combo, \"tipo_recurso\", \"\" + reg.getIdTipoRecurso(), true);\n/* */ \n/* 168 */ combo = this.pagHTML.getElementIdProcedimiento();\n/* 169 */ llenarCombo(combo, \"prc_procedimientos\", \"id_procedimiento\", \"objetivo\", \"1=1\", \"\" + reg.getIdProcedimiento(), true);\n/* */ \n/* 171 */ combo = this.pagHTML.getElementEstado();\n/* 172 */ comboMultivalores(combo, \"estado_activo_inactivo\", \"\" + reg.getEstado(), true);\n/* */ \n/* */ \n/* 175 */ this.pagHTML.getElementIdRecurso().setReadOnly(true);\n/* */ } \n/* 177 */ this.pagHTML.getElement_operacion().setValue(\"M\");\n/* 178 */ activarVista(\"nuevo\");\n/* */ }", "private void editTextEditorButton(){\n TextEditorTextfield.setText(textEditorPref);\n TextEditorDialog.setVisible(true);\n }", "@Override\n public String getEditTitle() {\n return \"LANGUE\";\n }", "public void limpiar() {\r\n\t\t\t\tid.setText(\"\");\r\n\t\t\t\ttitulo.setText(\"\");\r\n\t\t\t\tdirector.setText(\"\");\r\n\t\t\t\tidCliente.setText(\"\");\r\n\t\t\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}", "public void editProfile(View v) {\n //Create map of all old info\n final Map tutorInfo = getTutorInfo();\n\n InputMethodManager imm = (InputMethodManager) this.getSystemService(Service.INPUT_METHOD_SERVICE);\n\n //Create animations\n final Animation animTranslate = AnimationUtils.loadAnimation(this, R.anim.translate);\n final Animation revTranslate = AnimationUtils.loadAnimation(this, R.anim.reverse_translate);\n\n //Enable Bio EditText, change color\n EditText bioField = (EditText) findViewById(R.id.BioField);\n bioField.clearFocus();\n bioField.setTextIsSelectable(true);\n bioField.setEnabled(true);\n bioField.setBackgroundResource(android.R.color.black);\n imm.showSoftInput(bioField, 0);\n\n //Hide edit button\n v.startAnimation(animTranslate);\n v.setVisibility(View.GONE);\n\n //Show add subject button\n Button addSubjButton = (Button) findViewById(R.id.addSubjButton);\n addSubjButton.setVisibility(View.VISIBLE);\n\n\n //Show save button\n Button saveButton = (Button) findViewById(R.id.save_button);\n saveButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n saveDialogue(tutorInfo);\n }\n });\n saveButton.startAnimation(revTranslate);\n saveButton.setVisibility(View.VISIBLE);\n\n enableSkillButtons();\n }", "@Override\n public void handleEditStart ()\n {\n\n }", "private void updateText(){\n\t\tif(propertiesObj == null)\n\t\t\treturn;\n\n\t\tif(propertiesObj instanceof QuestionDef)\n\t\t\t((QuestionDef)propertiesObj).setText(txtText.getText());\n\t\telse if(propertiesObj instanceof OptionDef)\n\t\t\t((OptionDef)propertiesObj).setText(txtText.getText());\n\t\telse if(propertiesObj instanceof PageDef)\n\t\t\t((PageDef)propertiesObj).setName(txtText.getText());\n\t\telse if(propertiesObj instanceof FormDef)\n\t\t\t((FormDef)propertiesObj).setName(txtText.getText());\n\n\t\tformChangeListener.onFormItemChanged(propertiesObj);\n\t}", "public void updateName() {\n try {\n userFound = clientefacadelocal.find(this.idcliente);\n if (userFound != null) {\n userFound.setNombre(objcliente.getNombre());\n clientefacadelocal.edit(userFound);\n objcliente = new Cliente();\n mensaje = \"sia\";\n } else {\n mensaje = \"noa\";\n System.out.println(\"Usuario No Encontrado\");\n }\n } catch (Exception e) {\n mensaje = \"noa\";\n System.out.println(\"El error al actualizar el nombre es \" + e);\n }\n }", "public void editar(AplicacionOferta aplicacionOferta){\n try{\n aplicacionOfertaDao.edit(aplicacionOferta);\n }catch(Exception e){\n Logger.getLogger(AplicacionOfertaServicio.class.getName()).log(Level.SEVERE, null, e);\n }\n }", "public void editMode(String newType, String newTarget, String oldContent)\n\t{\n\t\tif (cs == ConnState.EDITING)\n\t\t{\n\t\t\tsendln(\"You're already editing. Exit your current buffer first.\");\n\t\t\treturn;\n\t\t}\n\t\tpromptTarget = newTarget;\n\t\tpromptType = newType;\n\t\tlastCs = cs;\n\t\tcs = ConnState.EDITING;\n\t\tsendln(\"{G /s - Save and Close /q - Close Without Saving /h - View Help & Commands\");\n\t\tsendln(\"{G---------------------------------------------------------------------------\");\n\t\teditorContents = new ArrayList<String>();\n\t\tif (oldContent.length() > 0)\n\t\t{\n\t\t\tString oldContents[] = oldContent.split(\"\\\\^/\", -1);\n\t\t\tfor (int ctr = 0; ctr < oldContents.length; ctr++)\n\t\t\t\teditorContents.add(oldContents[ctr]);\n\t\t}\n\t}", "public void clickEdit() {\r\n\t\tEdit.click();\r\n\t}", "public static void editButtonAction(ActionContext actionContext){\n Table dataTable = actionContext.getObject(\"dataTable\");\n Shell shell = actionContext.getObject(\"shell\");\n Thing store = actionContext.getObject(\"store\");\n \n TableItem[] items = dataTable.getSelection();\n if(items == null || items.length == 0){\n MessageBox box = new MessageBox(shell, SWT.ICON_WARNING | SWT.OK);\n box.setText(\"警告\");\n box.setMessage(\"请先选择一条记录!\");\n box.open();\n return;\n }\n \n store.doAction(\"openEditForm\", actionContext, \"record\", items[0].getData());\n }", "public String paginaEditCliente(){\n\t\t\r\n\t\treturn \"editcli\";\r\n\t}", "public void onEditItem(View view) {\n Intent data = new Intent(EditItemActivity.this, MainActivity.class);\n data.putExtra(\"position\", elementId);\n data.putExtra(\"text\", etText.getText().toString());\n setResult(RESULT_OK, data);\n finish();\n }", "@Override\r\n\t\t\tpublic void modifyText(ModifyEvent me) {\n\t\t\t\tString newValue = newEditor.getText();\r\n\t\t\t\teditor.getItem().setText(VALUE_COLUMN_NO, newValue);\r\n\t\t\t\t//isEditorModify = true;\r\n\t\t\t\t//propertyInfo.setValue(newValue);\r\n\t\t\t}", "public void editTheirProfile() {\n\t\t\n\t}", "private void makeModifiable() {\n final TableEditor editor = new TableEditor(providers);\n editor.horizontalAlignment = SWT.LEFT;\n editor.grabHorizontal = true;\n editor.minimumWidth = 50;\n\n // editing the fourth column\n final int editable = 4;\n\n providers.addSelectionListener(new SelectionListener() {\n \n @Override\n public void widgetSelected(SelectionEvent exc) {\n\n TableItem item = (TableItem) exc.item;\n\n //Column should only be editable if arguments are allowed for the provider.\n if (item.getText(3).toString().equals(\"false\") || item == null) {\n return;\n }\n\n Control oldEditor = editor.getEditor();\n\n if (oldEditor != null) {\n oldEditor.dispose();\n }\n\n \n Text newEditor = new Text(providers, SWT.NONE);\n newEditor.setText(item.getText(editable));\n newEditor.addModifyListener(new ModifyListener() {\n\n \n @Override\n public void modifyText(ModifyEvent exc) {\n Text text = (Text) editor.getEditor();\n editor.getItem().setText(editable, text.getText());\n }\n });\n \n newEditor.selectAll();\n newEditor.setFocus();\n editor.setEditor(newEditor, item, editable); \n }\n\n @Override\n public void widgetDefaultSelected(SelectionEvent exc) {\n // TODO Auto-generated method stub\n }\n });\n \n for (int i = 0; i < TITLES.length; i++) {\n providers.getColumn(i).pack();\n }\n }", "public void setTextTablaEd(String text) { doSetText(this.$element_TablaEd, text); }", "public void controlaMenuEditaFuncionario(Funcionario funcionario) {\n int opcao = this.telaFuncionario.pedeOpcao();\n\n switch (opcao) {\n case 1:\n String nome = this.telaFuncionario.pedeNome();\n funcionario.setNome(nome);\n this.telaFuncionario.mensagemNomeEditadoSucesso();\n menuEditaFuncionario(funcionario);\n break;\n case 2:\n int matricula = verificaMatriculaInserida();\n funcionario.setMatricula(matricula);\n this.telaFuncionario.mensagemMatriculaEditadaSucesso();\n menuEditaFuncionario(funcionario);\n break;\n case 3:\n String dataNascimento = cadastraDataNascimento();\n funcionario.setDataNascimento(dataNascimento);\n this.telaFuncionario.mensagemDataNascimentoEditadaSucesso();\n menuEditaFuncionario(funcionario);\n break;\n case 4:\n int telefone = this.telaFuncionario.pedeTelefone();\n funcionario.setTelefone(telefone);\n this.telaFuncionario.mensagemTelefoneEditadoSucesso();\n menuEditaFuncionario(funcionario);\n break;\n case 5:\n int salario = this.telaFuncionario.pedeSalario();\n funcionario.setSalario(salario);\n this.telaFuncionario.mensagemSalarioEditadoSucesso();\n menuEditaFuncionario(funcionario);\n break;\n\n case 6:\n this.telaFuncionario.exibeOpcaoCargoFuncionario();\n Cargo cargo = atribuiCargoAoFuncionario();\n funcionario.setCargo(cargo);\n this.telaFuncionario.mensagemCargoEditadoSucesso();\n menuEditaFuncionario(funcionario);\n break;\n\n case 7:\n exibeMenuFuncionario();\n break;\n default:\n this.telaFuncionario.opcaoInexistente();\n editaFuncionario();\n break;\n }\n }", "private void modifyActionPerformed(ActionEvent evt) throws Exception {\n String teaID = this.teaIDText.getText();\n String teaCollege = this.teaCollegeText.getText();\n String teaDepartment = this.teaDepartmentText.getText();\n String teaType = this.teaTypeText.getText();\n String teaPhone = this.teaPhoneText.getText();\n String teaRemark = this.teaRemarkText.getText();\n if(StringUtil.isEmpty(teaID)){\n JOptionPane.showMessageDialog(null, \"请先选择一条老师信息!\");\n return;\n }\n if(StringUtil.isEmpty(teaCollege)){\n JOptionPane.showMessageDialog(null, \"学院不能为空!\");\n return;\n }\n if(StringUtil.isEmpty(teaDepartment)){\n JOptionPane.showMessageDialog(null, \"系不能为空!\");\n return;\n }\n if(StringUtil.isEmpty(teaType)){\n JOptionPane.showMessageDialog(null, \"类型不能为空!\");\n return;\n }\n if(StringUtil.isEmpty(teaPhone)){\n JOptionPane.showMessageDialog(null, \"手机不能为空!\");\n return;\n }\n if(!StringUtil.isAllNumber(teaPhone)){\n JOptionPane.showMessageDialog(null, \"请输入合法的手机号!\");\n return;\n }\n if(teaPhone.length() != 11){\n JOptionPane.showMessageDialog(null, \"请输入11位的手机号!\");\n return;\n }\n int confirm = JOptionPane.showConfirmDialog(null, \"确认修改?\");\n if(confirm == 0){//确认修改\n Teacher tea = new Teacher(teaID,teaCollege,teaDepartment,teaType,teaPhone,teaRemark);\n Connection con = dbUtil.getConnection();\n int modify = teacherInfo.updateInfo(con, tea);\n if(modify == 1){\n JOptionPane.showMessageDialog(null, \"修改成功!\");\n resetValues();\n }\n else{\n JOptionPane.showMessageDialog(null, \"修改失败!\");\n return;\n }\n initTable(new Teacher());//初始化表格\n }\n }", "public void mmEditClick(ActionEvent event) throws Exception{\r\n displayEditProfile();\r\n }", "public void editar(ParadaUtil paradaUtil) {\n\t\tiniciarTransacao();\r\n\t\ttry {\r\n\t\t\ts.update(paradaUtil);\r\n\t\t\ttx.commit();\r\n\t\t} catch (Exception e) {\r\n\t\t} finally {\r\n\t\t\ts.close();\r\n\t\t}\r\n\t}", "public Editar_Encargado() {\n \n initComponents();\n //Mandamos a llamar el metodo que carga el Grid;\n CargarTabla();\n\n }", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"<html><center><u><strong>Edité par :</strong></u><br>RAHMANI ABD EL KADER<br>SEIF EL ISLEM<br> Groupe 1 Section 1</center></html>\", \"A propros\", JOptionPane.INFORMATION_MESSAGE);\r\n\t\t\t}", "public Equipamento editar(Equipamento eq) {\r\n\t\t\tthis.conexao.abrirConexao();\r\n\t\t\tString sqlUpdate = \"UPDATE equipamentos SET nome=?,descricao=?, id_usuario=? WHERE id_equipamentos=?\";\r\n\t\t\ttry {\r\n\t\t\t\tPreparedStatement statement = (PreparedStatement) this.conexao.getConexao().prepareStatement(sqlUpdate);\r\n\t\t\t\tstatement.setString(1, eq.getNome());\r\n\t\t\t\tstatement.setString(2, eq.getDescricao());\r\n\t\t\t\tstatement.setLong(3, eq.getUsuario().getId());\r\n\t\t\t\tstatement.setLong(4, eq.getId());\r\n\t\t\t\t/*int linhasAfetadas = */statement.executeUpdate();\r\n\t\t\t\t\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t} finally {\r\n\t\t\t\tthis.conexao.fecharConexao();\r\n\t\t\t}\r\n\t\t\treturn eq;\r\n\t\t}", "private void editMode() {\n\t\t// Set the boolean to true to indicate in edit mode\n\t\teditableEditTexts();\n\t\thideEditDelete();\n\t\thideEmail();\n\t\tshowSaveAndAdd();\n\t\tshowThatEditable();\n\t}", "public String edit() {\r\n\t\tuserEdit = (User) users.getRowData();\r\n\t\treturn \"edit\";\r\n\t}", "public abstract void setApellido(java.lang.String newApellido);" ]
[ "0.75013167", "0.71682155", "0.70332134", "0.69384384", "0.69106907", "0.6886121", "0.66932094", "0.66799295", "0.66681623", "0.6651884", "0.6630578", "0.6601991", "0.65969235", "0.6558146", "0.65525275", "0.65299517", "0.6469202", "0.64123464", "0.64104253", "0.6394982", "0.63768184", "0.6373973", "0.6364709", "0.6364384", "0.63444513", "0.6343972", "0.63249755", "0.63239187", "0.6316606", "0.63019836", "0.62931436", "0.62768877", "0.62717974", "0.62606823", "0.6241537", "0.6239671", "0.6235327", "0.6233109", "0.6230754", "0.62235564", "0.621485", "0.6208652", "0.6206855", "0.6206778", "0.61989933", "0.61917955", "0.6152128", "0.6135057", "0.6134798", "0.6133693", "0.6129588", "0.61279595", "0.61169165", "0.6114723", "0.61098945", "0.610728", "0.6089583", "0.60892415", "0.6088012", "0.6087506", "0.60872793", "0.60860014", "0.6077624", "0.60668534", "0.60644495", "0.6059387", "0.6054574", "0.60286885", "0.6023861", "0.6023214", "0.60198474", "0.6018177", "0.6017729", "0.6014483", "0.6005522", "0.60034585", "0.6001286", "0.5989394", "0.59893715", "0.5980745", "0.5976381", "0.5971468", "0.59674776", "0.59666204", "0.59666204", "0.5963508", "0.5958816", "0.5956939", "0.59562546", "0.59459805", "0.5944745", "0.5942705", "0.59420073", "0.5938902", "0.5934062", "0.59308416", "0.5923949", "0.59204656", "0.591325", "0.5908612" ]
0.6375348
21
1) Llamamos a la otra actividad pasando un texto para editar
public void editDoc(View view) { Intent intent = new Intent(this, EditActivity.class); intent.putExtra("text", doc); startActivityForResult(intent, EDIT_DOC);//CTRL+ALT+C per canviar de 0 a una variable }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void edit() {\n\n\t}", "public String editar()\r\n/* 59: */ {\r\n/* 60: 74 */ if ((getMotivoLlamadoAtencion() != null) && (getMotivoLlamadoAtencion().getIdMotivoLlamadoAtencion() != 0)) {\r\n/* 61: 75 */ setEditado(true);\r\n/* 62: */ } else {\r\n/* 63: 77 */ addInfoMessage(getLanguageController().getMensaje(\"msg_info_seleccionar\"));\r\n/* 64: */ }\r\n/* 65: 79 */ return \"\";\r\n/* 66: */ }", "@Override\r\n\tpublic void edit() {\n\t\t\r\n\t}", "void setEditore(String editore);", "String getEditore();", "public void editOperation() {\n\t\t\r\n\t}", "public void setTextUsuarioModificacionEd(String text) { doSetText(this.$element_UsuarioModificacionEd, text); }", "private void setToEdit(String input){\n ToEdit = input;\n }", "public abstract void edit();", "void onEditClicked();", "public void editarData(){\n\t\talunoTurmaService.inserirAlterar(alunoTurmaAltera);\n\t\t\n\t\t\n\t\tmovimentacao.setDataMovimentacao(alunoTurmaAltera.getDataMudanca());\n\t\tmovimentacaoService.inserirAlterar(movimentacao);\n\t\t\n\t\tFecharDialog.fecharDialogDATAAluno();\n\t\tExibirMensagem.exibirMensagem(Mensagem.SUCESSO);\n\t\talunoTurmaAltera = new AlunoTurma();\n\t\tmovimentacao = new Movimentacao();\n\t\t\n\t\tatualizarListas();\n\t}", "@Override\n //nhan ket qua man hinh khac tra ve Main\n protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {\n if (requestCode == REQUEST_CODE_EDIT && resultCode == RESULT_OK && data != null){\n String name = data.getStringExtra(\"New\");\n txtName.setText(name);\n }\n super.onActivityResult(requestCode, resultCode, data);\n }", "private void editName() {\n Routine r = list.getSelectedValue();\n\n String s = (String) JOptionPane.showInputDialog(\n this,\n \"Enter the new name:\",\n \"Edit name\",\n JOptionPane.PLAIN_MESSAGE,\n null, null, r.getName());\n\n if (s != null) {\n r.setName(s);\n }\n }", "public String edit() {\n return \"edit\";\n }", "private void edit() {\n if (String.valueOf(tgl_pengobatanField.getText()).equals(null)\n || String.valueOf(waktu_pengobatanField.getText()).equals(null)) {\n Toast.makeText(getApplicationContext(),\n \"Ada Yang Belum Terisi\", Toast.LENGTH_SHORT).show();\n } else {\n SQLite.update(Integer.parseInt(idField.getText().toString().trim()),nama_pasien2,nama_dokter2, tgl_pengobatanField.getText().toString().trim(),waktu_pengobatanField.getText().toString(),\n keluhan_pasienField.getText().toString().trim(),hasil_diagnosaField.getText().toString().trim(),\n biayaField.getText().toString().trim());\n blank();\n finish();\n }\n }", "@Override\n\tpublic void editAction(int id) {\n\t\t\n\t}", "public void edit() throws Exception {\n\t\topenPrimaryButtonDropdown();\n\t\tgetControl(\"editButton\").click();\n\t}", "public void setEditButtonText(String text) {\n/*Generated! Do not modify!*/ replyDTO.getVariablesToSet().add(\"overviewSmall_editButton_propertyText\");\n/*Generated! Do not modify!*/ if (text == null) {\n/*Generated! Do not modify!*/ replyDTO.getVariableValues().remove(\"overviewSmall_editButton_propertyText\");\n/*Generated! Do not modify!*/ } else {\n/*Generated! Do not modify!*/ replyDTO.getVariableValues().put(\"overviewSmall_editButton_propertyText\", text);\n/*Generated! Do not modify!*/ }\n/*Generated! Do not modify!*/ if (recordMode){\n/*Generated! Do not modify!*/ addRecordedAction(\"setEditButtonText(\" + escapeString(text) + \");\");\n/*Generated! Do not modify!*/ }\n/*Generated! Do not modify!*/ }", "private void edit() {\n mc.displayGuiScreen(new GuiEditAccount(selectedAccountIndex));\n }", "public void editPrioritaet(int prioID, String bezeichnung) throws Exception;", "public String loadMainEdit(){\r\n\t\treturn \"edit\";\r\n }", "public void editTitle(View view) {\n Intent intent = new Intent(this, EditActivity.class);\n intent.putExtra(\"text\", title);\n startActivityForResult(intent, EDIT_TITLE);//CTRL+ALT+C per canviar de 0 a una variable\n }", "public String editar()\r\n/* 86: */ {\r\n/* 87:112 */ if (getDimensionContable().getId() != 0)\r\n/* 88: */ {\r\n/* 89:113 */ this.dimensionContable = this.servicioDimensionContable.cargarDetalle(this.dimensionContable.getId());\r\n/* 90:114 */ String[] filtro = { \"indicadorValidarDimension\" + getDimension(), \"true\" };\r\n/* 91:115 */ this.listaCuentaContableBean.agregarFiltro(filtro);\r\n/* 92:116 */ this.listaCuentaContableBean.setIndicadorSeleccionarTodo(true);\r\n/* 93:117 */ verificaDimension();\r\n/* 94:118 */ setEditado(true);\r\n/* 95: */ }\r\n/* 96: */ else\r\n/* 97: */ {\r\n/* 98:120 */ addInfoMessage(getLanguageController().getMensaje(\"msg_info_seleccionar\"));\r\n/* 99: */ }\r\n/* 100:123 */ return \"\";\r\n/* 101: */ }", "protected TextGuiTestObject edittext() \n\t{\n\t\treturn new TextGuiTestObject(\n getMappedTestObject(\"edittext\"));\n\t}", "public void setTextUsuarioInsercionEd(String text) { doSetText(this.$element_UsuarioInsercionEd, text); }", "public int getAddEditMenuText();", "private void editComic() {\n mainActivity.ISSUE_ID = comic.getComicID();\n\n //Load the edit fragment\n mainActivity.loadEditComicFragment();\n }", "@Override\r\n public void actionPerformed(ActionEvent e) {\n String texto = tf.getText();\r\n //lo seteo como texto en el Label\r\n lab.setText(texto);\r\n //refresco los componentes de la ventana\r\n validate();\r\n //combierto a mayuscula el texto del textfield\r\n tf.setText(texto.toUpperCase());\r\n //lo selecciono todo\r\n tf.selectAll();\r\n }", "public void setTextEstadoEd(String text) { doSetText(this.$element_EstadoEd, text); }", "public void editar() {\n try {\n ClienteDao fdao = new ClienteDao();\n fdao.Atualizar(cliente);\n\n JSFUtil.AdicionarMensagemSucesso(\"Cliente editado com sucesso!\");\n\n } catch (RuntimeException e) {\n JSFUtil.AdicionarMensagemErro(\"ex.getMessage()\");\n e.printStackTrace();\n }\n }", "public void editEmployeeInformationName(String text) {\n\t\tthis.name=text;\n\t\tResourceCatalogue resCat = new ResourceCatalogue();\t\t\n\t\tresCat.getResource(rid).editResource(name, this.sectionId);\n\t\tHashMap<String, String> setVars = new HashMap<String, String>();\n\t\tsetVars.put(\"empname\", \"\\'\"+name+\"\\'\");\n\t\tsubmitToDB(setVars);\n\n\t}", "public void editarAlimento(int id_alimento, String nombre, String estado, float caloria, float proteinas,float grasas ,float hidratos_de_carbono, float H20, float NE, float vitamina_a, float vitamina_B1, float vitamina_B2, float vitamina_C, float Niac, float sodio, float potasio, float calcio, float magnesio, float cobre, float hierro, float fosforo, float azufre, float cloro, float Fen, float Ileu, float Leu, float Lis, float Met, float Tre, float Tri, float Val, float Acid, float AlCAL);", "private void performDirectEdit() {\n\t}", "public void updateEmpresa() {\n Empresa empresa = empresaDAO.load(config.getApplicationEmpresaId());\n this.textTitle.setText(MessageFormat.format(resource.getString(\"main.title\"), empresa.getNome()));\n }", "@Override\n\tpublic String editPriyom(String priyom) {\n\t\treturn null;\n\t}", "@Override\r\n\tpublic Loja editar(String nomeResponsavel, int telefoneEmpresa, String rua, String cidade, String estado, String pais,\r\n\t\t\tint cep, int cnpj, String razaoSocial, String email, String nomeEmpresa, String senha) {\n\t\treturn null;\r\n\t}", "public void editarArtista() {\n\t\tArrayList<String> listString = new ArrayList<>();\r\n\t\tArrayList<ArtistaMdl> listArtista = new ArrayList<>();\r\n\t\tString[] possibilities = pAController.getArtista();\r\n\t\tfor (String s : possibilities) {\r\n\t\t\tString text = s.replaceAll(\".*:\", \"\");\r\n\t\t\tlistString.add(text);\r\n\t\t\tif (s.contains(\"---\")) {\r\n\t\t\t\tArtistaMdl artista = new ArtistaMdl();\r\n\t\t\t\tartista.setNome(listString.get(1));\r\n\t\t\t\tlistArtista.add(artista);\r\n\t\t\t\tlistString.clear();\r\n\t\t\t}\r\n\t\t}\r\n\t\tString[] possibilities2 = new String[listArtista.size()];\r\n\t\tfor (int i = 0; i < listArtista.size(); i++) {\r\n\t\t\tpossibilities2[i] = listArtista.get(i).getNome();\r\n\t\t}\r\n\t}", "public Editar_Entrada() {\n initComponents();\n this.setLocationRelativeTo(null);\n this.setResizable(false);\n this.setTitle(\"CPU System Service S.A.S - FACTURAS DE ENTRADA\");\n //CargarCmbCliente();\n txtSec.setEnabled(false);\n txtIdCli.setEnabled(false);\n traerDatos();\n txtEstado.setEnabled(false);\n txtGarantia.setEnabled(false);\n }", "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 edit() {\r\n if (String.valueOf(txt_name.getText()).equals(\"\") || String.valueOf(txt_bagian.getText()).equals(\"\")|| String.valueOf(txt_address.getText()).equals(\"\")|| String.valueOf(txt_telp.getText()).equals(\"\")) {\r\n Toast.makeText(getApplicationContext(),\r\n \"Anda belum memasukan Nama atau ALamat ...\", Toast.LENGTH_SHORT).show();\r\n } else {\r\n SQLite.update(Integer.parseInt(txt_id.getText().toString().trim()),txt_name.getText().toString().trim(),\r\n txt_bagian.getText().toString().trim(),\r\n txt_address.getText().toString().trim(),\r\n txt_telp.getText().toString().trim());\r\n Toast.makeText(getApplicationContext(),\"Data berhasil di Ubah\",Toast.LENGTH_SHORT).show();\r\n blank();\r\n finish();\r\n }\r\n }", "private void modi() { \n try {\n cvo.getId_cliente();\n cvo.setNombre_cliente(vista.txtNombre.getText());\n cvo.setApellido_cliente(vista.txtApellido.getText());\n cvo.setDireccion_cliente(vista.txtDireccion.getText());\n cvo.setCorreo_cliente(vista.txtCorreo.getText());\n cvo.setClave_cliente(vista.txtClave.getText());\n cdao.actualizar(cvo);\n vista.txtNombre.setText(\"\");\n vista.txtApellido.setText(\"\");\n vista.txtDireccion.setText(\"\");\n vista.txtCorreo.setText(\"\");\n vista.txtClave.setText(\"\");\n JOptionPane.showMessageDialog(null, \"Registro Modificado\");\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"Debe ingresar Datos para Modificar registro!\");\n }\n }", "public void onClick(View view) {\n Log.d(\"Edit1\",\"EDITED1\");\n\n }", "protected abstract void editItem();", "@Override\r\n\tprotected void editarObjeto() throws ClassNotFoundException {\n\t\tif (tbJustificaciones.getSelectedRow() != -1\r\n\t\t\t\t&& tbJustificaciones.getValueAt(tbJustificaciones.getSelectedRow(), 0) != null) {\r\n\t\t\tthis.setTitle(\"PROCESOS - PERMISOS INDIVIDUALES (MODIFICANDO)\");\r\n\t\t\tthis.opcion = 2;\r\n\t\t\tactivarFormulario();\r\n\t\t\tcargarDatosModificar();\r\n\t\t\ttxtCedula.setEnabled(false);\r\n\t\t\tlimpiarTabla();\r\n\t\t\tthis.panelBotones.habilitar();\r\n\t\t} else {\r\n\t\t\tJOptionPane.showMessageDialog(null, GlobalUtil.MSG_ITEM_NO_SELECCIONADO, \"ATENCION\",\r\n\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\r\n\t\t}\r\n\t}", "@Override\n\tpublic void editar(Contato contato) {\n\t\tthis.dao.editar(contato);\n\t\t\n\t}", "public void editText(String t, Context ctx){\n\t\t\tChildInteraction cDb = new ChildInteraction(ctx);\t// For Writing to the database\n\t\t\ttext = t;\t\t\t\t\t\t\t\t\t\t\t// set the text\n\t\t\tfor(String key : numbers.keySet())\t\t\t\t\t// for all the numbers\n\t\t\t\tcDb.ChildEditMessage(numbers.get(key), text);\t// edit the text in the db\n\t\t\tcDb.Cleanup();\t\t\t\t\t\t\t\t\t\t// clean up the cursor\n\t\t}", "public void setTextCodigoPoaEd(String text) { doSetText(this.$element_CodigoPoaEd, text); }", "@FXML\r\n private void editar(ActionEvent event) {\n selecionado = tabelaCliente.getSelectionModel()\r\n .getSelectedItem();\r\n\r\n //Se tem algum cliente selecionado\r\n if (selecionado != null) { //tem clienteonado\r\n //Pegar os dados do cliente e jogar nos campos do\r\n //formulario\r\n textFieldNumeroCliente.setText(\r\n String.valueOf( selecionado.getIdCliente() ) );\r\n textfieldNome.setText( selecionado.getNome() ); \r\n textFieldEmail.setText(selecionado.getEmail());\r\n textFieldCpf.setText(selecionado.getCpf());\r\n textFieldRg.setText(selecionado.getRg());\r\n textFieldRua.setText(selecionado.getRua());\r\n textFieldCidade.setText(selecionado.getCidade());\r\n textFieldBairro.setText(selecionado.getBairro());\r\n textFieldNumeroCasa.setText(selecionado.getNumeroCasa());\r\n textFieldDataDeNascimento.setValue(selecionado.getDataNascimemto());\r\n textFieldTelefone1.setText(selecionado.getTelefone1());\r\n textFieldTelefone2.setText(selecionado.getTelefone2());\r\n textFieldCep.setText(selecionado.getCep());\r\n \r\n \r\n \r\n }else{ //não tem cliente selecionado na tabela\r\n mensagemErro(\"Selecione um cliente.\");\r\n }\r\n\r\n }", "public boolean setEditView(int editViewID, String text){\n try {\n EditText editview = (EditText) findViewById(editViewID);\n editview.setText(text);\n Log.i(\"MenuAndDatabase\",\"setEditText: \" + editViewID + \", message: \" + text);\n return false;\n }\n catch(Exception e){\n Log.e(\"MenuAndDatabase\", \"error setting editText: \" + e.toString());\n return true;\n }\n }", "public void onClick(View view) {\n Log.d(\"Edit\",\"EDITED\");\n }", "@Override\n public void edit(){\n Integer Pointer=0;\n FileWriter editDetails = null;\n ArrayList<String> lineKeeper = saveText();\n\n /* Search into the list to find the Username, if it founds it, changes the\n * old information with the new information.\n * Search*/\n if(lineKeeper.contains(getUsername())){\n Pointer=lineKeeper.indexOf(getUsername());\n\n //Write the new information\n lineKeeper.set(Pointer+1, getPassword());\n lineKeeper.set(Pointer+2, getFirstname());\n lineKeeper.set(Pointer+3, getLastname());\n lineKeeper.set(Pointer+4, DMY.format(getDoB()));\n lineKeeper.set(Pointer+5, getContactNumber());\n lineKeeper.set(Pointer+6, getEmail());\n lineKeeper.set(Pointer+7, String.valueOf(getSalary()));\n lineKeeper.set(Pointer+8, getPositionStatus());\n Pointer=Pointer+9;\n homeAddress.edit(lineKeeper,Pointer);\n }//end if\n\n try{\n editDetails= new FileWriter(\"employees.txt\",false);\n for( int i=0;i<lineKeeper.size();i++){\n editDetails.append(lineKeeper.get(i));\n editDetails.append(System.getProperty(\"line.separator\"));\n }//end for\n editDetails.close();\n editDetails = null;\n }//end try\n catch (IOException ioe) {}//end catch\n }", "private void showThatEditable() {\n\t\tTextView tv = new TextView(this);\n\t\ttv.setText(\"You may now edit this recipe!\");\n\t\tAlertDialog.Builder alert = new AlertDialog.Builder(this);\n\t\talert.setTitle(\"Edit Mode\");\n\t\talert.setView(tv);\n\t\talert.setNegativeButton(\"OK\", new DialogInterface.OnClickListener() {\n\t\t\tpublic void onClick(DialogInterface dialog, int whichButton) {\n\t\t\t}\n\t\t});\n\t\talert.show();\n\t}", "private void editar(){\n String codigo = getIntent().getStringExtra(\"codigo\");\n Intent otra = new Intent(this, MainActivity.class);\n otra.putExtra(\"codigo\", codigo);\n otra.putExtra(\"nombre\", nombre.getText().toString());\n otra.putExtra(\"raza\", raza.getText().toString());\n otra.putExtra(\"clase\", clase.getText().toString());\n otra.putExtra(\"nv\", nv.getText().toString());\n otra.putExtra(\"exp\", exp.getText().toString());\n otra.putExtra(\"pg\", String.valueOf(pgValue));\n otra.putExtra(\"pgMax\", String.valueOf(pgMaxValue));\n otra.putExtra(\"ca\", ca.getText().toString());\n otra.putExtra(\"vel\", vel.getText().toString());\n\n String[] statsValue = new String[stats.length];\n for(int i = 0; i < statsValue.length; i++){\n statsValue[i] = stats[i].getText().toString();\n }\n otra.putExtra(\"stats\", statsValue);\n\n otra.putExtra(\"salvBonus\", String.valueOf(salvBonus));\n\n otra.putExtra(\"statsSalv\", salvacionCb);\n\n otra.putExtra(\"habBonus\", String.valueOf(habBonus));\n\n otra.putExtra(\"habilidadesCb\", habilidadesCb);\n\n startActivity(otra);\n }", "void actionEdit(int position);", "@Override\n\t\tpublic void afterTextChanged(Editable arg0) {\n\t\t\tdata.get(position).setTejia(viewHolder.et_tejia.getText().toString());\n\t\t\tsavemodel.SaveMod(data);\n\t\t}", "public String editarRutina(Rutina tp) {\n\t\t//newRutina = ts;\n\t\tvEditing = true;\n\t\tvTitulo = \"EDITAR\";\n\t\treturn \"nueva-rutina?faces-redirect=true&id=\"+tp.getIdRutina();\n\t}", "public void switchToEdit() {\n if (isReadOnly || deckPanel.getVisibleWidget() == TEXTAREA_INDEX) {\n return;\n }\n\n textArea.setText(getValue());\n deckPanel.showWidget(TEXTAREA_INDEX);\n textArea.setFocus(true);\n }", "private void editElement(int position) {\n Intent intent = new Intent(this, NewNoteActivity.class);\n Task t = this.printedTasks.get(position);\n intent.putExtra(\"id\", t.getUid());\n intent.putExtra(\"intitule\", t.getIntitule());\n intent.putExtra(\"description\", t.getDescription());\n intent.putExtra(\"duree\", t.getDuree());\n intent.putExtra(\"date\", t.getDate());\n intent.putExtra(\"color\", t.getColor());\n intent.putExtra(\"url\", t.getUrl());\n intent.putExtra(\"position\", position);\n\n // Send boolean -> edit mode\n intent.putExtra(\"edit\", true);\n startActivityForResult(intent, SECOND_ACTIVITY_REQUEST);\n\n reloadWidget();\n }", "@Override\n\tpublic void editar(Cliente cliente) throws ExceptionUtil {\n\t\t\n\t}", "@Override\n public void updateAlumno(String contenido) {\n txtRecibido.setText(contenido);\n clienteServer.enviar(buscarKardex(contenido));\n }", "private void modificarFuente(){\n\n if(campoDeTexto.getText().toString().length()>5){\n Editable txtEditable = campoDeTexto.getText();\n\n //modifica el tipo de fuente\n txtEditable.setSpan(new TypefaceSpan(\"sans-serif-condensed\"),0, txtEditable.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);\n\n //modifica el color de la fuente\n txtEditable.setSpan(new ForegroundColorSpan(Color.YELLOW),0, txtEditable.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);\n\n //modifica el estilo de fuente\n txtEditable.setSpan(new StyleSpan(android.graphics.Typeface.BOLD), 0, txtEditable.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);\n\n //modifica el tamaño de la fuente. El valor boleano es para indicar la independencia del tamaño agregado\n //con respecto a la densida depixeles del dispositivo\n txtEditable.setSpan(new AbsoluteSizeSpan(30, true), 0, txtEditable.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);\n }\n }", "public EditarVenda() {\n initComponents();\n URL caminhoIcone = getClass().getResource(\"/mklivre/icone/icone2.png\");\n Image iconeTitulo = Toolkit.getDefaultToolkit().getImage(caminhoIcone);\n this.setIconImage(iconeTitulo);\n conexao = ModuloConexao.conector();\n codigoCliente.setEnabled(false);\n lucro.setEnabled(false);\n valorLiquidoML.setEnabled(false);\n }", "@Override\r\n\t\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\t\tbe.setNom(textFieldMarque.getText());\r\n\t\t\t\t\t\tbe.setPrenom(textFieldModele.getText());\r\n\t\t\t\t\t\tbe.setAge(Integer.valueOf(textFieldAge.getText()));\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tbs.update(be);\r\n\t\t\t\t\t\t} catch (DaoException e1) {\r\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tdispose();\r\n\t\t\t\t\t}", "public void modifyText(ModifyEvent e) {\n Text redefineText = (Text) e.getSource();\n coll.set_value(Key, redefineText.getText());\n\n OtpErlangObject re = parent.getIdeBackend(parent.confCon, coll.type, coll.coll_id, Key, redefineText.getText());\n String reStr = Util.stringValue(re);\n //ErlLogger.debug(\"Ll:\"+document.getLength());\n try {\n parent.document.replace(0, parent.document.getLength(), reStr);\n } catch (BadLocationException e1) {\n // TODO Auto-generated catch block\n e1.printStackTrace();\n }\n }", "public void beforeEdit(Librerias.ZafTblUti.ZafTblEvt.ZafTableEvent evt) {\n// strEstCncDia=tblDat.getValueAt(tblDat.getSelectedRow(), INT_TBL_DAT_EST_CON)==null?\"\":tblDat.getValueAt(tblDat.getSelectedRow(), INT_TBL_DAT_EST_CON).toString();\n// if(strEstCncDia.equals(\"S\")){\n// mostrarMsgInf(\"<HTML>La cuenta ya fue conciliada.<BR>Desconcilie la cuenta en el documento a modificar y vuelva a intentarlo.</HTML>\");\n//// fireAsiDiaListener(new ZafAsiDiaEvent(this), INT_BEF_EDI_CEL);\n// objTblCelEdiTxtVcoCta.setCancelarEdicion(true);\n// }\n// else if(strEstCncDia.equals(\"B\")){\n// mostrarMsgInf(\"<HTML>No se puede cambiar el valor de la cuenta<BR>Este valor proviene de la transferencia ingresada.</HTML>\");\n// objTblCelEdiTxtVcoCta.setCancelarEdicion(true);\n// }\n// else{\n// //Permitir de manera predeterminada la operaci�n.\n// blnCanOpe=false;\n// //Generar evento \"beforeEditarCelda()\".\n// fireAsiDiaListener(new ZafAsiDiaEvent(this), INT_BEF_EDI_CEL);\n// //Permitir/Cancelar la edici�n de acuerdo a \"cancelarOperacion\".\n// if (blnCanOpe)\n// {\n// objTblCelEdiTxtVcoCta.setCancelarEdicion(true);\n// }\n// }\n }", "public void editarProveedor() {\n try {\n proveedorFacadeLocal.edit(proTemporal);\n this.proveedor = new Proveedor();\n FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, \"Proveedor editado\", \"Proveedor editado\"));\n } catch (Exception e) {\n \n }\n\n }", "@Override\r\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\ttx.setText(editText.getText().toString());\r\n\t\t\t\t\t}", "private void btnEditActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnEditActionPerformed\n boolean flag = this.cutiController.save(txtCutiID.getText(), (txtTglAwal.getText()), (txtTglAkhir.getText()),\n txtKet.getText(), cmbCutiKhususID.getSelectedIndex());\n String message = \"Failed to edit data\";\n if (flag){\n message = \"Success to edit data\";\n }\n JOptionPane.showMessageDialog(this, message, \"Notification\", JOptionPane.INFORMATION_MESSAGE);\n bindingTable();\n reset();\n }", "public void editHandler(View v) {\n LinearLayout vwParentRow = (LinearLayout)v.getParent();\n TextView id =(TextView) vwParentRow.findViewById(R.id._id);\n Intent intent = new Intent(Hates.this, Formulario.class);\n\n intent.putExtra(C_MODO, C_EDITAR);\n intent.putExtra(C_TIPO, love_hate);\n intent.putExtra(mDbHelper.ID, Long.valueOf((String)id.getText()));\n\n\n this.startActivityForResult(intent, C_EDITAR);\n }", "public void modifyComment(String text){\n if (activeEmployee.hasLicence(202)){\n DB.modifyComment(getData().id_comment, getData().id_task, text);\n update();\n } //consideramos que solo se puede modificar el texto no las id\n }", "@FXML\n void handleEdit(ActionEvent event) {\n if (checkFields()) {\n\n try {\n //create a pseudo new environment with the changes but same id\n Environment newEnvironment = new Environment(oldEnvironment.getId(), editTxtName.getText(), editTxtDesc.getText(), editClrColor.getValue());\n\n //edit the oldenvironment\n Environment.edit(oldEnvironment, newEnvironment);\n } catch (SQLException exception) {\n //failed to save a environment, IO with database failed\n Manager.alertException(\n resources.getString(\"error\"),\n resources.getString(\"error.10\"),\n this.dialogStage,\n exception\n );\n }\n //close the stage\n dialogStage.close();\n } else {\n //fields are not filled valid\n Manager.alertWarning(\n resources.getString(\"add.invalid\"),\n resources.getString(\"add.invalid\"),\n resources.getString(\"add.invalid.content\"),\n this.dialogStage);\n }\n Bookmark.refreshBookmarksResultsProperty();\n }", "private void editar(HttpPresentationComms comms) throws HttpPresentationException, KeywordValueException {\n/* 149 */ int idRecurso = 0;\n/* */ try {\n/* 151 */ idRecurso = Integer.parseInt(comms.request.getParameter(\"idRecurso\"));\n/* */ }\n/* 153 */ catch (Exception e) {}\n/* */ \n/* */ \n/* 156 */ PrcRecursoDAO ob = new PrcRecursoDAO();\n/* 157 */ PrcRecursoDTO reg = ob.cargarRegistro(idRecurso);\n/* 158 */ if (reg != null) {\n/* 159 */ this.pagHTML.getElementIdRecurso().setValue(\"\" + reg.getIdRecurso());\n/* 160 */ this.pagHTML.getElementDescripcionRecurso().setValue(\"\" + reg.getDescripcionRecurso());\n/* 161 */ this.pagHTML.getElementUsuarioInsercion().setValue(\"\" + reg.getUsuarioInsercion());\n/* 162 */ this.pagHTML.getElementFechaInsercion().setValue(\"\" + reg.getFechaInsercion());\n/* 163 */ this.pagHTML.getElementUsuarioModificacion().setValue(\"\" + reg.getUsuarioModificacion());\n/* 164 */ this.pagHTML.getElementFechaModificacion().setValue(\"\" + reg.getFechaModificacion());\n/* 165 */ HTMLSelectElement combo = this.pagHTML.getElementIdTipoRecurso();\n/* 166 */ comboMultivalores(combo, \"tipo_recurso\", \"\" + reg.getIdTipoRecurso(), true);\n/* */ \n/* 168 */ combo = this.pagHTML.getElementIdProcedimiento();\n/* 169 */ llenarCombo(combo, \"prc_procedimientos\", \"id_procedimiento\", \"objetivo\", \"1=1\", \"\" + reg.getIdProcedimiento(), true);\n/* */ \n/* 171 */ combo = this.pagHTML.getElementEstado();\n/* 172 */ comboMultivalores(combo, \"estado_activo_inactivo\", \"\" + reg.getEstado(), true);\n/* */ \n/* */ \n/* 175 */ this.pagHTML.getElementIdRecurso().setReadOnly(true);\n/* */ } \n/* 177 */ this.pagHTML.getElement_operacion().setValue(\"M\");\n/* 178 */ activarVista(\"nuevo\");\n/* */ }", "private void editTextEditorButton(){\n TextEditorTextfield.setText(textEditorPref);\n TextEditorDialog.setVisible(true);\n }", "@Override\n public String getEditTitle() {\n return \"LANGUE\";\n }", "public void limpiar() {\r\n\t\t\t\tid.setText(\"\");\r\n\t\t\t\ttitulo.setText(\"\");\r\n\t\t\t\tdirector.setText(\"\");\r\n\t\t\t\tidCliente.setText(\"\");\r\n\t\t\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}", "public void editProfile(View v) {\n //Create map of all old info\n final Map tutorInfo = getTutorInfo();\n\n InputMethodManager imm = (InputMethodManager) this.getSystemService(Service.INPUT_METHOD_SERVICE);\n\n //Create animations\n final Animation animTranslate = AnimationUtils.loadAnimation(this, R.anim.translate);\n final Animation revTranslate = AnimationUtils.loadAnimation(this, R.anim.reverse_translate);\n\n //Enable Bio EditText, change color\n EditText bioField = (EditText) findViewById(R.id.BioField);\n bioField.clearFocus();\n bioField.setTextIsSelectable(true);\n bioField.setEnabled(true);\n bioField.setBackgroundResource(android.R.color.black);\n imm.showSoftInput(bioField, 0);\n\n //Hide edit button\n v.startAnimation(animTranslate);\n v.setVisibility(View.GONE);\n\n //Show add subject button\n Button addSubjButton = (Button) findViewById(R.id.addSubjButton);\n addSubjButton.setVisibility(View.VISIBLE);\n\n\n //Show save button\n Button saveButton = (Button) findViewById(R.id.save_button);\n saveButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n saveDialogue(tutorInfo);\n }\n });\n saveButton.startAnimation(revTranslate);\n saveButton.setVisibility(View.VISIBLE);\n\n enableSkillButtons();\n }", "@Override\n public void handleEditStart ()\n {\n\n }", "private void updateText(){\n\t\tif(propertiesObj == null)\n\t\t\treturn;\n\n\t\tif(propertiesObj instanceof QuestionDef)\n\t\t\t((QuestionDef)propertiesObj).setText(txtText.getText());\n\t\telse if(propertiesObj instanceof OptionDef)\n\t\t\t((OptionDef)propertiesObj).setText(txtText.getText());\n\t\telse if(propertiesObj instanceof PageDef)\n\t\t\t((PageDef)propertiesObj).setName(txtText.getText());\n\t\telse if(propertiesObj instanceof FormDef)\n\t\t\t((FormDef)propertiesObj).setName(txtText.getText());\n\n\t\tformChangeListener.onFormItemChanged(propertiesObj);\n\t}", "public void updateName() {\n try {\n userFound = clientefacadelocal.find(this.idcliente);\n if (userFound != null) {\n userFound.setNombre(objcliente.getNombre());\n clientefacadelocal.edit(userFound);\n objcliente = new Cliente();\n mensaje = \"sia\";\n } else {\n mensaje = \"noa\";\n System.out.println(\"Usuario No Encontrado\");\n }\n } catch (Exception e) {\n mensaje = \"noa\";\n System.out.println(\"El error al actualizar el nombre es \" + e);\n }\n }", "public void editar(AplicacionOferta aplicacionOferta){\n try{\n aplicacionOfertaDao.edit(aplicacionOferta);\n }catch(Exception e){\n Logger.getLogger(AplicacionOfertaServicio.class.getName()).log(Level.SEVERE, null, e);\n }\n }", "public void editMode(String newType, String newTarget, String oldContent)\n\t{\n\t\tif (cs == ConnState.EDITING)\n\t\t{\n\t\t\tsendln(\"You're already editing. Exit your current buffer first.\");\n\t\t\treturn;\n\t\t}\n\t\tpromptTarget = newTarget;\n\t\tpromptType = newType;\n\t\tlastCs = cs;\n\t\tcs = ConnState.EDITING;\n\t\tsendln(\"{G /s - Save and Close /q - Close Without Saving /h - View Help & Commands\");\n\t\tsendln(\"{G---------------------------------------------------------------------------\");\n\t\teditorContents = new ArrayList<String>();\n\t\tif (oldContent.length() > 0)\n\t\t{\n\t\t\tString oldContents[] = oldContent.split(\"\\\\^/\", -1);\n\t\t\tfor (int ctr = 0; ctr < oldContents.length; ctr++)\n\t\t\t\teditorContents.add(oldContents[ctr]);\n\t\t}\n\t}", "public void clickEdit() {\r\n\t\tEdit.click();\r\n\t}", "public static void editButtonAction(ActionContext actionContext){\n Table dataTable = actionContext.getObject(\"dataTable\");\n Shell shell = actionContext.getObject(\"shell\");\n Thing store = actionContext.getObject(\"store\");\n \n TableItem[] items = dataTable.getSelection();\n if(items == null || items.length == 0){\n MessageBox box = new MessageBox(shell, SWT.ICON_WARNING | SWT.OK);\n box.setText(\"警告\");\n box.setMessage(\"请先选择一条记录!\");\n box.open();\n return;\n }\n \n store.doAction(\"openEditForm\", actionContext, \"record\", items[0].getData());\n }", "public String paginaEditCliente(){\n\t\t\r\n\t\treturn \"editcli\";\r\n\t}", "public void onEditItem(View view) {\n Intent data = new Intent(EditItemActivity.this, MainActivity.class);\n data.putExtra(\"position\", elementId);\n data.putExtra(\"text\", etText.getText().toString());\n setResult(RESULT_OK, data);\n finish();\n }", "@Override\r\n\t\t\tpublic void modifyText(ModifyEvent me) {\n\t\t\t\tString newValue = newEditor.getText();\r\n\t\t\t\teditor.getItem().setText(VALUE_COLUMN_NO, newValue);\r\n\t\t\t\t//isEditorModify = true;\r\n\t\t\t\t//propertyInfo.setValue(newValue);\r\n\t\t\t}", "public void editTheirProfile() {\n\t\t\n\t}", "private void makeModifiable() {\n final TableEditor editor = new TableEditor(providers);\n editor.horizontalAlignment = SWT.LEFT;\n editor.grabHorizontal = true;\n editor.minimumWidth = 50;\n\n // editing the fourth column\n final int editable = 4;\n\n providers.addSelectionListener(new SelectionListener() {\n \n @Override\n public void widgetSelected(SelectionEvent exc) {\n\n TableItem item = (TableItem) exc.item;\n\n //Column should only be editable if arguments are allowed for the provider.\n if (item.getText(3).toString().equals(\"false\") || item == null) {\n return;\n }\n\n Control oldEditor = editor.getEditor();\n\n if (oldEditor != null) {\n oldEditor.dispose();\n }\n\n \n Text newEditor = new Text(providers, SWT.NONE);\n newEditor.setText(item.getText(editable));\n newEditor.addModifyListener(new ModifyListener() {\n\n \n @Override\n public void modifyText(ModifyEvent exc) {\n Text text = (Text) editor.getEditor();\n editor.getItem().setText(editable, text.getText());\n }\n });\n \n newEditor.selectAll();\n newEditor.setFocus();\n editor.setEditor(newEditor, item, editable); \n }\n\n @Override\n public void widgetDefaultSelected(SelectionEvent exc) {\n // TODO Auto-generated method stub\n }\n });\n \n for (int i = 0; i < TITLES.length; i++) {\n providers.getColumn(i).pack();\n }\n }", "public void setTextTablaEd(String text) { doSetText(this.$element_TablaEd, text); }", "public void controlaMenuEditaFuncionario(Funcionario funcionario) {\n int opcao = this.telaFuncionario.pedeOpcao();\n\n switch (opcao) {\n case 1:\n String nome = this.telaFuncionario.pedeNome();\n funcionario.setNome(nome);\n this.telaFuncionario.mensagemNomeEditadoSucesso();\n menuEditaFuncionario(funcionario);\n break;\n case 2:\n int matricula = verificaMatriculaInserida();\n funcionario.setMatricula(matricula);\n this.telaFuncionario.mensagemMatriculaEditadaSucesso();\n menuEditaFuncionario(funcionario);\n break;\n case 3:\n String dataNascimento = cadastraDataNascimento();\n funcionario.setDataNascimento(dataNascimento);\n this.telaFuncionario.mensagemDataNascimentoEditadaSucesso();\n menuEditaFuncionario(funcionario);\n break;\n case 4:\n int telefone = this.telaFuncionario.pedeTelefone();\n funcionario.setTelefone(telefone);\n this.telaFuncionario.mensagemTelefoneEditadoSucesso();\n menuEditaFuncionario(funcionario);\n break;\n case 5:\n int salario = this.telaFuncionario.pedeSalario();\n funcionario.setSalario(salario);\n this.telaFuncionario.mensagemSalarioEditadoSucesso();\n menuEditaFuncionario(funcionario);\n break;\n\n case 6:\n this.telaFuncionario.exibeOpcaoCargoFuncionario();\n Cargo cargo = atribuiCargoAoFuncionario();\n funcionario.setCargo(cargo);\n this.telaFuncionario.mensagemCargoEditadoSucesso();\n menuEditaFuncionario(funcionario);\n break;\n\n case 7:\n exibeMenuFuncionario();\n break;\n default:\n this.telaFuncionario.opcaoInexistente();\n editaFuncionario();\n break;\n }\n }", "private void modifyActionPerformed(ActionEvent evt) throws Exception {\n String teaID = this.teaIDText.getText();\n String teaCollege = this.teaCollegeText.getText();\n String teaDepartment = this.teaDepartmentText.getText();\n String teaType = this.teaTypeText.getText();\n String teaPhone = this.teaPhoneText.getText();\n String teaRemark = this.teaRemarkText.getText();\n if(StringUtil.isEmpty(teaID)){\n JOptionPane.showMessageDialog(null, \"请先选择一条老师信息!\");\n return;\n }\n if(StringUtil.isEmpty(teaCollege)){\n JOptionPane.showMessageDialog(null, \"学院不能为空!\");\n return;\n }\n if(StringUtil.isEmpty(teaDepartment)){\n JOptionPane.showMessageDialog(null, \"系不能为空!\");\n return;\n }\n if(StringUtil.isEmpty(teaType)){\n JOptionPane.showMessageDialog(null, \"类型不能为空!\");\n return;\n }\n if(StringUtil.isEmpty(teaPhone)){\n JOptionPane.showMessageDialog(null, \"手机不能为空!\");\n return;\n }\n if(!StringUtil.isAllNumber(teaPhone)){\n JOptionPane.showMessageDialog(null, \"请输入合法的手机号!\");\n return;\n }\n if(teaPhone.length() != 11){\n JOptionPane.showMessageDialog(null, \"请输入11位的手机号!\");\n return;\n }\n int confirm = JOptionPane.showConfirmDialog(null, \"确认修改?\");\n if(confirm == 0){//确认修改\n Teacher tea = new Teacher(teaID,teaCollege,teaDepartment,teaType,teaPhone,teaRemark);\n Connection con = dbUtil.getConnection();\n int modify = teacherInfo.updateInfo(con, tea);\n if(modify == 1){\n JOptionPane.showMessageDialog(null, \"修改成功!\");\n resetValues();\n }\n else{\n JOptionPane.showMessageDialog(null, \"修改失败!\");\n return;\n }\n initTable(new Teacher());//初始化表格\n }\n }", "public void mmEditClick(ActionEvent event) throws Exception{\r\n displayEditProfile();\r\n }", "public void editar(ParadaUtil paradaUtil) {\n\t\tiniciarTransacao();\r\n\t\ttry {\r\n\t\t\ts.update(paradaUtil);\r\n\t\t\ttx.commit();\r\n\t\t} catch (Exception e) {\r\n\t\t} finally {\r\n\t\t\ts.close();\r\n\t\t}\r\n\t}", "public Editar_Encargado() {\n \n initComponents();\n //Mandamos a llamar el metodo que carga el Grid;\n CargarTabla();\n\n }", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"<html><center><u><strong>Edité par :</strong></u><br>RAHMANI ABD EL KADER<br>SEIF EL ISLEM<br> Groupe 1 Section 1</center></html>\", \"A propros\", JOptionPane.INFORMATION_MESSAGE);\r\n\t\t\t}", "public Equipamento editar(Equipamento eq) {\r\n\t\t\tthis.conexao.abrirConexao();\r\n\t\t\tString sqlUpdate = \"UPDATE equipamentos SET nome=?,descricao=?, id_usuario=? WHERE id_equipamentos=?\";\r\n\t\t\ttry {\r\n\t\t\t\tPreparedStatement statement = (PreparedStatement) this.conexao.getConexao().prepareStatement(sqlUpdate);\r\n\t\t\t\tstatement.setString(1, eq.getNome());\r\n\t\t\t\tstatement.setString(2, eq.getDescricao());\r\n\t\t\t\tstatement.setLong(3, eq.getUsuario().getId());\r\n\t\t\t\tstatement.setLong(4, eq.getId());\r\n\t\t\t\t/*int linhasAfetadas = */statement.executeUpdate();\r\n\t\t\t\t\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t} finally {\r\n\t\t\t\tthis.conexao.fecharConexao();\r\n\t\t\t}\r\n\t\t\treturn eq;\r\n\t\t}", "private void editMode() {\n\t\t// Set the boolean to true to indicate in edit mode\n\t\teditableEditTexts();\n\t\thideEditDelete();\n\t\thideEmail();\n\t\tshowSaveAndAdd();\n\t\tshowThatEditable();\n\t}", "public String edit() {\r\n\t\tuserEdit = (User) users.getRowData();\r\n\t\treturn \"edit\";\r\n\t}", "public abstract void setApellido(java.lang.String newApellido);" ]
[ "0.75013167", "0.71682155", "0.70332134", "0.69384384", "0.69106907", "0.6886121", "0.66932094", "0.66799295", "0.66681623", "0.6651884", "0.6630578", "0.6601991", "0.65969235", "0.6558146", "0.65525275", "0.65299517", "0.6469202", "0.64123464", "0.64104253", "0.6394982", "0.63768184", "0.6375348", "0.6373973", "0.6364709", "0.6364384", "0.63444513", "0.6343972", "0.63249755", "0.63239187", "0.6316606", "0.63019836", "0.62931436", "0.62768877", "0.62717974", "0.62606823", "0.6241537", "0.6239671", "0.6235327", "0.6233109", "0.6230754", "0.62235564", "0.621485", "0.6208652", "0.6206855", "0.6206778", "0.61989933", "0.61917955", "0.6152128", "0.6135057", "0.6134798", "0.6133693", "0.6129588", "0.61279595", "0.61169165", "0.6114723", "0.61098945", "0.610728", "0.6089583", "0.60892415", "0.6088012", "0.60872793", "0.60860014", "0.6077624", "0.60668534", "0.60644495", "0.6059387", "0.6054574", "0.60286885", "0.6023861", "0.6023214", "0.60198474", "0.6018177", "0.6017729", "0.6014483", "0.6005522", "0.60034585", "0.6001286", "0.5989394", "0.59893715", "0.5980745", "0.5976381", "0.5971468", "0.59674776", "0.59666204", "0.59666204", "0.5963508", "0.5958816", "0.5956939", "0.59562546", "0.59459805", "0.5944745", "0.5942705", "0.59420073", "0.5938902", "0.5934062", "0.59308416", "0.5923949", "0.59204656", "0.591325", "0.5908612" ]
0.6087506
60
Interface of Data Object, which contains info from request and respond, necessary for controller and view
public interface PageParameters { String getStringParameter(String param); int getIntParameter(String param); HttpServletRequest getRequest(); HttpServletResponse getResponse(); String getMode(); int getItemsPerPage(); int getPageNumber(); int getParentId(); String getEditMode(); int getEditId(); PrintWriter getOut(); ItemType getEditItemType(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface Data {\n\n String getRequest();\n\n}", "public T getRequestData();", "public interface DataView extends View\n{\n //Returns the status of the response\n //True: successful\n //False: failed\n public boolean getResponseStatus();\n \n //Returns the response message\n public String getResponseMessage();\n \n //Returns the data from the controller\n public Message getResponseData();\n \n //Returns a json representation of the data\n public String getJson();\n \n}", "void requestData();", "public T getRequestData() {\n return requestData;\n }", "Object getData();", "Object getData();", "public Object getData();", "public abstract Object getData();", "public interface IIndexDataInfo {\n Index_DataInfo getDataInfo();// 获取首页的整体对象\n List<Index_DataInfo.InfoBean.FocusBean> getFocusDataFromServer();// 首页图片轮播\n List<Index_DataInfo.InfoBean.BannerBean> getBannerDataFromServer();// 首页轮播下选项\n}", "DataHandler getDataHandler();", "public interface DataHandler {\n\n\tpublic String formatData(DataResponse dr);\n}", "public interface Data extends Bookmarkable, Closeable {\n\n /**\n * Returns custom metadata that will be available to processor with prefix 'c_'.\n */\n Map<String, String> getCustomMetadata();\n\n /**\n * Identifies type of data in {@link Data#getInputStream()}. Typically it will be a string including provider type and\n * data type - i.e 'ALM/tests'. A result processor will be selected based on the data type.\n */\n @NotNull\n String getDataType();\n\n /**\n * MIME type value (i.e application/xml, text/plain).\n */\n @NotNull\n String getMimeType();\n\n /**\n * Returns charset of the content. If the content is binary then returns null.\n */\n String getCharset();\n\n /**\n * Returns input stream for reading data. The data may be binary, textual etc. Its content type is identified by\n * {@link Data#getMimeType()}.\n */\n @NotNull\n InputStream getInputStream() throws IOException;\n}", "public interface RequestInfo {\n\n /**\n * Sets status for the request\n * @param status\n */\n void setStatus(STATUS status);\n\n /**\n * @return status of the request\n */\n STATUS getStatus();\n\n /**\n * @return unique id of the request\n */\n Long getId();\n\n /**\n * @return list of errors for this request if any\n */\n List<? extends ErrorInfo> getErrorInfo();\n\n /**\n * @return number of retries available for this request\n */\n int getRetries();\n\n /**\n * @return number of already executed attempts\n */\n int getExecutions();\n\n /**\n * @return command name for this request\n */\n String getCommandName();\n\n /**\n * @return business key assigned to this request\n */\n String getKey();\n\n /**\n * @return descriptive message assigned to this request\n */\n String getMessage();\n\n /**\n * @return time that this request shall be executed (for the first attempt)\n */\n Date getTime();\n\n /**\n * @return serialized bytes of the contextual request data\n */\n byte[] getRequestData();\n\n /**\n * @return serialized bytes of the response data\n */\n byte[] getResponseData();\n \n /**\n * @return optional deployment id in case this job is scheduled from within process context\n */\n String getDeploymentId();\n \n /**\n * @return optional process instance id in case this job is scheduled from within process context\n */\n Long getProcessInstanceId();\n \n /**\n * @return get priority assigned to this job request\n */\n int getPriority();\n}", "public Object getData() \n {\n return data;\n }", "void getDataFromServer();", "public interface Data {\n\n String getContent();\n\n}", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "@GetMapping(\"/data\")\n\t@ResponseBody\n\tpublic Notice data() {\n\t\t\n\t\tNotice notice = new Notice();\n\t\tnotice.setId(1);\n\t\tnotice.setTitle(\"hello\");\n\t\tnotice.setWriterId(\"newlec\");\n\t\tnotice.setHit(10);\n\t\treturn notice;\n\t\t\n\t}", "public interface WaterAndSandDetailsView extends BaseView {\n void successData(Map<String, String> data);\n\n}", "public interface Data {\n String getContent();\n}", "public Object getStandardNoticeData(HttpServletRequest req, HttpServletResponse res) {\r\n\t\tMap<String,Object> noticeData = new HashMap<String,Object>();\r\n\r\n\t\tnoticeData.put(\"currentDate\", new CurrentDate());\r\n\t\tif (req != null) {\r\n\t\t\tnoticeData.put(\"request\", req);\r\n\t\t\tif (req.getSession() != null) {\r\n\t\t\t\tnoticeData.put(\"session\", req.getSession());\r\n\t\t\t}\r\n\t\t\tif (req.getUserPrincipal() != null) {\r\n\t\t\t\tnoticeData.put(\"user\", req.getUserPrincipal());\r\n\t\t\t}\r\n\t\t\tnoticeData.put(\"formfield\", buildFormFieldMap(req.getParameterMap()));\r\n\t\t\tnoticeData.put(\"fieldlist\", req.getParameterMap());\r\n\t\t}\r\n\t\tif (res!= null) {\r\n\t\t\tnoticeData.put(\"response\", res);\r\n\t\t}\r\n\r\n\t\treturn noticeData;\r\n\t}", "@Override\r\n\tpublic Map<String, Object> referenceData(HttpServletRequest request) {\n\t\treturn null;\r\n\t}", "public interface Request{\n public Response execute(Library library);\n public String getTextString();\n public String[] getParams();\n public boolean isPartial();\n}", "public interface InformationView extends BaseView {\n String getPage();\n String getPagecount();\n void getDoctorNoticeList(ResultModel<List<InfoUserNoticeListBean>> model);\n\n String getUserUuid();\n void getInformationList(ResultModel<InformationBean> model);\n\n\n}", "@Override\r\n\tpublic Map<String, Object> returnData(Map<String, Object> map,Model model, HttpServletRequest request) {\n\t\treturn null;\r\n\t}", "Object getData() { /* package access */\n\t\treturn data;\n\t}", "@Override\n\tpublic void getData() {\n\t\t\n\t}", "@Override\r\n\tpublic ModelAndView dataPreview(HttpServletRequest request, HttpServletResponse response) throws Exception {\n\t\treturn null;\r\n\t}", "public MetadataResponse() {\n data = new HashMap<String, Object>();\n }", "public interface HttpRequest extends Serializable {\n\n\tpublic HttpResponse send() throws BackendConnectionException;\n\t\n\tpublic GoalContext getGoalContext();\n\t\n\tpublic HttpRequest setGoalContext(GoalContext _ctx);\n\n\tpublic void saveToDisk() throws IOException;\n\n\tpublic void savePayloadToDisk() throws IOException;\n\t\n\tpublic void loadFromDisk() throws IOException;\n\t\n\tpublic void loadPayloadFromDisk() throws IOException;\n\n\tpublic void deleteFromDisk() throws IOException;\n\n\tpublic void deletePayloadFromDisk() throws IOException;\n\n\tpublic String getFilename();\n}", "public Message getResponseData();", "abstract public Object getUserData();", "public interface Data {\n\t/* nothing special at the moment */\n}", "public IData getData() {\n return data;\n }", "public interface Data {\n\n int DATA_TYPE_HEADER = 1;\n int DATA_TYPE_ITEM = 2;\n\n String getData();\n void setData(String data);\n int getDataType();\n long getTime();\n}", "public Object getData()\r\n\t\t{\r\n\t\t\treturn data;\r\n\t\t}", "@Override\n\tprotected void initData() {\n\t\trequestUserInfo();\n\t}", "public interface IHttpRequest {\n Map<String, String> getHeaders();\n\n Map<String, String> getBodyParams();\n\n Map<String, String> getCookies();\n\n String getMethod();\n\n void setMethod(String method);\n\n String getUrl();\n\n void setUrl(String url);\n\n void addHeader(String header, String value);\n\n void addBodyParam(String bodyParam, String value);\n\n boolean isResource();\n}", "public interface GoodsModel {\n void getDataFromNet(String url, Map<String, String> map);\n void unsubcribe();\n}", "interface Data {\n}", "public DataRequest() {\n\t\tfilters = new ArrayList<FilteringRule>();\n\t\tsort_by = new ArrayList<SortingRule>();\n\t}", "public Object getUserData();", "public ViewRequestResponse() {\n super(\"View Request/Response\");\n initComponents();\n blRequestResponse = new BLRequestResponse();\n response = new Response();\n request = new Request();\n \n }", "public interface RequestController {\n\n void onCreate();\n\n void setUsePagingRefreshDelegate();\n\n void requestData();\n}", "public interface Request {\n public String toXml();\n\n\n public String getHandlerId();\n\n\n public String getRequestId();\n}", "public interface Requestable {\n\n /**\n * In our TicTacToe game server sends get methods\n *\n * @return an json sting of the request\n */\n public String post();\n\n /**\n * In TicTacToe game client sends post methods\n *\n * @return an json string of the request;\n */\n public String get();\n\n}", "DataModel getDataModel ();", "public interface IModel {\n void requestData(String url, OnHomeDataChangeLister onHomeDataChangeLister);\n\n interface OnHomeDataChangeLister {\n //头条\n void onHomeData(Toutiao1 toutiao1);\n }\n// //视频\n// void VideoData(OnVideoDataChangeLister onVideoDataChangeLister);\n// interface OnVideoDataChangeLister{\n// void OnVideoLister(Video video);\n// }\n}", "public interface DataTransmission{\n\n\n void getData(getJson json);\n\n//void onRestonse(setResponse response);\n\n interface getJson{\n\n void setData(List list);\n\n }\n\n// interface setResponse{\n//\n// void setResponse();\n// }\n}", "public interface IView extends BaseIView{\n void getDataSuccess(LoginBean loginBean);\n void getDataError(String error);\n\n}", "public Object getData(){\n\t\treturn this.data;\n\t}", "KijiDataRequest getClientRequest();", "public Object getData() {\n\t\treturn data;\n\t}", "public Object data() {\n return this.data;\n }", "public Object getDataObject() {\n return dataObject;\n }", "public void setRequestData(T requestData) {\n this.requestData = requestData;\n }", "public static Map<String, Object> mapData(Object data) {\n\t\tMap<String, Object> modelMap = new HashMap<String,Object>(2);\n\t\tmodelMap.put(\"data\", data);\n\t\tmodelMap.put(\"success\", true);\n\t\t\n\t\treturn modelMap;\n\t}", "public Object getData() {\r\n\t\t\treturn data;\r\n\t\t}", "public abstract Collection<Entry<K, V>> dataToServe();", "protected T getResponse() {\n return responseData;\n }", "@ApiStatus.Internal\n @NotNull\n public Map<String, Object> getData() {\n return data;\n }", "public interface MainIView<D extends Object> extends BaseIView {\r\n\r\n void getDataSuccess(D data);\r\n\r\n\r\n void getDataFail(Exception exc);\r\n}", "private Response() {\n initFields();\n }", "public void Data(){\n\t\t\t\t\t\t\n\t\t\t\t\t}", "protected abstract Object[] getData();", "protected ScServletData getData()\n {\n return ScServletData.getLocal();\n }", "public interface BuildingFurnitureView {\n\n void showResposeSuccess(ResposneBuildingFurnitureData data);\n void ShowFailed();\n void SHowNoMoreData();\n\n\n}", "public interface ReceiveThirdDataService {\n\n /**\n * 解析第三数据,每叫号业务推送\n *\n * @param courtTakeNumPojo\n * @return\n */\n RestApiMsg<String> transferThirdData(CourtTakeNumPojo courtTakeNumPojo, HttpServletRequest request);\n}", "public interface DataObject {\n\n /**\n * Returns the length of the contained resource.\n *\n * @return resource length of the resource.\n * @throws IOException when an error occurs while reading the length.\n */\n long getContentLength() throws IOException;\n\n /**\n * Returns an {@link InputStream} representing the contents of the resource.\n *\n * @return contents of the resource as stream.\n * @throws IOException when an error occurs while reading the resource.\n */\n InputStream getInputStream() throws IOException;\n\n /**\n * Returns {@link DataObject} containing the resource. The contents are ranged\n * from the start to the end indexes.\n *\n * @param start index at which data will be read from.\n * @param end index at which dat will be read to.\n * @return ranged resource object.\n * @throws IOException when an error occurs while reading the resource.\n */\n DataObject withRange(int start, int end) throws IOException;\n}", "public abstract Response read(Request request, Response response);", "public interface IFourModel {\n void getServerData(IHttpCompleteListener iHttpCompleteListener);\n FourBean getFourBean();\n}", "@Override\n public DataObjectResponse<T> handleGET(DataObjectRequest<T> request)\n {\n if(getRequestValidator() != null) getRequestValidator().validateGET(request);\n\n DefaultDataObjectResponse<T> response = new DefaultDataObjectResponse<>();\n try\n {\n VisibilityFilter<T, DataObjectRequest<T>> visibilityFilter = visibilityFilterMap.get(VisibilityMethod.GET);\n List<Query> queryList = new LinkedList<>();\n if(request.getQueries() != null)\n queryList.addAll(request.getQueries());\n\n if(request.getId() != null)\n {\n // if the id is specified\n queryList.add(new ById(request.getId()));\n }\n\n DataObjectFeed<T> feed = objectPersister.retrieve(queryList);\n if(feed == null)\n feed = new DataObjectFeed<>();\n List<T> filteredObjects = visibilityFilter.filterByVisible(request, feed.getAll());\n response.setCount(feed.getCount());\n response.addAll(filteredObjects);\n }\n catch(PersistenceException e)\n {\n ObjectNotFoundException objectNotFoundException = new ObjectNotFoundException(String.format(OBJECT_NOT_FOUND_EXCEPTION, request.getId()), e);\n response.setErrorResponse(ErrorResponseFactory.objectNotFound(objectNotFoundException, request.getCID()));\n }\n return response;\n }", "fintech.HistoryResponse.Data getData();", "Object visitorResponse();", "T getData() {\n\t\treturn data;\n\t}", "public interface BaseView {\n\n /**\n * 返回请求信息\n * @param value\n */\n void showReqResult(String value);\n\n}", "public interface Controller {\n\n void exit();\n void initialize();\n void refresh();\n void updateDataFromDataPasser();\n}", "public interface IRequest<T, O> {\r\n /**\r\n * Call back interface method for processing the Server Request\r\n *\r\n * @param requestInfo - RequestInfo Object which holds all the required Request Details\r\n */\r\n void processRequest(RequestInfo<T, O> requestInfo, Class<T> TClass, Class<O> OClass, boolean invalidateCache);\r\n\r\n void registerListener(INetworkListener networkListener);\r\n\r\n boolean cancelRequest();\r\n}", "public interface DataAnalyseService {\n JSONArray getDataOperateTimesInDay(String dataName,String month,String year);\n JSONArray getDataOperateTimesInMonth(String dataName,String year);\n JSONArray getDataOperateTimesInYear(String dataName);\n JSONArray getDataOperateTimesByType(String dataName);\n\n JSONObject getHotData();\n JSONObject getLikeData(String dataName);\n\n JSONObject getUserRecommendData(String userName);\n}", "public interface Request {\n}", "private void initData() {\n requestServerToGetInformation();\n }", "public interface ICommonAction {\n\n void obtainData(Object data, String methodIndex, int status,Map<String, String> parameterMap);\n\n\n}", "public interface Controller {\r\n Object handle(WebRequest request);\r\n}", "public interface CodDataService {\n\n /**\n * 获取配置\n * @return 全部配置\n */\n Map<String, String> getConfig();\n\n /**\n * 获取数据\n */\n String getDataValue(String key);\n\n /**\n *\n * @param key\n * @return\n */\n CodDataConfigDto getData(String key);\n\n\n /**\n * 设置数据\n * @param key key\n * @param value value\n */\n void setData(String key, String value);\n\n /**\n * 设置数据\n * @param key key\n * @param value value\n * @param name 配置名称\n */\n void setData(String key, String value, String name);\n\n /**\n * 设置数据\n * @param key key\n * @param value value\n * @param name 配置名称\n * @param sort 序号\n */\n void setData(String key, String value, String name, String sort);\n\n /**\n * 设置数据\n * @param key key\n * @param value value\n * @param name 配置名称\n * @param sort 序号\n * @param desc 描述\n */\n void setData(String key, String value, String name, String desc, String sort);\n\n /**\n * 删除\n * @param key key\n */\n void delete(String key);\n\n}", "public interface IDataIslem {\n <T> void addOrUpdate(T data, String serviceUrl,\n EnumUtil.SendingDataType dataType, Context ctx);\n\n <T> List<T> get(String serviceUrl, Class clazz, Context ctx);\n\n <T> void updateDeleteCreateProcess(EnumUtil.SendingDataType sendingDataType, String message, Context context,\n T data, String serviceUrl);\n}", "public interface IResponse {\n\t\n\t/**\n\t * @param response Some input stream that may be encoded in any way\n\t * @param cookies A cookie store containing the cookie values\n\t * @return A java class that represents the data sent from the server\n\t * @throws IOException\n\t */\n\tpublic IResponse fromResponse(BufferedReader response, CookieStore cookies) throws IOException;\n}", "Object getUserData();", "T getObject() {\n\t\t\treturn data;\n\t\t}", "interface View{\n /**\n * Il seguente metodo peremtte di gestire una situazione di errore\n */\n void onFailure();\n\n /**\n * Il seguente metodo permette di gestire l'ottenimento delle informazioni di un dato cliente\n *\n * @param client cliente\n * @param weightList lista contenete tutti i pesi registrati dal cliente nella piattaforma\n * @param dateList lista contenente tutte le date in cui un cliente ha registrato un peso\n */\n void onClientDataReceived(Client client, List<Float> weightList, List<Date> dateList);\n }", "public interface IReserveView extends IBaseView {\n\n void getReserveSuccess(ReserveResponseBody data);\n}", "public T getData(){\n return this.data;\n }", "public interface RoutedUserData extends Routed {\n String getDomainName();\n String getServerName();\n String getDatasourceName();\n Authentication getAuthentication();\n\n String getName();\n\n String getDataRoute();\n String getUserRoute();\n String getRepositoryRoute();\n}", "public interface ServiceRequest<T> extends Serializable {\r\n\t\r\n\t/**\r\n\t * Gets the service name for this request\r\n\t * @return the valid service name\r\n\t */\r\n\tpublic String getServiceName();\r\n\t\r\n\t/**\r\n\t * Gets the service version.\r\n\t * @return the service version as string\r\n\t */\r\n\tpublic String getServiceVersion();\r\n\t\r\n\t/**\r\n\t * Set the version of the service for this request.\r\n\t * @param serviceVersion\r\n\t */\r\n\tpublic void setServiceVersion(String serviceVersion);\r\n\t \r\n\t/**\r\n\t * Gets the request body data aka paylod for the request\r\n\t * @return the request data\r\n\t */\r\n\tpublic T getRequestData();\r\n\t\r\n\t/**\r\n\t * Returns the security context around this request.\r\n\t * @return the security context for this request\r\n\t */\r\n\tpublic SecurityContext getSecurityContext();\r\n\t\r\n\t/**\r\n\t * Returns all headers.\r\n\t * @return the array of headers\r\n\t */\r\n\tpublic Header[] getHeaders();\r\n\t\r\n\t/**\r\n\t * Returns the header object if the header with a specified key is present.\r\n\t * @param key The key for which value has to be returned\r\n\t * @return the value of the specified key\r\n\t */\r\n\tpublic Header getHeaderByKey(String key);\t\r\n}", "public interface OnDataRequestListener {\n\n void onDataError();\n void requestData();\n void onCompleted();\n\n}", "public interface IPlainRequest extends Serializable\r\n{\r\n\t/**\r\n\t * Returns the id of the request\r\n\t * \r\n\t * @return the id of the request\r\n\t */\r\n\tLong getId();\r\n\r\n\t/**\r\n\t * Returns the status of the request\r\n\t * \r\n\t * @return the status of the request\r\n\t */\r\n\tRequestStatus getStatus();\r\n\r\n\t/**\r\n\t * Returns information about the sender of the request\r\n\t * \r\n\t * @return information about the sender of the request\r\n\t */\r\n\tINotificationTraveller getSender();\r\n}", "public interface DataContentHandler {\n /**\n * Returns an array of DataFlavor objects indicating the flavors the\n * data can be provided in. The array should be ordered according to\n * preference for providing the data (from most richly descriptive to\n * least descriptive).\n *\n * @return The DataFlavors.\n */\n public ActivationDataFlavor[] getTransferDataFlavors();\n\n /**\n * Returns an object which represents the data to be transferred.\n * The class of the object returned is defined by the representation class\n * of the flavor.\n *\n * @param df The DataFlavor representing the requested type.\n * @param ds The DataSource representing the data to be converted.\n * @return The constructed Object.\n * @exception IOException\tif the data can't be accessed\n */\n public Object getTransferData(ActivationDataFlavor df, DataSource ds)\n\t\t\t\tthrows /*UnsupportedFlavorException,*/ IOException;\n\n /**\n * Return an object representing the data in its most preferred form.\n * Generally this will be the form described by the first DataFlavor\n * returned by the <code>getTransferDataFlavors</code> method.\n *\n * @param ds The DataSource representing the data to be converted.\n * @return The constructed Object.\n * @exception IOException\tif the data can't be accessed\n */\n public Object getContent(DataSource ds) throws IOException;\n\n /**\n * Convert the object to a byte stream of the specified MIME type\n * and write it to the output stream.\n *\n * @param obj\tThe object to be converted.\n * @param mimeType\tThe requested MIME type of the resulting byte stream.\n * @param os\tThe output stream into which to write the converted\n *\t\t\tbyte stream.\n * @exception IOException\terrors writing to the stream\n */\n public void writeTo(Object obj, String mimeType, OutputStream os)\n\t throws IOException;\n}", "public boolean isData() {return true; }", "public interface NoteView extends View{\n void showNotesResponse(Object response);\n void showNoteByUserIdAndEntityIdResponse (NoteResponse notesResponse);\n void showCreateProductNoteResponse(CreateProductNoteResponse createProductNoteResponse);\n}", "public T getData() {\r\n return data;\r\n }", "public DataHolder processRequest(DataHolder indataholder) throws java.rmi.RemoteException;" ]
[ "0.71608377", "0.6979711", "0.6674983", "0.64887714", "0.6410555", "0.6327563", "0.6327563", "0.6234516", "0.6189397", "0.6159773", "0.6140498", "0.6136001", "0.6047087", "0.5988151", "0.5948664", "0.59190685", "0.59085643", "0.5893193", "0.5892861", "0.58912945", "0.5860049", "0.5854765", "0.58077085", "0.57887894", "0.5787366", "0.57658666", "0.57468194", "0.5744188", "0.57412183", "0.5725604", "0.5718066", "0.5708474", "0.57029843", "0.57026607", "0.5696304", "0.5694525", "0.56910455", "0.5687433", "0.5683473", "0.5665267", "0.5659317", "0.56553125", "0.56486815", "0.56417805", "0.5626067", "0.5619512", "0.5614004", "0.5611819", "0.56068784", "0.5600773", "0.5594084", "0.5593983", "0.55902714", "0.55893666", "0.55818385", "0.5580714", "0.5574348", "0.5572699", "0.55700815", "0.55433875", "0.55401915", "0.55378455", "0.55372864", "0.55207855", "0.5517928", "0.5517341", "0.5499997", "0.5493157", "0.5490807", "0.54896986", "0.54874235", "0.5482219", "0.5477765", "0.54768395", "0.5473572", "0.5468453", "0.5468099", "0.5467306", "0.5466207", "0.5461709", "0.545261", "0.54444927", "0.5443135", "0.54319113", "0.5416524", "0.5414039", "0.5409408", "0.5407468", "0.5404248", "0.5384953", "0.5376198", "0.5368986", "0.5363905", "0.5358559", "0.5357484", "0.53564906", "0.53488415", "0.5348778", "0.53471017", "0.5344264", "0.5333775" ]
0.0
-1
private static Logger logger = Appctx.getLogger(GatherRDS.class.getName());
private void gather(final Session s) throws Exception { //final MeasureHandler mHandler = Appctx.getBean("measurehandler"); //final List<CacheClusterBean> cache = s.createQuery( // "from CacheClusterBean").list(); //for (final CacheClusterBean cluster : cache) { // if (!cluster.getLbStatus().endsWith("ready")) { // logger.debug("Ignoring AC " + cluster.getUserId() + " LB " // + cluster.getLoadBalancerName() + " Status " // + cluster.getLbStatus()); // continue; // } // final long acid = cluster.getAccount().getId(); // logger.debug("Gather AC " + acid + " Cluster " + // cluster.getName()); // final AccountBean acb = cluster.getAccount(); // final AccountType ac = AccountUtil.toAccount(acb); // // final DimensionBean dim = CWUtil.getDimensionBean(s, acb.getId(), // "CacheClusterId", cluster.getName(), true); // final Set<DimensionBean> dims = new HashSet<DimensionBean>(); // dims.add(dim); // BinLogDiskUsage Bytes // CPUUtilization Percent // DatabaseConnections Count // FreeableMemory Bytes // FreeStorageSpace Bytes // ReplicaLag Seconds // SwapUsage Bytes // ReadIOPS Count/Second // WriteIOPS Count/Second // ReadLatency Seconds // WriteLatency Seconds // ReadThroughput Bytes/Second // WriteThroughput Bytes/Second //} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void logs() {\n \n }", "private DAOLogger() {\n\t}", "LogRecorder getLogRecorder();", "LogRecorder getLogRecorder();", "private void initLogger(BundleContext bc) {\n\t\tBasicConfigurator.configure();\r\n\t\tlogger = Logger.getLogger(Activator.class);\r\n\t\tLogger.getLogger(\"org.directwebremoting\").setLevel(Level.WARN);\r\n\t}", "private ExtentLogger() {}", "public LogScrap() {\n\t\tconsumer = bin->Conveyor.LOG.debug(\"{}\",bin);\n\t}", "@Override\n\tpublic void initLogger() {\n\t\t\n\t}", "protected GerentePoolLog(Class ownerClass)\n {\n\t\tArquivoConfiguracaoGPP arqConf = ArquivoConfiguracaoGPP.getInstance();\n\t\t//Define o nome e a porta do servidor q serao utilizados no LOG\n\t\thostName = arqConf.getEnderecoOrbGPP() + \":\" + arqConf.getPortaOrbGPP();\n\n\t\t/* Configura o LOG4J com as propriedades definidas no arquivo\n\t\t * de configuracao do GPP\n\t\t */\n\t\t\n\t\tPropertyConfigurator.configure(arqConf.getConfiguracaoesLog4j());\n\t\t//Inicia a instancia do Logger do LOG4J\n\t\tlogger = Logger.getLogger(ownerClass);\n\t\tlog(0,Definicoes.DEBUG,\"GerentePoolLog\",\"Construtor\",\"Iniciando escrita de Log do sistema GPP...\");\n }", "public String get_log(){\n }", "public String getBindLog() {\n/* 135 */ return this.bindLog;\n/* */ }", "protected static Logger log() {\n return LogSingleton.INSTANCE.value;\n }", "private static void defineLogger() {\n HTMLLayout layout = new HTMLLayout();\n DailyRollingFileAppender appender = null;\n try {\n appender = new DailyRollingFileAppender(layout, \"/Server_Log/log\", \"yyyy-MM-dd\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n logger.addAppender(appender);\n logger.setLevel(Level.DEBUG);\n }", "public String getLog();", "void initializeLogging();", "protected String logInstanceName() {\n\t\treturn getClass().getName();\n\t}", "private JavaUtilLogHandlers() { }", "public static void main(String[] args)throws IOException ,SQLException {\nlog.debug(\"Hello this is a debug message\");\r\nlog.info(\"Hello this is a info message\");\r\nlog.warn(\"Sample warn message \");\r\nlog.error(\"Sample error message \");\r\nlog.fatal(\"Sample fatal message \");\r\n\r\n}", "static Handler bindAndLog() {\n return Handlers.chain(bind(), new Handler() {\n private final Logger logger = LoggerFactory.getLogger(RequestId.class);\n\n @Override\n public void handle(Context ctx) throws Exception {\n ctx.onClose((RequestOutcome outcome) -> {\n Request request = ctx.getRequest();\n StringBuilder logLine = new StringBuilder()\n .append(request.getMethod().toString())\n .append(\" \")\n .append(request.getUri())\n .append(\" \")\n .append(outcome.getResponse().getStatus().getCode());\n\n request.maybeGet(RequestId.class).ifPresent(id1 -> {\n logLine.append(\" id=\");\n logLine.append(id1.toString());\n });\n\n logger.info(logLine.toString());\n });\n\n ctx.next();\n }\n });\n }", "private Log() {\r\n\t}", "private void repetitiveWork(){\n\t PropertyConfigurator.configure(\"log4j.properties\");\n\t log = Logger.getLogger(BackupRestore.class.getName());\n }", "protected static Logger initLogger() {\n \n \n File logFile = new File(\"workshop2_slf4j.log\");\n logFile.delete();\n return LoggerFactory.getLogger(Slf4j.class.getName());\n }", "public void logData(){\n }", "@Override\n\tprotected Logger getLogger() {\n\t\treturn HMetis.logger;\n\t}", "public OsgiLoggerContext(Bundle bundle) {\n this.bundle = bundle;\n loggerRegistry = new LoggerRegistry<>();\n }", "protected Log getLog()\n/* */ {\n/* 59 */ return log;\n/* */ }", "private Logger getLogger() {\n return LoggingUtils.getLogger();\n }", "void log();", "private void divertLog() {\n wr = new StringWriter(1000);\n LogTarget[] lt = { new WriterTarget(wr, fmt) };\n SampleResult.log.setLogTargets(lt);\n }", "public RevisorLogger getLogger();", "public void viewLogs() {\n\t}", "public ServicioLogger() {\n }", "protected void initLogger() {\n initLogger(\"DEBUG\");\n }", "abstract protected void _log(Snapshot snapshot) throws Exception;", "public DNSLog() {}", "@Override\n protected Logger getLogger() {\n return LOGGER;\n }", "@Override\n public void log()\n {\n }", "private LoggerSingleton() {\n\n }", "ExtendedCommonLogger() {\n this.msgbuf = new byte[128];\n }", "public void setPoolLog(String poolLog) { this.poolLog = poolLog; }", "private void logDeviceInfo() {\n logDeviceLevel();\n }", "private void logDeviceInfo() {\n logDeviceLevel();\n }", "@Override\n public void run() {\n logger.info(\"Servicing connection\");\n }", "private SAMLDefaultLogger getSamlLogger() {\n\t\tif (samlLogger == null) {\n\t\t\tsamlLogger = new SAMLDefaultLogger();\n\t\t}\n\t\treturn samlLogger;\n\t}", "@Override\n\tpublic void releaseLogger() {\n\t\t\n\t}", "private Logger getLogger() {\n return LoggerFactory.getLogger(ApplicationManager.class);\n }", "public Logger getPhotoLogger(){\r\n\treturn logger;\r\n\t}", "private void logIt(String msg) {\n\tSystem.out.println(\"PLATINUM-SYNC-LOG: \" + msg);\n}", "public EqpmentLogExample() {\n oredCriteria = new ArrayList();\n }", "public static void main(String[] args) {\n // logger.info(\"Message\");\n // System.out.println(\"cdkdk\");\n\n }", "public static Logger get() {\n\t\treturn LoggerFactory.getLogger(WALKER.getCallerClass());\n\t}", "Log getHarvestLog(String dsID) throws RepoxException;", "private static Logger getLogger() {\n return LogDomains.getLogger(ClassLoaderUtil.class, LogDomains.UTIL_LOGGER);\n }", "public SegaLogger getLog(){\r\n\t\treturn log;\r\n\t}", "public Logger (){}", "private HeaderBrandingTest()\n\t{\n\t\tBaseTest.classLogger = LoggerFactory.getLogger( HeaderBrandingTest.class );\n\t}", "public static void log4jExample() {\n\t\tnewLogger.warn(\"This is the info level\");\n\t\t\n\t}", "private static void _logInfo ()\n {\n System.err.println (\"Logging is enabled using \" + log.getClass ().getName ());\n }", "public Logger getLogger() {\n\treturn _logger;\n }", "private Logger() {\n\n }", "@Override\n protected void log(String tag, String msg) {\n Log.i(tag, \"[you can use your custom logger here \\\"]\" + msg);\n }", "public LogPoster() {\n\t\t\n\t}", "public static Logger getErrorLogger()\n\t{\n\t\treturn RequestMaker.getErrorLogger();\n\t}", "private void doIt() {\n\t\tlogger.debug(\"hellow this is the first time I use Logback\");\n\t\t\n\t}", "private void initLoggers() {\n _logger = LoggerFactory.getInstance().createLogger();\n _build_logger = LoggerFactory.getInstance().createAntLogger();\n }", "public static void main(String... args) {\n\n System.setProperty(\"file.encoding\", StandardCharsets.UTF_8.name());\n\n // Register the PID within the logback context\n String name = String.valueOf(ManagementFactory.getRuntimeMXBean().getName());\n if (name != null) {\n MDC.put(\"process_id\", name.split(\"@\")[0]);\n }\n\n try {\n if (args.length == 0) {\n displayHelp();\n return;\n }\n int argi = 0;\n while (argi < args.length) {\n String arg = args[argi++].intern();\n // Options that are not followed by additional parameters\n // come first.\n JDBCConfig jdbcConfig = new JDBCConfig();\n if (Objects.equals(arg, \"-h\") || Objects.equals(arg, \"-help\")) {\n displayHelp();\n somethingDone = true;\n } else if (Objects.equals(arg, \"-version\")) {\n displayVersion();\n somethingDone = true;\n } else if (Objects.equals(arg, \"-d\") || Objects.equals(arg, \"-debug\")) {\n if (debugLevel++ == 0) {\n LogDebugUtils.enableDebugLogging();\n displayVersion();\n }\n } else if (Objects.equals(arg, \"--forceRegister\")) {\n forceRegister = true;\n somethingDone = true;\n getService();\n } else if (Objects.equals(arg, \"-MO\") || Objects.equals(arg, \"-modules\")) {\n somethingDone = true;\n logModules();\n } else if (Objects.equals(arg, \"-V\") || Objects.equals(arg, \"-views\")) {\n somethingDone = true;\n Stream<ModelData> modelsStream =\n StreamSupport.stream(getService().getModels().spliterator(), false);\n if (modelId != null) {\n modelsStream = modelsStream\n .filter(model -> modelId.equals(model.getId()) || modelId.equals(model.getName()));\n }\n if (workspaceId != null) {\n modelsStream = modelsStream.filter(model -> {\n String modelWorkspaceId = model.getCurrentWorkspaceId();\n Workspace modelWorkspace = service.getWorkspace(modelWorkspaceId);\n if (modelWorkspace == null) {\n return false;\n }\n return workspaceId.equals(modelWorkspace.getId()) ||\n workspaceId.equals(modelWorkspace.getName());\n });\n }\n modelsStream = modelsStream.sorted(Comparator.comparing(ModelData::getCurrentWorkspaceId)\n .thenComparing(ModelData::getId));\n\n List<ModelData> models = modelsStream.collect(Collectors.toList());\n // If the current user is a visitor user, they may not get data about the used workspace/model so we'll\n // just try with the provided input\n if (models.isEmpty()) {\n Model model = getModel(workspaceId, modelId);\n if (model != null) {\n models = Collections.singletonList(model.getData());\n }\n }\n for (ModelData model : models) {\n logModuleViews(model);\n }\n } else if (Objects.equals(arg, \"-W\") || Objects.equals(arg, \"-workspaces\")) {\n somethingDone = true;\n Iterable<Workspace> workspaces = getService().getWorkspaces();\n String log = Utils.formatTSV(\"WS_ID\", \"WS_NAME\", \"WS_ALLOCATED_SIZE\", \"WS_SIZE\");\n LOG.info(log);\n for (Workspace workspace : workspaces) {\n log = Utils\n .formatTSV(workspace.getId(), workspace.getName(), workspace.getSizeAllowance(),\n workspace.getCurrentSize());\n LOG.info(log);\n }\n } else if (Objects.equals(arg, \"-M\") || Objects.equals(arg, \"-models\")) {\n somethingDone = true;\n Map<String, String> workspaceNames = StreamSupport\n .stream(getService().getWorkspaces().spliterator(), false)\n .collect(Collectors.toMap(Workspace::getId, Workspace::getName));\n Iterable<ModelData> models = getService().getModels();\n String log = Utils.formatTSV(\"WS_ID\", \"WS_NAME\", \"MODEL_ID\", \"MODEL_NAME\", \"MODEL_SIZE\");\n LOG.info(log);\n for (ModelData model : models) {\n String workspaceId = model.getCurrentWorkspaceId();\n String workspaceName = Optional.ofNullable(workspaceNames.get(workspaceId))\n .orElse(\"\");\n log = Utils.formatTSV(workspaceId, workspaceName, model.getId(), model.getName(),\n model.getMemoryUsage());\n LOG.info(log);\n }\n } else if (Objects.equals(arg, \"-F\") || Objects.equals(arg, \"-files\")) {\n somethingDone = true;\n Model model = getModel(workspaceId, modelId);\n if (model != null) {\n String log;\n for (ServerFile serverFile : model.getServerFiles()) {\n log = Utils.formatTSV(\n serverFile.getId(),\n serverFile.getCode(),\n serverFile.getName());\n LOG.info(log);\n }\n }\n } else if (Objects.equals(arg, \"-I\") || Objects.equals(arg, \"-imports\")) {\n somethingDone = true;\n Model model = getModel(workspaceId, modelId);\n if (model != null) {\n String log;\n for (Import serverImport : model.getImports()) {\n log = Utils.formatTSV(\n serverImport.getId(),\n serverImport.getCode(),\n serverImport.getName(),\n serverImport.getImportType(),\n serverImport.getSourceFileId());\n LOG.info(log);\n }\n }\n } else if (Objects.equals(arg, \"-A\") || Objects.equals(arg, \"-actions\")) {\n somethingDone = true;\n Model model = getModel(workspaceId, modelId);\n if (model != null) {\n String log;\n for (Action serverAction : model.getActions()) {\n log = Utils.formatTSV(\n serverAction.getId(),\n serverAction.getCode(),\n serverAction.getName());\n LOG.info(log);\n }\n }\n } else if (Objects.equals(arg, \"-E\") || Objects.equals(arg, \"-exports\")) {\n somethingDone = true;\n Model model = getModel(workspaceId, modelId);\n if (model != null) {\n String log;\n for (Export serverExport : model.getExports()) {\n log = Utils.formatTSV(\n serverExport.getId(),\n serverExport.getCode(),\n serverExport.getName());\n LOG.info(log);\n }\n }\n } else if (Objects.equals(arg, \"-P\") || Objects.equals(arg, \"-processes\")) {\n somethingDone = true;\n Model model = getModel(workspaceId, modelId);\n if (model != null) {\n String log;\n for (Process serverProcess : model.getProcesses()) {\n log = Utils.formatTSV(\n serverProcess.getId(),\n serverProcess.getCode(),\n serverProcess.getName());\n LOG.info(log);\n }\n }\n } else if (Objects.equals(arg, \"-L\") || \"-lists\".equals(arg)) {\n if (argi == args.length) {\n somethingDone = true;\n Service service = getService();\n Model model = getModel(workspaceId, modelId);\n if (service != null && model != null) {\n service\n .exportListNames(fileType, fileId, model.getCurrentWorkspaceId(), model.getId());\n }\n }\n } else if (Objects.equals(arg, \"-l\") || Objects.equals(arg, \"-list\")) {\n listId = args[argi++];\n if (argi >= args.length) {\n somethingDone = true;\n Service service = getService();\n Model model = getModel(workspaceId, modelId);\n if (service != null) {\n service.exportListMetadata(fileType, fileId, model.getCurrentWorkspaceId(),\n model.getId(), listId);\n }\n }\n } else if (Objects.equals(arg, GET_JSON) || Objects.equals(arg, \"-get:csv\") || Objects\n .equals(arg, \"-get:csv_sc\") ||\n Objects.equals(arg, \"-get:csv_mc\")) {\n boolean supportedListTypes = Objects.equals(arg, GET_JSON) || Objects\n .equals(arg, \"-get:csv\");\n boolean supportedModuleTypes =\n Objects.equals(arg, GET_JSON) || Objects.equals(arg, \"-get:csv_sc\") || Objects\n .equals(arg, \"-get:csv_mc\");\n fileType = arg.substring(\"-get:\".length());\n if (argi < args.length) {\n fileId = args[argi];\n }\n argi++;\n somethingDone = true;\n Model model = getModel(workspaceId, modelId);\n if (argi >= args.length - 1) {\n if (executeParamPresent && moduleId != null && supportedModuleTypes) {\n Module module = getModule(workspaceId, modelId, moduleId);\n if (module != null) {\n module\n .exportViewData(fileType, fileId, model.getCurrentWorkspaceId(), model.getId(),\n viewId, pagesSplit);\n }\n } else if (supportedListTypes) {\n Service service = getService();\n if (service != null) {\n if (executeParamPresent) {\n service.exportListItems(fileType, fileId, model.getCurrentWorkspaceId(),\n model.getId(), listId, includeAll);\n } else if (supportedListTypes) {\n if (listId == null) {\n service.exportListNames(fileType, fileId, model.getCurrentWorkspaceId(),\n model.getId());\n } else {\n service.exportListMetadata(fileType, fileId, model.getCurrentWorkspaceId(),\n model.getId(), listId);\n }\n }\n }\n }\n }\n } else if (Objects.equals(arg, \"-emd\")) {\n somethingDone = true;\n Export export = getExport(workspaceId, modelId, exportId);\n ExportMetadata emd = export.getExportMetadata();\n String delimiter = emd.getDelimiter();\n if (\"\\t\".equals(delimiter)) {\n delimiter = \"\\\\t\";\n }\n String exportName = export.getName();\n int columnCount = emd.getColumnCount();\n int rowCount = emd.getRowCount();\n String exportFormat = emd.getExportFormat();\n String encoding = emd.getEncoding();\n String separator = emd.getSeparator();\n LOG.info(\n \"Export: {}\\ncolumns: {}\\nrows: {}\\nformat: {}\\ndelimiter: {}\\nencoding: {}\\nseparator: {}\"\n , exportName, columnCount, rowCount, exportFormat, delimiter, encoding, separator);\n\n String[] headerNames = emd.getHeaderNames();\n DataType[] dataTypes = emd.getDataTypes();\n String[] listNames = emd.getListNames();\n\n String dataType;\n for (int i = 0; i < headerNames.length; i++) {\n dataType = dataTypes[i].toString();\n LOG.info(\" col {}:\\n name: {}\\n type: {}\\n list: {}\", i, headerNames[i], dataType, listNames[i]);\n }\n } else if (Objects.equals(arg, \"-x:all\") || Objects.equals(arg, \"-execute:all\")) {\n somethingDone = true;\n executeParamPresent = true;\n includeAll = true;\n } else if (Objects.equals(arg, \"-x\") || Objects.equals(arg, \"-execute\")) {\n executeParamPresent = true;\n TaskFactory taskFactory = null;\n if (importId != null) {\n somethingDone = true;\n taskFactory = getImport(workspaceId, modelId, importId);\n } else if (exportId != null) {\n somethingDone = true;\n taskFactory = getExport(workspaceId, modelId, exportId);\n } else if (actionId != null) {\n somethingDone = true;\n taskFactory = getAction(workspaceId, modelId, actionId);\n } else if (processId != null) {\n taskFactory = getProcess(workspaceId, modelId,\n processId);\n }\n if (taskFactory != null) {\n somethingDone = true;\n Task task = taskFactory.createTask(taskParameters);\n lastResult = task.runTask();\n } else if (listId != null) {\n // Performing list operations, like retrieving a list items\n } else if (moduleId != null) {\n // Performing module operations, like retrieving module view data\n } else {\n LOG.error(\"An import, export, action or \"\n + \"process must be specified before {}\", arg);\n }\n\n } else if (Objects.equals(arg, \"-gets\") || Objects.equals(arg, \"-getc\")) {\n somethingDone = true;\n String sourceId = null;\n if (fileId != null) {\n sourceId = fileId;\n } else if (exportId != null) {\n if (lastResult != null && lastResult.isSuccessful()) {\n sourceId = exportId;\n } else {\n LOG.error(\"Export failed - ignoring content\");\n }\n }\n if (null != sourceId) {\n ServerFile serverFile = getServerFile(workspaceId,\n modelId, sourceId, false);\n if (serverFile != null) {\n if (Objects.equals(arg, \"-gets\")) {\n InputStream inputStream = serverFile\n .getDownloadStream();\n byte[] buffer = new byte[4096];\n int read;\n String stringBuilder = \"\";\n do {\n if (0 < (read = inputStream.read(buffer))) {\n stringBuilder = stringBuilder.concat(new String(buffer));\n }\n } while (-1 != read);\n LOG.info(stringBuilder);\n inputStream.close();\n } else {\n CellReader cellReader = serverFile\n .getDownloadCellReader();\n String[] row = cellReader.getHeaderRow();\n do {\n StringBuilder line = new StringBuilder();\n for (int i = 0; i < row.length; ++i) {\n if (line.length() > 0) {\n line.append('\\t');\n }\n line.append(row[i]);\n }\n String log = line.toString();\n LOG.info(log);\n row = cellReader.readDataRow();\n } while (null != row);\n }\n }\n }\n\n } else if (Objects.equals(arg, \"-ch\") || Objects.equals(arg, \"-chunksize\")) {\n fetchChunkSize(args[argi++]);\n } else if (Objects.equals(arg, \"-pages\")) {\n String delim = \",\";\n String regex = \"(?<!\\\\\\\\)\" + Pattern.quote(delim);\n String pages = args[argi++];\n pagesSplit = pages.split(regex);\n } else if (Objects.equals(arg, \"-auth\") || Objects.equals(arg, \"-authserviceurl\")) {\n authServiceUrl = new URI(args[argi++]);\n } else if (Objects.equals(arg, \"-puts\") || Objects.equals(arg, \"-putc\")) {\n somethingDone = true;\n ServerFile serverFile = getServerFile(workspaceId, modelId,\n fileId, true);\n if (serverFile != null) {\n if (Objects.equals(arg, \"-puts\")) {\n OutputStream uploadStream = serverFile.getUploadStream(chunkSize);\n byte[] buf = new byte[4096];\n int read;\n do {\n if (0 < (read = System.in.read(buf))) {\n uploadStream.write(buf, 0, read);\n }\n } while (-1 != read);\n uploadStream.close();\n } else {\n CellWriter cellWriter = serverFile.getUploadCellWriter(chunkSize);\n LineNumberReader lnr = new LineNumberReader(new InputStreamReader(System.in));\n String line;\n while (null != (line = lnr.readLine())) {\n String[] row = line.split(\"\\\\t\");\n if (1 == lnr.getLineNumber()) {\n cellWriter.writeHeaderRow(row);\n } else {\n cellWriter.writeDataRow(row);\n }\n }\n cellWriter.close();\n }\n LOG.info(\"Upload to {} completed.\", fileId);\n }\n // Now check the additional parameter is present before\n // processing consuming options\n } else if (argi >= args.length) {\n break;\n } else if (Objects.equals(arg, \"-oauth-client-id\")) {\n authType = AUTH_TYPE.OAUTH;\n clientId = args[argi++];\n } else if (Objects.equals(arg, \"--rotatable\")) {\n refreshType = ROTATABLE;\n } else if (Objects.equals(arg, \"-s\") || Objects.equals(arg, \"-service\")) {\n serviceLocation = new URI(args[argi++]);\n } else if (Objects.equals(arg, \"-u\") || Objects.equals(arg, \"-user\")) {\n String auth = args[argi++];\n int colonPosition = auth.indexOf(':');\n if (colonPosition != -1) {\n setUsername(auth.substring(0, colonPosition));\n setPassphrase(auth.substring(colonPosition + 1));\n } else {\n setUsername(auth);\n setPassphrase(\"?\");\n }\n } else if (Objects.equals(arg, \"-v\") || Objects.equals(arg, \"-via\")) {\n URI uri = new URI(args[argi++]);\n setProxyLocation(\n new URI(uri.getScheme(), null, uri.getHost(), uri.getPort(), null, null, null));\n } else if (Objects.equals(arg, \"-vu\") || Objects.equals(arg, \"-viauser\")) {\n String auth = args[argi++];\n int colonPosition = auth.indexOf(':');\n if (colonPosition != -1) {\n setProxyUsername(auth.substring(0, colonPosition));\n setProxyPassphrase(auth.substring(colonPosition + 1));\n } else {\n setProxyUsername(auth);\n setProxyPassphrase(\"?\");\n }\n } else if (Objects.equals(arg, \"-mrc\") || Objects.equals(arg, \"-maxretrycount\")) {\n maxRetryCount = fetchMaxRetryCount(args[argi++]);\n } else if (Objects.equals(arg, \"-rt\") || Objects.equals(arg, \"-retrytimeout\")) {\n retryTimeout = fetchRetryTimeout(args[argi++]);\n } else if (Objects.equals(arg, \"-ct\") || Objects.equals(arg, \"-httptimeout\")) {\n httpConnectionTimeout = fetchHttpTimeout(args[argi++]);\n } else if (Objects.equals(arg, \"-c\") || Objects.equals(arg, \"-certificate\")) {\n String certificatePath = args[argi++];\n setCertificatePath(certificatePath);\n } else if (Objects.equals(arg, \"-pkey\") || Objects.equals(arg, \"-privatekey\")) {\n if (keyStorePath != null) {\n throw new IllegalArgumentException(\n \"expected either the privatekey or the keystore arguments\");\n }\n String auth = args[argi++];\n int colonPosition = auth.lastIndexOf(':');\n if (colonPosition != -1) {\n setPrivateKeyPath(auth.substring(0, colonPosition));\n setPassphrase(auth.substring(colonPosition + 1));\n } else {\n setUsername(auth);\n setPassphrase(\"?\");\n }\n } else if (Objects.equals(arg, \"-k\") || Objects.equals(arg, \"-keystore\")) {\n if (passphrase != null || privateKeyPath != null) {\n throw new IllegalArgumentException(\n \"expected either the privatekey or keystore arguments\");\n }\n String keyStorePath = args[argi++];\n setKeyStorePath(keyStorePath);\n } else if (Objects.equals(arg, \"-ka\") || Objects.equals(arg, \"-keystorealias\")) {\n String keyStoreAlias = args[argi++];\n setKeyStoreAlias(keyStoreAlias);\n } else if (Objects.equals(arg, \"-kp\") || Objects.equals(arg, \"-keystorepass\")) {\n String keyStorePassword = args[argi++];\n setKeyStorePassword(keyStorePassword);\n } else if (Objects.equals(arg, \"-w\") || Objects.equals(arg, \"-workspace\")) {\n workspaceId = args[argi++];\n } else if (Objects.equals(arg, \"-w_id\") || Objects.equals(arg, \"-workspace_id\")) {\n workspaceId = args[argi++];\n noValidateWorkspace = true;\n } else if (Objects.equals(arg, \"-m\") || Objects.equals(arg, \"-model\")) {\n modelId = args[argi++];\n } else if (Objects.equals(arg, \"-m_id\") || Objects.equals(arg, \"-model_id\")) {\n modelId = args[argi++];\n noValidateModel = true;\n } else if (Objects.equals(arg, \"-mo\") || Objects.equals(arg, \"-module\")) {\n moduleId = args[argi++];\n } else if (Objects.equals(arg, \"-vi\") || Objects.equals(arg, \"-view\")) {\n viewId = args[argi++];\n } else if (Objects.equals(arg, \"-f\") || Objects.equals(arg, \"-file\")) {\n fileId = args[argi++];\n } else if (Objects.equals(arg, \"-g\") || Objects.equals(arg, \"-get\")) {\n somethingDone = true;\n File targetFile = new File(args[argi++]);\n String sourceId;\n if (fileId != null) {\n sourceId = fileId;\n } else if (exportId != null) {\n if (lastResult != null && lastResult.isSuccessful()) {\n sourceId = exportId;\n } else {\n LOG.error(\"Export failed - ignoring content\");\n sourceId = null;\n }\n } else {\n sourceId = targetFile.getName();\n }\n if (sourceId != null) {\n ServerFile serverFile = getServerFile(workspaceId, modelId, sourceId, false);\n if (serverFile != null) {\n serverFile.downLoad(targetFile, true);\n LOG.info(\"The server file {} has been downloaded to {}\", sourceId,\n targetFile.getAbsolutePath());\n }\n }\n } else if (Objects.equals(arg, \"-putItems:json\") || Objects.equals(arg, \"-putItems:csv\")\n || Objects.equals(arg, \"-putItems:jdbc\") ||\n Objects.equals(arg, \"-upsertItems:jdbc\") || Objects.equals(arg, \"-upsertItems:json\") || Objects\n .equals(arg, \"-upsertItems:csv\")) {\n somethingDone = true;\n boolean upsert = arg.startsWith(\"-upsertItems:\");\n String type = arg.startsWith(\"-putItems\") ? arg.substring(\"-putItems:\".length()) :\n arg.substring(\"-upsertItems:\".length());\n final Path outputPath = getOutput(args, argi);\n String outputType = null;\n if (outputPath != null) {\n outputType = args[argi + 1].substring(OUTPUT.length());\n }\n ListItemResultData result = new ListItemResultData();\n result.setFailures(new ArrayList<>(0));\n ListImpl listImpl;\n final Path itemMapFile = (\"\".equals(itemPropertiesPath) || itemPropertiesPath == null) ?\n null : new File(itemPropertiesPath).toPath();\n if (\"jdbc\".equalsIgnoreCase(type)) {\n final Map<String, String> headerMap = getHeader(jdbcConfig, itemMapFile, args[argi++]);\n listImpl = new ListImpl(getService(), workspaceId, modelId, listId, true);\n result = JDBCUtils.doActionsItemsFromJDBC(jdbcConfig, listImpl, headerMap,\n ListImpl.ListAction.ADD, (itemPropertiesPath != null));\n } else {\n final File sourceFile = new File(args[argi++]);\n listImpl = new ListImpl(getService(), workspaceId, modelId, listId, false);\n\n result = listImpl.doActionToItems(sourceFile.toPath(), itemMapFile, FileType\n .valueOf(type.toUpperCase()), ListImpl.ListAction.ADD);\n }\n\n if (result != null) {\n LOG.info(\"{} items added to the list\", result.getAdded());\n manageItemLog(upsert, outputPath, outputType, result, listImpl);\n }\n if (outputPath != null) {\n String log = outputPath.toString();\n LOG.info(DUMP_FILE_WRITTEN, log);\n argi += 2;\n }\n\n } else if (Objects.equals(arg, \"-updateItems:json\") || Objects\n .equals(arg, \"-updateItems:csv\") ||\n Objects.equals(arg, \"-updateItems:jdbc\")) {\n somethingDone = true;\n String type = arg.substring(\"-updateItems:\".length());\n final Path outputPath = getOutput(args, argi);\n String outputType = null;\n if (outputPath != null) {\n outputType = args[argi + 1].substring(OUTPUT.length());\n }\n final ListImpl listImpl;\n ListItemResultData result = new ListItemResultData();\n result.setFailures(new ArrayList<>(0));\n final Path itemMapFile = (\"\".equals(itemPropertiesPath) || itemPropertiesPath == null)\n ? null : new File(itemPropertiesPath).toPath();\n if (\"jdbc\".equalsIgnoreCase(type)) {\n listImpl = new ListImpl(getService(), workspaceId, modelId, listId, true);\n final Map<String, String> headerMap = getHeader(jdbcConfig, itemMapFile, args[argi++]);\n result = JDBCUtils\n .doActionsItemsFromJDBC(jdbcConfig, listImpl, headerMap, ListAction.UPDATE,\n (itemPropertiesPath != null));\n } else {\n listImpl = new ListImpl(getService(), workspaceId, modelId, listId, false);\n final File sourceFile = new File(args[argi++]);\n\n result = listImpl\n .doActionToItems(sourceFile.toPath(), itemMapFile,\n FileType.valueOf(type.toUpperCase()), ListImpl.ListAction.UPDATE);\n }\n if (result != null) {\n String log = String.format(\"%d items updated in the list\", result.getUpdated());\n LOG.info(log);\n if (result.getIgnored() > 0) {\n int ignored = result.getIgnored();\n LOG.info(ITEMS_IGNORED, ignored);\n }\n }\n if (outputPath != null) {\n addLogItemToOutput(result, outputPath, outputType, listImpl.getContent());\n argi += 2;\n String log = outputPath.toString();\n LOG.info(DUMP_FILE_WRITTEN, log);\n }\n } else if (Objects.equals(arg, \"-deleteItems:json\") || Objects.equals(arg, \"-deleteItems:csv\") ||\n Objects.equals(arg, \"-deleteItems:jdbc\")) {\n somethingDone = true;\n String type = arg.substring(\"-deleteItems:\".length());\n final Path outputPath = getOutput(args, argi);\n String outputType = null;\n if (outputPath != null) {\n outputType = args[argi + 1].substring(OUTPUT.length());\n }\n final Path itemMapFile = (\"\".equals(itemPropertiesPath) || itemPropertiesPath == null) ?\n null : new File(itemPropertiesPath).toPath();\n ListItemResultData result = new ListItemResultData();\n result.setFailures(new ArrayList<>());\n if (\"jdbc\".equalsIgnoreCase(type)) {\n final Map<String, String> headerMap = getHeader(jdbcConfig, itemMapFile, args[argi++]);\n final ListImpl listImpl = new ListImpl(getService(), workspaceId, modelId, listId,\n true);\n result = JDBCUtils.doActionsItemsFromJDBC(jdbcConfig, listImpl, headerMap,\n ListImpl.ListAction.DELETE, (itemPropertiesPath != null));\n argi = handleDeleteLog(result, outputPath, outputType, listImpl.getContent(), argi);\n } else {\n final File sourceFile = new File(args[argi++]);\n final ListImpl listImpl = new ListImpl(getService(), workspaceId, modelId, listId, false);\n result = listImpl.doActionToItems(sourceFile.toPath(), itemMapFile, FileType\n .valueOf(type.toUpperCase()), ListImpl.ListAction.DELETE);\n argi = handleDeleteLog(result, outputPath, outputType, listImpl.getContent(), argi);\n }\n } else if (Objects.equals(arg, \"-p\") || Objects.equals(arg, \"-put\")) {\n somethingDone = true;\n File sourceFile = new File(args[argi++]);\n String destId = fileId == null ? sourceFile.getName() : fileId;\n ServerFile serverFile = getServerFile(workspaceId, modelId,\n destId, true);\n if (serverFile != null) {\n serverFile.upLoad(sourceFile, true, chunkSize);\n LOG.info(\"The file \\\"{}\\\" has been uploaded as {}.\", sourceFile, destId);\n }\n } else if (Objects.equals(arg, \"-i\") || Objects.equals(arg, \"-import\")) {\n importId = args[argi++];\n exportId = null;\n actionId = null;\n processId = null;\n } else if (Objects.equals(arg, \"-e\") || Objects.equals(arg, \"-export\")) {\n importId = null;\n exportId = args[argi++];\n actionId = null;\n processId = null;\n } else if (Objects.equals(arg, \"-a\") || Objects.equals(arg, \"-action\")) {\n importId = null;\n exportId = null;\n actionId = args[argi++];\n processId = null;\n } else if (Objects.equals(arg, \"-pr\") || Objects.equals(arg, \"-process\")) {\n importId = null;\n exportId = null;\n actionId = null;\n processId = args[argi++];\n } else if (Objects.equals(arg, \"-xl\") || Objects.equals(arg, \"-locale\")) {\n String[] localeName = args[argi++].split(\"_\");\n taskParameters.setLocale(localeName[0], localeName.length > 0 ? localeName[1] : null);\n } else if (Objects.equals(arg, \"-xc\") || Objects.equals(arg, \"-connectorproperty\")) {\n String[] propEntry = args[argi++].split(\":\", 2);\n if (propEntry.length != 2) {\n throw new IllegalArgumentException(\n \"expected \" + arg + \" [(<source>|<type>)/]property:(value|?)\");\n }\n\n String[] propKey = propEntry[0].split(\"/\", 2);\n String prompt = propEntry[0];\n if (propKey.length < 2) {\n prompt = \"Import source/\" + prompt;\n }\n String property = propKey[propKey.length - 1];\n String propValue = promptForValue(prompt, propEntry[1],\n property.toLowerCase().endsWith(\"password\"));\n if (propKey.length == 2) {\n taskParameters.addConnectorParameter(propKey[0],\n propKey[1], propValue);\n } else {\n taskParameters.addConnectorParameter(propKey[0],\n propValue);\n }\n } else if (Objects.equals(arg, \"-im\") || Objects.equals(arg, \"-itemmappingproperty\")) {\n itemPropertiesPath = Optional.ofNullable(args[argi++]).orElse(\"\");\n } else if (Objects.equals(arg, \"-xm\") || Objects.equals(arg, \"-mappingproperty\")) {\n String[] propEntry = args[argi++].split(\":\", 2);\n if (propEntry.length != 2) {\n throw new IllegalArgumentException(\"expected \" + arg\n + \" [(<import id>|<import name>)/]dimension\"\n + \":(value|?)\");\n }\n String[] propKey = propEntry[0].split(\"/\", 2);\n String propValue = promptForValue(propEntry[0],\n propEntry[1], false);\n if (propKey.length == 2) {\n taskParameters.addMappingParameter(propKey[0],\n propKey[1], propValue);\n } else {\n taskParameters.addMappingParameter(propKey[0],\n propValue);\n }\n } else if (Objects.equals(arg, \"-o\") || Objects.equals(arg, \"-output\")) {\n File outputFile = new File(args[argi++]);\n retrieveOutput(lastResult, outputFile);\n } else if (Objects.equals(arg, \"-loadclass\")) {\n argi++;\n //Removing the usage of loadclass parameter\n LOG.error(\n \"Warning : Loadclass parameter is deprecated starting in Anaplan Connect v1.4.4. Anaplan Connect will automatically load the right driver. This parameter will be removed in a future Anaplan Connect version.\");\n } else if (arg.equals(\"-jdbcproperties\")) {\n String propertiesFilePath = args[argi++];\n jdbcConfig = loadJdbcProperties(propertiesFilePath);\n if (fileId != null) {\n ServerFile serverFile = getServerFile(workspaceId, modelId,\n fileId, true);\n CellWriter cellWriter = null;\n CellReader cellReader = null;\n try {\n cellWriter = serverFile.getUploadCellWriter(chunkSize);\n cellReader = new JDBCCellReader(jdbcConfig)\n .connectAndExecute();\n String[] row = cellReader.getHeaderRow();\n cellWriter.writeHeaderRow(row);\n int rowCount = 0;\n do {\n if (null != (row = cellReader.readDataRow())) {\n cellWriter.writeDataRow(row);\n ++rowCount;\n }\n somethingDone = true; // TBD\n } while (null != row && row.length > 0);\n cellWriter.close();\n cellWriter = null;\n LOG.info(\"Transferred {} records to {}\", rowCount, fileId);\n } finally {\n if (cellReader != null) {\n cellReader.close();\n }\n if (cellWriter != null) {\n cellWriter.abort();\n }\n }\n } else if (exportId != null) {\n ServerFile serverFile = getServerFile(workspaceId, modelId,\n exportId, true);\n if (serverFile != null) {\n CellWriter cellWriter = null;\n somethingDone = true;\n Export export = getExport(workspaceId, modelId, exportId);\n if (export == null) {\n continue;\n }\n ExportMetadata emd = export.getExportMetadata();\n int columnCount = emd.getColumnCount();\n String separator = emd.getSeparator();\n //build map for metadata for exports\n HashMap<String, Integer> headerName = new HashMap<>();\n for (int i = 0; i < emd.getHeaderNames().length; i++) {\n headerName.put(emd.getHeaderNames()[i], i);\n }\n doTransfer(serverFile, jdbcConfig, cellWriter, headerName, separator, columnCount);\n }\n }\n } else {\n break;\n }\n }\n if (!somethingDone) {\n displayHelp();\n }\n closeDown();\n } catch (Exception thrown) {\n if (authType == AUTH_TYPE.OAUTH && thrown instanceof FeignException) {\n FeignException exception = (FeignException) thrown;\n if (exception.status() == 403) {\n LOG.error(\"The refresh token has expired. Please register again using -forceRegister parameter once.\", exception);\n } else {\n LOG.error(Utils.formatThrowable(thrown));\n }\n } else if (!(thrown instanceof InterruptedException)) {\n // Some brevity for those who don't\n LOG.error(Utils.formatThrowable(thrown));\n }\n // System.exit causes abrupt termination, but the status is useful\n // when run from an automated script.\n closeDown();\n Thread.currentThread().interrupt();\n System.exit(1);\n }\n }", "private ErrorLogger errorLogger() {\n return this.m_mds.errorLogger();\n }", "public Slf4jLogService() {\n this(System.getProperties());\n }", "public LogGPPServer()\n\t{\n\t\tarqConfig = ArqConfigGPPServer.getInstance();\n\t\t\n\t\t//Define o nome e a porta do servidor q serao utilizados no LOG\n\t\thostName = arqConfig.getHostGPP() + \":\" + arqConfig.getPortaGPP();\n\n\t\ttry\n\t\t{\n\t\t\t// Liga o log4j\n\t\t\tthis.ligaLog4j();\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tSystem.out.println(\"Não foi possível instanciar logger\");\n\t\t}\n\t}", "public MyLogs() {\n }", "public void writeLog() {\n\n\t}", "public void writeLog() {\n\n\t}", "public void writeLog() {\n\n\t}", "public static void main(String[] args) {\nConnection connection =ConnectionUtil.getConnection();\r\nSystem.out.println(connection);\r\n\t}", "@Override\n\t\tpublic Logger getJavaLogger(String name) {\n\t\t\treturn Logger.getLogger(\"com.ibm.connectors.amqp\");\n\t\t}", "public void setupLogging() {\n\t\ttry {\n\t\t\t_logger = Logger.getLogger(QoSModel.class);\n\t\t\tSimpleLayout layout = new SimpleLayout();\n\t\t\t_appender = new FileAppender(layout,_logFileName+\".txt\",false);\n\t\t\t_logger.addAppender(_appender);\n\t\t\t_logger.setLevel(Level.ALL);\n\t\t\tSystem.setOut(createLoggingProxy(System.out));\n\t\t}\n\t\tcatch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "protected static void dumpConfig() {\n try {\n logger.info( Configuration.CN_WKBOTANICA_API_CONTEXT_PATH + getContextPath());\n logger.info( Configuration.CN_DNS + \" \" + Configuration.CN_DNS_ADD_LOCALS + shouldAddLocalDns());\n logger.info( Configuration.CN_HTTP + \" \" + Configuration.CN_HTTP_PORT + getHttpPort());\n logger.info( Configuration.CN_FLICKR_API_KEY + \" \" + getFlickrApiKey());\n logger.info( Configuration.CN_FLICKR_USER_ID + \" \" + getFlickrUserId());\n logger.info( Configuration.CN_FLICKR_PHOTOSET_ID + \" \" + getFickrPhotosetId());\n }\n catch (Exception e) {\n logger.info(\"GRAVE:\" + e.getMessage());\n }\n }", "LogTailer startTailing();", "public MyLogger () {}", "public LogX() {\n\n }", "public ExLoggingHandler() {\n super();\n }", "RootMessageLogger getRootMessageLogger();", "private void logToFile() {\n }", "abstract void initiateLog();", "private static Log getLog() {\n if (log == null) {\n log = new SystemStreamLog();\n }\n\n return log;\n }", "public void logSensorData () {\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\tGson gson = new GsonBuilder().serializeNulls().create();\r\n\t\t\r\n\t\tHttpLoggingInterceptor loggingInterceptor = new HttpLoggingInterceptor() ;\r\n\t\tloggingInterceptor.setLevel(HttpLoggingInterceptor.Level.BODY);\r\n\t\t\r\n\t\tOkHttpClient okhttp = new OkHttpClient.Builder()\r\n\t\t\t\t.addInterceptor(loggingInterceptor)\r\n\t\t\t\t.build();\r\n\t\t\r\n\t\tRetrofit retrofit = new Retrofit.Builder()\r\n\t\t\t\t.baseUrl(\"https://jsonplaceholder.typicode.com/\")\r\n\t\t\t\t.addConverterFactory(GsonConverterFactory.create(gson))\r\n\t\t\t\t.client(okhttp)\r\n\t\t\t\t.build();\r\n\t\t\r\n\t\tLogAPI logAPI = retrofit.create(LogAPI.class);\r\n\t\t\r\n\t\tCall<LogDataModel> call = logAPI.getLog();\r\n\t\tcall.enqueue(new Callback<LogDataModel>() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onFailure(Call<LogDataModel> call, Throwable t) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onResponse(Call<LogDataModel> call, Response<LogDataModel> response) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tif(response.code() !=200) {\r\n\t\t\t\t\tSystem.out.println(\"Error in Connection\");\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tString value= \"\";\r\n\t\t\t\tvalue+=\"ID: \" + response.body().getId();\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.println(\"Data: \\n \" + value);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t});\r\n\t}", "private void recordPushLog(String configName) {\n PushLog pushLog = new PushLog();\n pushLog.setAppId(client.getAppId());\n pushLog.setConfig(configName);\n pushLog.setClient(IP4s.intToIp(client.getIp()) + \":\" + client.getPid());\n pushLog.setServer(serverHost.get());\n pushLog.setCtime(new Date());\n pushLogService.add(pushLog);\n }", "public String getLoggerName() {\n return \"test\";\n }", "@BeforeClass\n\tpublic void setup() {\n\t\tlogger = Logger.getLogger(\"AveroRestAPI\");\n\t\tPropertyConfigurator.configure(\"Log4j.properties\");\n\t\tlogger.setLevel(Level.DEBUG);\n\n\t}", "public Logger getLog () {\n return log;\n }", "private LogUtil() {\r\n /* no-op */\r\n }", "Appendable getLog();", "private Log() {\n }", "public Logger logger()\n\t{\n\t\tif (logger == null)\n\t\t{\n\t\t\tlogger = new Logger(PluginRegionBlacklist.this.getClass().getCanonicalName(), null)\n\t\t\t{\n\t\t\t\tpublic void log(LogRecord logRecord)\n\t\t\t\t{\n\n\t\t\t\t\tlogRecord.setMessage(loggerPrefix + logRecord.getMessage());\n\t\t\t\t\tsuper.log(logRecord);\n\t\t\t\t}\n\t\t\t};\n\t\t\tlogger.setParent(getLogger());\n\t\t}\n\t\treturn logger;\n\t}", "public JdbcOdbcTracer getTracer(){\n if (tracer == null) {\n tracer = new JdbcOdbcTracer();\n }\n return tracer; \n }", "public Logger getLogger(){\n\t\treturn logger;\n\t}", "public void doLog() {\n SelfInvokeTestService self = (SelfInvokeTestService)context.getBean(\"selfInvokeTestService\");\n self.selfLog();\n //selfLog();\n }", "public GenLogServerConfig() {\n }", "public static Logger getLogger()\n {\n if (logger == null)\n {\n Log.logger = LogManager.getLogger(BAG_DESC);\n }\n return logger;\n }", "private Logger(){ }" ]
[ "0.59490573", "0.58463913", "0.56806624", "0.56806624", "0.56717324", "0.5663714", "0.56099796", "0.5575531", "0.55568635", "0.55228555", "0.5490015", "0.5481035", "0.54687965", "0.5449245", "0.5443038", "0.5391712", "0.53860193", "0.53792393", "0.5367076", "0.5354926", "0.5339202", "0.5331178", "0.5330585", "0.5286408", "0.526595", "0.5264761", "0.522942", "0.52122086", "0.52058995", "0.52008176", "0.51924676", "0.5187046", "0.5185718", "0.5165825", "0.51625603", "0.51624143", "0.51598555", "0.515337", "0.51518196", "0.5151693", "0.51464117", "0.51464117", "0.51429814", "0.5131664", "0.5123996", "0.512121", "0.5120459", "0.51093763", "0.51024336", "0.5098795", "0.50940686", "0.5090298", "0.50858074", "0.50767255", "0.50701594", "0.50649434", "0.50394917", "0.50319874", "0.5028428", "0.50137806", "0.49953824", "0.4990178", "0.49804726", "0.4972722", "0.4967294", "0.496681", "0.49647534", "0.49601066", "0.49582732", "0.49582085", "0.49573332", "0.49573332", "0.49573332", "0.49425372", "0.49409348", "0.49308753", "0.4930099", "0.4926923", "0.49207664", "0.49179214", "0.4914163", "0.49139306", "0.49054056", "0.4904654", "0.49006328", "0.48956227", "0.4895118", "0.4892009", "0.48865604", "0.48834947", "0.48830175", "0.48777655", "0.48773518", "0.48766738", "0.48740056", "0.48732883", "0.48713407", "0.48618427", "0.48597232", "0.4851425", "0.4849349" ]
0.0
-1
Metoda koja preuzima postavku OpenSkyNetwork.lozinka iz konfiguracijske datoteke
public String preuzmiPassword() { return konfiguracija.dajPostavku("OpenSkyNetwork.lozinka"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void poczatkowe_zmienne()\n {\n konfiguracja.loadProperties();\n predkosc_wroga=Integer.parseInt(konfiguracja.properties.getProperty(\"predkosc_wroga\"));\n czas_watku=Integer.parseInt(konfiguracja.properties.getProperty(\"czas_watku\"));\n punkty_poziomu=Integer.parseInt(konfiguracja.properties.getProperty(\"punkty_poziomu\"));\n zmienne_poziomu(poziom);\n }", "public JLabel etykietaWyswietlaniaPunktow()\n\t{\n\t\treturn wyswietleniePunktow;\n\t}", "TransportLayerAttributes getConfig();", "@Override\n\tpublic Map<String, Map<Integer, List<String>>> getOverlayNetwork() throws TimeSeriesException {\n\t\tIConfig configurationService = ServiceFactory.getConfigurationService();\n\t\tMap<String, Map<Integer, List<String>>> overlayNetwork = configurationService.getOverlayNetwork(this.clusterName);\n\t\t//configurationService.close();\n\t\treturn overlayNetwork;\n\t}", "private void buildTimeChartUrl() {\n url = \"http://q.lizone.net/index/index/fenshi/label/\" + dataItem.label + \"/\";//api 2.0\n }", "private void caricaLivelloDiLegge() {\n\t\ttry {\n\t\t\t//TODO riutilizzo il piano dei conti caricato in precedenza ma associato al padre (per evitare un nuovo accesso a db)! verificare se va bene!\n\t\t\tlivelloDiLegge = conto.getContoPadre().getPianoDeiConti().getClassePiano().getLivelloDiLegge();\n\t\t} catch(NullPointerException npe) {\n\t\t\tthrow new BusinessException(\"Impossibile determinare il livello di legge associato al conto. Verificare sulla base dati il legame con il piano dei conti e la classe piano.\");\n\t\t}\n\t}", "@Override\n\tpublic String getDescription() {\n\t\treturn \"This extension allows setting of different winds at different altitudes.\";\n\t}", "@Override\n public String toString(){\n return \"|Lege navn: \"+legeNavn+\" |Kon.ID: \"+konID+\"|\";\n }", "public void setPolaznik(Polaznik polaznik) {\n this.polaznik = polaznik;\n }", "@Override\n\tpublic String getLiuLiangUrl() {\n\t\tLiuLiang_Url = Util.getMaiYuanConfig(\"LiuLiang_Url\");\n\t\treturn LiuLiang_Url;\n\t}", "public void setKlinik(Klinik klinik) {\r\n // variabel klinik sama dengan variabel lokal klinik\r\n this.klinik = klinik;\r\n }", "public void setLaji(String laji) {\n this.laji = laji; \n }", "public Map<String, KelimeTipi> kokTipiAdlari() {\n Map<String, KelimeTipi> tipMap = new HashMap<String, KelimeTipi>();\r\n tipMap.put(\"IS\", ISIM);\r\n tipMap.put(\"FI\", FIIL);\r\n tipMap.put(\"SI\", SIFAT);\r\n tipMap.put(\"SA\", SAYI);\r\n tipMap.put(\"YA\", YANKI);\r\n tipMap.put(\"ZA\", ZAMIR);\r\n tipMap.put(\"SO\", SORU);\r\n tipMap.put(\"IM\", IMEK);\r\n tipMap.put(\"ZAMAN\", ZAMAN);\r\n tipMap.put(\"HATALI\", HATALI);\r\n tipMap.put(\"EDAT\", EDAT);\r\n tipMap.put(\"BAGLAC\", BAGLAC);\r\n tipMap.put(\"OZ\", OZEL);\r\n tipMap.put(\"UN\", UNLEM);\r\n tipMap.put(\"KI\", KISALTMA);\r\n return tipMap;\r\n }", "public class_config(){\n\t\t\n\t\tformat_date=\"dd/MM/yyyy\";\n\t\tcurrency='€';\n\t\tdecimals=2;\n\t\tlanguage=\"eng\";\n\t\ttheme=\"Metal\";\n\t\tfile_format=\"json\";\n\t\t\n\t}", "public void load(String typ, String souborMilnik, String souborNaplanovane, String souborVysledek) {\r\n\t\t/* cteni dat */\r\n\t\tISourceReader reader = SourceReaderFactory.getReader(typ);\r\n\t\tif(reader == null) return;\r\n\t\tList<Data> dataMilniky = reader.read(DocType.MILNIK, souborMilnik);\r\n\t\tList<Data> dataNaplanovane = reader.read(DocType.NAPLANOVANE, souborNaplanovane);\r\n\t\tList<Data> dataVysledky = reader.read(DocType.VYSLEDKY, souborVysledek);\r\n\t\tif((dataMilniky == null) || (dataNaplanovane == null) || (dataVysledky == null)) return;\r\n\r\n\t\t/* mapovani dat */\r\n\t\tIMapper mapper;\r\n\t\tmapper = MapperFactory.getMapper(DocType.MILNIK);\r\n\t\tList<OutData> dataMilnikyOut = mapper.map(dataMilniky);\r\n\t\tmapper = MapperFactory.getMapper(DocType.NAPLANOVANE);\r\n\t\tList<OutData> dataNaplanovaneOut = mapper.map(dataNaplanovane);\r\n\t\tmapper = MapperFactory.getMapper(DocType.VYSLEDKY);\r\n\t\tList<OutData> dataVysledkyOut = mapper.map(dataVysledky);\r\n\t\tif((dataMilnikyOut == null) || (dataNaplanovaneOut == null) || (dataVysledkyOut == null)) return;\r\n\r\n\t\t/* slouceni dat */\r\n\t\tMerger merger = new Merger();\r\n\t\tmerger.mergeData(dataMilnikyOut, dataNaplanovaneOut, dataVysledkyOut);\r\n\r\n\t\t/* zapis dat do databaze */\r\n\t\tMongoWriter writer = new MongoWriter();\r\n\t\tSystem.out.println(\"Zadej URI: \");\r\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tString uri = sc.nextLine();\r\n\t\tsc.close();\r\n\t\tMongoDatabase db = writer.connectToDB(uri);\r\n\t\tif(db == null) return;\r\n\t\twriter.write(dataMilnikyOut, db);\r\n\t}", "public Meta_data_Layer() {\n\t\tlayerName=null;\n\t\tlayerSize=0;\n\t\tlayerColor=\"black\";\n\t}", "public Exo2_Editeurpolylignes() {\n valeur_maximum = 5;\n initComponents();\n Tools.windowsInit(this);\n Tools.setIcone(\"./src/Icones/Icone_Lines.bmp\", this);\n this.setTitle(\"Editeur de poly-Lignes\");\n etat = Etat.Init;\n //rien\n initNombrePoints();\n\n }", "public void setLayer(int l)\n\t{\n\t\tlayer = l;\n\t}", "public final void setLomd(final LearningObjectMetadataEntity aLomd) {\n this.lomd = aLomd;\n\n /////////////////////////////////////////////////////////////////////\n // Set Image right here\n this.jLabelImageIcon.setIcon(\n new ImageIcon(ImageMediaManagerLogic.getImageBy(lomd))\n );\n\n /////////////////////////////////////////////////////////////////////\n // Set Title\n this.jTextFieldImageTitle.setText(\n lomd.getShortDisplayName() != null\n ? lomd.getShortDisplayName() : \"\"\n );\n\n /////////////////////////////////////////////////////////////////////\n // Set Reference\n this.jTextFieldReference.setText(\n lomd.getReferenceURI() != null ? lomd.getReferenceURI() : \"\"\n );\n\n /////////////////////////////////////////////////////////////////////\n // Set Upload Date\n this.jTextFieldUploadDate.setText(\n lomd.getCreationTimeStamp() != null\n ? DateFormat.getDateTimeInstance().format(\n new Date( lomd.getCreationTimeStamp() ))\n : \"\"\n );\n\n\n ////////////////////////////////////////////////////////////////////\n // Refresh\n this.refresh();\n }", "LabNetworkProfile networkProfile();", "@Override\r\n\tpublic int getGela_kop() {\n\t\treturn super.getGela_kop();\r\n\t}", "@Override\n\tpublic Map<String, String> getConfig() {\n\t\treturn null;\n\t}", "HashMap<Value, HashSet<Value>> getLayerDatasetDescriptions();", "public static void load() {\n tag = getPlugin().getConfig().getString(\"Tag\");\n hologram_prefix = getPlugin().getConfig().getString(\"Prefix\");\n hologram_time_fixed = getPlugin().getConfig().getBoolean(\"Hologram_time_fixed\");\n hologram_time = getPlugin().getConfig().getInt(\"Hologram_time\");\n hologram_height = getPlugin().getConfig().getInt(\"Hologram_height\");\n help_message = getPlugin().getConfig().getStringList(\"Help_message\");\n hologram_text_lines = getPlugin().getConfig().getInt(\"Max_lines\");\n special_chat = getPlugin().getConfig().getBoolean(\"Special_chat\");\n radius = getPlugin().getConfig().getBoolean(\"Radius\");\n radius_distance = getPlugin().getConfig().getInt(\"Radius_distance\");\n chat_type = getPlugin().getConfig().getInt(\"Chat-type\");\n spectator_enabled = getPlugin().getConfig().getBoolean(\"Spectator-enabled\");\n dataType = getPlugin().getConfig().getInt(\"Data\");\n mySQLip = getPlugin().getConfig().getString(\"Server\");\n mySQLDatabase = getPlugin().getConfig().getString(\"Database\");\n mySQLUsername = getPlugin().getConfig().getString(\"Username\");\n mySQLPassword = getPlugin().getConfig().getString(\"Password\");\n\n }", "public Klinik getKlinik() {\r\n return klinik;\r\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 }", "String getLayer2Info();", "private void zmienne_poziomu(int poziom)\n {\n liczba_zyc =Integer.parseInt(konfiguracja.properties.getProperty(poziom+\"_liczba_zyc\"));\n liczba_naboi=Integer.parseInt(konfiguracja.properties.getProperty(poziom+\"_liczba_naboi\"));\n liczba_zyc_wroga=Integer.parseInt(konfiguracja.properties.getProperty(poziom+\"_liczba_zyc_wroga\"));\n liczba_pilek=Integer.parseInt(konfiguracja.properties.getProperty(poziom+\"_liczba_pilek\"));\n predkosc_wroga=Integer.parseInt(konfiguracja.properties.getProperty(poziom+\"_predkosc_wroga\"));\n bonusy_poziomu=Integer.parseInt(konfiguracja.properties.getProperty(poziom+\"_bonusy_poziomu\"));\n rozmiar_pilki=Integer.parseInt(konfiguracja.properties.getProperty(poziom+\"_rozmiar_pilki\"));\n zmiana_ruchu_wroga=Integer.parseInt(konfiguracja.properties.getProperty(poziom+\"_zmiana_ruchu_wroga\"));\n czas_gry=Integer.parseInt(konfiguracja.properties.getProperty(poziom+\"_czas_gry\"));\n }", "protected DesiredField[] istenenAlanlariOlustur() {\n DFHelper dh = new DFHelper(new LOG_View());\n DesiredField[] df = dh.buFieldleriOlustur(\"username\", \"eventName\", \"tableName\", \"eventDateTARIH\", \"eventDateSAAT\", \"currentdata\", \"olddata\");\n dh.fieldBasliklariSunlarOlsun(\"Kullanıcı Adı\", \"Yapılan İşlem\", \"Tablo Adı\", \"Tarihi\", \"Saati\", \"Yeni Data\", \"Eski Data\");\n df[5].setMaxWidth(350);\n df[6].setMaxWidth(350);\n return df;\n }", "private void loadZomatoData(String lat, String lon){\n String url = URL + \"lat=\"+ lat + \"&lon=\" + lon;\n //Log.i(TAG, \"URL: \" + url);\n ZomatoAsyncTask zomTask = new ZomatoAsyncTask();\n zomTask.execute(new String[]{url});\n }", "public AutomatZustand()\r\n\t{\r\n\t\tthis.ew_lokal = Automat.eingabewort;\r\n\t}", "private static void setDefaultConfig() {\n AgentConfig agentConfig = HypertraceConfig.get();\n OpenTelemetryConfig.setDefault(OTEL_EXPORTER, \"zipkin\");\n OpenTelemetryConfig.setDefault(\n OTEL_EXPORTER_ZIPKIN_SERVICE_NAME, agentConfig.getServiceName().getValue());\n OpenTelemetryConfig.setDefault(\n OTEL_PROPAGATORS, toOtelPropagators(agentConfig.getPropagationFormatsList()));\n OpenTelemetryConfig.setDefault(\n OTEL_EXPORTER_ZIPKIN_ENDPOINT, agentConfig.getReporting().getEndpoint().getValue());\n OpenTelemetryConfig.setDefault(\n OTEL_EXPORTER_ZIPKIN_SERVICE_NAME, agentConfig.getServiceName().getValue());\n }", "public void setFondoLeyenda() {\n URL url = getClass().getResource(\"/Imagenes/Leyenda.png\");\n\tthis.setOpaque(false);\n\tthis.image = new ImageIcon(url).getImage();\n\trepaint();\n }", "public void setDataLote(DateTimeDB dataLote) {\n\t\tthis.dataLote = dataLote;\n\t}", "public void inicjalizujRynek()\n\t{\n\t\tif (!Stale.cenyZGeneratora)\n\t\t{\n\t\t\tlistaCenWczytanaZPliku=loader.loadPrices();\n\t\t}\n\t}", "public Electrodomestico() {\r\n\t\tthis.precioBase = PRECIO_BASE;\r\n\t\tthis.color = COLOR_DEFAULT;\r\n\t\tthis.consumoEnergetico = CONSUMO_DEFAULT;\r\n\t\tthis.peso = PESO_BASE;\r\n\t}", "private void initWifiLineLayer() {\n mapboxMap.getStyle(new Style.OnStyleLoaded() {\n @Override\n public void onStyleLoaded(@NonNull Style style) {\n style.addSource(new GeoJsonSource(WIFI_LINE_SOURCE_ID));\n LineLayer wifiLineLayer = new LineLayer(WIFI_LINE_LAYER_ID,\n WIFI_LINE_SOURCE_ID).withProperties(\n lineColor(Color.parseColor(LINE_LAYER_COLOR)),\n lineWidth(LINE_LAYER_WIDTH)\n );\n if (style.getLayer(\"wifi-hotspot-locations\") != null) {\n style.addLayerBelow(wifiLineLayer, \"wifi-hotspot-locations\");\n } else {\n style.addLayer(wifiLineLayer);\n }\n }\n });\n }", "protected void setupZanataOptions() {\n // Set the zanata url\n if (this.zanataUrl != null) {\n // Find the zanata server if the url is a reference to the zanata server name\n for (final String serverName : getClientConfig().getZanataServers().keySet()) {\n if (serverName.equals(zanataUrl)) {\n zanataUrl = getClientConfig().getZanataServers().get(serverName).getUrl();\n break;\n }\n }\n \n getCspConfig().getZanataDetails().setServer(ClientUtilities.fixHostURL(zanataUrl));\n }\n \n // Set the zanata project\n if (this.zanataProject != null) {\n getCspConfig().getZanataDetails().setProject(zanataProject);\n }\n \n // Set the zanata version\n if (this.zanataVersion != null) {\n getCspConfig().getZanataDetails().setVersion(zanataVersion);\n }\n }", "public RelayConfig (long the_mode_timestamp) {\n\t\tthis (the_mode_timestamp, RelayLink.RMODE_SOLO, (new ServerConfig()).get_server_number());\n\t}", "public Leiho4ZerbitzuGehigarriak(Ostatua hartutakoOstatua, double prezioTot, Date dataSartze, Date dataIrtetze,\r\n\t\t\tint logelaTot, int pertsonaKop) {\r\n\t\tsetIconImage(Toolkit.getDefaultToolkit().getImage(\".\\\\Argazkiak\\\\logoa.png\"));\r\n\t\tgetContentPane().setLayout(null);\r\n\t\tthis.setBounds(350, 50, 600, 600);\r\n\t\tthis.setResizable(false); // neurketak ez aldatzeko\r\n\t\tthis.setSize(new Dimension(600, 600));\r\n\t\tthis.setTitle(\"Airour ostatu bilatzailea\");\r\n\t\tprezioTot2 = prezioTot;\r\n\t\t// botoiak\r\n\t\tbtn_next.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\r\n\t\t\t\tMetodoakLeihoAldaketa.bostgarrenLeihoa(hartutakoOstatua, prezioTot2, dataSartze, dataIrtetze, logelaTot,\r\n\t\t\t\t\t\tpertsonaKop, cboxPentsioa.getSelectedItem() + \"\", zerbitzuArray, gosaria);\r\n\r\n\t\t\t\tdispose();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtn_next.setBounds(423, 508, 122, 32);\r\n\t\tbtn_next.setFont(new Font(\"Tahoma\", Font.ITALIC, 16));\r\n\t\tbtn_next.setBackground(Color.LIGHT_GRAY);\r\n\t\tbtn_next.setForeground(Color.RED);\r\n\t\tgetContentPane().add(btn_next);\r\n\r\n\t\tbtn_prev.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t// System.out.println(hartutakoOstatua.getOstatuMota());\r\n\t\t\t\tif (hartutakoOstatua.getOstatuMota().equals(\"H\"))\r\n\t\t\t\t\tMetodoakLeihoAldaketa.hirugarrenLeihoaHotelak(hartutakoOstatua, dataSartze, dataIrtetze);\r\n\t\t\t\telse\r\n\t\t\t\t\tMetodoakLeihoAldaketa.hirugarrenLeihoaEtxeak(hartutakoOstatua, prezioTot, dataIrtetze, dataIrtetze);\r\n\t\t\t\tdispose();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtn_prev.setBounds(38, 508, 107, 32);\r\n\t\tbtn_prev.setFont(new Font(\"Tahoma\", Font.ITALIC, 16));\r\n\t\tbtn_prev.setForeground(Color.RED);\r\n\t\tbtn_prev.setBackground(Color.LIGHT_GRAY);\r\n\t\tgetContentPane().add(btn_prev);\r\n\r\n\t\trestart.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tMetodoakLeihoAldaketa.lehenengoLeihoa();\r\n\t\t\t\tdispose();\r\n\t\t\t}\r\n\t\t});\r\n\t\trestart.setBounds(245, 508, 72, 32);\r\n\t\trestart.setForeground(Color.RED);\r\n\t\trestart.setBackground(Color.LIGHT_GRAY);\r\n\t\tgetContentPane().add(restart);\r\n\r\n\t\t// panela\r\n\t\tlblIzena.setText(hartutakoOstatua.getIzena());\r\n\t\tlblIzena.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblIzena.setFont(new Font(\"Verdana\", Font.BOLD | Font.ITALIC, 21));\r\n\t\tlblIzena.setBounds(0, 13, 594, 32);\r\n\t\tgetContentPane().add(lblIzena);\r\n\r\n\t\tlblLogelak.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\r\n\t\tlblLogelak.setBounds(210, 114, 72, 25);\r\n\t\tgetContentPane().add(lblLogelak);\r\n\r\n\t\ttxtLogelak = new JTextField();\r\n\t\ttxtLogelak.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\r\n\t\ttxtLogelak.setEditable(false);\r\n\t\ttxtLogelak.setText(logelaTot + \"\");\r\n\t\ttxtLogelak.setBounds(285, 116, 32, 20);\r\n\t\ttxtLogelak.setColumns(10);\r\n\t\tgetContentPane().add(txtLogelak);\r\n\r\n\t\tlblPentsioa.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\r\n\t\tlblPentsioa.setBounds(210, 165, 72, 14);\r\n\t\tif (!hartutakoOstatua.getOstatuMota().equals(\"H\"))\r\n\t\t\tlblPentsioa.setVisible(false);\r\n\t\tgetContentPane().add(lblPentsioa);\r\n\r\n\t\tcboxPentsioa.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\r\n\t\tcboxPentsioa.addItem(\"Pentsiorik ez\");\r\n\t\tcboxPentsioa.addItem(\"Erdia\");\r\n\t\tcboxPentsioa.addItem(\"Osoa\");\r\n\t\tcboxPentsioa.setBounds(285, 162, 111, 20);\r\n\t\tgetContentPane().add(cboxPentsioa);\r\n\t\tif (!hartutakoOstatua.getOstatuMota().equals(\"H\"))\r\n\t\t\tcboxPentsioa.setVisible(false);\r\n\r\n\t\tcboxPentsioa.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tint gauak = (int) ((dataIrtetze.getTime() - dataSartze.getTime()) / 86400000);\r\n\r\n\t\t\t\tif (cboxPentsioa.getSelectedItem().equals(\"Pentsiorik ez\")) {\r\n\t\t\t\t\tprezioTot2 = prezioTot2 - pentsioPrez;\r\n\t\t\t\t\tpentsioPrez = 0;\r\n\t\t\t\t} else if (cboxPentsioa.getSelectedItem().equals(\"Erdia\")) {\r\n\t\t\t\t\tprezioTot2 = prezioTot2 - pentsioPrez;\r\n\t\t\t\t\tpentsioPrez = 5 * gauak;\r\n\t\t\t\t\tprezioTot2 = prezioTot2 + pentsioPrez;\r\n\t\t\t\t} else if (cboxPentsioa.getSelectedItem().equals(\"Osoa\")) {\r\n\t\t\t\t\tprezioTot2 = prezioTot2 - pentsioPrez;\r\n\t\t\t\t\tpentsioPrez = 10 * gauak;\r\n\t\t\t\t\tprezioTot2 = prezioTot2 + pentsioPrez;\r\n\t\t\t\t}\r\n\t\t\t\ttxtPrezioa.setText(prezioTot2 + \" €\");\r\n\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tchckbxGosaria.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\r\n\t\tchckbxGosaria.setBounds(245, 201, 97, 23);\r\n\t\tchckbxGosaria.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tint gauak = (int) ((dataIrtetze.getTime() - dataSartze.getTime()) / 86400000);\r\n\t\t\t\tdouble gosariPrezioa = 3 * gauak;\r\n\t\t\t\tif (chckbxGosaria.isSelected()) {\r\n\t\t\t\t\tprezioTot2 = prezioTot2 + gosariPrezioa;\r\n\t\t\t\t\tgosaria = true;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tgosaria = false;\r\n\t\t\t\t\tprezioTot2 = prezioTot2 - gosariPrezioa;\r\n\t\t\t\t}\r\n\t\t\t\ttxtPrezioa.setText(prezioTot2 + \" €\");\r\n\t\t\t}\r\n\t\t});\r\n\t\tgetContentPane().add(chckbxGosaria);\r\n\r\n\t\tlblZerbitzuak.setFont(new Font(\"Verdana\", Font.BOLD, 16));\r\n\t\tlblZerbitzuak.setBounds(51, 244, 230, 25);\r\n\t\tgetContentPane().add(lblZerbitzuak);\r\n\r\n\t\t// gehigarriak\r\n\t\tzerbitzuArray = MetodoakKontsultak.zerbitzuakOstatuanMet(hartutakoOstatua);\r\n\r\n\t\tmodelo.addColumn(\"Izena:\");\r\n\t\tmodelo.addColumn(\"Prezio gehigarria:\");\r\n\t\tmodelo.addColumn(\"Hartuta:\");\r\n\r\n\t\t// tabla datuak\r\n\t\ttable = new JTable(modelo);\r\n\t\ttable.setShowVerticalLines(false);\r\n\t\ttable.setBorder(new LineBorder(new Color(0, 0, 0)));\r\n\t\ttable.setFont(new Font(\"Verdana\", Font.PLAIN, 14));\r\n\r\n\t\ttable.getColumnModel().getColumn(0).setPreferredWidth(150);\r\n\t\ttable.getColumnModel().getColumn(1).setPreferredWidth(150);\r\n\t\ttable.getColumnModel().getColumn(1).setPreferredWidth(150);\r\n\r\n\t\ttable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\r\n\t\ttable.getTableHeader().setResizingAllowed(false);\r\n\t\ttable.setRowHeight(32);\r\n\t\ttable.setBackground(Color.LIGHT_GRAY);\r\n\t\ttable.setBounds(24, 152, 544, 42);\r\n\t\ttable.getTableHeader().setFont(new Font(\"Verdana\", Font.BOLD, 15));\r\n\t\ttable.getTableHeader().setReorderingAllowed(false);\r\n\t\tgetContentPane().add(table);\r\n\r\n\t\ttable.addMouseListener(new java.awt.event.MouseAdapter() {\r\n\t\t\tpublic void mousePressed(MouseEvent me) {\r\n\t\t\t\tif (me.getClickCount() == 1) {\r\n\t\t\t\t\ti = 1;\r\n\t\t\t\t\tif (table.getValueAt(table.getSelectedRow(), 2).equals(\"Ez\"))\r\n\t\t\t\t\t\ti = 1;\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\ti = 2;\r\n\t\t\t\t\tif (i == 1) {\r\n\t\t\t\t\t\ttable.setValueAt(\"Bai\", table.getSelectedRow(), 2);\r\n\t\t\t\t\t\tprezioTot2 = prezioTot2 + zerbitzuArray.get(table.getSelectedRow()).getPrezioa();\r\n\t\t\t\t\t\tzerbitzuArray.get(table.getSelectedRow()).setHartuta(\"Bai\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (i == 2) {\r\n\t\t\t\t\t\ttable.setValueAt(\"Ez\", table.getSelectedRow(), 2);\r\n\t\t\t\t\t\tprezioTot2 = prezioTot2 - zerbitzuArray.get(table.getSelectedRow()).getPrezioa();\r\n\t\t\t\t\t\tzerbitzuArray.get(table.getSelectedRow()).setHartuta(\"Ez\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\ttxtPrezioa.setText(prezioTot2 + \" €\");\r\n\t\t\t\t} else {\r\n\t\t\t\t\t\ti = 1;\r\n\t\t\t\t\t\tif (table.getValueAt(table.getSelectedRow(), 2).equals(\"Ez\"))\r\n\t\t\t\t\t\t\ti = 1;\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\ti = 2;\r\n\t\t\t\t\t\tif (i == 1) {\r\n\t\t\t\t\t\t\ttable.setValueAt(\"Bai\", table.getSelectedRow(), 2);\r\n\t\t\t\t\t\t\tprezioTot2 = prezioTot2 + zerbitzuArray.get(table.getSelectedRow()).getPrezioa();\r\n\t\t\t\t\t\t\tzerbitzuArray.get(table.getSelectedRow()).setHartuta(\"Bai\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (i == 2) {\r\n\t\t\t\t\t\t\ttable.setValueAt(\"Ez\", table.getSelectedRow(), 2);\r\n\t\t\t\t\t\t\tprezioTot2 = prezioTot2 - zerbitzuArray.get(table.getSelectedRow()).getPrezioa();\r\n\t\t\t\t\t\t\tzerbitzuArray.get(table.getSelectedRow()).setHartuta(\"Ez\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\ttxtPrezioa.setText(prezioTot2 + \" €\");\r\n\t\t\t\t\t\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tscrollPane = new JScrollPane(table);\r\n\t\tscrollPane.setViewportBorder(null);\r\n\t\tscrollPane.setBounds(20, 282, 562, 188);\r\n\r\n\t\tgetContentPane().add(scrollPane);\r\n\r\n\t\tfor (HartutakoOstatuarenZerbitzuak zerb : zerbitzuArray) {\r\n\t\t\tarray[0] = zerb.getIzena();\r\n\t\t\tarray[1] = zerb.getPrezioa() + \" €\";\r\n\t\t\tarray[2] = \"Ez\";\r\n\t\t\tmodelo.addRow(array);\r\n\t\t}\r\n\t\ttable.setModel(modelo);\r\n\r\n\t\tlblPrezioa.setFont(new Font(\"Tahoma\", Font.PLAIN, 16));\r\n\t\tlblPrezioa.setBounds(210, 72, 63, 14);\r\n\t\tgetContentPane().add(lblPrezioa);\r\n\r\n\t\ttxtPrezioa = new JTextField();\r\n\t\ttxtPrezioa.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\r\n\t\ttxtPrezioa.setText(prezioTot2 + \" €\");\r\n\t\ttxtPrezioa.setEditable(false);\r\n\t\ttxtPrezioa.setBounds(274, 70, 136, 20);\r\n\t\ttxtPrezioa.setColumns(10);\r\n\t\tgetContentPane().add(txtPrezioa);\r\n\r\n\t}", "public void setFondoMapaLibre() {\n URL url = getClass().getResource(\"/Imagenes/ImaxeVUbi.png\");\n\tthis.setOpaque(false);\n\tthis.image = new ImageIcon(url).getImage();\n\trepaint();\n }", "public void dayLightSavingSettings( DayLightSaving dayLightSavingData ) throws Exception;", "public Lihat_Dokter_Keseluruhan() {\n initComponents();\n }", "private void initConfiguration() {\n\n\t\t//Configuration du jeu\n\t\tconfigJeu = ask(config, \"Emplacement de départ ?\", \"Emplacement\");\n\t\tSystem.out.println(\"\"+modeJeu);\n\n\t\t//mode 2 = Machine contre Machine\n\t\t//mode 1 = Jouur contre Machine\n\n\t\t//On demande le mode de jeu\n\t\tmodeJeu = JOptionPane.showOptionDialog(this, \"Quel mode de jeu ?\", \"Mode de jeu\",\n\t\t\t\tJOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE,\n\t\t\t\ticon, modes, modes[1]); //default button title\n\n\t\tif(modeJeu == 1 || modeJeu == 2){\t//Dans le cas ou c'est joueur contre machine\n\t\t\t nivDifficulté = new String[]{\"Niveau 0 (Random)\",\n\t\t\t\t\t \"Niveau 1 (MinMax niveau 4 avec random)\",\n\t\t\t\t\t \"Niveau 2 (MinMax niveau 2)\",\n\t\t\t\t\t \"Niveau 2.5 (MinMax niveau 2 puis 4)\",\n\t\t\t\t\t \"Niveau 3 (AlphaBeta profondeur 2)\",\n\t\t\t\t\t \"Niveau 4 (NégaAlphaBeta profondeur 4)\",\n\t\t\t\t\t \"Niveau 5 (IA Tricheuse, avec NégaAlphaBeta profondeur 4)\",\n\t\t\t\t\t \"Niveau 6 (IA Tricheuse & voleuse, avec NégaAlphaBeta profondeur 4)\"};\n\n\t\t\tniveauDifficulté = ask(nivDifficulté, \"Votre niveau de difficulté?\",\"Niveau de difficulté\");\n\n\t\t\tniveauHeuristique = ask(configHeuristique, \"L'orientation des poids de l'IA ?\", \"Poids de l'IA\");\n\t\t\tif(niveauHeuristique == 0)\n\t\t\t\tpoids = poidsEquilibre;\n\t\t\telse if(niveauHeuristique == 1)\n\t\t\t\tpoids = poidsAttaque;\n\t\t\telse if (niveauHeuristique == 2)\n\t\t\t\tpoids = poidsDefense;\n\n\n\t\t}else if (modeJeu == 2){\n\t\t\tniveauDifficulté = 10;\t// Dans le cas ou c'est Humain contre humain\n\t\t}\n\t}", "public abstract void setLOD(int lod);", "@Override\r\n public void handleEvent(NetworkAddedEvent arg0) {\n \tCyNetwork network = arg0.getNetwork();\r\n \t\r\n \t// check if it is a TRONCO network by its information field\r\n \tif (!isTroncoNetwork(network)) {\r\n \t\treturn;\r\n \t}\r\n \t\r\n \t// add the TRONCO view\r\n \tCyNetworkView view = networkViewFactory.createNetworkView(network);\r\n networkViewManager.addNetworkView(view, true);\r\n\r\n // get the visual style\r\n VisualStyle visualStyle = null;\r\n for (VisualStyle tempVisualStyle : visualMappingManager.getAllVisualStyles()) {\r\n\t\t\tif (tempVisualStyle.getTitle().equals(\"TRONCO\")) {\r\n\t\t\t\tvisualStyle = tempVisualStyle;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n \r\n // create the visual style if it is the first added network\r\n if (visualStyle == null) {\r\n \tvisualStyle = visualStyleFactory.createVisualStyle(\"TRONCO\");\r\n\t\t\r\n\t // remove the lock of nodes' height-width and set the arrow color\r\n\t for (VisualPropertyDependency visualPropertyDependency : visualStyle.getAllVisualPropertyDependencies()) {\r\n\t\t\t\tif (visualPropertyDependency.getIdString().equals(\"nodeSizeLocked\")) {\r\n\t\t\t\t\tvisualPropertyDependency.setDependency(false);\r\n\t\t\t\t} else if (visualPropertyDependency.getIdString().equals(\"arrowColorMatchesEdge\")) {\r\n\t\t\t\t\tvisualPropertyDependency.setDependency(true);\r\n\t\t\t\t}\r\n\t }\r\n\t \r\n\t // set node width\r\n\t PassthroughMapping widthMapping = (PassthroughMapping) visualMappingFunctionFactoryPassthrough.createVisualMappingFunction(\"width\", Color.class, BasicVisualLexicon.NODE_WIDTH);\r\n\t visualStyle.addVisualMappingFunction(widthMapping);\r\n\t \r\n\t // set node height\r\n\t PassthroughMapping heightMapping = (PassthroughMapping) visualMappingFunctionFactoryPassthrough.createVisualMappingFunction(\"height\", Color.class, BasicVisualLexicon.NODE_HEIGHT);\r\n\t visualStyle.addVisualMappingFunction(heightMapping);\r\n\t \r\n\t // set node shape\r\n\t DiscreteMapping<String, NodeShape> shapeMapping = (DiscreteMapping<String, NodeShape>) visualMappingFunctionFactoryDiscrete.createVisualMappingFunction(\"shape\", String.class, BasicVisualLexicon.NODE_SHAPE);\r\n\t shapeMapping.putMapValue(\"ellipse\", NodeShapeVisualProperty.ELLIPSE);\r\n\t shapeMapping.putMapValue(\"diamond\", NodeShapeVisualProperty.DIAMOND);\r\n\t shapeMapping.putMapValue(\"hexagon\", NodeShapeVisualProperty.HEXAGON);\r\n\t shapeMapping.putMapValue(\"octagon\", NodeShapeVisualProperty.OCTAGON);\r\n\t shapeMapping.putMapValue(\"parallelogram\", NodeShapeVisualProperty.PARALLELOGRAM);\r\n\t shapeMapping.putMapValue(\"rectangle\", NodeShapeVisualProperty.RECTANGLE);\r\n\t shapeMapping.putMapValue(\"round rectangle\", NodeShapeVisualProperty.ROUND_RECTANGLE);\r\n\t shapeMapping.putMapValue(\"triangle\", NodeShapeVisualProperty.TRIANGLE);\r\n\t visualStyle.addVisualMappingFunction(shapeMapping);\r\n\t \r\n\t // set nodes color\r\n\t PassthroughMapping colorMapping = (PassthroughMapping) visualMappingFunctionFactoryPassthrough.createVisualMappingFunction(\"fillcolor\", Color.class, BasicVisualLexicon.NODE_FILL_COLOR);\r\n\t visualStyle.addVisualMappingFunction(colorMapping);\r\n\t\r\n\t // set nodes label\r\n\t PassthroughMapping labelMapping = (PassthroughMapping) visualMappingFunctionFactoryPassthrough.createVisualMappingFunction(\"label\", String.class, BasicVisualLexicon.NODE_LABEL);\r\n\t visualStyle.addVisualMappingFunction(labelMapping);\r\n\t \r\n\t // set nodes label color\r\n\t PassthroughMapping fontColorMapping = (PassthroughMapping) visualMappingFunctionFactoryPassthrough.createVisualMappingFunction(\"fontcolor\", Color.class, BasicVisualLexicon.NODE_LABEL_COLOR);\r\n\t visualStyle.addVisualMappingFunction(fontColorMapping);\r\n\t\r\n\t // set nodes border color\r\n\t PassthroughMapping borderColorMapping = (PassthroughMapping) visualMappingFunctionFactoryPassthrough.createVisualMappingFunction(\"bordercolor\", Paint.class, BasicVisualLexicon.NODE_BORDER_PAINT);\r\n\t visualStyle.addVisualMappingFunction(borderColorMapping);\r\n\t \r\n\t // set node border width\r\n\t PassthroughMapping borderWidthMapping = (PassthroughMapping) visualMappingFunctionFactoryPassthrough.createVisualMappingFunction(\"borderwidth\", Double.class, BasicVisualLexicon.NODE_BORDER_WIDTH);\r\n\t visualStyle.addVisualMappingFunction(borderWidthMapping);\r\n\t\r\n\t // set edges arrow\r\n\t DiscreteMapping<String, ArrowShape> arrowMapping = (DiscreteMapping<String, ArrowShape>) visualMappingFunctionFactoryDiscrete.createVisualMappingFunction(\"arrow\", String.class, BasicVisualLexicon.EDGE_TARGET_ARROW_SHAPE);\r\n\t arrowMapping.putMapValue(\"True\", ArrowShapeVisualProperty.ARROW);\r\n\t arrowMapping.putMapValue(\"False\", ArrowShapeVisualProperty.NONE);\r\n\t visualStyle.addVisualMappingFunction(arrowMapping);\r\n\t\r\n\t // set edges color\r\n\t PassthroughMapping edgeColorMapping = (PassthroughMapping) visualMappingFunctionFactoryPassthrough.createVisualMappingFunction(\"color\", Color.class, BasicVisualLexicon.EDGE_UNSELECTED_PAINT);\r\n\t visualStyle.addVisualMappingFunction(edgeColorMapping);\r\n\t \r\n\t // set edges label\r\n\t PassthroughMapping edgeLabelMapping = (PassthroughMapping) visualMappingFunctionFactoryPassthrough.createVisualMappingFunction(\"edgelabel\", String.class, BasicVisualLexicon.EDGE_LABEL);\r\n\t visualStyle.addVisualMappingFunction(edgeLabelMapping);\r\n\t\r\n\t // set edges label color\r\n\t PassthroughMapping edgeFontColorMapping = (PassthroughMapping) visualMappingFunctionFactoryPassthrough.createVisualMappingFunction(\"labelcolor\", Color.class, BasicVisualLexicon.EDGE_LABEL_COLOR);\r\n\t visualStyle.addVisualMappingFunction(edgeFontColorMapping);\r\n\t\r\n\t // set edges thickness\r\n\t PassthroughMapping edgeThicknessMapping = (PassthroughMapping) visualMappingFunctionFactoryPassthrough.createVisualMappingFunction(\"width\", Double.class, BasicVisualLexicon.EDGE_WIDTH);\r\n\t visualStyle.addVisualMappingFunction(edgeThicknessMapping);\r\n\t\r\n\t // set edges line type\r\n\t DiscreteMapping<String, LineType> edgeLineTypeMapping = (DiscreteMapping<String, LineType>) visualMappingFunctionFactoryDiscrete.createVisualMappingFunction(\"line\", String.class, BasicVisualLexicon.EDGE_LINE_TYPE);\r\n\t edgeLineTypeMapping.putMapValue(\"dash\", LineTypeVisualProperty.EQUAL_DASH);\r\n\t edgeLineTypeMapping.putMapValue(\"solid\", LineTypeVisualProperty.SOLID);\r\n\t visualStyle.addVisualMappingFunction(edgeLineTypeMapping);\r\n \r\n }\r\n \r\n // get the rescaling factor\r\n Double currentScaleMaximum = 50d;\r\n Double maximumSize = 0d;\r\n CyTable table = network.getDefaultNodeTable();\r\n for (View<CyNode> nodeView : view.getNodeViews()) {\r\n \tMap<String, Object> rowValues = table.getRow(nodeView.getModel().getSUID()).getAllValues();\r\n \t\r\n \tDouble width = (Double) rowValues.get(\"width\");\r\n \tif (width != null && width > maximumSize) {\r\n\t\t\t\tmaximumSize = width;\r\n\t\t\t}\r\n \t\r\n \tDouble height = (Double) rowValues.get(\"height\");\r\n \tif (height != null && height > maximumSize) {\r\n\t\t\t\tmaximumSize = height;\r\n\t\t\t}\r\n }\r\n final Double rescalingFactor = maximumSize/currentScaleMaximum;\r\n \r\n // set the new size\r\n for (View<CyNode> nodeView : view.getNodeViews()) {\r\n \tCyRow row = table.getRow(nodeView.getModel().getSUID());\r\n \tMap<String, Object> rowValues = row.getAllValues();\r\n \t\r\n \tDouble width = (Double) rowValues.get(\"width\");\r\n \trow.set(\"width\", width/rescalingFactor);\r\n \t\r\n \tDouble height = (Double) rowValues.get(\"height\");\r\n \trow.set(\"height\", height/rescalingFactor);\r\n }\r\n \r\n // correct the triple / in the label\r\n CyTable edgeTable = network.getDefaultEdgeTable();\r\n for (View<CyEdge> edgeView : view.getEdgeViews()) {\r\n \tCyRow row = edgeTable.getRow(edgeView.getModel().getSUID());\r\n \tMap<String, Object> rowValues = row.getAllValues();\r\n \t\r\n \tString label = (String) rowValues.get(\"edgelabel\");\r\n \tif (label != null) {\r\n \t\trow.set(\"edgelabel\", label.replace(\"\\\\\", \"\"));\r\n\t\t\t} \t\r\n }\r\n \r\n // apply the visual style\r\n visualMappingManager.setVisualStyle(visualStyle, view);\r\n }", "public static HashMap configurerJoueur() {\r\n HashMap config = new HashMap();\r\n \r\n // Titre de la page du jeu\r\n //\r\n config.put(\"titre\", \"Joueur_IM\");\r\n \r\n // Identifiant du joueur\r\n //\r\n config.put(\"Prefixe\", \"Joueur_1\");\r\n \r\n // Donnees de connexion\r\n //\r\n config.put(\"Host\", \"localHost\");\r\n \r\n // Donnees de panneauG\r\n //\r\n config.put(\"arrierePlan\", Color.black);\r\n config.put(\"avantPlan\", Color.gray);\r\n config.put(\"police\", new Font(\"Times Roman\", Font.BOLD, 16));\r\n config.put(\"grille\", new Dimension(10, 10));\r\n \r\n return config;\r\n }", "@Override\n public Map<String, Object> getConfigParams() {\n return null;\n }", "private int obliczDowoz() {\n int x=this.klient.getX();\n int y=this.klient.getY();\n double odl=Math.sqrt((Math.pow((x-189),2))+(Math.pow((y-189),2)));\n int kilometry=(int)(odl*0.5); //50 gr za kilometr\n return kilometry;\n }", "public String getLanUrl() {\n return lanUrl;\n }", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n lineChart.setLegendVisible(false);\n lineChart.setAnimated(false);\n lineChart.setCreateSymbols(false);\n\n NumberAxis xAxis = (NumberAxis)lineChart.getXAxis();\n xAxis.setTickLabelFormatter(new NumberAxis.DefaultFormatter(xAxis) {\n @Override\n public String toString(Number value) {\n //minus value FIXME if you can\n return String.format(\"%.1f\", -value.doubleValue());\n }\n });\n\n //-- Tooltip for lineChart\n mouseLocationInScene = new SimpleObjectProperty<>();\n tooltip = new Tooltip();\n \n lineChart.setOnMouseMoved((MouseEvent evt) -> { \n mouseLocationInScene.set(new Point2D(evt.getSceneX(), evt.getSceneY()));\n double x = getXMouseCoordinate();\n double y = getYMouseCoordinate();\n tooltip.show(lineChart, evt.getScreenX() + 50, evt.getScreenY());\n tooltip.setText(String.format(\"[%.4f; %.4f]\", -x, y));\n });\n }", "public Electrodomestico() {\r\n this.precioBase = PRECIO_BASE_POR_DEFECTO;\r\n this.color = COLOR_POR_DEFECTO;\r\n this.consumoEnergetico = CONSUMO_POR_DEFECTO;\r\n this.peso = PESO_POR_DEFECTO;\r\n\r\n }", "@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:32:42.012 -0500\", hash_original_method = \"DB39049AAE02496ACE7C7C1E193B0ADF\", hash_generated_method = \"40C00F325A8EB9E169C604B505C6A30B\")\n \n public void setNetworkOnLine(boolean online){\n \taddTaint(online);\n }", "private @Nonnull Map<String, Configuration> generateVxlanConfigs() {\n NetworkFactory nf = new NetworkFactory();\n Configuration.Builder cb =\n nf.configurationBuilder().setConfigurationFormat(ConfigurationFormat.CISCO_IOS);\n _s1 = cb.setHostname(S1_NAME).build();\n _s2 = cb.setHostname(S2_NAME).build();\n _h1 = cb.setHostname(H1_NAME).build();\n _h2 = cb.setHostname(H2_NAME).build();\n Vrf.Builder vb = nf.vrfBuilder().setName(Configuration.DEFAULT_VRF_NAME);\n Vrf h1Vrf = vb.setOwner(_h1).build();\n Vrf h2Vrf = vb.setOwner(_h2).build();\n Vrf s1Vrf = vb.setOwner(_s1).build();\n Vrf s2Vrf = vb.setOwner(_s2).build();\n Interface.Builder l3Builder =\n Interface.builder().setType(InterfaceType.PHYSICAL).setActive(true);\n l3Builder.setName(E1_NAME).setAddresses(H1_ADDRESS).setOwner(_h1).setVrf(h1Vrf).build();\n l3Builder.setName(E2_NAME).setAddresses(H2_ADDRESS).setOwner(_h2).setVrf(h2Vrf).build();\n l3Builder.setName(E12_NAME).setAddresses(S1_ADDRESS).setOwner(_s1).setVrf(s1Vrf).build();\n l3Builder.setName(E21_NAME).setAddresses(S2_ADDRESS).setOwner(_s2).setVrf(s2Vrf).build();\n Interface.Builder l2Builder =\n Interface.builder()\n .setType(InterfaceType.PHYSICAL)\n .setActive(true)\n .setAccessVlan(VLAN)\n .setSwitchport(true)\n .setSwitchportMode(SwitchportMode.ACCESS);\n l2Builder.setName(SWP1_NAME).setOwner(_s1).setVrf(s1Vrf).build();\n l2Builder.setName(SWP2_NAME).setOwner(_s2).setVrf(s2Vrf).build();\n\n VniSettings.Builder vsb =\n VniSettings.builder()\n .setBumTransportMethod(BumTransportMethod.UNICAST_FLOOD_GROUP)\n .setUdpPort(UDP_PORT)\n .setVlan(VLAN)\n .setVni(VNI);\n s1Vrf\n .getVniSettings()\n .put(\n VNI,\n vsb.setBumTransportIps(ImmutableSortedSet.of(S2_ADDRESS.getIp()))\n .setSourceAddress(S1_ADDRESS.getIp())\n .build());\n s2Vrf\n .getVniSettings()\n .put(\n VNI,\n vsb.setBumTransportIps(ImmutableSortedSet.of(S1_ADDRESS.getIp()))\n .setSourceAddress(S2_ADDRESS.getIp())\n .build());\n return ImmutableMap.of(H1_NAME, _h1, H2_NAME, _h2, S1_NAME, _s1, S2_NAME, _s2);\n }", "public void setDylb(java.lang.String param) {\r\n localDylbTracker = param != null;\r\n\r\n this.localDylb = param;\r\n }", "private void setKlarosUrl(final String value) {\n\n klarosUrl = value;\n }", "@Override\r\n\tpublic void setGela_kop(int gela_kop) {\n\t\tsuper.setGela_kop(gela_kop);\r\n\t}", "public beranda() {\n initComponents();\n koneksi DB = new koneksi();\n DB.config();\n con = DB.con;\n st = DB.stm;\n ShowDataStore();\n ShowPermintaanStore();\n ShowPermintaanGudang();\n ShowDataStoreKurang15();\n }", "public String getConfig();", "void loadConfig() {\r\n\t\tFile file = new File(\"open-ig-mapeditor-config.xml\");\r\n\t\tif (file.canRead()) {\r\n\t\t\ttry {\r\n\t\t\t\tElement root = XML.openXML(file);\r\n\t\t\t\t\r\n\t\t\t\t// reposition the window\r\n\t\t\t\tElement eWindow = XML.childElement(root, \"window\");\r\n\t\t\t\tif (eWindow != null) {\r\n\t\t\t\t\tsetBounds(\r\n\t\t\t\t\t\tInteger.parseInt(eWindow.getAttribute(\"x\")),\r\n\t\t\t\t\t\tInteger.parseInt(eWindow.getAttribute(\"y\")),\r\n\t\t\t\t\t\tInteger.parseInt(eWindow.getAttribute(\"width\")),\r\n\t\t\t\t\t\tInteger.parseInt(eWindow.getAttribute(\"height\"))\r\n\t\t\t\t\t);\r\n\t\t\t\t\tsetExtendedState(Integer.parseInt(eWindow.getAttribute(\"state\")));\r\n\t\t\t\t}\r\n\t\t\t\tElement eLanguage = XML.childElement(root, \"language\");\r\n\t\t\t\tif (eLanguage != null) {\r\n\t\t\t\t\tString langId = eLanguage.getAttribute(\"id\");\r\n\t\t\t\t\tif (\"hu\".equals(langId)) {\r\n\t\t\t\t\t\tui.languageHu.setSelected(true);\r\n\t\t\t\t\t\tui.languageHu.doClick();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tui.languageEn.setSelected(true);\r\n\t\t\t\t\t\tui.languageEn.doClick();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tElement eSplitters = XML.childElement(root, \"splitters\");\r\n\t\t\t\tif (eSplitters != null) {\r\n\t\t\t\t\tsplit.setDividerLocation(Integer.parseInt(eSplitters.getAttribute(\"main\")));\r\n\t\t\t\t\ttoolSplit.setDividerLocation(Integer.parseInt(eSplitters.getAttribute(\"preview\")));\r\n\t\t\t\t\tfeaturesSplit.setDividerLocation(Integer.parseInt(eSplitters.getAttribute(\"surfaces\")));\r\n\t\t\t\t}\r\n\r\n\t\t\t\tElement eTabs = XML.childElement(root, \"tabs\");\r\n\t\t\t\tif (eTabs != null) {\r\n\t\t\t\t\tpropertyTab.setSelectedIndex(Integer.parseInt(eTabs.getAttribute(\"selected\")));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tElement eLights = XML.childElement(root, \"lights\");\r\n\t\t\t\tif (eLights != null) {\r\n\t\t\t\t\talphaSlider.setValue(Integer.parseInt(eLights.getAttribute(\"preview\")));\r\n\t\t\t\t\talpha = Float.parseFloat(eLights.getAttribute(\"map\"));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tElement eMode = XML.childElement(root, \"editmode\");\r\n\t\t\t\tif (eMode != null) {\r\n\t\t\t\t\tif (\"true\".equals(eMode.getAttribute(\"type\"))) {\r\n\t\t\t\t\t\tui.buildButton.doClick();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tElement eView = XML.childElement(root, \"view\");\r\n\t\t\t\tif (eView != null) {\r\n\t\t\t\t\tui.viewShowBuildings.setSelected(false);\r\n\t\t\t\t\tif (\"true\".equals(eView.getAttribute(\"buildings\"))) {\r\n\t\t\t\t\t\tui.viewShowBuildings.doClick();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tui.viewSymbolicBuildings.setSelected(false);\r\n\t\t\t\t\tif (\"true\".equals(eView.getAttribute(\"minimap\"))) {\r\n\t\t\t\t\t\tui.viewSymbolicBuildings.doClick();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tui.viewTextBackgrounds.setSelected(false);\r\n\t\t\t\t\tif (\"true\".equals(eView.getAttribute(\"textboxes\"))) {\r\n\t\t\t\t\t\tui.viewTextBackgrounds.doClick();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tui.viewTextBackgrounds.setSelected(false);\r\n\t\t\t\t\tif (\"true\".equals(eView.getAttribute(\"textboxes\"))) {\r\n\t\t\t\t\t\tui.viewTextBackgrounds.doClick();\r\n\t\t\t\t\t}\r\n\t\t\t\t\trenderer.scale = Double.parseDouble(eView.getAttribute(\"zoom\"));\r\n\t\t\t\t\t\r\n\t\t\t\t\tui.viewStandardFonts.setSelected(\"true\".equals(eView.getAttribute(\"standard-fonts\")));\r\n\t\t\t\t\tui.viewPlacementHints.setSelected(!\"true\".equals(eView.getAttribute(\"placement-hints\")));\r\n\t\t\t\t\tui.viewPlacementHints.doClick();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tElement eSurfaces = XML.childElement(root, \"custom-surface-names\");\r\n\t\t\t\tif (eSurfaces != null) {\r\n\t\t\t\t\tfor (Element tile : XML.childrenWithName(eSurfaces, \"tile\")) {\r\n\t\t\t\t\t\tTileEntry te = new TileEntry();\r\n\t\t\t\t\t\tte.id = Integer.parseInt(tile.getAttribute(\"id\"));\r\n\t\t\t\t\t\tte.surface = tile.getAttribute(\"type\");\r\n\t\t\t\t\t\tte.name = tile.getAttribute(\"name\");\r\n\t\t\t\t\t\tcustomSurfaceNames.add(te);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tElement eBuildigns = XML.childElement(root, \"custom-building-names\");\r\n\t\t\t\tif (eBuildigns != null) {\r\n\t\t\t\t\tfor (Element tile : XML.childrenWithName(eBuildigns, \"tile\")) {\r\n\t\t\t\t\t\tTileEntry te = new TileEntry();\r\n\t\t\t\t\t\tte.id = Integer.parseInt(tile.getAttribute(\"id\"));\r\n\t\t\t\t\t\tte.surface = tile.getAttribute(\"type\");\r\n\t\t\t\t\t\tte.name = tile.getAttribute(\"name\");\r\n\t\t\t\t\t\tcustomBuildingNames.add(te);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tElement eFilter = XML.childElement(root, \"filter\");\r\n\t\t\t\tif (eFilter != null) {\r\n\t\t\t\t\tfilterSurface.setText(eFilter.getAttribute(\"surface\"));\r\n\t\t\t\t\tfilterBuilding.setText(eFilter.getAttribute(\"building\"));\r\n\t\t\t\t}\r\n\t\t\t\tElement eAlloc = XML.childElement(root, \"allocation\");\r\n\t\t\t\tif (eAlloc != null) {\r\n\t\t\t\t\tui.allocationPanel.availableWorkers.setText(eAlloc.getAttribute(\"worker\"));\r\n\t\t\t\t\tui.allocationPanel.strategies.setSelectedIndex(Integer.parseInt(eAlloc.getAttribute(\"strategy\")));\r\n\t\t\t\t}\r\n\t\t\t\tElement eRecent = XML.childElement(root, \"recent\");\r\n\t\t\t\tif (eRecent != null) {\r\n\t\t\t\t\tfor (Element r : XML.childrenWithName(eRecent, \"entry\")) {\r\n\t\t\t\t\t\taddRecentEntry(r.getAttribute(\"file\")); \r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} catch (IOException ex) {\r\n\t\t\t\tex.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public ECPunkt oblKluczaPublicznego()\n\t{\n\t\tkluczPubliczny = new ECPunkt( G.wielokrotnoscPunktu(G, new BigInteger(kluczPrywatny.toString()) ) );\n\t\treturn kluczPubliczny;\n\t}", "@Override\r\n\t\tpublic String nazivLika() {\r\n\t\t\treturn \"ELIPSA\";\r\n\t\t}", "private void buildBS60Url() {\n url = \"http://q.lizone.net/index/index/BSline/res/60/label/\" + dataItem.label;//API 2.0\n }", "@Override\n \t\t\t\tpublic String getGraphName() {\n \t\t\t\t\treturn \"http://opendata.cz/data/namedGraph/3\";\n \t\t\t\t}", "public Layer konstruisiFinalniLayer(ArrayList<Integer> a) {\n\t\tLayer lejer = new Layer(sirina, visina);\r\n\t\tArrayList<Layer> aktivniLejeri=new ArrayList();\r\n\r\n\t\tif (a.size() == 0) return lejer;\r\n\t\tfor ( Integer i : layers.keySet()) {\r\n\t\t\tif (inAktivni(i, a)) {\r\n\t\t\t\taktivniLejeri.add(layers.get(i));\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (aktivniLejeri.size() == 0) return lejer;\r\n\t\tfor (int i = 0; i < sirina; i++) {\r\n\t\t\tfor (int j = 0; j < visina; j++) {\r\n\t\t\t\tPiksel piksel = aktivniLejeri.get(0).getPixel(i, j);\r\n\t\t\t\tdouble r = piksel.getR() * 1.0 / 255;\r\n\t\t\t\tdouble g = piksel.getG() * 1.0 / 255;\r\n\t\t\t\tdouble b = piksel.getB() * 1.0 / 255;\r\n\t\t\t\tdouble opacity = piksel.getOpacity() * 1.0 / 255;\r\n\r\n\t\t\t\t\r\n\t\t\t\tif (i == 410 && j == 40) {\r\n\t\t\t\t\t//std::cout << \"s\";\r\n\t\t\t\t}\r\n\t\t\t\tif (i == 40 && j == 410) {\r\n\t\t\t\t\t//std::cout << \"s\";\r\n\t\t\t\t}\r\n\t\t\t\t\tfor (int k = 1; k != aktivniLejeri.size(); k++) {\r\n\t\t\t\t\t\tif (opacity == 1.0) { continue; }\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tPiksel p1 = aktivniLejeri.get(k).getPixel(i,j);\r\n\t\t\t\t\t\tdouble r1 = p1.getR() * 1.0 / 255;\r\n\t\t\t\t\t\tdouble g1 = p1.getG() * 1.0 / 255;\r\n\t\t\t\t\t\tdouble b1 = p1.getB() * 1.0 / 255;\r\n\t\t\t\t\t\tdouble opacity1= p1.getOpacity() * 1.0 / 255;\r\n\t\t\t\t\t\tif (opacity1 == 0)continue;\r\n\t\t\t\t\t\tdouble temp = (1 - opacity)* opacity1 ;\r\n\t\t\t\t\t\tdouble opt = opacity + temp;\r\n\t\t\t\t\t\tdouble temp2 = temp / opt;\r\n\t\t\t\t\t\tdouble temp3 = opacity / opt;\r\n\t\t\t\t\t\tdouble rt = r * temp3 + r1 * temp2;\r\n\t\t\t\t\t\tdouble gt = g * temp3 + g1 * temp2;\r\n\t\t\t\t\t\tdouble bt = b * temp3 + b1 * temp2;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tr = rt;\r\n\t\t\t\t\t\tb = bt;\r\n\t\t\t\t\t\tg = gt;\r\n\t\t\t\t\t\topacity = opt;\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tPiksel novi = new Piksel(r*255, g*255, b*255, 0, opacity*255);\r\n\t\t\t\tlejer.overwritepixel(i, j, novi);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn lejer;\r\n\t\r\n\r\n\r\n\r\n\r\n\r\n\t}", "String getLayer1Info();", "public String dajPopis() {\n return super.dajPopis() + \"KUZLO \\nJedna tebou vybrata jednotka ziska 3-nasobnu silu\";\n }", "public DretvaZaObraduPoruka(WebKonfiguracija config, ServerSocket server) {\n this.server = server;\n this.config = config;\n this.setName(\"DretvaZaObraduPoruka\");\n }", "public String getConfig () { \n StringBuffer ar_sb = new StringBuffer();\n if (active_relationships.size() > 0) {\n ar_sb.append(Utils.encToURL(active_relationships.get(0)));\n for (int i=1;i<active_relationships.size();i++) ar_sb.append(\",\" + Utils.encToURL(active_relationships.get(i)));\n }\n\n return \"RTGraphPanel\" + BundlesDT.DELIM +\n \"nodesize=\" + Utils.encToURL(nodeSize()) + BundlesDT.DELIM +\n \"nodecolor=\" + Utils.encToURL(nodeColor()) + BundlesDT.DELIM +\n\t \"linksize=\" + Utils.encToURL(linkSize()) + BundlesDT.DELIM +\n\t \"linkcolor=\" + Utils.encToURL(linkColor()) + BundlesDT.DELIM +\n\t \"linkcurves=\" + Utils.encToURL(\"\" + linkCurves()) + BundlesDT.DELIM +\n\t \"linktrans=\" + Utils.encToURL(\"\" + linksTransparent()) + BundlesDT.DELIM +\n\t \"arrows=\" + Utils.encToURL(\"\" + drawArrows()) + BundlesDT.DELIM +\n\t \"timing=\" + Utils.encToURL(\"\" + drawTiming()) + BundlesDT.DELIM +\n\t \"strict=\" + Utils.encToURL(\"\" + strictMatches()) + BundlesDT.DELIM +\n\t \"dynlabels=\" + Utils.encToURL(\"\" + dynamicLabels()) + BundlesDT.DELIM +\n\t \"nodelabels=\" + Utils.encToURL(\"\" + nodeLabels()) + BundlesDT.DELIM +\n\t \"linklabels=\" + Utils.encToURL(\"\" + linkLabels()) + BundlesDT.DELIM +\n\t \"nlabels=\" + commaDelimited(nodeLabelsArray()) + BundlesDT.DELIM +\n\t \"clabels=\" + commaDelimited(colorLabelsArray()) + BundlesDT.DELIM +\n\t \"llabels=\" + commaDelimited(linkLabelsArray()) +\n\t (ar_sb.length() > 0 ? BundlesDT.DELIM + \"relates=\" + ar_sb.toString() : \"\");\n }", "@Override\n \t\t\t\tpublic String getMetadataGraphName() {\n \t\t\t\t\treturn \"http://opendata.cz/data/metadata\";\n \t\t\t\t}", "public void loadConfig(){\n this.saveDefaultConfig();\n //this.saveConfig();\n\n\n }", "public String getUrlName() {\n\t\treturn \"neoload\";\n\t}", "public Kelola_Data_Dokter() {\n initComponents();\n }", "ArrayList<ArrayList<String>> get_config(){\n return config_file.r_wartosci();\n }", "public abstract String getConfig();", "public data_kelahiran() {\n initComponents();\n ((javax.swing.plaf.basic.BasicInternalFrameUI)this.getUI()).setNorthPane(null);\n autonumber();\n data_tabel();\n lebarKolom();\n \n \n \n }", "public void configurarPeriodoNoturno() {\n Dig_Config dig = new Dig_Config(this, true);\n dig.setVisible(true);\n }", "Landsat8OLISensor(imgViewer applet)\n {\n super(applet,\"Landsat 8 OLI\", \"l8oli\", \"LANDSAT_8\",\n \"showbrowse.cgi\", \"showmetadata.cgi\", \"USGS_logo.gif\",\n \"http://www.usgs.gov\",\n \"https://lta.cr.usgs.gov/L8\",\n \"http://landsat.usgs.gov/tools_acq.php\",\n resolutions,borderX,borderY,Color.YELLOW);\n\n numQualityValues = 1; // Yes, L8 only has 1\n qualityLimit = 9;\n\n // the Landsat L1T scenes are downloadable\n isDownloadable = true;\n mightBeDownloadable = true;\n maxScenesPerOrder = 100;\n\n // set the navigation model to the WRS-2 descending model\n navModel = new WRS2Model();\n }", "public void podstawZapiszDaneWielePlikow() throws IOException {\r\n\t\tBufferedWriter bw = null; // tutaj zaSztywno\r\n\t\tString[] wektorDanych;\r\n\t\tString nazwaPlikuWynikowego = null;\r\n\t\tint licznik = 0;\r\n\t\twhile ((wektorDanych = daneEgzemplarza.getNextCorrectData()) != null) {\r\n\t\t\t++licznik;\r\n\t\t\tnazwaPlikuWynikowego = \"./wynik/wynik\" + Integer.toString(licznik)\r\n\t\t\t\t\t+ \".\" + rozszerzenieSzablonu;\r\n\t\t\tbw = new BufferedWriter(new FileWriter(nazwaPlikuWynikowego));\r\n\t\t\tfor (String[] s : calaZawartoscRozsep) {\r\n\t\t\t\tfor (String wyraz : s) {\r\n\t\t\t\t\tif (wyraz.equals(interpretujWyraz(wyraz)))\r\n\t\t\t\t\t\tfor (int i = 0; i < zmienne.length; ++i) {\r\n\t\t\t\t\t\t\tif (wyraz.equals(zmienne[i])) {\r\n\t\t\t\t\t\t\t\twyraz = wektorDanych[i];\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\twyraz = interpretujWyraz(wyraz);\r\n\r\n\t\t\t\t\tbw.write(wyraz);\r\n\t\t\t\t}\r\n\t\t\t\tbw.newLine();\r\n\t\t\t}\r\n\t\t\tbw.close();\r\n\t\t}\r\n\t}", "public void loadDisabledWorlds() {\n disabledWorlds = ConfigManager.getInstance().getDisabledWorlds();\n }", "private static void loadConfig() {\n\t\trxID = (Integer) ConfigStoreRedstoneWireless.getInstance(\n\t\t\t\t\"WirelessRedstone\").get(\"Receiver.ID\", Integer.class,\n\t\t\t\tnew Integer(rxID));\n\t\ttxID = (Integer) ConfigStoreRedstoneWireless.getInstance(\n\t\t\t\t\"WirelessRedstone\").get(\"Transmitter.ID\", Integer.class,\n\t\t\t\tnew Integer(txID));\n\t}", "public String getNomeConfigurazione() {\n return null;\r\n }", "protected Properties loadData() {\n/* 362 */ Properties mapData = new Properties();\n/* */ try {\n/* 364 */ mapData.load(WorldMapView.class.getResourceAsStream(\"worldmap-small.properties\"));\n/* 365 */ } catch (IOException e) {\n/* 366 */ e.printStackTrace();\n/* */ } \n/* */ \n/* 369 */ return mapData;\n/* */ }", "public static void dodavanjeBicikl() {\n\t\tString vrstaVozila = \"Bicikl\";\n\t\tString regBr = UtillMethod.unosRegBroj();\n\t\tGorivo gorivo = Main.nista;\n\t\tint brServisa = 1;\n\t\tdouble potrosnja100 = 0;\n\t\tSystem.out.println(\"Unesite broj km koje je vozilo preslo:\");\n\t\tdouble predjeno = UtillMethod.unesiteBroj();\n\t\tdouble preServisa = 700;\n\t\tdouble cenaServisa = 5000;\n\t\tSystem.out.println(\"Unesite cenu vozila za jedan dan:\");\n\t\tdouble cenaDan = UtillMethod.unesiteBroj();\n\t\tint brSedist = 1;\n\t\tint brVrata = 0;\n\t\tboolean vozObrisano = false;\n\t\tArrayList<Gorivo> gorivaVozila = new ArrayList<Gorivo>();\n\t\tgorivaVozila.add(gorivo);\n\t\tArrayList<Servis> servisiNadVozilom = new ArrayList<Servis>();\n\t\tBicikl vozilo = new Bicikl(vrstaVozila, regBr, gorivaVozila, brServisa, potrosnja100, predjeno, preServisa,\n\t\t\t\tcenaServisa, cenaDan, brSedist, brVrata, vozObrisano, servisiNadVozilom);\n\t\tUtillMethod.prviServis(vozilo, predjeno);\n\t\tMain.getVozilaAll().add(vozilo);\n\t\tSystem.out.println(\"Novo vozilo je uspesno dodato u sistem!\");\n\t\tSystem.out.println(\"--------------------------------------\");\n\t}", "private void loadData() {\n\t\tlogger.trace(\"loadData() is called\");\n\t\t\n\t\ttry {\n\t\t\tFileInputStream fileIn = new FileInputStream(\"server-info.dat\");\n\t\t\tObjectInputStream in = new ObjectInputStream(fileIn);\n\t\t\tjokeFile = (String ) in.readObject();\n\t\t\tkkServerPort = (int) in.readObject();\n\t\t\tin.close();\n\t\t} catch (Exception e) {\n\t\t\tjokeFile = \"kk-jokes.txt\";\n\t\t\tkkServerPort = 5555;\n\t\t\t//e.printStackTrace();\n\t\t\tSystem.err.println(\"server-info.dat file is likely missing but it should be created automatically when this app is closed.\");\n\t\t\tlogger.info(\"server-info.dat file is likely missing but it should be created automatically when this app is closed.\");\n\t\t}\t\n\t}", "public void setURL() {\n\t\tURL = Constant.HOST_KALTURA+\"/api_v3/?service=\"+Constant.SERVICE_KALTURA_LOGIN+\"&action=\"\n\t\t\t\t\t\t+Constant.ACTION_KALTURA_LOGIN+\"&loginId=\"+Constant.USER_KALTURA+\"&password=\"+Constant.PASSWORD_KALTURA+\"&format=\"+Constant.FORMAT_KALTURA;\n\t}", "@Override\n public void setLoadOnStartup(int los) {\n }", "public DashboardPondok() {\n initComponents();\n setExtendedState(JFrame.MAXIMIZED_BOTH);\n waktu();\n try {\n int kodee = 0;\n\n Koneksi_DB objkoneksi = new Koneksi_DB();\n Connection con = objkoneksi.bukakoneksi();\n Statement st = con.createStatement();\n String SQL = \"select kode from enabled\";\n ResultSet RS = st.executeQuery(SQL);\n while (RS.next()) {\n kodee = RS.getInt(1);\n }\n if (kodee == 11) {\n menusiswa.setEnabled(false);\n menumapel.setEnabled(false);\n menunilai.setEnabled(false);\n menuguru.setEnabled(false);\n menureport.setEnabled(true);\n menusetting.setEnabled(true);\n subuser.setEnabled(false);\n sublog.setEnabled(true);\n subclose.setEnabled(true);\n sublaporansantri.setEnabled(true);\n sublaporanguru.setEnabled(false);\n sublaporanall.setEnabled(true);\n } else if (kodee == 12) {\n menusiswa.setEnabled(false);\n menumapel.setEnabled(false);\n menunilai.setEnabled(true);\n menuguru.setEnabled(false);\n menureport.setEnabled(true);\n menusetting.setEnabled(true);\n subuser.setEnabled(false);\n sublog.setEnabled(true);\n subclose.setEnabled(true);\n } else if (kodee == 13) {\n menusiswa.setEnabled(true);\n menumapel.setEnabled(true);\n menunilai.setEnabled(true);\n menuguru.setEnabled(true);\n menureport.setEnabled(true);\n menusetting.setEnabled(true);\n subuser.setEnabled(true);\n sublog.setEnabled(true);\n subclose.setEnabled(true);\n }\n } catch (SQLException e) {\n }\n }", "public void setNzyl(Double nzyl) {\n this.nzyl = nzyl;\n }", "public void podstawZapiszDaneJedenPlik() throws IOException {\r\n\t\tBufferedWriter bw = new BufferedWriter(new FileWriter(\"./wynik/wynik.\"\r\n\t\t\t\t+ rozszerzenieSzablonu));\r\n\t\tString[] wektorDanych;\r\n\t\twhile ((wektorDanych = daneEgzemplarza.getNextCorrectData()) != null) {\r\n\t\t\tfor (String[] s : calaZawartoscRozsep) {\r\n\t\t\t\tfor (String wyraz : s) {\r\n\t\t\t\t\tif (wyraz.equals(interpretujWyraz(wyraz)))\r\n\t\t\t\t\t\tfor (int i = 0; i < zmienne.length; ++i) {\r\n\t\t\t\t\t\t\tif (wyraz.equals(zmienne[i])) {\r\n\t\t\t\t\t\t\t\twyraz = wektorDanych[i];\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\twyraz = interpretujWyraz(wyraz);\r\n\r\n\t\t\t\t\tbw.write(wyraz);\r\n\t\t\t\t}\r\n\t\t\t\tbw.newLine();\r\n\t\t\t}\r\n\t\t\tbw.write(\"---------------------------------------------------\");\r\n\t\t\tbw.newLine();\r\n\t\t}\r\n\t\tbw.close();\r\n\t}", "private boolean isLoptaNaPodlozi(){\n\t\tif (loptaY >= LOPTA_MIN_Y && loptaY <= LOPTA_MAX_Y){\n\t\t\treturn true;\n\t\t}else {\n\t\t\treturn false;\n\t\t}\n\t}", "public RekapKamar() {\n Koneksi DB = new Koneksi();\n DB.koneksi();\n con = DB.conn;\n stat = DB.stmn;\n initComponents();\n loadTabel();\n }", "protected void initconfig(Class<? extends Globe> globeTypeClass) {\r\n\t\t// Configuration.setValue(AVKey.GLOBE_CLASS_NAME, EarthFlat.class.getName());\r\n\t\tConfiguration.setValue(AVKey.GLOBE_CLASS_NAME, globeTypeClass.getName());\r\n\t\tConfiguration.setValue(AVKey.VIEW_CLASS_NAME, BasicOrbitView.class.getName()); // or FlatOrbitView.class.getName()\r\n\t\t\t\r\n//\t\tConfiguration\r\n//\t\t\t\t.setValue(\r\n//\t\t\t\t\t\tAVKey.LAYERS_CLASS_NAMES,\r\n//\t\t\t\t\t\t\"gov.nasa.worldwind.layers.CompassLayer,\"\r\n//\t\t\t\t\t\t\t\t+ \"gov.nasa.worldwind.layers.Earth.NASAWFSPlaceNameLayer,\"\r\n//\t\t\t\t\t\t\t\t+ \"gov.nasa.worldwind.layers.Earth.BMNGOneImage,\"\r\n//\t\t\t\t\t\t\t\t+ \"gov.nasa.worldwind.layers.Earth.BMNGWMSLayer,\"\r\n//\t\t\t\t\t\t\t\t+ \"gov.nasa.worldwind.layers.Earth.LandsatI3WMSLayer,\"\r\n//\t\t\t\t\t\t\t\t+ \"gov.nasa.worldwind.layers.Earth.USGSUrbanAreaOrtho,\"\r\n//\t\t\t\t\t\t\t\t+ \"gov.nasa.worldwind.layers.Earth.MSVirtualEarthLayer,\"\r\n//\t\t\t\t\t\t\t\t+ \"gov.nasa.worldwind.layers.Earth.CountryBoundariesLayer,\" // Careful, this layer can get hidden by the other layers.\r\n//\t\t\t\t\t\t\t\t);\r\n\r\n\t\tSystem.setProperty(\"java.net.useSystemProxies\", \"true\");\r\n\t\tif (Configuration.isMacOS()) {\r\n\t\t\tSystem.setProperty(\"apple.laf.useScreenMenuBar\", \"true\");\r\n\t\t\tSystem.setProperty(\r\n\t\t\t\t\t\"com.apple.mrj.application.apple.menu.about.name\",\r\n\t\t\t\t\t\"World Wind Application\");\r\n\t\t\tSystem.setProperty(\"com.apple.mrj.application.growbox.intrudes\",\r\n\t\t\t\t\t\"false\");\r\n\t\t\tSystem.setProperty(\"apple.awt.brushMetalLook\", \"true\");\r\n\t\t} else if (Configuration.isWindowsOS()) {\r\n\t\t\t// Prevent flashing during window resizing\r\n\t\t\tSystem.setProperty(\"sun.awt.noerasebackground\", \"true\");\r\n\t\t}\r\n\t}", "public void nastav() {\n\t\ttabulkaZiak.setMaxWidth(velkostPolickaX * 3 + 2);\n\t\ttabulkaZiak.setPlaceholder(new Label(\"Žiadne známky.\"));\n\n\t}", "public void setNrLoja(int nrLoja) {\n this.nrLoja = nrLoja;\n }", "public void load()\n\t{\n\t\ttry {\n\t\t\tIFile file = project.getFile(PLAM_FILENAME);\n\t\t if (file.exists()) {\n\t\t\t\tInputStream stream= null;\n\t\t\t\ttry {\n\t\t\t\t\tstream = new BufferedInputStream(file.getContents(true));\n\t\t\t\t SAXReader reader = new SAXReader();\n\t\t\t\t Document document = reader.read(stream);\n\t\t\t\t \n\t\t\t\t Element root = document.getRootElement();\n\n\t\t\t\t String url = root.elementTextTrim(\"server-url\");\n\t\t\t\t setServerURL((url != null) ? new URL(url) : null);\n\t\t\t\t \n\t\t\t\t setUserName(root.elementTextTrim(\"username\"));\n\t\t\t\t setPassword(root.elementTextTrim(\"password\"));\n\t\t\t\t setProductlineId(root.elementTextTrim(\"pl-id\"));\n \n\t\t\t\t} catch (CoreException e) {\n\t\t\t\t\t\n\t\t\t\t} finally {\n\t\t\t\t if (stream != null)\n\t\t\t\t stream.close();\n\t\t\t\t}\n\t\t }\n\t\t} catch (DocumentException e) {\n\t\t\tlogger.info(\"Error while parsing PLAM config.\", e);\n\t\t} catch (IOException e) {\n\t\t}\n\t}", "Integer getNLNDskp();", "public static void loadSettings( JFormattedTextField[] tf_verotiedot, \n \t\t\t\t\t\t\t\t JFormattedTextField[] tf_lisat,\n \t\t\t\t\t\t\t\t JCheckBox[] cb_omalisa,\n \t\t\t\t\t\t\t\t JFormattedTextField[] tf_omalisa,\n \t\t\t\t\t\t\t\t boolean defaultFile) {\n \t\n \t// READ FILE TO A STRING\n \tBufferedReader br;\n \tString str = \"cfg\\\\saved.dat\";\n \t\n \tif (defaultFile)\n \t\tstr = \"cfg\\\\default.dat\";\n \t\n\t\ttry {\n\t\t\tbr = new BufferedReader( new FileReader(str));\n\t\t\tstr = br.readLine();\n\t\t\tbr.close();\n\t\t\t\n\t\t\n\t\t\t// LOAD VALUES FROM STRING\n\t\t\tString[] values = str.split(dataSep);\n\t\t\tint idx = 0;\n\t\t\t\n\t\t\t\n\t\t\t// VEROTIEDOT\n\t\t\tfor(int i=0; i<8; i++) {\n\t\t\t\ttf_verotiedot[i].setValue( Double.parseDouble( values[idx] ) );\n\t\t\t\tidx++;\n\t\t\t}\n\t\t\t\n\t\t\t// LISÄT\n\t\t\tfor(int i=0; i<13; i++) {\n\t \t\tif ( i%3==0 )\n\t \t\t\ttf_lisat[i].setValue( Double.parseDouble( values[idx] ) );\n\t \t\t\n\t \t\telse \n\t \t\t\ttf_lisat[i].setValue( values[idx] );\n\t \t\t\n\t \t\t\n\t \t\tidx++;\n\t \t}\n\t\t\t\n\t\t\t// OMALISÄ PÄIVÄT\n\t\t\tfor(int i=0; i<7; i++) {\n\t\t\t\tcb_omalisa[i].setSelected( Boolean.parseBoolean( values[idx] ) );\n\t\t\t\tidx++;\n\t\t\t}\n\t\t\t\n\t\t\t// OMALISÄ MUUT\n\t\t\ttf_omalisa[0].setValue( values[idx] );\n\t\t\tidx++;\n\t\t\t\n\t\t\ttf_omalisa[0].setValue( values[idx] );\n\t\t\tidx++;\n\t\t\t\n\t\t\ttf_omalisa[2].setValue( Double.parseDouble( values[idx] ) );\n\t\t\tcb_omalisa[7].setSelected( Boolean.parseBoolean( values[idx+1] ) );\n\t\t\n\t\t\n\t\t} catch (Exception e) {\n\t\t\tsysMsg.newErrorMessage(\tnull,\n\t\t\t\t\t\t\t\t\t\"Tietojen lataaminen ei onnistunut\", \n\t\t\t\t\t\t\t\t\t\"VIRHE: Verotiedot\");\n\t\t\te.printStackTrace();\n\t\t}\n\n }", "private static boolean fetchDefaultData() {\n if (!Data.DEBUG) return false;\n System.err.println(\"We cannot fetch from any online sources, so default weather data has been injected.\");\n sky = Util.rand(\"partly sunny\", \"mostly cloudy\", \"rainy\", \"mostly sunny\");\n windDir = Util.rand(\"north\", \"south\", \"east\", \"west\");\n windSpeed = Util.rand(0, 5, 10, 15);\n temp = Util.rand(40, 50, 60, 70, 80);\n sunriseHour = 6.5;\n sunsetHour = 20.0;\n return true;\n }", "private void setOverlay() {\n //Initial Map\n mapOverlayOptions = new GroundOverlayOptions()\n .image(BitmapDescriptorFactory.fromResource(R.drawable.kmuttmap))\n .position(position_Initmap, map_wide, map_high);\n\n //Red Line\n red_lineOptions = new GroundOverlayOptions()\n .image(BitmapDescriptorFactory.fromResource(R.drawable.red_line))\n .position(position_Redline, redline_wide, redline_high);\n\n //Yellow Line\n yellow_lineOptions = new GroundOverlayOptions()\n .image(BitmapDescriptorFactory.fromResource(R.drawable.yellow_line))\n .position(position_Yellowline, yellowline_wide, yellowline_high);\n\n //Map with label\n map_labelOverlayOptions = new GroundOverlayOptions()\n .image(BitmapDescriptorFactory.fromResource(R.drawable.kmuttmap_label2))\n .position(position_Initmap, map_wide, map_high);\n\n }" ]
[ "0.5290771", "0.52010334", "0.51491934", "0.51038146", "0.51016676", "0.5032046", "0.5008936", "0.49810347", "0.49703732", "0.4970352", "0.49618396", "0.49003077", "0.4878204", "0.4861584", "0.48430493", "0.48271602", "0.48145393", "0.48046696", "0.48024938", "0.47984338", "0.4794611", "0.4791007", "0.47901624", "0.47896022", "0.47847006", "0.47836342", "0.47828475", "0.47752908", "0.4772106", "0.47534814", "0.47530526", "0.474569", "0.47386366", "0.47367337", "0.47268972", "0.4720996", "0.4717197", "0.47108442", "0.4700425", "0.46942416", "0.46860248", "0.4685191", "0.46834776", "0.46788937", "0.46710196", "0.46625033", "0.46619174", "0.46520078", "0.46458787", "0.4642406", "0.46223384", "0.46216768", "0.4614948", "0.4613258", "0.46119115", "0.46099275", "0.46097663", "0.4601223", "0.4601125", "0.4598167", "0.4596352", "0.45948815", "0.45928028", "0.45834753", "0.45768774", "0.45744243", "0.4564327", "0.45635813", "0.4561399", "0.4561197", "0.45592162", "0.45570594", "0.4556065", "0.45451275", "0.4536432", "0.45328736", "0.45231587", "0.45181048", "0.4517116", "0.45121112", "0.45119148", "0.45103732", "0.45094568", "0.449991", "0.44993144", "0.44989896", "0.44943503", "0.44940048", "0.44923532", "0.44922924", "0.44910064", "0.4488751", "0.44847605", "0.4482522", "0.4480474", "0.44783005", "0.4476008", "0.44746745", "0.4472592", "0.44713864" ]
0.5811314
0
Display a dialog with an edit text box. The user can enter their email and receive instructions in that email on how to recover their password. The email used must be the same email used to register.
public void forgotPassword() { new MaterialDialog.Builder(activity) .title(R.string.dialog_forgot_password_title) .content(R.string.dialog_forgot_password_content) .inputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS) .theme(Theme.LIGHT) .positiveText(R.string.dialog_forgot_password_positive_button) .negativeText(R.string.dialog_forgot_password_negative_button) .widgetColorRes(R.color.colorPrimary) .positiveColorRes(R.color.colorPrimary) .negativeColorRes(R.color.colorPrimary) .autoDismiss(false) .cancelable(false) .onAny(new MaterialDialog.SingleButtonCallback() { @Override public void onClick(@NonNull MaterialDialog dialog, @NonNull DialogAction which) { if(which == DialogAction.POSITIVE) { try { //Check if the email is valid. String email = dialog.getInputEditText().getText().toString(); if(!Patterns.EMAIL_ADDRESS.matcher(email).matches()) { //TODO send recovery instructions to reset password. dialog.dismiss(); } else { dialog.getInputEditText().setText(""); dialog.getInputEditText().setError( activity.getResources().getString (R.string.dialog_forgot_password_invalid_email)); } } catch(NullPointerException ex) { ex.printStackTrace(); dialog.dismiss(); } } else if(which == DialogAction.NEGATIVE) { dialog.dismiss(); } } }) .input(R.string.dialog_edit_text_forgot_password_hint, R.string.dialog_edit_text_forgot_password_prefill, new MaterialDialog.InputCallback() { @Override public void onInput(@NonNull MaterialDialog dialog, CharSequence input) { } }).show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void showChangeEmailDialog() {\n if(dialog != null && dialog.isShowing()) return;\n\n LayoutInflater inflater = LayoutInflater.from(this);\n View view = inflater.inflate(R.layout.dialog_change_email, null);\n\n // The dialog that will appear\n AlertDialog.Builder builder = new AlertDialog.Builder(this, R.style.CustomDialogTheme)\n .setView(view)\n .setCancelable(true);\n\n Typeface tf = ResourcesCompat.getFont(getApplicationContext(), R.font.catamaran);\n\n ImageButton closeButton = (ImageButton) view.findViewById(R.id.closeDialogButton);\n final AppCompatButton confirmChangeButton = (AppCompatButton) view.findViewById(R.id.confirmChangeEmailBtn);\n\n TextInputLayout tilPassword = view.findViewById(R.id.tilPassword);\n TextInputLayout tilEmail = view.findViewById(R.id.tilEmail);\n TextInputLayout tilNewEmail = view.findViewById(R.id.tilNewEmail);\n TextInputLayout tilReEnterNewEmail = view.findViewById(R.id.tilReEnterNewEmail);\n passwordEditText = view.findViewById(R.id.input_password);\n emailEditText = view.findViewById(R.id.input_email);\n newEmailEditText = view.findViewById(R.id.input_newEmail);\n reEnterNewEmailEditText = view.findViewById(R.id.input_reEnterNewEmail);\n\n // Setting custom font to dialog\n tilPassword.setTypeface(tf);\n tilEmail.setTypeface(tf);\n tilNewEmail.setTypeface(tf);\n tilReEnterNewEmail.setTypeface(tf);\n passwordEditText.setTypeface(tf);\n emailEditText.setTypeface(tf);\n newEmailEditText.setTypeface(tf);\n reEnterNewEmailEditText.setTypeface(tf);\n\n // Creating dialog and adjusting size\n dialog = builder.create();\n dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);\n dialog.show();\n\n closeButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n dialog.dismiss();\n }\n });\n\n // Override the button handler to check if data is valid\n confirmChangeButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n confirmChangeButton.setEnabled(false);\n\n boolean valid = true;\n\n String password = passwordEditText.getText().toString();\n String email = emailEditText.getText().toString();\n String newEmail = newEmailEditText.getText().toString();\n String reEnterNewEmail = reEnterNewEmailEditText.getText().toString();\n\n // check email\n if (email.isEmpty() || !Patterns.EMAIL_ADDRESS.matcher(email).matches()) {\n emailEditText.setError(getString(R.string.error_email));\n valid = false;\n } else {\n emailEditText.setError(null);\n }\n\n // check email\n if (newEmail.isEmpty() || !Patterns.EMAIL_ADDRESS.matcher(newEmail).matches()) {\n newEmailEditText.setError(getString(R.string.error_email));\n valid = false;\n } else if (newEmail.equals(email)) {\n newEmailEditText.setError(getString(R.string.error_email_change_equal));\n valid = false;\n } else{\n newEmailEditText.setError(null);\n }\n\n // check email\n if (reEnterNewEmail.isEmpty() || !Patterns.EMAIL_ADDRESS.matcher(reEnterNewEmail).matches()) {\n reEnterNewEmailEditText.setError(getString(R.string.error_email));\n valid = false;\n } else if (reEnterNewEmail.equals(email)) {\n reEnterNewEmailEditText.setError(getString(R.string.error_email_change_equal));\n valid = false;\n } else if (!reEnterNewEmail.equals(newEmail)) {\n reEnterNewEmailEditText.setError(getString(R.string.error_email_match));\n valid = false;\n } else {\n reEnterNewEmailEditText.setError(null);\n }\n\n // check password\n if (password.isEmpty() || password.trim().isEmpty() || password.length() < 4 || password.length() > 10) {\n passwordEditText.setError(getString(R.string.error_password));\n valid = false;\n } else {\n passwordEditText.setError(null);\n }\n\n if(valid)\n onChangeEmail(password, email, newEmail, reEnterNewEmail);\n else\n confirmChangeButton.setEnabled(true);\n }\n });\n\n WindowManager.LayoutParams lp = new WindowManager.LayoutParams();\n lp.copyFrom(dialog.getWindow().getAttributes());\n lp.width = 900;\n if(lp.height > 1300)\n lp.height = 1300;\n else\n lp.height = WindowManager.LayoutParams.WRAP_CONTENT;\n lp.gravity = Gravity.CENTER;\n dialog.getWindow().setAttributes(lp);\n dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));\n TextView textView = (TextView) dialog.findViewById(android.R.id.message);\n textView.setTypeface(tf);\n }", "private void showForgotPasswordDialog() {\n LayoutInflater inflater = LayoutInflater.from(this);\n View dialogView = inflater.inflate(R.layout.dialog_forgot_password, null);\n final TextInputEditText emailEditText = dialogView.findViewById(R.id.dialog_forgot_password_value_email);\n //endregion\n\n //region Building the dialog\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(R.string.password_reset);\n\n builder.setPositiveButton(R.string.reset, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n\n String email = emailEditText.getText().toString();\n\n mFirebaseAuth.sendPasswordResetEmail(email)\n .addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()) {\n Toast.makeText(SignInActivity.this, R.string.sent_reset_password_email, Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(SignInActivity.this, R.string.failed_to_reset_email, Toast.LENGTH_SHORT).show();\n }\n }\n });\n dialog.dismiss();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n dialog.dismiss();\n }\n });\n //endregion\n\n builder.setView(dialogView);\n\n AlertDialog dialog = builder.create();\n dialog.show();\n }", "private void showPasswordResetView(String email) {\n if (!email.isEmpty()) {\n EditText etEmail = findViewById(R.id.etResetEmail);\n etEmail.setText(email);\n }\n\n changeForm(R.id.btnResetPasswordForm);\n }", "public void onClickShowChangeEmail(){\n //Get the alert dialog based on the resource email_change_input\n AlertDialog.Builder alertBuilder = new AlertDialog.Builder(LoginActivity.this);\n View layView = (LayoutInflater.from(LoginActivity.this)).inflate(R.layout.email_change_input, null);\n alertBuilder.setView(layView);\n\n //Get the field\n final EditText userInput = (EditText) layView.findViewById(R.id.tvContentMessage);\n\n //Build the buttons on the alertbuilder\n alertBuilder.setCancelable(true)\n .setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n sharedpreferences = getSharedPreferences(MyPREFERENCES, Context.MODE_PRIVATE);\n //Set the email into the shared preferences\n sharedpreferences.edit().putString(\"email_to_report\", userInput.getText().toString()).commit();\n Toast.makeText(getApplicationContext(), \"Email to retrieve reports changed!\", Toast.LENGTH_SHORT).show();\n\n }\n })\n .setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n\n }\n })\n ;\n\n Dialog dialog = alertBuilder.create();\n dialog.show();\n\n }", "private void showForgotPassDialogEmail() {\n\n final AlertDialog.Builder builder = new AlertDialog.Builder(Login.this);\n builder.setTitle(\"Quên mật khẩu\");\n builder.setMessage(\"Nhập mã bảo mật của bạn\");\n builder.setIcon(R.drawable.common_google_signin_btn_icon_dark);\n\n\n LayoutInflater inflater = this.getLayoutInflater();\n View forgotPassView = inflater.inflate(R.layout.activity_forgot_password, null);\n\n builder.setView(forgotPassView);\n builder.setIcon(R.drawable.common_google_signin_btn_icon_dark);\n final EditText edPhone = forgotPassView.findViewById(R.id.edtPhone);\n\n Email = edPhone.getText().toString().trim();\n\n builder.setPositiveButton(\"Xác nhận\", new DialogInterface.OnClickListener() {\n\n @Override\n public void onClick(DialogInterface dialog, int which) {\n if(!Patterns.EMAIL_ADDRESS.matcher(Email).matches())\n {\n// Toast.makeText(Login.this, \"Cách thức nhập Email của bạn bị sai\", Toast.LENGTH_SHORT).show();\n Toasty.error(Login.this, \"Cách thức nhập Email của bạn bị sai\", Toast.LENGTH_SHORT, true).show();\n\n return;\n }\n progressDialog.setMessage(\"Đang gửi mã đổi mật khẩu sang Email của bạn\\nVui lòng kiểm tra hòm thư Email đã gửi chưa\\nNếu chưa thì bạn hãy chờ vài phút để hệ thống đang trong tiến trình gửi cho bạn..\");\n progressDialog.show();\n\n Fauth.sendPasswordResetEmail(Email)\n .addOnCompleteListener(new OnCompleteListener() {\n @Override\n public void onComplete(@NonNull Task task) {\n if (task.isSuccessful()) {\n //instructions sent\n //hướng dẫn được gửi để reset lại password của bạn\n progressDialog.dismiss();\n dialog.dismiss();\n //Password reset instructions sent to your email\n// Toast.makeText(Login.this, \"Đã gửi link đặt lại mật khẩu đến Email của bạn\", Toast.LENGTH_SHORT).show();\n Toasty.success(Login.this, \"Đã gửi link đặt lại mật khẩu đến Email của bạn!\", Toast.LENGTH_SHORT, true).show();\n\n }\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n //failed sending instructions\n //không gửi được hướng dẫn để reset lại password của bạn\n progressDialog.dismiss();\n dialog.dismiss();\n ReusableCodeForAll.ShowAlert(Login.this,\"Lỗi kìa\",\"Chưa có tài khoản mà đòi quên với chả không\");\n Toasty.error(Login.this, \"\"+e.getMessage(), Toast.LENGTH_SHORT, true).show();\n }\n });\n\n\n }\n });\n builder.setNegativeButton(\"Huỷ\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n });\n builder.show();\n }", "private void showChangePasswordDialog() {\n if(dialog != null && dialog.isShowing()) return;\n\n LayoutInflater inflater = LayoutInflater.from(this);\n View view = inflater.inflate(R.layout.dialog_change_password, null);\n\n // The dialog that will appear\n AlertDialog.Builder builder = new AlertDialog.Builder(this, R.style.CustomDialogTheme)\n .setView(view)\n .setCancelable(true);\n\n ImageButton closeButton = (ImageButton) view.findViewById(R.id.closeDialogButton);\n final AppCompatButton confirmChangeButton = (AppCompatButton) view.findViewById(R.id.confirmChangePasswordBtn);\n\n Typeface tf = ResourcesCompat.getFont(getApplicationContext(), R.font.catamaran);\n\n TextInputLayout tilPassword = view.findViewById(R.id.tilPassword);\n TextInputLayout tilNewPassword = view.findViewById(R.id.tilNewPassword);\n TextInputLayout tilReEnterNewPassword = view.findViewById(R.id.tilReEnterNewPassword);\n passwordEditText = view.findViewById(R.id.input_password);\n newPasswordEditText = view.findViewById(R.id.input_newPassword);\n reEnterNewPasswordEditText = view.findViewById(R.id.input_reEnterNewPassword);\n\n // Setting custom font to dialog\n tilPassword.setTypeface(tf);\n tilNewPassword.setTypeface(tf);\n tilReEnterNewPassword.setTypeface(tf);\n passwordEditText.setTypeface(tf);\n newPasswordEditText.setTypeface(tf);\n reEnterNewPasswordEditText.setTypeface(tf);\n\n // Creating dialog and adjusting size\n dialog = builder.create();\n dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);\n dialog.show();\n\n closeButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n dialog.dismiss();\n }\n });\n\n // Override the button handler to check if data is valid\n confirmChangeButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n confirmChangeButton.setEnabled(false);\n boolean valid = true;\n\n String password = passwordEditText.getText().toString();\n String newPassword = newPasswordEditText.getText().toString();\n String reEnterNewPassword = reEnterNewPasswordEditText.getText().toString();\n\n // check password\n if (password.isEmpty() || password.trim().isEmpty() || password.length() < 4 || password.length() > 10) {\n passwordEditText.setError(getString(R.string.error_password));\n valid = false;\n } else {\n passwordEditText.setError(null);\n }\n\n // check password\n if (newPassword.isEmpty() || newPassword.trim().isEmpty() || newPassword.length() < 4 || newPassword.length() > 10) {\n newPasswordEditText.setError(getString(R.string.error_password));\n valid = false;\n } else if(newPassword.equals(password)) {\n newPasswordEditText.setError(getString(R.string.error_password_change_equal));\n valid = false;\n } else {\n newPasswordEditText.setError(null);\n }\n\n // check password\n if (reEnterNewPassword.isEmpty() || reEnterNewPassword.trim().isEmpty() || reEnterNewPassword.length() < 4 ||\n reEnterNewPassword.length() > 10) {\n reEnterNewPasswordEditText.setError(getString(R.string.error_password));\n valid = false;\n } else if(reEnterNewPassword.equals(password)) {\n reEnterNewPasswordEditText.setError(getString(R.string.error_password_change_equal));\n valid = false;\n } else if(!reEnterNewPassword.equals(newPassword)) {\n reEnterNewPasswordEditText.setError(getString(R.string.error_password_match));\n valid = false;\n } else {\n reEnterNewPasswordEditText.setError(null);\n }\n\n if(valid)\n onChangePassword(password, newPassword, reEnterNewPassword);\n else\n confirmChangeButton.setEnabled(true);\n }\n });\n\n WindowManager.LayoutParams lp = new WindowManager.LayoutParams();\n lp.copyFrom(dialog.getWindow().getAttributes());\n lp.width = 900;\n if(lp.height > 1300)\n lp.height = 1300;\n else\n lp.height = WindowManager.LayoutParams.WRAP_CONTENT;\n lp.gravity = Gravity.CENTER;\n dialog.getWindow().setAttributes(lp);\n dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));\n TextView textView = (TextView) dialog.findViewById(android.R.id.message);\n textView.setTypeface(tf);\n }", "private void openValidateDialog() {\n final ValidateEmailDialog dialog = new ValidateEmailDialog(EmailRegisterActivity.this, EmailRegisterActivity.this, editEmail.getText().toString().trim());\n }", "public void onClick(DialogInterface dialog, int which) {\n Toast.makeText(getApplicationContext(), \"Email Id Is InCorrect\", Toast.LENGTH_SHORT).show();\n uname.requestFocus();\n }", "@Override\n public void onClick(View v) {\n final Dialog MyDialog = new Dialog(Login.this);\n MyDialog.requestWindowFeature(Window.FEATURE_NO_TITLE);\n MyDialog.setContentView(R.layout.activity_email_popup);\n\n hello = (Button)MyDialog.findViewById(R.id.hello);\n close = (Button)MyDialog.findViewById(R.id.close);\n\n hello.setEnabled(true);\n close.setEnabled(true);\n\n hello.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n EditText resetmail=MyDialog.findViewById(R.id.edittext);\n firebaseAuth=FirebaseAuth.getInstance();\n if(resetmail.getText().toString().isEmpty())\n\n Toast.makeText(getApplicationContext(),\"Enter the mail\",Toast.LENGTH_LONG).show();\n else{\n firebaseAuth.sendPasswordResetEmail(resetmail.getText().toString().trim()).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if(task.isSuccessful()){\n Toast.makeText(getApplicationContext(),\"link sent to mail\",Toast.LENGTH_LONG).show();\n\n MyDialog.dismiss();\n }\n else Toast.makeText(getApplicationContext(),\"Invalid email\",Toast.LENGTH_LONG).show();\n }\n });\n }\n }\n });\n\n\n\n\n close.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n MyDialog.cancel();\n }\n });\n\n MyDialog.show();\n\n }", "private void forgotPasswordDialog() {\n mForgotPassword.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n AlertDialog.Builder builder = new AlertDialog.Builder(LoginActivity.this);\n builder.setTitle(\"Reset Password\");\n final EditText emailInput = new EditText(LoginActivity.this);\n emailInput.setHint(\"Enter email of forgotten account.\");\n emailInput.setInputType(InputType.TYPE_CLASS_TEXT);\n builder.setView(emailInput);\n builder.setPositiveButton(\"Send Reset Instructions\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n String email = emailInput.getText().toString().trim();\n if (email.isEmpty()) {\n Toast.makeText(LoginActivity.this, \"Please type an email\", Toast.LENGTH_SHORT).show();\n } else {\n mAuth.sendPasswordResetEmail(email).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()) {\n Toast.makeText(LoginActivity.this, \"Password reset instructions sent\", Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(LoginActivity.this, \"Invalid email entered. Please try again\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n }\n }\n });\n builder.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n dialogInterface.cancel();\n }\n });\n builder.show();\n }\n });\n\n }", "public void inputToEmailTextbox(String email) {\n\t\twaitToElementVisible(driver,RegisterPageUI.EMAIL_TEXTBOX);\n\t\tsendkeyToElement(driver, RegisterPageUI.EMAIL_TEXTBOX, email);\n\t}", "@Override\n public void onClick(DialogInterface dialog, int id) {\n FirebaseAuth auth = FirebaseAuth.getInstance();\n EditText editTextMail = getDialog().findViewById(R.id.editTextPasswordMail);\n String mail = editTextMail.getText().toString();\n\n // Senden der ResetMail durch Firebase\n auth.sendPasswordResetEmail(mail)\n .addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()) {\n // Bei Erfolg Dialog wird geschlossen\n dismiss();\n }\n }\n });\n }", "public String printNewEmailPrompt() {\n return \"Please enter new email: \";\n }", "private void showWrongPasswordDialog()\r\n\t{\t\r\n\t\t// Create and show dialog\r\n\t\tfinal WrongPasswordDialogBuilder loginDialogBuilder = new WrongPasswordDialogBuilder(this);\r\n\t\tfinal AlertDialog alert = loginDialogBuilder.create( );\r\n\t\talert.show( );\r\n\t}", "private void showAlert() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\r\n builder.setTitle(\"Info..\");\r\n builder.setMessage(\"Your password reset email has been sent!\\n\" +\r\n \"\\n\" +\r\n \"We have sent a password reset email to your email address:\\n\" +\r\n \"\\n\" +\r\n input_email.getText().toString()+\"\\n\" +\r\n \"\\n\" +\r\n \"Please check your inbox to continue.\");\r\n\r\n builder.setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\r\n @Override\r\n public void onClick(DialogInterface dialog, int which) {\r\n dialog.dismiss();\r\n finish();\r\n }\r\n });\r\n /* builder.setNegativeButton(\"cancel\", new DialogInterface.OnClickListener() {\r\n @Override\r\n public void onClick(DialogInterface dialog, int which) {\r\n dialog.dismiss();\r\n }\r\n });*/\r\n // create and show the alert dialog\r\n AlertDialog dialog = builder.create();\r\n dialog.show();\r\n }", "@Override\n public void onClick(View v) {\n AlertDialog alertDialog = new AlertDialog.Builder(MyAccount.this).create();\n\n //Put edit text into the alert dialog\n alertDialog.setTitle(\"Change Password\");\n\n LinearLayout linearLayout = new LinearLayout(getApplicationContext());\n linearLayout.setOrientation(LinearLayout.VERTICAL);\n final EditText editTextPassword = new EditText(getApplication());\n editTextPassword.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD);\n editTextPassword.setHint(\"Enter current password\");\n editTextPassword.setHintTextColor(getResources().getColor(R.color.alpha_gray));\n editTextPassword.setTextColor(getResources().getColor(R.color.black));\n\n final EditText editTextNewPassword = new EditText(getApplication());\n editTextNewPassword.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD);\n editTextNewPassword.setTextColor(getResources().getColor(R.color.black));\n editTextNewPassword.setHintTextColor(getResources().getColor(R.color.alpha_gray));\n editTextNewPassword.setHint(\"Enter new password\");\n\n final EditText editTextReenterNewPassword = new EditText(getApplication());\n editTextReenterNewPassword.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD);\n editTextReenterNewPassword.setTextColor(getResources().getColor(R.color.black));\n editTextReenterNewPassword.setHintTextColor(getResources().getColor(R.color.alpha_gray));\n editTextReenterNewPassword.setHint(\"Reenter new password\");\n\n linearLayout.addView(editTextPassword);\n linearLayout.addView(editTextNewPassword);\n linearLayout.addView(editTextReenterNewPassword);\n\n alertDialog.setView(linearLayout);\n //Set positive button (submit)\n alertDialog.setButton(AlertDialog.BUTTON_POSITIVE,\"Enter\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n String currentPassword = editTextPassword.getText().toString();\n\n if(currentPassword.contentEquals(user.getPassword())) {\n //Check if the reentered password matches\n String newPassword = editTextNewPassword.getText().toString();\n String reenterNewPassword = editTextReenterNewPassword.getText().toString();\n\n if(newPassword.equals(reenterNewPassword) && !newPassword.equals(user.getPassword())\n && !currentPassword.equals(\"\") &&!newPassword.equals(\"\")&&!reenterNewPassword.equals(\"\")) {\n //Update password\n dialog.dismiss();\n BackgroundUpdatePasswordTask backgroundUpdatePasswordTask = new BackgroundUpdatePasswordTask();\n backgroundUpdatePasswordTask.execute(user.getUsername(), newPassword);\n\n } else if(newPassword.equals(user.getPassword())){\n Toast.makeText(getApplicationContext(),\"new password cannot be current password\", Toast.LENGTH_LONG).show();\n }else if(currentPassword.equals(\"\")||newPassword.equals(\"\")||reenterNewPassword.equals(\"\")){\n Toast.makeText(getApplicationContext(),\"All fields must be entered\", Toast.LENGTH_LONG).show();\n }\n else {\n //New passwords don't match\n editTextReenterNewPassword.setError(\"Reentered new password does not match new password\");\n Toast.makeText(getApplicationContext(),\"Passwords do not match\", Toast.LENGTH_LONG).show();\n }\n\n } else {\n //Incorrect user password\n //Don't let them update password\n dialog.dismiss();\n Toast.makeText(getApplicationContext(),\"Wrong password\",Toast.LENGTH_LONG).show();\n }\n\n\n }\n });\n //Set negative button (cancel)\n alertDialog.setButton(AlertDialog.BUTTON_NEGATIVE,\"Cancel\", new DialogInterface.OnClickListener() {\n\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }\n });\n\n alertDialog.show();\n\n }", "public void inputRandomEmailToTextbox() {\r\n\t\twaitElementVisible(driver, RegisterForm.EMAIL_TEXTBOX);\r\n\t\tString emailAddress = \"auto06\" + getTodayString(\"ddMMyyHHmmss\")+\"@lv.com\";\r\n\t\tsendKeyElement(driver,RegisterForm.EMAIL_TEXTBOX, emailAddress);\r\n\t}", "@Override\n public void onClick(View view) {\n\n final Dialog dialog = new Dialog(LoginActivity.this);\n dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);\n dialog.setContentView(R.layout.forgot_password_mobile_email_dialog);\n final EditText etForgotPass = (EditText) dialog.findViewById(R.id.et_forgot_pass_email);\n Button btForgotPassSubmit = (Button) dialog.findViewById(R.id.bt_submit_for_forgot_pass);\n startMobileWithOnlyNumber92(etForgotPass);\n btForgotPassSubmit.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n String textFromEt = etForgotPass.getText().toString();\n if (textFromEt.startsWith(\"03\")){\n if (textFromEt.length()<10){\n Toast.makeText(LoginActivity.this, \"Please enter valid number\", Toast.LENGTH_SHORT).show();\n }\n else {\n if (textFromEt.startsWith(\"03\")){\n textFromEt = textFromEt.substring(1);\n textFromEt = \"+92\"+textFromEt;\n }\n dialog.dismiss();\n Log.e(\"TAG\", \"the use text is \" + textFromEt);\n forgotPassword(textFromEt);\n }\n\n }\n else if (!textFromEt.startsWith(\"03\")){\n if (!emailValidator(textFromEt)){\n Toast.makeText(LoginActivity.this, \"Invalid Email\", Toast.LENGTH_SHORT).show();\n }else {\n dialog.dismiss();\n Log.e(\"TAG\", \"the use text is \" + textFromEt);\n forgotPassword(textFromEt);\n }\n }\n }\n });\n dialog.getWindow().getAttributes().windowAnimations = R.style.DialogAnimationTooDouen;\n dialog.show();\n\n }", "private void confirmOtp(String OTP) {\n verifyOTP=OTP;\n LayoutInflater li = LayoutInflater.from(this);\n //Creating a view to get the dialog box\n View confirmDialog = li.inflate(R.layout.dailogconfirm, null);\n AppCompatButton buttonConfirm = (AppCompatButton) confirmDialog.findViewById(R.id.buttonConfirm);\n editTextConfirmOtp = (EditText) confirmDialog.findViewById(R.id.editTextOtp);\n\n alert = new AlertDialog.Builder(this);\n alert.setView(confirmDialog);\n\n\n alertDialog = alert.create();\n alertDialog.show();\n\n\n }", "public void onClick(DialogInterface dialog, int which) {\n Toast.makeText(getApplicationContext(), \"Re-enter Email\", Toast.LENGTH_SHORT).show();\n }", "private void showChangePasswordtDialog() {\n //creating aleart dialog builder object\n final AlertDialog.Builder builder = new AlertDialog.Builder(this);\n //setting cancelable to false\n builder.setCancelable(false);\n //set title\n builder.setTitle(\"CHANGE PASSWORD\");\n //set message\n builder.setMessage(\"Please Enter All Required Fields !\");\n /**\n * getting layoutinflater object\n *\n */\n final LayoutInflater inflater = (LayoutInflater) getSystemService(LAYOUT_INFLATER_SERVICE);\n //convert xml file into corespondings views objects\n final View view = inflater.inflate(R.layout.change_password, null);\n //intialize old pass edit text\n final AppCompatEditText oldPass = view.findViewById(R.id.old_pass_edit);\n //intialize new pass edit text\n final AppCompatEditText newPass = view.findViewById(R.id.new_pass_edit);\n //intialize repeat pass edit text\n final AppCompatEditText newRepeatPass = view.findViewById(R.id.repeat_pass_edit);\n //setting cancel button\n builder.setNegativeButton(\"CANCEL\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n //hide the dailog\n dialogInterface.dismiss();\n }\n });\n //seeting reset button\n builder.setPositiveButton(\"CHANGE\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n //showing spots dialog\n final SpotsDialog dialog = new SpotsDialog(DriverHome.this, \"Please Wait...\");\n dialog.show();\n //getting old pass form uberDriver\n String mOldPass = oldPass.getText().toString();\n //getting old pass form uberDriver\n final String mNewPass = newPass.getText().toString();\n //getting old pass form uberDriver\n final String mRepeatPass = newRepeatPass.getText().toString();\n //checking if the email is empty\n if (TextUtils.isEmpty(mOldPass) && TextUtils.isEmpty(mNewPass) && TextUtils.isEmpty(mRepeatPass)) {\n dialog.dismiss();\n showChangePasswordtDialog();\n Snackbar.make(supportMapFragment.getView(), \"Please Enter All Fields !\", Snackbar.LENGTH_LONG).show();\n } else if (TextUtils.isEmpty(mOldPass)) {\n dialog.dismiss();\n showChangePasswordtDialog();\n Snackbar.make(supportMapFragment.getView(), \"Please Enter Your old Password\", Snackbar.LENGTH_LONG).show();\n } else if (TextUtils.isEmpty(mNewPass)) {\n dialog.dismiss();\n showChangePasswordtDialog();\n Snackbar.make(supportMapFragment.getView(), \"Please Enter Your new Password\", Snackbar.LENGTH_LONG).show();\n } else if (TextUtils.isEmpty(mRepeatPass)) {\n dialog.dismiss();\n showChangePasswordtDialog();\n Snackbar.make(supportMapFragment.getView(), \"Please Repeat Your new Password\", Snackbar.LENGTH_LONG).show();\n } else {\n if (mNewPass.equals(mRepeatPass)) {\n final FirebaseUser user = mAuth.getCurrentUser();\n AuthCredential credential = EmailAuthProvider.getCredential(user.getEmail(), mOldPass);\n user.reauthenticate(credential).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()) {\n user.updatePassword(mNewPass).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()) {\n dialog.dismiss();\n Toast.makeText(DriverHome.this, \"password updated successfully!\", Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(DriverHome.this, \"\" + task.getException().getLocalizedMessage(), Toast.LENGTH_SHORT).show();\n }\n }\n });\n } else {\n dialog.dismiss();\n // Toast.makeText(DriverHome.this, \"\"+task.getException().getLocalizedMessage(), Toast.LENGTH_SHORT).show();\n Toast.makeText(DriverHome.this, \"The old password is incorrect!\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n } else {\n Toast.makeText(DriverHome.this, \"passwoed doesn't match\", Toast.LENGTH_SHORT).show();\n }\n\n\n }\n }\n });\n //set the custom view\n builder.setView(view);\n //show the dialog\n builder.show();\n }", "public void showPasswordPrompt();", "public void enterEmailInAboutMe(String email) throws UIAutomationException{\r\n\t\r\n\t\telementController.requireElementSmart(fileName,\"Email Text Field In About Me\",GlobalVariables.configuration.getAttrSearchList(), \"Email Address\");\r\n\t\tUIActions.click(fileName,\"Email Text Field In About Me\",GlobalVariables.configuration.getAttrSearchList(), \"Email Address\");\r\n\t\tUIActions.clearTextBox(fileName,\"Email Text Field In About Me\",GlobalVariables.configuration.getAttrSearchList(), \"Email Address\");\r\n\t\tUIActions.enterValueInTextBox(email,fileName,\"Email Text Field In About Me\",GlobalVariables.configuration.getAttrSearchList(), \"Email Address\");\r\n\t\tUIActions.enterKey(Keys.TAB);\r\n\t\r\n\t}", "@Override\n public void onClick(View view) {\n final EditText emailField = new EditText(view.getContext());\n AlertDialog.Builder passwordResetDialog = new AlertDialog.Builder(view.getContext());\n passwordResetDialog.setIcon(android.R.drawable.ic_dialog_email)\n .setTitle(\"Reset password\")\n .setMessage(\"Enter your email to receive the reset link\")\n .setView(emailField)\n .setNegativeButton(\"NO\",null)\n .setPositiveButton(\"YES\", new DialogInterface.OnClickListener() {\n /**\n * Confirms password reset request\n * Sends an email to user to reset password\n * @param dialogInterface interface\n * @param i index\n */\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n // Extract email address\n String mail = emailField.getText().toString();\n if (mail.length()==0){\n Toast.makeText(LogInActivity.this, \"Enter a valid email\", Toast.LENGTH_SHORT).show();\n return;\n }\n firebaseAuth.sendPasswordResetEmail(mail).addOnSuccessListener(new OnSuccessListener<Void>() {\n /**\n * Displays toast when password reset email is successfully sent\n * @param aVoid VarArgs\n */\n @Override\n public void onSuccess(Void aVoid) {\n Toast.makeText(LogInActivity.this, \"Email is send\", Toast.LENGTH_SHORT).show();\n }\n }).addOnFailureListener(new OnFailureListener() {\n /**\n * Displays email when password reset email fails to send\n * @param e exception\n */\n @Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(LogInActivity.this, \"Unable to send the email\"+e.getMessage(), Toast.LENGTH_SHORT).show();\n }\n });\n }\n });\n passwordResetDialog.create().show();\n }", "private void registerEmailAddr() {\r\n\t\t\t\tWindow.setTitle(Common.APPNAME);\r\n\t\t\t\tmanualRegisterBtn.setEnabled(false);\r\n\t\t\t\tfinal String emailAddrProvided = emailAddrField.getText();\r\n\t\t\t\tserverResponseLabel.setText(\"\");\r\n\t\t\t\tregisterService.manualRegister(emailAddrProvided,\r\n\t\t\t\t\tnew AsyncCallback<String>() {\r\n\t\t\t\t\t\tpublic void onFailure(Throwable caught) {\r\n\t\t\t\t\t\t\t// Show the RPC error message to the user\r\n\t\t\t\t\t\t\tdialogBox.setText(\"Email Address Registration - Failure\");\r\n\t\t\t\t\t\t\tdialogBox.center();\r\n\t\t\t\t\t\t\tcloseButton.setFocus(true);\r\n\t\t\t\t\t\t\tdialogBox.show();\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tpublic void onSuccess(String result) {\r\n\t\t\t\t\t\t\tif (\"Verified\".equalsIgnoreCase(result)) {\r\n\t\t\t\t\t\t\t\tString registerReturnUri = GWT.getHostPageBaseURL() + REGISTER_RETURN_URI;\r\n\t\t\t\t\t\t\t\tWindow.open(registerReturnUri, \"_self\", \"\"); \r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\temailAddrField.setText(\"\");\r\n\t\t\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t\t\tWindow.alert(result);\r\n\t\t\t\t\t\t\t\t*/\r\n\t\t\t\t\t\t\t\tdialogBox.center();\r\n\t\t\t\t\t\t\t\tdialogBox.setAnimationEnabled(true);\r\n\t\t\t\t\t\t\t\tdialogBox.setWidth(\"320px\");\r\n\t\t\t\t\t\t\t\tdialogBox.setText(result);\r\n\t\t\t\t\t\t\t\tcloseButton.setFocus(true);\r\n\t\t\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t\t\tmanualRegisterBtn.setEnabled(true);\r\n\t\t\t\t\t\t\t\t*/\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t);\r\n\t\t\t}", "private void jbuttonAddGuestActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbuttonAddGuestActionPerformed\n String fnGuest = JTextFirstNameGuest.getText().toLowerCase();\n String lnGuest = JTextLastNameGuest.getText().toLowerCase();\n String emGuest = JTextEmailGuest.getText().toLowerCase(); //??\n boolean succes = false;\n int phoneNr = 0;\n \n try{\n phoneNr = Integer.parseInt(JTextPhoneGuest.getText());\n }\n catch(java.lang.NullPointerException ex){\n jLabelAddGuestStatus.setText(\"Missing phone number\");\n }\n if(fnGuest.isEmpty()){\n jLabelAddGuestStatus.setText(\"Missing Firstname\");\n }\n if(lnGuest.isEmpty()){\n jLabelAddGuestStatus.setText(\"Missing Lastname\");\n }\n if(emGuest.isEmpty()){\n jLabelAddGuestStatus.setText(\"Missing Email\");\n }\n \n if(!fnGuest.isEmpty() && !lnGuest.isEmpty() && phoneNr != 0 ){\n try{ \n succes = conIf.addGuestEmail(fnGuest, lnGuest, phoneNr, emGuest); //emguest? \n }catch(Exception ex){\n succes = false;\n }\n }\n if(succes == true){\n JTextFirstNameGuest.setText(\"\");\n JTextLastNameGuest.setText(\"\");\n JTextPhoneGuest.setText(\"\");\n JTextEmailGuest.setText(\"\");\n \n int reply = JOptionPane.showConfirmDialog(\n fr1,\n \"Would you like to add another guest?\",\n \"Guest added successfully\",\n JOptionPane.YES_NO_OPTION);\n \n if(reply == JOptionPane.NO_OPTION){\n fr1.setVisible(true);\n this.setVisible(false);\n }\n \n \n \n }else{\n jLabelAddGuestStatus.setText(\"guest not added\");\n }\n }", "public void exportSubject() {\n @SuppressLint(\"InflateParams\") TextInputLayout inputText = (TextInputLayout) fragment.getLayoutInflater()\n .inflate(R.layout.popup_edittext, null);\n if (inputText.getEditText() != null) inputText.getEditText().setInputType(\n InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD);\n inputText.setEndIconMode(TextInputLayout.END_ICON_PASSWORD_TOGGLE);\n inputText.setHint(fragment.getString(R.string.set_blank_password));\n\n // Display the dialog\n DismissibleDialogFragment dismissibleFragment = new DismissibleDialogFragment(\n new AlertDialog.Builder(fragment.requireContext())\n .setTitle(R.string.n2_password_export)\n .setView(inputText)\n .create());\n dismissibleFragment.setPositiveButton(fragment.getString(android.R.string.ok), view -> {\n // Check if password is too short, must be 8 characters in length\n String responseText = \"\";\n if (inputText.getEditText() != null) responseText = inputText.getEditText().getText().toString();\n checkPasswordRequirement(dismissibleFragment, responseText, inputText);\n });\n dismissibleFragment.setNegativeButton(fragment.getString(android.R.string.cancel), view ->\n dismissibleFragment.dismiss());\n dismissibleFragment.show(fragment.getParentFragmentManager(), \"NotesSubjectFragment.6\");\n }", "private void setUpRecoverPassword() {\n binding.textViewRecoverPassword.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n // Open the fragment\n Timber.d(\"Forgot password clicked\");\n ForgotPasswordDialog forgotPasswordDialog = new ForgotPasswordDialog();\n forgotPasswordDialog.show(getChildFragmentManager(), ForgotPasswordDialog.class.getSimpleName());\n\n }\n });\n }", "@Override\n public void onClick(View view) {\n final View textEntryView = factory.inflate(R.layout.email_text_entry, null);\n // text_entry is an Layout XML file containing two text field to display in alert dialog\n final EditText input_email_subject = (EditText) textEntryView.findViewById(R.id.et_emailsubject);\n final EditText input_email_body = (EditText) textEntryView.findViewById(R.id.et_emailbody);\n final AlertDialog.Builder alert = new AlertDialog.Builder(getContext());\n\n alert.setIcon(R.drawable.sendemail)\n .setTitle(\"Draft Your Email\")\n .setView(textEntryView)\n .setPositiveButton(\"Send\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int whichButton) {\n Log.i(\"AlertDialog\",\"TextEntry 1 Entered \"+input_email_subject.getText().toString());\n Log.i(\"AlertDialog\",\"TextEntry 2 Entered \"+input_email_body.getText().toString());\n\n\n\n /* User clicked OK so do some stuff */\n final Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);\n emailIntent.setData(Uri.parse(\"mailto:\"));\n emailIntent.setType(\"plain/text\");\n\n// emailIntent.putExtra(Intent.EXTRA_EMAIL, new String[] { \"[email protected]\" });\n// emailIntent.putExtra(Intent.EXTRA_EMAIL, new String[] { selected_email });\n emailIntent.putExtra(Intent.EXTRA_EMAIL, new String[] { selected_email });\n\n String email_subject = input_email_subject.getText().toString();\n String email_body = input_email_body.getText().toString();\n\n// // Encrypt email subject and email body\n// try {\n// encrypted_email_subject = encrypt(email_subject);\n// encrypted_email_body = encrypt(email_body);\n// } catch (InvalidKeyException e) {\n// e.printStackTrace();\n// }\n//\n// emailIntent.putExtra(Intent.EXTRA_SUBJECT, encrypted_email_subject);\n// emailIntent.putExtra(Intent.EXTRA_TEXT,encrypted_email_body);\n\n emailIntent.putExtra(Intent.EXTRA_SUBJECT, email_subject);\n emailIntent.putExtra(Intent.EXTRA_TEXT, email_body);\n try{\n startActivity(Intent.createChooser(emailIntent,\"Sending email...\"));\n Log.i(\"SMS sent to \" + selected_email, \"\");\n }catch (Exception e){\n Toast.makeText(getActivity(), \"There is no email client installed.\", Toast.LENGTH_SHORT).show();\n }\n }\n })\n .setNegativeButton(\"Cancel\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog,\n int whichButton) {\n }\n });\n alert.show();\n }", "private void showOtpDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(\"Enter OTP:\");\n\n // set the custom layout\n final View customLayout = getLayoutInflater().inflate(R.layout.pno_otp_alert_dialog, null);\n builder.setView(customLayout);\n\n // add a button\n builder.setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n EditText otp1 = customLayout.findViewById(R.id.et_verificationCode);\n String otp2 = otp1.getText().toString();\n verifyCode(otp2);\n }\n });\n\n // create and show\n // the alert dialog\n AlertDialog dialog = builder.create();\n dialog.show();\n\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n String hAnsFill = hintPut.getText().toString();\n Log.i(easyShort.TAG,hAnsFill);\n Log.i(easyShort.TAG,hintAns);\n if (hAnsFill.equals(hintAns)) {\n // New dialog box showing password\n\n AlertDialog.Builder myBuilder = new AlertDialog.Builder(entryApp.this);\n myBuilder.setTitle(\"Your password\").setMessage(\"Your password: \"+userPass).setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n });\n myBuilder.create();\n myBuilder.show();\n } else {\n Toast.makeText(entryApp.this,\"Wrong answer!!\",Toast.LENGTH_SHORT).show();\n }\n }", "@Override\n public void onClick(View v) {\n if(!isEmpty(mUserRegBinding.editTextPrivEmail.getText().toString())\n && !isEmpty(mUserRegBinding.editTextPrivPassword.getText().toString())\n && !isEmpty(mUserRegBinding.editTextPrivConfirmPassword.getText().toString())){\n\n //check if passwords match\n if(doStringsMatch(mUserRegBinding.editTextPrivPassword.getText().toString(),\n mUserRegBinding.editTextPrivConfirmPassword.getText().toString())){\n\n //Initiate user registration task\n registerNewEmail(mUserRegBinding.editTextPrivEmail.getText().toString(),\n mUserRegBinding.editTextPrivPassword.getText().toString());\n }else{\n Snackbar.make(getCurrentFocus().getRootView(), \"Passwords do not Match\", Snackbar.LENGTH_SHORT).show();\n }\n\n }else{\n Snackbar.make(getCurrentFocus().getRootView(), \"You must fill out all the fields\", Snackbar.LENGTH_SHORT).show();\n }\n }", "protected void editPassword(ActionEvent ae) {\n\t\tEditPasswordFrm editPasswordFrm = new EditPasswordFrm();\n\t\teditPasswordFrm.setVisible(true);\n\t\tdesktopPane.add(editPasswordFrm);\n\t}", "protected void editPassword(ActionEvent ae) {\n\t\tEditPasswordFrm editPasswordFrm = new EditPasswordFrm();\n\t\teditPasswordFrm.setVisible(true);\n\t\tdesktopPane.add(editPasswordFrm);\n\t}", "public void resetpassword(){\n resetpasswordlocal.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n\n final EditText resetpass = new EditText(view.getContext());\n AlertDialog.Builder passwordResetDialog = new AlertDialog.Builder(view.getContext());\n passwordResetDialog.setTitle(\"Reset Password ?\");\n passwordResetDialog.setMessage(\"Enter the new password\");\n passwordResetDialog.setView(resetpass);\n\n passwordResetDialog.setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n //Extract the email and set reset link\n String newpass = resetpass.getText().toString();\n user.updatePassword(newpass).addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n Toast.makeText(Profile.this, \"Password reset successfully\", Toast.LENGTH_SHORT).show();\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(Profile.this, \"Password reset failed\", Toast.LENGTH_SHORT).show();\n }\n });\n }\n });\n\n passwordResetDialog.setNegativeButton(\"No\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n //Close the dialog box\n dialogInterface.cancel();\n }\n });\n passwordResetDialog.create().show();\n\n }\n });\n }", "public void onClick(DialogInterface dialog, int which) {\n Toast.makeText(getApplicationContext(), \"Please Enter Correct User Name And Password\", Toast.LENGTH_SHORT).show();\n }", "public void onClick(DialogInterface dialog, int which) {\n Toast.makeText(getApplicationContext(), \"Please Enter Correct User Name And Password\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) {\n Preference pref = findPreference(\"email\");\n \n EditTextPreference editTextPreference=(EditTextPreference)findPreference(\"email\"); \n \n if(!check(editTextPreference.getText())){\n \t \n \t editTextPreference.setText(\"\");\n \t AlertDialog alertDialog = new AlertDialog.Builder(AppPreferences.this).create();\n \talertDialog.setTitle(\"Erreur...\");\n \talertDialog.setMessage(\"Email non valide\");\n \talertDialog.show();\n }\n \n \n\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n String mail = resetMail.getText().toString();\n auth.sendPasswordResetEmail(mail).addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n Toast.makeText(Login.this, R.string.reset_sent, Toast.LENGTH_SHORT).show();\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(Login.this, getString(R.string.reset_not_sent) + e.getMessage(), Toast.LENGTH_SHORT).show();\n }\n });\n\n }", "public void handleForgotPassword() {\n\t\tAlert alert = new Alert(AlertType.WARNING);\n\t\talert.initOwner(mainApp.getPrimaryStage());\n\t\talert.setTitle(\"Under building\");\n\t\talert.setHeaderText(\"Under construction.\");\n\t\talert.setContentText(\"At the moment you can not get your password. Thanks for being patient.\");\n\t\talert.showAndWait();\n\t}", "@Override\r\n\t\t\tpublic void afterTextChanged(Editable edit) {\n\t\t\t\tconfirmPassword = edit.toString();\r\n\t\t\t}", "private void changeBioDialog() {\n\n AlertDialog.Builder alert;\n alert = new AlertDialog.Builder(this,R.style.Theme_MaterialComponents_Dialog_Alert);\n LayoutInflater inflater = getLayoutInflater();\n\n View view = inflater.inflate(R.layout.change_bio_dialog,null);\n\n changeBio = view.findViewById(R.id.change_bio);\n bCancel = view.findViewById(R.id.b_cancel);\n bSave = view.findViewById(R.id.b_save);\n\n alert.setView(view);\n alert.setCancelable(false);\n\n AlertDialog dialog = alert.create();\n dialog.getWindow().setBackgroundDrawableResource(R.color.transparent);\n\n dialog.show();\n\n bSave.setOnClickListener(v -> {\n txtBio = changeBio.getText().toString().trim();\n if(TextUtils.isEmpty(txtBio)){\n Toast.makeText(UserActivity.this, \"Your bio is empty\" , Toast.LENGTH_SHORT).show();\n dialog.dismiss();\n }\n else {\n updateUserBio(txtBio);\n dialog.dismiss();\n }\n });\n\n bCancel.setOnClickListener(v -> dialog.dismiss());\n }", "@FXML\n void handlerModifyProfile(){\n //Checks if any field is empty so it can show an alert to the user.\n if(tfName.getText().equals(\"\")||tfFirstSurName.getText().equals(\"\")||\n tfSecondSurName.getText().equals(\"\")||tfDirection.getText().equals(\"\")||\n tfEmail.getText().equals(\"\")){\n //Alert that notice the user that at least oen field is empty\n Alert alert = new Alert(javafx.scene.control.Alert.AlertType.INFORMATION, \"Please write your email before\");\n alert.showAndWait();\n }else{\n try {\n //Checks if the email is correct\n if(new EmailValidator().validate(tfEmail.getText())){\n Alert alert;\n //load a UserDTO class with the current information in the fields\n UserDTO user= new UserDTO(tfUserName.getText(),tfName.getText(),\n tfFirstSurName.getText()+\"%\"+tfSecondSurName.getText(),\n tfEmail.getText(), tfDirection.getText());\n //Call to the DB to change the user information\n userManager.updateUser(user);\n logger.info(tfUserName.getText() + \" user updated\");\n //load password pattern\n String pattern = \"((?=.*[a-z])(?=.*\\\\d)(?=.*[A-Z])(?=.*[@#$%!*.,+-;&]).{8,40})\";\n //Checks that the fields are not empty, have same value and matches with pattern,\n if((!(tfPassword.getText().equals(\"\")||tfRepeatPassword.getText().equals(\"\"))) &&\n tfPassword.getText().equals(tfRepeatPassword.getText()) &&\n tfPassword.getText().matches(pattern)){\n //Update user password\n userManager.changePassword(tfUserName.getText(),EncrypterUtil.encrypt(tfPassword.getText()));\n System.out.println(tfPassword.getText());\n System.out.println(EncrypterUtil.encrypt(tfPassword.getText()));\n alert = new Alert(javafx.scene.control.Alert.AlertType.INFORMATION, \"Credentials updated\");\n alert.showAndWait();\n logger.info(tfUserName.getText() + \" password changed\");\n //Send an email to the user saying that the password has been changed\n MailUtil.sendEmail(tfEmail.getText(), \"Password changed\", \"Your password have changed, if you didn´t do it\"\n + \" put in contact with our customer service.\");\n //Check that passwords got same value\n }else if(!tfPassword.getText().equals(tfRepeatPassword.getText())){\n alert = new Alert(javafx.scene.control.Alert.AlertType.INFORMATION, \"Please write same password\");\n alert.showAndWait();\n //Password are the same but dont match with pattern\n }else if (!tfPassword.getText().matches(pattern) && !(tfPassword.getText().equals(\"\") && tfRepeatPassword.getText().equals(\"\"))){\n alert = new Alert(AlertType.WARNING, \"Pasword has to be valid. A valid pasword contains at least :\\n-8 characters\\n-one capital letter\"\n + \"\\n-one small letter\\n-one number and one symbol\");\n alert.showAndWait();\n }else if(tfPassword.getText().equals(\"\")&&tfRepeatPassword.getText().equals(\"\")){\n //In case the user just changed his/her information.\n MobileApplication.getInstance().showMessage(\"Data saved\");\n }\n \n }\n } catch (UserUpdateException ex) {\n //Put in the logger the information of the error\n logger.severe(ex.getMessage());\n //Alert with the current error\n Alert alert = new Alert(javafx.scene.control.Alert.AlertType.ERROR, ex.getMessage());\n alert.showAndWait();\n }\n }\n }", "private void jForgottenPasswordMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jForgottenPasswordMouseClicked\n new ForgottenPassword().setVisible(true);\n dispose();\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n String mail = resetMail.getText().toString();\n fAuth.sendPasswordResetEmail(mail).addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n Toast.makeText(Login.this, \"Reset link sent to your email.\", Toast.LENGTH_SHORT).show();\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(Login.this, \"Error! Reset link was not sent\" + e.getMessage(), Toast.LENGTH_SHORT).show();\n }\n });\n\n }", "public void emailCollisionError(){\n String[] options = {\"Proceed with Login\",\"Stay Here\"};\n AlertDialog.Builder builder = new AlertDialog.Builder(LoginActivity.this)\n .setTitle(\"You are a registered user, try logging in!\")\n .setItems(options, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n if(which == 0){\n\n startActivity(new Intent(LoginActivity.this, RegisteredUserLogin.class));\n LoginActivity.this.finish();\n\n }\n }\n });\n builder.show();\n\n }", "public void onRecoverPassword(View v)\r\n {\r\n\r\n String user_emailid = user_emailidET.getText().toString();\r\n String user_phonenumber = user_phonenumberET.getText().toString();\r\n\r\n\r\n String typeofoperation = \"recover_password\";\r\n\r\n\r\n\r\n if(user_emailid.equals(\"\"))\r\n {\r\n\r\n user_emailidET = (EditText) findViewById(R.id.recover_emailid);\r\n user_emailidET.requestFocus(R.id.recover_emailid);\r\n Toast toast = Toast.makeText(this,\"Please, enter email id.\", Toast.LENGTH_LONG);\r\n toast.setGravity(Gravity.DISPLAY_CLIP_VERTICAL,0,0);\r\n toast.show();\r\n\r\n\r\n }\r\n else if(user_emailid.length()>50)\r\n {\r\n user_emailidET = (EditText) findViewById(R.id.recover_emailid);\r\n user_emailidET.requestFocus(R.id.recover_emailid);\r\n Toast toast = Toast.makeText(this,\"email id exceeds 50 characters.\", Toast.LENGTH_LONG);\r\n toast.setGravity(Gravity.DISPLAY_CLIP_VERTICAL,0,0);\r\n toast.show();\r\n }\r\n\r\n\r\n else if(user_phonenumber.equals(\"\"))\r\n {\r\n\r\n user_phonenumberET = (EditText) findViewById(R.id.recover_mobilenumber);\r\n user_phonenumberET.requestFocus(R.id.recover_mobilenumber);\r\n Toast toast = Toast.makeText(this,\"Please, enter mobile number.\", Toast.LENGTH_LONG);\r\n toast.setGravity(Gravity.DISPLAY_CLIP_VERTICAL,0,0);\r\n toast.show();\r\n\r\n\r\n }\r\n else if(user_phonenumber.length()>10)\r\n {\r\n user_phonenumberET = (EditText) findViewById(R.id.recover_mobilenumber);\r\n user_phonenumberET.requestFocus(R.id.recover_mobilenumber);\r\n Toast toast = Toast.makeText(this,\"mobile number exceeds 10 characters.\", Toast.LENGTH_LONG);\r\n toast.setGravity(Gravity.DISPLAY_CLIP_VERTICAL,0,0);\r\n toast.show();\r\n }\r\n\r\n else\r\n {\r\n\r\n // background_processor class for connecting \"Android\" device from \"MySql Database.\r\n\r\n\r\n //ad = new AlertDialog.Builder(this).create();\r\n\r\n //ad.setTitle(\"Registering...\");\r\n // ad.setMessage(\"Please wait...\");\r\n //ad.show();\r\n\r\n\r\n /*-------------------Code to close dialog box automatically-------------------------------------*/\r\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\r\n builder.setTitle(\"Processing...\");\r\n builder.setMessage(\"Please Wait...\");\r\n builder.setCancelable(true);\r\n\r\n final AlertDialog closedialog = builder.create();\r\n\r\n closedialog.show();\r\n\r\n final Timer timer2 = new Timer();\r\n timer2.schedule(new TimerTask() {\r\n public void run() {\r\n closedialog.dismiss();\r\n timer2.cancel(); //this will cancel the timer of the system\r\n }\r\n }, 3000); // the timer will count 1 seconds....\r\n\r\n/*--------------------------------------------------------*/\r\n\r\n\r\n user_recover_password_background_worker urpbw = new user_recover_password_background_worker(this);\r\n urpbw.execute(typeofoperation,user_emailid, user_phonenumber);\r\n\r\n }\r\n\r\n\r\n\r\n }", "@Override\r\n public void onClick(View view) {\n showDialog(PASSWORD_DIALOG_ID);\r\n }", "public void onPressValidate(View view) {\n final String validEmail = txtValidEmail.getText().toString();\n if (validEmail.length() == 0) {\n txtValidEmail.requestFocus();\n txtValidEmail.setError(\"Please enter an email address\");\n }\n else if (!validEmail.matches(\"^(.+)@(.+)$\")) {\n txtValidEmail.requestFocus();\n txtValidEmail.setError(\"Invalid email address\");\n }\n else {\n InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\n imm.hideSoftInputFromWindow(view.getWindowToken(),0);\n authenticateUserEmail(validEmail);\n }\n }", "public void onClick(View view){\n if(password.getText().toString().equals(confirm.getText().toString()))\n creatAccount(email.getText().toString(), password.getText().toString(), username.getText().toString());\n else\n showMessage(\"Confirmed Password is not the same as Password\");\n }", "public void email() {\n\t\t\t\temailGUI = new EmailGUI();\n\t\t\t\tpopUpWindow = emailGUI.getFrame();\n\t\t\t\tpopUpWindow.setVisible(true);\n\t\t\t\temailGUI.setListeners(new mailListener());\n\t\t\t}", "@Override\n public void onClick(DialogInterface dialog, int which) {\n String mail = resetMail.getText().toString();\n fAuth.sendPasswordResetEmail(mail).addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n Toast.makeText(Login.this, \"Reset Link Sent To Your Email.\", Toast.LENGTH_SHORT).show();\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(Login.this, \"Error ! Reset Link is Not Sent\" + e.getMessage(), Toast.LENGTH_SHORT).show();\n }\n });\n }", "private void showEditDialog() {\n String[] array = {\"Change Name\", \"Change Password\"};\n AlertDialog.Builder builder = new AlertDialog.Builder(UserProfileActivity.this);\n builder.setTitle(\"What would you like to change?\")\n .setItems(array, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n switch (which) {\n case 0:\n changeNameDialogFragment fragment1\n = new changeNameDialogFragment();\n fragment1.show(getSupportFragmentManager(),\n \"changeNameDialogFragment\");\n break;\n case 1:\n changePasswordDialogFragment fragment2\n = new changePasswordDialogFragment();\n fragment2.show(getSupportFragmentManager(),\n \"changePasswordDialogFragment\");\n break;\n default:\n break;\n }\n dialog.dismiss();\n }\n })\n .setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int i) {\n dialog.dismiss();\n }\n });\n builder.show();\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n\n userphone=editText_phone.getText().toString();\n useremail=editText_email.getText().toString();\n\n if (validate(userphone,useremail)){\n editProfile(user_id,userphone,useremail);\n dialogInterface.dismiss();\n }\n else {\n Toast.makeText(getActivity(), \"Updation Failed\", Toast.LENGTH_SHORT).show();\n }\n\n }", "public void onClick(View v) {\n\t\t\t\tfname = edt_fname.getText().toString();\n\t\t\t\tlname = edt_lname.getText().toString();\n\t\t\t\tcontactno = edt_contactno.getText().toString();\n\t\t\t\temail = edt_email.getText().toString();\n\t\t\t\tpassword = edt_password.getText().toString();\n\t\t\t\tconfirmpassword = edt_confirmpassword.getText().toString();\n\n\t\t\t\tpattern = Pattern.compile(EMAIL_PATTERN);\n\t\t\t\tmatcher = pattern.matcher(email);\n\t\t\t\tif (fname.equals(\"\")\n\t\t\t\t\t\t|| !fname.matches(\"[a-zA-z]+([ '-][a-zA-Z]+)*\")) {\n\n\t\t\t\t\tedt_fname.setError(\"Enter valid firstname format\");\n\n\t\t\t\t}\n\n\t\t\t\telse if (lname.equals(\"\")\n\t\t\t\t\t\t|| !lname.matches(\"[a-zA-z]+([ '-][a-zA-Z]+)*\")) {\n\n\t\t\t\t\tedt_lname.setError(\"Enter valid lastname format\");\n\n\t\t\t\t} else if (contactno.equals(\"\")\n\t\t\t\t\t\t|| !contactno.matches(MobilePattern)) {\n\n\t\t\t\t\tedt_contactno.setError(\"Enter valid contact number\");\n\n\t\t\t\t} else if (email.equals(\"\")) {\n\n\t\t\t\t\tedt_email.setError(\"Please enter email\");\n\n\t\t\t\t}\n\n\t\t\t\telse if (!matcher.matches()) {\n\t\t\t\t\tedt_email.setError(\"Enter valid email.\");\n\t\t\t\t}\n\n\t\t\t\telse if (password.equals(\"\")) {\n\n\t\t\t\t\tedt_password.setError(\"Please enter password\");\n\n\t\t\t\t} else if (password.length() < 6) {\n\n\t\t\t\t\tedt_password\n\t\t\t\t\t\t\t.setError(\"Choose password length minimum 6 character.\");\n\n\t\t\t\t} else if (confirmpassword.equals(\"\")\n\t\t\t\t\t\t|| !password.matches(confirmpassword)) {\n\n\t\t\t\t\tedt_confirmpassword.setError(\"Password mismatch\");\n\n\t\t\t\t}\n\n\t\t\t\telse if (StaticData.isNetworkAvailable(getApplicationContext())) {\n\n\t\t\t\t\tgetlocation();\n\n\t\t\t\t} else {\n\t\t\t\t\tToast.makeText(getApplicationContext(),\n\t\t\t\t\t\t\t\"Internet not connected\", Toast.LENGTH_SHORT)\n\t\t\t\t\t\t\t.show();\n\t\t\t\t}\n\n\t\t\t}", "@Override\n\tprotected Dialog onCreateDialog(int id) {\n\n\t\tLayoutInflater factory = LayoutInflater.from(this);\n\t\tfinal View textEntryView = factory.inflate(R.layout.alert_dialog, null);\n\t\tfinal EditText MacID = (EditText) textEntryView\n\t\t\t\t.findViewById(R.id.editTextMacID);\n\t\treturn new AlertDialog.Builder(GarageOpener.this)\n\t\t\t\t// .setIconAttribute(android.R.attr.alertDialogIcon)\n\t\t\t\t.setTitle(\"Enter MAC Address of form: \\n 00:06:66:01:E3:BD\")\n\t\t\t\t.setView(textEntryView)\n\n\t\t\t\t.setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int whichButton) {\n\n\t\t\t\t\t\tString value = MacID.getText().toString();\n\n\t\t\t\t\t\t// prelim test for actual MacID\n\t\t\t\t\t\t// test char length\n//\t\t\t\t\t\tif (value.length() != 17) {\n//\t\t\t\t\t\t\tToast.makeText(\n//\t\t\t\t\t\t\t\t\tgetApplicationContext(),\n//\t\t\t\t\t\t\t\t\t\"MacID is wrong Length. Please include ':'\",\n//\t\t\t\t\t\t\t\t\tToast.LENGTH_LONG);\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse {\n//\t\t\t\t\t\t\tint colonCount = 0;\n//\t\t\t\t\t\t\tchar[] a = value.toCharArray();\n//\t\t\t\t\t\t\tfor (int i = 0; i < value.length(); i++) {\n//\t\t\t\t\t\t\t\tif (a[i] == ':') {\n//\t\t\t\t\t\t\t\t\tcolonCount++;\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\tif (colonCount != 5) {\n//\t\t\t\t\t\t\t\tToast.makeText(\n//\t\t\t\t\t\t\t\t\t\tgetApplicationContext(),\n//\t\t\t\t\t\t\t\t\t\t\"MacID is incorrect. Did you include ':' characters? \",\n//\t\t\t\t\t\t\t\t\t\tToast.LENGTH_LONG);\n//\t\t\t\t\t\t\t}\n//\n//\t\t\t\t\t\t}\n\n\t\t\t\t\t\tLog.e(TAG, \"******ENTERED DATA: \" + whichButton + \" \"\n\t\t\t\t\t\t\t\t+ value);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//set macaddress to connect with\n\t\t\t\t\t\tMAC_ADDRESS = value;\n\t\t\t\t\t\t\n\t\t\t\t\t\t/* User clicked OK so do some stuff */\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\t.setNegativeButton(\"CANCEL\",\n\t\t\t\t\t\tnew DialogInterface.OnClickListener() {\n\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog,\n\t\t\t\t\t\t\t\t\tint whichButton) {\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t/* User clicked cancel so do some stuff */\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\t\t\t\t.create();\n\t\t// }\n\n\t}", "public void recoverPassword(String vEID) {\n\t\tmyD.findElement(By.linkText(\"Forgot Password\")).click();\n\t\t\n\t\t//4\tEnter Email ID EmailID\n\t\tmyD.findElement(By.id(\"forgot_email\")).clear();\n\t\tmyD.findElement(By.id(\"forgot_email\")).sendKeys(vEmailID);\n\t\t\n\t\t//5\tClick on Recover Button\t\t\t\n\t\tmyD.findElement(By.name(\"submit\")).click();\n\t\t\n\t}", "public void SaveEmailAddress(View view) {\r\n\t\tEditText edit = (EditText)findViewById(R.id.EmailText);\r\n\t\tString email = edit.getText().toString();\t\t\r\n\t\tToast.makeText(this, email, Toast.LENGTH_LONG).show();\r\n\t}", "public Forgotpassword()\n {\n initComponents();\n \n }", "public void userNameInput()\n {\n if(forgotPasswordModel.userExists(textBox1.getText())) {\n\n user = forgotPasswordModel.getUser(textBox1.getText());\n userName = false;\n secQuestion = true;\n String txt = \"Your secret question is: \" + user.getSecretQ();\n labelHeader.setText(txt);\n textBox1Label.setText(\"Answer\");\n textBox1.promptTextProperty().set(\"Security Question Answer\");\n textBox1.setText(\"\");\n }\n else\n {\n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.setContentText(\"Username does not exist!\");\n alert.show();\n }\n }", "public void popUpEmptyTextView() {\n final Intent intent = new Intent(this, AddUserDetailsActivity.class);\n AlertDialog alertDialog = new AlertDialog.Builder(AddUserDetailsActivity.this).create();\n alertDialog.setTitle(\"ERROR\");\n alertDialog.setMessage(\"One of the fields have been left empty, please try again.\"\n );\n alertDialog.setButton(AlertDialog.BUTTON_NEUTRAL, \"OK\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n //Intent intent = new Intent(this, AddUserDetailsActivity.class);\n startActivity(intent);\n finish();\n\n }\n });\n alertDialog.show();\n }", "public void displayForgotPasswordDialog(View v) {\n\n FragmentManager fm = getSupportFragmentManager();\n ForgotPasswordFragment frag = new ForgotPasswordFragment();\n frag.show(fm, \"fragment_forgot_password\");\n }", "private void secQuestionInput()\n {\n if(textBox1.getText().equals(user.getSecretQAns()))\n {\n secQuestion = false;\n password = true;\n\n textBox1.setText(\"\");\n textBox1.promptTextProperty().set(\"New Password\");\n labelHeader.setText(\"Input new password\");\n\n textBox2Label.setVisible(true);\n textBox2Label.setText(\"Confirm New Password\");\n textBox2.setVisible(true);\n textBox1Label.setText(\"New Password\");\n }\n else\n {\n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.setContentText(\"Security answer does not match!\");\n alert.show();\n }\n }", "@Override\r\n\t\t\tpublic void afterTextChanged(Editable edit) {\n\t\t\t\temail = edit.toString();\r\n\t\t\t}", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n // Extract email address\n String mail = emailField.getText().toString();\n if (mail.length()==0){\n Toast.makeText(LogInActivity.this, \"Enter a valid email\", Toast.LENGTH_SHORT).show();\n return;\n }\n firebaseAuth.sendPasswordResetEmail(mail).addOnSuccessListener(new OnSuccessListener<Void>() {\n /**\n * Displays toast when password reset email is successfully sent\n * @param aVoid VarArgs\n */\n @Override\n public void onSuccess(Void aVoid) {\n Toast.makeText(LogInActivity.this, \"Email is send\", Toast.LENGTH_SHORT).show();\n }\n }).addOnFailureListener(new OnFailureListener() {\n /**\n * Displays email when password reset email fails to send\n * @param e exception\n */\n @Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(LogInActivity.this, \"Unable to send the email\"+e.getMessage(), Toast.LENGTH_SHORT).show();\n }\n });\n }", "public void onClick(DialogInterface dialog,int id) {\n ForgotPasswordAct.this.finish();\n }", "public void onClick(DialogInterface dialog,int id) {\n ForgotPasswordAct.this.finish();\n }", "@Override\n public void onClick(View v) {\n\n String email=et_email.getText().toString().trim();\n String email1=et_email1.getText().toString().trim();\n if(email.equals(\"\")||email1.equals(\"\"))\n {\n Toast.makeText(AdminHomeActivity.this, \"Enter all field\", Toast.LENGTH_SHORT).show();\n }\n else\n {\n\n if(c==0)\n {\n repo.setEmail(email);\n repo.setEmail(email1);\n }\n else if(c==2)\n {\n repo.updateEmail(email,ema[1]);\n repo.updateEmail(email1,ema[0]);\n }\n\n dialog.dismiss();\n }\n\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n etUser.setText(\"\");\n etPassword.setText(\"\");\n\n\n }", "private void confirmOtp() {\n LayoutInflater li = LayoutInflater.from(this);\n //Creating a view to get the dialog box\n View confirmDialog = li.inflate(R.layout.dialog_confirm, null);\n\n //Initizliaing confirm button fo dialog box and edittext of dialog box\n AppCompatButton buttonConfirm = confirmDialog.findViewById(R.id.buttonConfirm);\n// editTextConfirmOtp = (EditText) confirmDialog.findViewById(R.id.editTextOtp);\n\n //Creating an alertdialog builder\n AlertDialog.Builder alert = new AlertDialog.Builder(this);\n\n //Adding our dialog box to the view of alert dialog\n alert.setView(confirmDialog);\n alert.setCancelable(false);\n\n //Creating an alert dialog\n final AlertDialog alertDialog = alert.create();\n\n //Displaying the alert dialog\n alertDialog.show();\n\n //On the click of the confirm button from alert dialog\n buttonConfirm.setOnClickListener(new OnClickListener() {\n @Override\n public void onClick(View v) {\n //Hiding the alert dialog\n alertDialog.dismiss();\n\n //Displaying a progressbar\n final ProgressDialog loading = ProgressDialog.show(BusinessRegistration.this, \"Authenticating\",\n \"Please wait while we check the entered code\", false, false);\n\n loading.dismiss();\n\n //Starting a new activity\n startActivity(new Intent(BusinessRegistration.this, BusinessMainActivity.class));\n\n\n// //Getting the user entered otp from edittext\n// final String otp = editTextConfirmOtp.getText().toString().trim();\n//\n// //Creating an string request\n// StringRequest stringRequest = new StringRequest(Request.Method.POST, Config.CONFIRM_URL,\n// new Response.Listener<String>() {\n// @Override\n// public void onResponse(String response) {\n// //if the server response is success\n// if(response.equalsIgnoreCase(\"success\")){\n// //dismissing the progressbar\n// loading.dismiss();\n//\n// //Starting a new activity\n// startActivity(new Intent(MainActivity.this, Success.class));\n// }else{\n// //Displaying a toast if the otp entered is wrong\n// Toast.makeText(MainActivity.this,\"Wrong OTP Please Try Again\",Toast.LENGTH_LONG).show();\n// try {\n// //Asking user to enter otp again\n// confirmOtp();\n// } catch (JSONException e) {\n// e.printStackTrace();\n// }\n// }\n// }\n// },\n// new Response.ErrorListener() {\n// @Override\n// public void onErrorResponse(VolleyError error) {\n// alertDialog.dismiss();\n// Toast.makeText(MainActivity.this, error.getMessage(), Toast.LENGTH_LONG).show();\n// }\n\n\n }\n\n });\n\n }", "public JTextField getTxtEmail() {\n return this.txtEmail;\n }", "public void Name_Setter() {\n Dialog<Pair<String, String>> dialog = new Dialog<>();\n dialog.setTitle(\"Developer Login\");\n FontAwesomeIconView icon = new FontAwesomeIconView(FontAwesomeIcon.EXPEDITEDSSL);\n icon.setGlyphSize(40);\n icon.setGlyphStyle(\"-fx-fill:green;\");\n\n dialog.setGraphic(icon);\n dialog.setHeaderText(\"Only Developers Authorised..\");\n\n //set Button types\n ButtonType lbutton = new ButtonType(\"Open\", ButtonData.NO);\n dialog.getDialogPane().getButtonTypes().addAll(lbutton, ButtonType.CANCEL);\n\n //create the username and password labels and fields\n GridPane grid = new GridPane();\n grid.setHgap(10);\n grid.setVgap(10);\n grid.setPadding(new Insets(0, 20, 10, 10));\n\n JFXTextField fld = new JFXTextField();\n fld.setPromptText(\"Developer email\");\n fld.setMinWidth(200);\n\n JFXPasswordField pfld = new JFXPasswordField();\n pfld.setPromptText(\"Developer Password\");\n\n Label infor = new Label(\"Enter Email and Password\");\n\n grid.add(fld, 2, 2);\n grid.add(pfld, 2, 5);\n grid.add(infor, 4, 8);\n\n dialog.getDialogPane().setContent(grid);\n\n Optional<Pair<String, String>> result = dialog.showAndWait();\n\n String pass = pfld.getText();\n String uname = fld.getText();\n\n if (pass.equals(\"erickerickyaah\") && uname.equals(\"[email protected]\")) {\n\n reportgenthree.ReportGenThree.NameSetter();\n\n } else {\n\n infor.setText(\"Wrong Password..\");\n }\n\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n String mail = resetMail.getText().toString();\n mAuth.sendPasswordResetEmail(mail).addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n Toast.makeText(LoginActivity.this,\"Reset Link sent to your Email.\", Toast.LENGTH_SHORT).show();\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(LoginActivity.this,\"Error ! Reset Link is Not Sent.\" + e.getMessage(), Toast.LENGTH_SHORT).show();\n }\n });\n }", "private String confirmPassword()\n {\n JPasswordField tf_password = new JPasswordField();\n int response = JOptionPane.showConfirmDialog(null,\n tf_password, \"Confirm Password: \",\n JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE);\n\n // Debug: System.out.println(\"Dialog\" + tf_password.getPassword());\n if (response == JOptionPane.OK_OPTION)\n {\n return new String(tf_password.getPassword());\n }\n return null;\n }", "public void onFailure(Throwable caught) {\n\t\t\t\t\t\t\tdialogBox.setText(\"Email Address Registration - Failure\");\r\n\t\t\t\t\t\t\tdialogBox.center();\r\n\t\t\t\t\t\t\tcloseButton.setFocus(true);\r\n\t\t\t\t\t\t\tdialogBox.show();\r\n\t\t\t\t\t\t}", "@Override\n public void actionPerformed(ActionEvent e) { // Acionado qnd aperta ENTER\n String string = \"\";\n // Fechar janela de login\n setVisible(false);\n\n String usuario = textField.getText();\n String senha = passwordField.getText();\n\n // Usuário pressionou ENTER no JTextField textField[0]\n if (e.getSource() == textField || e.getSource() == passwordField) {\n if (usuario.equals(\"Daniel\")) {\n if (senha.equals(\"Daniel21\")) {\n JOptionPane.showMessageDialog(null, \"Entrou no sistema!\", \"Usuário: \" + usuario,\n JOptionPane.INFORMATION_MESSAGE);\n } else {\n JOptionPane.showMessageDialog(null, \"Senha Incorreta!\", \"ERRO\", JOptionPane.ERROR_MESSAGE);\n }\n } else {\n JOptionPane.showMessageDialog(null, \"Usuário Inválido!\", \"ERRO\", JOptionPane.ERROR_MESSAGE);\n }\n }\n\n // mostrar janela de login\n setVisible(true);\n }", "private void TFAddAltEmailFocusLost(java.awt.event.FocusEvent evt) {\n if (isEmail(TFAddAltEmail.getText())) {\n //no hace nada porque esta bien\n }else{\n JOptionPane.showMessageDialog(null,\"Email Incorrecto\",\"Validar email\", JOptionPane.INFORMATION_MESSAGE);\n TFAddAltEmail.requestFocus();\n }\n }", "@SuppressLint(\"InflateParams\")\r\n\tprivate void showDialog() {\n\t\tLayoutInflater layoutInflater = LayoutInflater.from(getActivity());\r\n\t\tviewAddEmployee = layoutInflater\r\n\t\t\t\t.inflate(R.layout.activity_dialog, null);\r\n\t\teditText = (EditText) viewAddEmployee.findViewById(R.id.editText1);\r\n\t\ttv_phone = (TextView) viewAddEmployee.findViewById(R.id.tv_phone);\r\n\t\tbt_setting = (Button) viewAddEmployee.findViewById(R.id.bt_setting);\r\n\t\tbt_cancel = (Button) viewAddEmployee.findViewById(R.id.bt_cancel);\r\n\t\tString tel = SharePreferenceUtil.getInstance(\r\n\t\t\t\tgetActivity().getApplicationContext()).getUserTel();\r\n\t\ttv_phone.setText(StringUtils.getTelNum(tel));\r\n\r\n\t\tshowPop();\r\n\r\n\t\tbt_setting.setOnClickListener(new OnClickListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tString psd = SharePreferenceUtil.getInstance(\r\n\t\t\t\t\t\tgetActivity().getApplicationContext()).getUserPsd();\r\n\t\t\t\tString password = editText.getText().toString().trim();\r\n\t\t\t\tif (TextUtils.isEmpty(password)) {\r\n\t\t\t\t\tShowToast(\"密码不能为空!\");\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tif (password.equals(psd)) {\r\n\t\t\t\t\tavatorPop.dismiss();\r\n\t\t\t\t\tintentAction(getActivity(), GesturePsdActivity.class);\r\n\r\n\t\t\t\t} else {\r\n\t\t\t\t\tShowToast(\"输入密码错误!\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tbt_cancel.setOnClickListener(new OnClickListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tavatorPop.dismiss();\r\n\t\t\t}\r\n\t\t});\r\n\t}", "private void resetPassword() {\n EditText etEmail = findViewById(R.id.etResetEmail);\n final String email = etEmail.getText().toString();\n\n if (email.isEmpty()) {\n etEmail.setError(\"Email field is required.\");\n etEmail.requestFocus();\n } else if (!Patterns.EMAIL_ADDRESS.matcher(email).matches()) {\n etEmail.setError(\"Valid email address required.\");\n etEmail.requestFocus();\n } else {\n mAuth.sendPasswordResetEmail(email).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()) {\n Log.d(\"PASSWORD_RESET\", \"Email sent.\");\n Toast.makeText(LoginActivity.this,\n \"An email has been sent to \" + email\n + \". Please check your inbox.\", Toast.LENGTH_LONG).show();\n changeForm(R.id.btnSignInForm);\n } else {\n //TODO: add some error notification for user here.\n Log.d(\"PASSWORD_RESET\", \"Failure.\");\n }\n }\n });\n }\n }", "public void onClick(final View v) {\n if (textInputLayout_email.getText().toString().isEmpty() || textInputLayout_email.getText().toString().equals(\"\")) {\n mensaje=getResources().getString(R.string.debe_indicar_nombre_usuario_registrado);\n Snackbar.make(v, mensaje, Snackbar.LENGTH_LONG).setAction(\"Action\", null).show();\n } else {\n // Para cerrar el teclado antes de mostrar el AlertDialog\n InputMethodManager inputMethodManager = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\n inputMethodManager.hideSoftInputFromWindow(textInputLayout_email.getWindowToken(), 0);\n //Dialogo que confirma el cambio de contraseña informado al usuario que se\n // le enviara un correo con la nueva contraseña auto generada.\n AlertDialog alertDialog = new AlertDialog.Builder(RecordarPass.this).create();\n alertDialog.setTitle(getResources().getString(R.string.recordarpasstitulo));\n alertDialog.setMessage(getResources().getString(R.string.mensaje_recordar_pass));\n alertDialog.setButton(AlertDialog.BUTTON_POSITIVE, getResources().getString(R.string.aceptar), new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n JSONObject json = new JSONObject();\n try {\n json.put(Tags.USUARIO, textInputLayout_email.getText().toString());\n //Se hace la peticion al servidor con el json que lleva dentro el email del usuario.\n json = JSONUtil.hacerPeticionServidor(\"usuarios/java/recuperar_contrasena/\", json);\n\n\n String p = json.getString(Tags.RESULTADO);\n //Comprobamos la conexión con el servidor\n if (p.contains(Tags.ERRORCONEXION)) {\n //Si no conecta imprime un snackbar\n mensaje=getResources().getString(R.string.error_conexion);\n Snackbar.make(v, mensaje, Snackbar.LENGTH_LONG).setAction(\"Action\", null).show();\n\n// return false;\n }\n else if (p.contains(Tags.OK)) {\n //Si el servidor devuelve OK y se ha generado una nueva\n // contraseña porque el usuario es correcto, tendra que mirar\n // el su correo para poder acceder a la apliacion con la nueva contraseña.\n mensaje= getResources().getString(R.string.mensaje_enviado);\n Snackbar.make(v, mensaje, Snackbar.LENGTH_LONG).setAction(\"Action\", null).show();\n finish();\n }\n //resultado falla por otro error\n else if (p.contains(Tags.ERROR)) {\n String msg = json.getString(Tags.MENSAJE);\n Snackbar.make(v, msg, Snackbar.LENGTH_LONG).setAction(\"Action\", null).show();\n\n// return false;\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n dialog.dismiss();\n }\n });\n\n alertDialog.setButton(AlertDialog.BUTTON_NEGATIVE, getResources().getString(R.string.cancelar), new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n });\n alertDialog.show();\n }\n }", "public void emailFieldTest() {\r\n\t\tif(Step.Wait.forElementVisible(QuoteForm_ComponentObject.emailFieldLocator, \"Email input field\", 5)) {\r\n\t\t\tStep.Action.typeText(QuoteForm_ComponentObject.emailFieldLocator, \"Email input field\", \"[email protected]\");\r\n\t\t}\r\n\t}", "public static void showEnterText(Context context, String msg, final DialogResult listener) {\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(context);\n\t\tfinal EditText edit = new EditText(context);\n\t\t\n\t\tDialogInterface.OnClickListener clickListener = new DialogInterface.OnClickListener() {\n\t\t\t@Override\n\t\t public void onClick(DialogInterface dialog, int which) {\n\t\t switch (which){\n\t\t case DialogInterface.BUTTON_POSITIVE:\n\t\t //Yes button clicked\n\t\t \tlistener.result(true, edit.getText().toString());\n\t\t \tbreak;\n\n\t\t case DialogInterface.BUTTON_NEGATIVE:\n\t\t //No button clicked\n\t\t \tlistener.result(false, edit.getText().toString());\n\t\t break;\n\t\t }\n\t\t }\n\t\t};\n\t\t \n\t\tbuilder.setView(edit);\n\t\tbuilder.setMessage(msg)\n\t\t\t.setPositiveButton(\"Yes\", clickListener)\n\t \t.setNegativeButton(\"No\", clickListener)\n\t \t.show();\t\t\n\t}", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.activity_change_password);\n\t\t\n\t\tToolbar toolbar = (Toolbar) findViewById(R.id.toolbar);\n if (toolbar != null) {\n toolbar.setNavigationIcon(R.drawable.abc_ic_ab_back_mtrl_am_alpha);\n toolbar.setTitle(\"Reset Password\");\n this.setSupportActionBar(toolbar);\n }\n \n Bundle bundle = getIntent().getExtras();\n if (bundle != null) {\n \temail = bundle.getString(\"email\");\n\t\t}\n \n connectionDetector = SKConnectionDetector.getInstance(this);\n \n\t\ttxt_login_email = (TextView)findViewById(R.id.txt_email);\n\t\ttxt_login_email.setText(\"**We've already sent the Code to your mail: (\"+email+\"). Enter it below\"); \n\t\t\n\t\ttxt_code = (EditText)findViewById(R.id.txt_code);\n\t\ttxt_password = (EditText)findViewById(R.id.txt_password);\n\t\ttxt_confirm_password = (EditText)findViewById(R.id.txt_confirm_password);\n\t\t\n\t\tbtn_continue = (FButton)findViewById(R.id.btn_continue);\n\t\tbtn_continue.setButtonColor(getResources().getColor(R.color.golden_brown_light));\n\t\tbtn_continue.setShadowEnabled(true);\n\t\tbtn_continue.setShadowHeight(3);\n\t\tbtn_continue.setCornerRadius(7);\n\t\t\n\t\tbtn_cancel = (FButton)findViewById(R.id.btn_cancel);\n\t\tbtn_cancel.setButtonColor(getResources().getColor(R.color.gray));\n\t\tbtn_cancel.setShadowEnabled(true);\n\t\tbtn_cancel.setShadowHeight(3);\n\t\tbtn_cancel.setCornerRadius(7);\n\t\t\n\t\tbtn_cancel.setOnClickListener(new OnClickListener() {\n\t\t\t\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tfinish();\n\t\t\t}\n\t\t});\n\t\t\n\t\tbtn_continue.setOnClickListener(new OnClickListener() {\n\t\t\t\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tif (checkFields()) {\n\t\t\t\t\tcode = txt_code.getText().toString();\n\t\t\t\t\tnew_password = txt_password.getText().toString();\n\t\t\t\t\t\n\t\t\t\t\tif (connectionDetector.isConnectingToInternet()) {\n\t\t\t\t\t\tgetResetPassword();\n\t\t\t\t\t}else {\n\t\t\t\t\t\tconnectionDetector.showErrorMessage();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tstartActivity(new Intent(ChangePasswordActivity.this, UserProfileActivity.class));\n\t\t\t}\n\t\t});\n\t}", "@Override\n public void onClick(View view) {\n if (validate()) {\n\n //Get values from EditText fields\n String Email = editTextEmail.getText().toString();\n String Password = editTextPassword.getText().toString();\n }\n }", "private void createContents() {\n shell = new Shell(getParent(), SWT.SHELL_TRIM | SWT.BORDER);\n shell.setSize(450, 353);\n shell.setText(\"修改邮箱\");\n shell.setLayout(new FormLayout());\n\n Label lblNewLabel = new Label(shell, SWT.NONE);\n FormData fd_lblNewLabel = new FormData();\n fd_lblNewLabel.top = new FormAttachment(0, 31);\n fd_lblNewLabel.left = new FormAttachment(0, 50);\n lblNewLabel.setLayoutData(fd_lblNewLabel);\n lblNewLabel.setText(\"旧邮箱地址\");\n\n text = new Text(shell, SWT.BORDER);\n FormData fd_text = new FormData();\n fd_text.left = new FormAttachment(lblNewLabel, 62);\n fd_text.top = new FormAttachment(0, 31);\n text.setLayoutData(fd_text);\n\n Label label = new Label(shell, SWT.NONE);\n FormData fd_label = new FormData();\n fd_label.right = new FormAttachment(0, 126);\n fd_label.top = new FormAttachment(0, 99);\n fd_label.left = new FormAttachment(0, 50);\n label.setLayoutData(fd_label);\n label.setText(\"验证码\");\n\n text_1 = new Text(shell, SWT.BORDER);\n FormData fd_text_1 = new FormData();\n fd_text_1.left = new FormAttachment(text, 0, SWT.LEFT);\n fd_text_1.right = new FormAttachment(100, -47);\n fd_text_1.top = new FormAttachment(label, -3, SWT.TOP);\n text_1.setLayoutData(fd_text_1);\n\n Button button = new Button(shell, SWT.NONE);\n button.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent e) {\n\n YanZhengma();\n\n }\n });\n FormData fd_button = new FormData();\n fd_button.right = new FormAttachment(100, -10);\n button.setLayoutData(fd_button);\n button.setText(\"获取验证码\");\n\n Button btnNewButton = new Button(shell, SWT.NONE);\n btnNewButton.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent e) {\n try {\n changeEmail();\n } catch (BizException bizException) {\n bizException.printStackTrace();\n // SwtHelper.message(bizException.getMessage(),shell);\n }\n shell.dispose();\n\n\n }\n });\n FormData fd_btnNewButton = new FormData();\n fd_btnNewButton.right = new FormAttachment(0, 178);\n fd_btnNewButton.bottom = new FormAttachment(100, -10);\n fd_btnNewButton.left = new FormAttachment(0, 80);\n btnNewButton.setLayoutData(fd_btnNewButton);\n btnNewButton.setText(\"确认\");\n\n Button btnNewButton_1 = new Button(shell, SWT.NONE);\n btnNewButton_1.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent e) {\n shell.dispose();\n }\n });\n fd_text.right = new FormAttachment(btnNewButton_1, 0, SWT.RIGHT);\n fd_button.left = new FormAttachment(btnNewButton_1, 49, SWT.LEFT);\n FormData fd_btnNewButton_1 = new FormData();\n fd_btnNewButton_1.bottom = new FormAttachment(100, -10);\n fd_btnNewButton_1.right = new FormAttachment(100, -47);\n fd_btnNewButton_1.left = new FormAttachment(100, -157);\n btnNewButton_1.setLayoutData(fd_btnNewButton_1);\n btnNewButton_1.setText(\"返回\");\n\n Label label_1 = new Label(shell, SWT.NONE);\n FormData fd_label_1 = new FormData();\n fd_label_1.top = new FormAttachment(label, 49);\n fd_label_1.left = new FormAttachment(lblNewLabel, 0, SWT.LEFT);\n label_1.setLayoutData(fd_label_1);\n label_1.setText(\"新邮箱地址\");\n\n text_2 = new Text(shell, SWT.BORDER);\n fd_button.top = new FormAttachment(text_2, 19);\n FormData fd_text_2 = new FormData();\n fd_text_2.left = new FormAttachment(text, 0, SWT.LEFT);\n fd_text_2.right = new FormAttachment(100, -47);\n fd_text_2.top = new FormAttachment(label_1, -3, SWT.TOP);\n text_2.setLayoutData(fd_text_2);\n\n text.setText(email);\n }", "@OnClick(R.id.tdk_menerima_kata_sandi)\n public void kirimUlangnkatasandi(){\n resetpassword(email);\n }", "private void displayEmailError(String errorMessage)\n {\n ConstraintLayout.LayoutParams params = (ConstraintLayout.LayoutParams) etUsername.getLayoutParams();\n params.setMargins(32, 32, 32, 0);\n etUsername.setLayoutParams(params);\n etEmail.setBackgroundResource(R.drawable.edit_text_error);\n tvEmailError.setText(errorMessage);\n tvEmailError.setVisibility(View.VISIBLE);\n }", "@Override\n public void onClick(View v) {\n\n\n String domain = \"@iiitkalyani.ac.in\";\n\n\n // check the email provided, to match \"@iiitkalyani.ac.in\" domain\n emailId = userEmail.getText().toString().trim();\n\n StringBuilder stringBuilder = new StringBuilder();\n stringBuilder.append(emailId);\n stringBuilder = stringBuilder.reverse();\n String domainPart = stringBuilder.substring(0,min(domain.length(),emailId.length()));\n\n stringBuilder = new StringBuilder();\n stringBuilder.append(domainPart);\n stringBuilder = stringBuilder.reverse();\n\n\n\n final String name_of_user = userName.getText().toString().trim();\n if(name_of_user.length() < 3 || name_of_user.length() > 15){\n userName.setError(\"4 - 15 characters only!\");\n userName.requestFocus();\n return;\n }\n\n if(emailId.length() == 0){\n userEmail.setError(\"Field can't be empty\");\n userEmail.requestFocus();\n return;\n }\n\n if(!domain.equals(stringBuilder.toString())){\n userEmail.setError(\"use '@iiitkalyani.ac.in' domain\");\n userEmail.requestFocus();\n return;\n }\n\n // check for the pin\n userPin = userPinInput.getText().toString().trim();\n if(userPin.length() ==0 ){\n userPinInput.setError(\"Can't be empty!\");\n userPinInput.requestFocus();\n return;\n }\n\n\n // email and name of the user is checked for no error\n // now verify the credentials\n\n // show an progress dialog\n final ProgressDialog pd = new ProgressDialog(LoginActivity.this);\n pd.setMessage(\"Creating Account\");\n pd.show();\n\n\n mAuth.createUserWithEmailAndPassword(emailId,userPin)\n .addOnCompleteListener(LoginActivity.this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if(task.isSuccessful()){\n\n // to verify the user, send an email\n final FirebaseUser firebaseUser = FirebaseAuth\n .getInstance().getCurrentUser();\n\n // update the name of the user, before sending verification email\n UserProfileChangeRequest userProfileChangeRequest = new UserProfileChangeRequest\n .Builder().setDisplayName(name_of_user).build();\n firebaseUser.updateProfile(userProfileChangeRequest).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n\n // finally send an verification email\n firebaseUser.sendEmailVerification().addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n\n // make the progressBar invisible\n pd.cancel();\n\n // store the user name\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putBoolean(\"isNotVerified\",true);\n editor.putString(\"userName\",name_of_user);\n editor.putString(\"userEmail\",emailId);\n editor.putString(\"password\",userPin);\n editor.apply();\n\n // call an intent to the user verification activity\n startActivity(new Intent(LoginActivity.this,\n UserVerificationActivity.class));\n // finish this activity, so that user can't return\n LoginActivity.this.finish();\n }\n });\n\n }\n });\n\n\n\n }\n else{\n\n pd.cancel();\n\n // show collision error text if email id entered by user is already registered!\n try{\n throw task.getException();\n }\n catch(FirebaseAuthUserCollisionException e){\n emailCollisionError();\n }\n catch(FirebaseAuthWeakPasswordException e){\n userPinInput.setError(\"Too weak password!\");\n userPinInput.requestFocus();\n }\n catch(Exception e){\n Toast.makeText(LoginActivity.this,\n \"Something unexpected happened! Try again later.\", Toast.LENGTH_SHORT).show();\n }\n\n }\n }\n });\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tEditText phoneNb = (EditText) findViewById(R.id.edt_portable);\n\t\t\t\tif (phoneNb.length() == 10) {\n\t\t\t\t\tphoneNb.getText();\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"Invalid phone number\");\n\t\t\t\t}\n\n\t\t\t\t// Second verification\n\t\t\t\t// to verify that the password is the same in the confirmation\n\t\t\t\t// field\n\t\t\t\tEditText password = (EditText) findViewById(R.id.edt_password);\n\t\t\t\tEditText repassword = (EditText) findViewById(R.id.edt_repassword);\n\t\t\t\tif (repassword.getText().equals(password.getText())) {\n\t\t\t\t\tSystem.out.println(\"same password right \");\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"your password is not confirmed \");\n\t\t\t\t}\n\n\t\t\t\t// Third verification\n\t\t\t\t// to verify the email\n\t\t\t\tEditText email = (EditText) findViewById(R.id.edt_email);\n\t\t\t\tif (email.getText().equals(emailPattern)) {\n\t\t\t\t\tSystem.out.println(\"Valid mail\");\n\t\t\t\t\t// here we'll take this mail and save it into the user class\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"Invalid mail\");\n\t\t\t\t}\n\t\t\t\tEditText nom= (EditText) findViewById(R.id.edt_nom); \n\t\t\t\tEditText prenom= (EditText) findViewById(R.id.edt_prenom); \n\t\t\t\tEditText portable= (EditText)findViewById(R.id.edt_portable); \n\t\t\t\tUser u = new User(); \n\t\t\t\tu.setNom(nom.getText().toString()); \n\t\t\t\tu.setPrenom(prenom.getText().toString()); \n\t\t\t\tu.setPassword(password.getText().toString()); \n\t\t\t\t\n\t\t\t\tnew LongTask().execute(u); \n\t\t\t\n\t\t\t\t/*Intent authentification = new Intent(Formulaire.this,\n\t\t\t\t\t\tAuthentification.class);\n\t\t\t\tstartActivity(authentification);\n\t\t\t\t*/ \n\t\t\t\t\n\t\t\t}", "@Override\n\tpublic void showMailDialog() {\n\t\t\n\t}", "public User forgotPassword (String inputUsername, String inputEmail, String textForEmailBody) {\n\t\t\n\t String [] recievers = new String[1];\n\t recievers[0] = inputEmail;\n\t \n\t if( this.myCompany.isCompanyMember(inputUsername) != null)\n\t {\n\t\tif(!emailAvailability(inputEmail))\n\t\t{\n\t\t\tfor(int i=0; i<myCompany.getCompanyMembers().size(); i++)\n\t\t\t{\n\t\t\t\tif(inputEmail.equalsIgnoreCase(myCompany.getCompanyMembers().get(i).getMyAccount().getEmail()))\n\t\t\t\t{\n\t\t\t\t\tUser user = myCompany.getCompanyMembers().get(i);\n\t\t\t\t\tHelp.sendGMail(\"[email protected]\", \"ITintelligence2001\", recievers, \"Account Recovery\", textForEmailBody);\n\t\t\t\t\treturn user;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t }\n\t \n\t return null;\n\t}", "private void RegisterUser(final User user) {\n AlertDialog.Builder builder;\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {\n builder = new AlertDialog.Builder(this, android.R.style.Theme_Material_Dialog_Alert);\n } else {\n builder = new AlertDialog.Builder(this);\n }\n\n View view = LayoutInflater.from(MainActivity.this).inflate(R.layout.alert_dialog_input,null);\n\n builder.setTitle(\"Faltan informacion requerida\")\n .setMessage(\"Completa los siguentes campos\")\n .setView(view);\n\n final EditText editTxtEmailDialog = view.findViewById(R.id.editTxtEmailAlertDialog);\n final EditText editTxtNicknameDialog = view.findViewById(R.id.editTxtNicknameAlertDialog);\n final EditText editTxtPasswordDialog = view.findViewById(R.id.editTxtPasswordAlertDialog);\n\n if(user.getEmail() != null)\n editTxtEmailDialog.setVisibility(View.GONE);\n\n builder.setPositiveButton(\"Registar\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n String email = user.getEmail() != null ? user.getEmail() : editTxtEmailDialog.getText().toString();\n String nickname = editTxtNicknameDialog.getText().toString();\n String password = editTxtPasswordDialog.getText().toString();\n if(!isValidateRegisterProvider(email,nickname,password))\n return;\n user.setEmail(email);\n user.setNickname(nickname);\n user.setPassword(password);\n\n\n\n //User aux = new User(user.getName(), user.getLastName(),nickname,email,password,\"\", user.getProvider());\n if(!Networking.isNetworkAvailable(MainActivity.this)) {\n Toast.makeText(MainActivity.this,\"No hay internet\",Toast.LENGTH_SHORT).show();\n return;\n }\n new Networking(MainActivity.this).execute(Networking.SIGNUP_PROVIDER, user,new NetCallback() {\n @Override\n public void onWorkFinish(Object... objects) {\n\n final User user_temp = (User) objects[0];\n if(user_temp.getId() != -1) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n Toast.makeText(MainActivity.this,\"Bienvenido\",Toast.LENGTH_SHORT).show();\n Intent intent = new Intent(MainActivity.this, InitActivity.class);\n Grua grua = new Grua(\"\",\"\", \"\");\n grua.setId(-1);\n intent.putExtra(Register.JSON_USER, user_temp.toJSON());\n intent.putExtra(Register.JSON_GRUA,grua.toJSON());\n SharedUtil.setUserNickname(MainActivity.this,user_temp.getNickname());\n SharedUtil.setUserPassword(MainActivity.this, user_temp.getPassword());\n SharedUtil.setUserProvider(MainActivity.this, user_temp.getProvider());\n startActivity(intent);\n }\n });\n }\n\n }\n\n @Override\n public void onMessageThreadMain(Object data) {\n final String message = (String) data;\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n Toast.makeText(MainActivity.this, message, Toast.LENGTH_SHORT).show();\n }\n });\n\n }\n });\n\n }\n }).setNegativeButton(\"Cancelar\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n //... Remover instancia iniciar con ...\n Toast.makeText(MainActivity.this,\"Su registro se ha cancelado\", Toast.LENGTH_SHORT).show();\n }\n })\n .setIcon(android.R.drawable.ic_dialog_info)\n .show();\n\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n String newpass = resetpass.getText().toString();\n user.updatePassword(newpass).addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n Toast.makeText(Profile.this, \"Password reset successfully\", Toast.LENGTH_SHORT).show();\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(Profile.this, \"Password reset failed\", Toast.LENGTH_SHORT).show();\n }\n });\n }", "@Override\n public void onClick(View view) {\n if (isValid(Email.getText().toString())){\n //checks is passwords match\n if (Password.getText().toString().matches(PasswordValidation.getText().toString())){\n createnewuser(Email.getText().toString(), Password.getText().toString());\n } else {\n Toast.makeText(SignUp.this,\"Passwords do not match! :(\",Toast.LENGTH_LONG).show();\n }\n } else {\n Toast.makeText(SignUp.this,\"E-Mail isn't valid! :(\",Toast.LENGTH_LONG).show();\n }\n\n }", "private void showPasswordChooserDialog(){\n if (getFragmentManager().findFragmentByTag(PASSWORD_FRAGMENT_TAG) != null){\n return;\n }\n PasswordDialogFragment fragment = PasswordDialogFragment.createFragment(R.string.box_sharesdk_password, R.string.box_sharesdk_set_password, R.string.box_sharesdk_ok, R.string.box_sharesdk_cancel );\n fragment.show(getFragmentManager(), PASSWORD_FRAGMENT_TAG);\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n String newPassword = resetPassword.getText().toString();\n user.updatePassword(newPassword).addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void unused) {\n Toast.makeText(profile.this, \"Password Reset Successfully\", Toast.LENGTH_SHORT).show();\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(profile.this, \"Password Reset Failed.\", Toast.LENGTH_SHORT).show();\n }\n });\n }", "public Login() {\n initComponents();\n //emailField.setText(\"[email protected]\");\n }", "private void btnancSave1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnancSave1MouseClicked\n // TODO add your handling code here:\n \n String status = null;\n try {\n status = validateCode(txtsenderEmail.getText(), \n txtVerificationCode1.getText());\n } catch (IOException ex) {\n Logger.getLogger(ForgetPassword.class.getName()).log(Level.SEVERE, \n null, ex);\n }\n \n if (status == \"success\") {\n resetPassword r = new resetPassword(txtsenderEmail.getText());\n r.setVisible(true);\n searchCode.removeAll(searchCode);\n txtsenderEmail.setText(\"\");\n txtVerificationCode1.setText(\"\");\n this.hide();\n\n } else {\n JOptionPane.showMessageDialog(this, \"Varification code not match\", \n \"Error\", JOptionPane.ERROR_MESSAGE);\n }\n }", "private void showEmailVerificationView(String email) {\n ConstraintLayout lytSignIn = findViewById(R.id.lytSignIn);\n ConstraintLayout lytSignUp = findViewById(R.id.lytSignUp);\n ConstraintLayout lytEmailVerification = findViewById(R.id.lytEmailVerification);\n TextView tvInfo = findViewById(R.id.tvInfo);\n\n lytSignIn.setVisibility(View.GONE);\n lytSignUp.setVisibility(View.GONE);\n\n String info = \"We've sent an email to \" + email + \".\\nPlease check your inbox.\";\n tvInfo.setText(info);\n\n lytEmailVerification.setVisibility(View.VISIBLE);\n }", "@Override\n public void onClick(View view) {\n inputUsername = usernameInput.getText().toString().trim();\n inputPassword = passwordInput.getText().toString();\n\n if(!inputUsername.contains(\"@gmail.com\")){\n inputUsername = inputUsername.concat(\"@gmail.com\");\n //Toast.makeText(MainActivity.this, \"Email: \" + inputUsername, Toast.LENGTH_SHORT).show();\n }\n\n //Toast.makeText(MainActivity.this, \"Email: \" + inputUsername, Toast.LENGTH_SHORT).show();\n checkEmail(inputUsername);\n }" ]
[ "0.72698617", "0.7172786", "0.7079762", "0.69807374", "0.6615299", "0.6548841", "0.65099674", "0.64980114", "0.64504874", "0.6436932", "0.6428253", "0.63865083", "0.63346684", "0.630553", "0.6291072", "0.62810004", "0.6264767", "0.6259568", "0.6256068", "0.62500596", "0.622238", "0.6211367", "0.61978126", "0.6136936", "0.6135968", "0.6105963", "0.60938996", "0.60897285", "0.6065928", "0.60173434", "0.5988651", "0.5984058", "0.59820336", "0.59820336", "0.5980399", "0.59766257", "0.59766257", "0.59509134", "0.59492797", "0.59276843", "0.5916982", "0.59153587", "0.59043354", "0.588028", "0.5869332", "0.58627814", "0.5861065", "0.5851643", "0.58504885", "0.5837903", "0.5836681", "0.58196217", "0.5814297", "0.5808057", "0.57976913", "0.5796264", "0.5782731", "0.57612926", "0.5746677", "0.5742975", "0.57428277", "0.5721896", "0.570961", "0.57083416", "0.5704028", "0.5703616", "0.5703616", "0.57035017", "0.57003874", "0.56937796", "0.56860846", "0.5676376", "0.5665166", "0.5664389", "0.56634843", "0.5655822", "0.5650518", "0.56438917", "0.5643674", "0.56430745", "0.56393033", "0.5636721", "0.5623549", "0.56235373", "0.5622806", "0.56214726", "0.56192565", "0.56120163", "0.5605642", "0.56054777", "0.5599423", "0.5570025", "0.5567017", "0.5566585", "0.55613744", "0.5557236", "0.55540407", "0.5552427", "0.555019", "0.5539531" ]
0.6738759
4
Method to get the web driver instance.
public WebDriver getWebDriver() { String driverName = getProperty("driver"); if (driverName.equals("firefox")) { driver = new FirefoxDriver(); } else if (driverName.equals("chrome")) { System.setProperty("webdriver.chrome.driver", "src\\main\\resources\\binaries\\chromedriver.exe"); driver = new ChromeDriver(); } return driver; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public WebDriver getDriver() {\n\t\tSystem.out.println(\"Inside DriverFactory.getDriver\");\n\t\tif (webDriver == null) {\n\t\t\twebDriver = launchDriver();\n\t\t}\n\t\treturn webDriver;\n\t}", "public WebDriver getWebdriver() {\n return driver.get();\n }", "public static WebDriver getDriver() {\n return driver.get();\n }", "public WebDriver getDriver() {\r\n\t\tif (driver == null)\r\n\t\t\tdriver = createDriver();\r\n\t\treturn driver;\r\n\t}", "public static WebDriver getDriver() {\n return driver;\n }", "public static WebDriver getWebDriver() {\n\t\t\treturn webdriver;\n\t\t}", "public static WebDriver getDriver() {\n\t\treturn driver;\n\t}", "public synchronized static WebDriver getDriver() {\n //if webdriver object doesn't exist\n //create it\n if (driverPool.get() == null) {\n //specify browser type in configuration.properties file\n String browser = ConfigurationReader.getProperty(\"browser\").toLowerCase();\n switch (browser) {\n case \"chrome\":\n WebDriverManager.chromedriver().version(\"79\").setup();\n ChromeOptions chromeOptions = new ChromeOptions();\n chromeOptions.addArguments(\"--start-maximized\");\n driverPool.set(new ChromeDriver(chromeOptions));\n break;\n case \"chromeheadless\":\n //to run chrome without interface (headless mode)\n WebDriverManager.chromedriver().version(\"79\").setup();\n ChromeOptions options = new ChromeOptions();\n options.setHeadless(true);\n driverPool.set(new ChromeDriver(options));\n break;\n case \"firefox\":\n WebDriverManager.firefoxdriver().setup();\n driverPool.set(new FirefoxDriver());\n break;\n default:\n throw new RuntimeException(\"Wrong browser name!\");\n }\n }\n return driverPool.get();\n }", "public WebDriver getWebDriver() {\n return webDriver;\n }", "protected WebDriver getDriver() {\n return Web.getDriver(Browser.CHROME, server.getURL() + \"TEST\", By.className(\"AuO\"));\n }", "public static WebDriverSingleton getInstance() {\n return driver;\n }", "public static WebDriver getDriver() {\n if(driver == null) {\n throw new NullPointerException(\"WebDriver instance is null\");\n }\n return driver;\n }", "public static RemoteWebDriver getDriver() {\n logger.trace(\"Get the WebDriver\");\n\n // Gets the WebDriver stored in the ThreadLocal variable\n return driverThread.get().getDriver();\n }", "public WebDriver getDriver() {\n return driver;\n }", "public WebDriver getDriver() {\n return driver;\n }", "public static WebDriver getDriver() {\n\n if (driver == null) {\n\n if (isRemote()) {\n try {\n driverThreadLocal.set(new RemoteWebDriver(new URL(getHubUrl()),\n getBrowser().getBrowserCapabilities()));\n\n } catch (MalformedURLException e) {\n e.printStackTrace();\n }\n } else {\n driverThreadLocal.set(getBrowser().getWebDriver());\n }\n }\n\n driverThreadLocal.get().manage().timeouts()\n .implicitlyWait(getImplicitWait(), TimeUnit.SECONDS);\n\n return driverThreadLocal.get();\n }", "public static WebDriver getDriver(){\n if(driver==null){\n //get the driver type from properties file\n\n String browser=ConfigurationReader.getPropery(\"browser\");\n switch(browser) {\n case \"chrome\":\n WebDriverManager.chromedriver().setup();\n driver=new ChromeDriver();\n break;\n case \"firefox\":\n WebDriverManager.firefoxdriver().setup();\n driver=new FirefoxDriver();\n }\n }\n\n return driver;\n }", "public WebDriver getDriver() {\n\t\treturn driver;\n\t}", "private WebDriver getDriver() {\n return new ChromeDriver();\n }", "public WebDriver getDriver(){\n\t\treturn driver;\n\t}", "public static WebDriver getInstance() {\n\n\t\tif (instance == null) {\n\t\t\t// Thread Safe. Might be costly operation in some case\n\t\t\tsynchronized (TestBase.class) {\n\t\t\t\tif (instance == null) {\n\t\t\t\t\tinstance = WebdriverFactory.createDriver();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn instance;\n\t}", "public static WebDriver setupDriver()\r\n\t{\r\n\t driver = getWebDriver();\r\n\t return driver;\r\n\t}", "public WebDriver getDriver() {\n\t\t\treturn this.driver;\r\n\t\t}", "public static WebDriver getDriver(){\n if(driverPool.get()==null) {\n synchronized ((Driver.class)) {\n\n\n\n\n /*\n we read our browser type from configuration file using .getProperty method we\n creating in configuration Reader class.\n */\n String browserType = ConfigurationReader.getProperty(\"browser\");\n\n /*\n Depending on the browser type our switch statement will determine\n to open specific type of browser/driver\n */\n\n // we use this not testBase we use this test base just for practice\n switch (browserType) {\n\n case \"chrome\":\n WebDriverManager.chromedriver().setup();\n driverPool.set(new ChromeDriver());\n driverPool.get().manage().window().maximize();\n driverPool.get().manage().timeouts().implicitlyWait(2, TimeUnit.SECONDS);\n break;\n\n case \"firefox\":\n WebDriverManager.firefoxdriver().setup();\n driverPool.set(new FirefoxDriver());\n driverPool.get().manage().window().maximize();\n driverPool.get().manage().timeouts().implicitlyWait(2, TimeUnit.SECONDS);\n break;\n\n }\n }\n\n }\n /*\n Same driver instance will be return every time we call Driver.getDriver(); method\n */\n return driverPool.get();\n }", "public void getDriver() {\n\t\tWebDriverManager.chromedriver().setup();\n\t\tdriver = new ChromeDriver();\n\t}", "public WebDriver getDriver(){\r\n\t\treturn this.driver;\r\n\t\t\t \r\n\t\t }", "public static final BaseRemoteWebDriver getDriver() {\r\n\t\tString browser = ConfigProperties.BROWSER;\r\n\t\tif (driver == null) {\r\n\r\n\t\t\tif (browser.equalsIgnoreCase(FIREFOX)) {\r\n\r\n\t\t\t\tlog.info(\"initializing 'firefox' driver...\");\r\n\t\t\t\tDesiredCapabilities capabilities = DesiredCapabilities\r\n\t\t\t\t\t\t.firefox();\r\n\t\t\t\tcapabilities.setCapability(CapabilityType.ACCEPT_SSL_CERTS,\r\n\t\t\t\t\t\ttrue);\r\n\t\t\t\ttry {\r\n\t\t\t\t\tdriver = new BaseRemoteWebDriver(new URL(\r\n\t\t\t\t\t\t\tConfigProperties.HUBURL), capabilities);\r\n\t\t\t\t} catch (MalformedURLException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t\telse if (browser.equalsIgnoreCase(CHROME)) {\r\n\r\n\t\t\t\tif (isPlatformWindows())\r\n\r\n\t\t\t\t\tlog.info(\"initializing 'chrome' driver...\");\r\n\r\n\t\t\t\tDesiredCapabilities capabilities = DesiredCapabilities.chrome();\r\n\t\t\t\tcapabilities.setCapability(CapabilityType.ACCEPT_SSL_CERTS,\r\n\t\t\t\t\t\ttrue);\r\n\t\t\t\tcapabilities.setCapability(\r\n\t\t\t\t\t\tCapabilityType.UNEXPECTED_ALERT_BEHAVIOUR, \"ignore\");\r\n\t\t\t\t\r\n\t\t\t\ttry {\r\n\t\t\t\t\tdriver = new BaseRemoteWebDriver(new URL(\r\n\t\t\t\t\t\t\tConfigProperties.HUBURL), capabilities);\r\n\r\n\t\t\t\t} catch (MalformedURLException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t\telse if (browser.equalsIgnoreCase(INTERNET_EXPLORER)) {\r\n\r\n\t\t\t\tAssert.assertTrue(isPlatformWindows(),\r\n\t\t\t\t\t\t\"Internet Explorer is not supporting in this OS\");\r\n\r\n\t\t\t\tDesiredCapabilities capabilities = DesiredCapabilities\r\n\t\t\t\t\t\t.internetExplorer();\r\n\t\t\t\tcapabilities.setCapability(CapabilityType.ACCEPT_SSL_CERTS,\r\n\t\t\t\t\t\ttrue);\r\n\t\t\t\ttry {\r\n\t\t\t\t\tdriver = new BaseRemoteWebDriver(new URL(\r\n\t\t\t\t\t\t\tConfigProperties.HUBURL), capabilities);\r\n\t\t\t\t} catch (MalformedURLException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tlog.info(\"initializing 'internet explorer' driver...\");\r\n\r\n\t\t\t}\r\n\r\n\t\t\telse if (browser.equalsIgnoreCase(SAFARI)) {\r\n\r\n\t\t\t\tAssert.assertTrue(isPlatformWindows() || isPlatformMac(),\r\n\t\t\t\t\t\t\"Safari is not supporting in this OS\");\r\n\t\t\t\tDesiredCapabilities capabilities = DesiredCapabilities.safari();\r\n\t\t\t\tcapabilities.setCapability(CapabilityType.ACCEPT_SSL_CERTS,\r\n\t\t\t\t\t\ttrue);\r\n\t\t\t\ttry {\r\n\t\t\t\t\tdriver = new BaseRemoteWebDriver(new URL(\r\n\t\t\t\t\t\t\tConfigProperties.HUBURL), capabilities);\r\n\t\t\t\t} catch (MalformedURLException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t\telse if (browser.equalsIgnoreCase(\"html\")) {\r\n\r\n\t\t\t\tlog.info(\"initializing 'html' driver...\");\r\n\t\t\t\tDesiredCapabilities capabilities = DesiredCapabilities\r\n\t\t\t\t\t\t.htmlUnit();\r\n\t\t\t\tcapabilities.setCapability(CapabilityType.ACCEPT_SSL_CERTS,\r\n\t\t\t\t\t\ttrue);\r\n\t\t\t\ttry {\r\n\t\t\t\t\tdriver = new BaseRemoteWebDriver(new URL(\r\n\t\t\t\t\t\t\tConfigProperties.HUBURL), capabilities);\r\n\t\t\t\t} catch (MalformedURLException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn driver;\r\n\t}", "private static WebDriver driver() {\n\t\treturn null;\r\n\t}", "public static WebDriver getDriver() {\n\t\t\n\t\tString driver = System.getProperty(\"selenium.driver\");\n\t\tif(driver.equals(\"ie\")) {\n\t\t\treturn getIEDriver();\n\t\t\t\n\t\t}\n\t\telse if(driver.equals(\"chrome\")) {\n\t\t\treturn getChromeDriver();\n\t\t}\n\t\t\telse if(driver.equals(\"firefox\")) {\n\t\t\t\treturn getFirefoxriver();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthrow new RuntimeException(\"System property selenium driver is not set\");\n\t\t}\n\t}", "public static WebDriverManager getInstance() {\n if (instance == null || instance.webDriver == null) {\n instance = new WebDriverManager();\n }\n return instance;\n }", "protected WebDriver newDriver() {\n SupportedWebDriver supportedDriverType = Configuration.getDriverType();\n return webDriverFactory.newInstanceOf(supportedDriverType);\n }", "public WebDriver getWebDriver() {\n\t\treturn this.driver;\n\t}", "Driver getDriver();", "public static WebDriverManager getInstance() {\n\n return ourInstance;\n }", "public WebDriver get() throws MalformedURLException {\n if(driverParams.getSource()==null || !driverParams.getSource().toUpperCase().equals(\"REMOTE\")){\n return getDriver();\n }\n return getRemoteDriver();\n }", "public WebServiceDriver getWebServiceDriver() {\n return this.getWebServiceDriverManager().getWebServiceDriver();\n }", "public WebDriver getDriver() throws MalformedURLException {\r\n\t\tif (gridMode) {\r\n\t\t\treturn new RemoteWebDriver(new URL(\"http://192.168.106.36:5555/wd/hub\"), getBrowserCapabilities(browser));\r\n\t\t} else {\r\n\t\t\tswitch (browser.toLowerCase()) {\r\n\t\t\tcase \"firefox\":\r\n\t\t\t\tstartGeckoDriver();\r\n\t\t\t\tFirefoxOptions options = new FirefoxOptions();\r\n\t\t\t\toptions.setProfile(firefoxProfile());\r\n\t\t\t\treturn new FirefoxDriver(options);\r\n\r\n\t\t\tcase \"chrome\":\r\n\t\t\t\tstartChromeDriver();\r\n\t\t\t\treturn new ChromeDriver(chromeoptions());\r\n\r\n\t\t\tdefault:\r\n\t\t\t\tSystem.out.println(\"Selecting firefox as default browser.\");\r\n\t\t\t\tstartGeckoDriver();\r\n\t\t\t\toptions = new FirefoxOptions();\r\n\t\t\t\toptions.setProfile(firefoxProfile());\r\n\t\t\t\treturn new FirefoxDriver(options);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static WebDriver getDriver(String browser)\n {\n return createInstance(browser);\n }", "public static AppiumDriver getDriver(){\n return appiumDriverList.get(0);\n }", "public synchronized static WebDriver getDriver(String browser) {\n //if webdriver object doesn't exist\n //create it\n if (driverPool.get() == null) {\n //specify browser type in configuration.properties file\n\n switch (browser) {\n case \"chrome\":\n WebDriverManager.chromedriver().version(\"79\").setup();\n ChromeOptions chromeOptions = new ChromeOptions();\n chromeOptions.addArguments(\"--start-maximized\");\n driverPool.set(new ChromeDriver(chromeOptions));\n break;\n case \"chromeheadless\":\n //to run chrome without interface (headless mode)\n WebDriverManager.chromedriver().version(\"79\").setup();\n ChromeOptions options = new ChromeOptions();\n options.setHeadless(true);\n driverPool.set(new ChromeDriver(options));\n break;\n case \"firefox\":\n WebDriverManager.firefoxdriver().setup();\n driverPool.set(new FirefoxDriver());\n break;\n default:\n throw new RuntimeException(\"Wrong browser name!\");\n }\n }\n return driverPool.get();\n }", "@Override\n public RemoteWebDriver getDriver() {\n\n File chromeFile = new File(Config.getProperty(Config.CHROME_PATH));\n System.setProperty(\"webdriver.chrome.driver\", chromeFile.getAbsolutePath());\n\n ChromeDriverService service = new ChromeDriverService.Builder()\n .usingDriverExecutable(chromeFile)\n .usingAnyFreePort().build();\n Driver.chromeService.set(service);\n try {\n service.start();\n } catch (IOException e) {\n e.printStackTrace();\n }\n ChromeOptions options = new ChromeOptions();\n options.addArguments(\"--no-sandbox\");\n DesiredCapabilities capabilities = DesiredCapabilities.chrome();\n capabilities.setCapability(ChromeOptions.CAPABILITY, options);\n return new ChromeDriver(capabilities);\n }", "public WebDriverSingleton getDriver(String driverType){\n switch (driverType){\n case \"CHROME\":\n return new ChromeDriverSingleton();\n case \"FIREFOX\":\n return new FirefoxDriverSingleton();\n default:\n throw new IllegalArgumentException(\"Invalid driver type: \" + driverType);\n }\n }", "private WebDriver createDriver() {\r\n\t\tlogger.info(\"Environment Type is \" + environmentType);\r\n\t\tswitch (environmentType) {\r\n\t\tcase LOCAL:\r\n\t\t\tdriver = createLocalDriver();\r\n\t\t\tbreak;\r\n\t\tcase REMOTE:\r\n\t\t\tdriver = createRemoteDriver();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\treturn driver;\r\n\t}", "public WebServiceDriverManager getWebServiceDriverManager() {\n return (WebServiceDriverManager) this.getManagerStore()\n .get(WebServiceDriverManager.class.getCanonicalName());\n }", "public WebDriver getDriver() {\n return eventDriver;\n }", "@Override\n public WebDriver getWebDriver() {\n return new FirefoxDriver();\n }", "public AppiumDriver getDriver() {\n return appiumDriver;\n }", "@Override\n public RemoteWebDriver getDriver() {\n\n File ieFile = new File(Config.getProperty(Config.IE_PATH));\n System.setProperty(\"webdriver.ie.driver\", ieFile.getAbsolutePath());\n\n DesiredCapabilities capabilities = DesiredCapabilities.internetExplorer();\n capabilities.setCapability(\n InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS,\n true);\n capabilities.setJavascriptEnabled(true);\n return new InternetExplorerDriver(capabilities);\n }", "public WebDriver getDriverInstance() throws Exception {\n\t\tDesiredCapabilities caps = new DesiredCapabilities();\n\n\t\tString browser = (System.getProperty(\"browser\") != null\n\t\t\t\t&& !(System.getProperty(\"browser\").equals(\"${browser}\"))) ? (System.getProperty(\"browser\"))\n\t\t\t\t\t\t: (getConfiguration().getBrowserName());\n\t\tthis.browser = browser;\n\n\t\tbaseUrl = (System.getProperty(\"instanceUrl\") != null\n\t\t\t\t&& !(System.getProperty(\"instanceUrl\").equals(\"${instanceUrl}\"))) ? System.getProperty(\"instanceUrl\")\n\t\t\t\t\t\t: getConfiguration().getURL();\n\n\t\tboolean isBrowserStackExecution = (System.getProperty(\"isBrowserstackExecution\") != null\n\t\t\t\t&& !(System.getProperty(\"isBrowserstackExecution\").equals(\"${isBrowserstackExecution}\")))\n\t\t\t\t\t\t? (System.getProperty(\"isBrowserstackExecution\").equals(\"true\"))\n\t\t\t\t\t\t: getConfiguration().isBrowserStackExecution();\n\t\tSystem.out.println(\"Is Browser Stack execution: \" + System.getProperty(\"isBrowserstackExecution\") + \" : \"\n\t\t\t\t+ isBrowserStackExecution);\n\n\t\tboolean isRemoteExecution = (System.getProperty(\"isRemoteExecution\") != null\n\t\t\t\t&& !(System.getProperty(\"isRemoteExecution\").equals(\"${isRemoteExecution}\")))\n\t\t\t\t\t\t? (System.getProperty(\"isRemoteExecution\").equals(\"true\"))\n\t\t\t\t\t\t: getConfiguration().isRemoteExecution();\n\t\tSystem.out\n\t\t\t\t.println(\"Is Remote execution: \" + System.getProperty(\"isRemoteExecution\") + \" : \" + isRemoteExecution);\n\n\t\tif (isBrowserStackExecution) {\n\t\t\tString browserVersion, os, osVersion, platform, device, browserStackUserName = \"\", browserStackAuthKey = \"\",\n\t\t\t\t\tisEmulator = \"false\";\n\n\t\t\tif (System.getProperty(\"isJenkinsJob\") != null && System.getProperty(\"isJenkinsJob\").equals(\"true\")) {\n\t\t\t\t// isBrowserStackExecution=((System.getProperty(\"isBrowserstackExecution\")!=null)&&(System.getProperty(\"isBrowserstackExecution\").equals(\"true\")));\n\t\t\t\tReporter.log(\"starting from is jenkins job\", true);\n\t\t\t\tbaseUrl = System.getProperty(\"instanceUrl\");\n\t\t\t\tReporter.log(baseUrl + \"\", true);\n\n\t\t\t\tbrowserVersion = System.getProperty(\"browserVersion\");\n\t\t\t\tReporter.log(browserVersion + \"\", true);\n\n\t\t\t\tos = System.getProperty(\"os\");\n\t\t\t\t;\n\t\t\t\tReporter.log(os + \"\", true);\n\n\t\t\t\tosVersion = System.getProperty(\"osVersion\");\n\t\t\t\tReporter.log(osVersion + \"\", true);\n\n\t\t\t\tplatform = System.getProperty(\"platform\");\n\t\t\t\tReporter.log(platform + \"\", true);\n\n\t\t\t\tdevice = System.getProperty(\"device\");\n\t\t\t\tReporter.log(device + \"\", true);\n\n\t\t\t\tbrowser = System.getProperty(\"browser\");\n\t\t\t\tReporter.log(browser + \"\", true);\n\n\t\t\t\tbrowserStackUserName = System.getProperty(\"broswerStackUserName\").trim();\n\t\t\t\tReporter.log(browserStackUserName + \"\", true);\n\n\t\t\t\tbrowserStackAuthKey = System.getProperty(\"broswerStackAuthKey\").trim();\n\t\t\t\tReporter.log(browserStackAuthKey + \"\", true);\n\n\t\t\t\tisEmulator = System.getProperty(\"isEmulator\").trim();\n\t\t\t\tReporter.log(isEmulator + \"\", true);\n\n\t\t\t\tReporter.log(\"stopping from is jenkins job\", true);\n\t\t\t} else {\n\n\t\t\t\tbrowserVersion = (System.getProperty(\"browserVersion\") != null\n\t\t\t\t\t\t&& !(System.getProperty(\"browserVersion\").equals(\"${browserVersion}\")))\n\t\t\t\t\t\t\t\t? (System.getProperty(\"browserVersion\"))\n\t\t\t\t\t\t\t\t: getConfiguration().getBrowserStackBrowserVersion();\n\t\t\t\tos = getConfiguration().getBrowserStackOS();\n\t\t\t\tosVersion = getConfiguration().getBrowserStackOSVersion();\n\t\t\t\tplatform = getConfiguration().getBrowserStackPlatform();\n\t\t\t\tdevice = getConfiguration().getBrowserStackDevice();\n\t\t\t\tisEmulator = getConfiguration().getBrowserStackIsEmulator();\n\t\t\t}\n\n\t\t\tif (browser.equalsIgnoreCase(\"IE\")) {\n\t\t\t\tcaps.setCapability(\"browser\", \"IE\");\n\t\t\t} else if (browser.equalsIgnoreCase(\"GCH\") || browser.equalsIgnoreCase(\"chrome\")) {\n\t\t\t\tcaps.setCapability(\"browser\", \"Chrome\");\n\t\t\t} else if (browser.equalsIgnoreCase(\"safari\")) {\n\t\t\t\tcaps.setCapability(\"browser\", \"Safari\");\n\t\t\t} else if (browser.equalsIgnoreCase(\"android\") || browser.equalsIgnoreCase(\"iphone\")\n\t\t\t\t\t|| browser.equalsIgnoreCase(\"ipad\")) {\n\t\t\t\tcaps.setCapability(\"browserName\", browser);\n\t\t\t\tcaps.setCapability(\"platform\", platform);\n\t\t\t\tcaps.setCapability(\"device\", device);\n\t\t\t\tif (isEmulator.equals(\"true\")) {\n\t\t\t\t\tcaps.setCapability(\"emulator\", isEmulator);\n\t\t\t\t}\n\t\t\t\tcaps.setCapability(\"autoAcceptAlerts\", \"true\");\n\t\t\t} else {\n\t\t\t\tcaps.setCapability(\"browser\", \"Firefox\");\n\t\t\t}\n\t\t\tif (!(browser.equalsIgnoreCase(\"android\"))) {\n\t\t\t\tif (browserVersion != null && !browserVersion.equals(\"\") && !browserVersion.equals(\"latest\")) {\n\t\t\t\t\tcaps.setCapability(\"browser_version\", browserVersion);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (osVersion != null && !(browser.equalsIgnoreCase(\"android\"))) {\n\t\t\t\tcaps.setCapability(\"os\", os);\n\t\t\t\tif (os.toLowerCase().startsWith(\"win\")) {\n\t\t\t\t\tcaps.setCapability(\"os\", \"Windows\");\n\t\t\t\t} else if (os.toLowerCase().startsWith(\"mac-\") || os.toLowerCase().startsWith(\"os x-\")) {\n\t\t\t\t\tcaps.setCapability(\"os\", \"OS X\");\n\t\t\t\t}\n\n\t\t\t\tif (os.equalsIgnoreCase(\"win7\")) {\n\t\t\t\t\tosVersion = \"7\";\n\t\t\t\t} else if (os.equalsIgnoreCase(\"win8\")) {\n\t\t\t\t\tosVersion = \"8\";\n\t\t\t\t} else if (os.equalsIgnoreCase(\"win8.1\") || os.equalsIgnoreCase(\"win8_1\")) {\n\t\t\t\t\tosVersion = \"8.1\";\n\t\t\t\t} else if (os.toLowerCase().startsWith(\"mac-\") || os.toLowerCase().startsWith(\"os x-\")) {\n\t\t\t\t\tosVersion = os.split(\"-\")[1];\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"OS Version:\" + osVersion);\n\t\t\t\tcaps.setCapability(\"os_version\", osVersion);\n\t\t\t}\n\t\t\tcaps.setCapability(\"resolution\", \"1920x1080\");\n\t\t\tcaps.setCapability(\"browserstack.debug\", \"true\");\n\n\t\t\tSystem.out.println(\"AppLibrary Build: \" + System.getProperty(\"Build\"));\n\t\t\tSystem.out.println(\"AppLibrary Project: \" + System.getProperty(\"Suite\"));\n\t\t\tSystem.out.println(\"AppLibrary Name: \" + currentTestName);\n\t\t\tcaps.setCapability(\"build\", System.getProperty(\"Build\"));\n\t\t\tcaps.setCapability(\"project\", System.getProperty(\"Suite\"));\n\t\t\tcaps.setCapability(\"name\", currentTestName);\n\n\t\t\ttry {\n\t\t\t\tdriver = new RemoteWebDriver(new URL(\"http://\"\n\t\t\t\t\t\t+ (browserStackUserName.equals(\"\") ? getConfiguration().getBrowserStackUserName()\n\t\t\t\t\t\t\t\t: browserStackUserName)\n\t\t\t\t\t\t+ \":\" + (browserStackAuthKey.equals(\"\") ? getConfiguration().getBrowserStackAuthKey()\n\t\t\t\t\t\t\t\t: browserStackAuthKey)\n\t\t\t\t\t\t+ \"@hub.browserstack.com/wd/hub\"), caps);\n\t\t\t\t((RemoteWebDriver) driver).setFileDetector(new LocalFileDetector());\n\t\t\t} catch (Exception e) {\n\t\t\t\tReporter.log(\"Issue creating new driver instance due to following error: \" + e.getMessage() + \"\\n\"\n\t\t\t\t\t\t+ e.getStackTrace(), true);\n\t\t\t\tthrow e;\n\t\t\t}\n\n\t\t\tcurrentSessionID = ((RemoteWebDriver) driver).getSessionId().toString();\n\n\t\t} else if (isRemoteExecution) {\n\t\t\tSystem.out.println(\"Remote execution set up\");\n\t\t\tString remoteGridUrl = (System.getProperty(\"remoteGridUrl\") != null\n\t\t\t\t\t&& !(System.getProperty(\"remoteGridUrl\").equals(\"${remoteGridUrl}\")))\n\t\t\t\t\t\t\t? (System.getProperty(\"remoteGridUrl\"))\n\t\t\t\t\t\t\t: getConfiguration().getRemoteGridUrl();\n\t\t\tString os = (System.getProperty(\"os\") != null && !(System.getProperty(\"os\").equals(\"${os}\")))\n\t\t\t\t\t? (System.getProperty(\"os\"))\n\t\t\t\t\t: getConfiguration().getOS();\n\t\t\tString deviceName = (System.getProperty(\"deviceName\") != null\n\t\t\t\t\t&& !(System.getProperty(\"deviceName\").equals(\"${deviceName}\"))) ? (System.getProperty(\"deviceName\"))\n\t\t\t\t\t\t\t: getConfiguration().getDeviceName();\n\t\t\tString deviceVersion = (System.getProperty(\"deviceVersion\") != null\n\t\t\t\t\t&& !(System.getProperty(\"deviceVersion\").equals(\"${deviceVersion}\")))\n\t\t\t\t\t\t\t? (System.getProperty(\"deviceVersion\"))\n\t\t\t\t\t\t\t: getConfiguration().getDeviceVersion();\n\t\t\tString version = (System.getProperty(\"browserVersion\") != null\n\t\t\t\t\t&& !(System.getProperty(\"browserVersion\").equals(\"${browserVersion}\")))\n\t\t\t\t\t\t\t? (System.getProperty(\"browserVersion\"))\n\t\t\t\t\t\t\t: getConfiguration().getBrowserVersion();\n\t\t\tbrowser = (browser.equalsIgnoreCase(\"ie\") || browser.equalsIgnoreCase(\"internet explorer\")\n\t\t\t\t\t|| browser.equalsIgnoreCase(\"iexplore\")) ? \"internet explorer\" : browser;\n\t\t\tcaps.setBrowserName(browser.toLowerCase());\n\n\t\t\tif (os.equalsIgnoreCase(\"win7\") || os.equalsIgnoreCase(\"vista\")) {\n\t\t\t\tcaps.setPlatform(Platform.VISTA);\n\t\t\t} else if (os.equalsIgnoreCase(\"win8\")) {\n\t\t\t\tcaps.setPlatform(Platform.WIN8);\n\t\t\t} else if (os.equalsIgnoreCase(\"win8.1\") || os.equalsIgnoreCase(\"win8_1\")) {\n\t\t\t\tcaps.setPlatform(Platform.WIN8_1);\n\t\t\t} else if (os.equalsIgnoreCase(\"mac\")) {\n\t\t\t\tcaps.setPlatform(Platform.MAC);\n\t\t\t} else if (os.equalsIgnoreCase(\"android\")) {\n\t\t\t\tcaps.setCapability(\"platformName\", \"ANDROID\");\n\t\t\t\tcaps.setBrowserName(StringUtils.capitalize(browser.toLowerCase()));\n\t\t\t\tcaps.setCapability(\"deviceName\", deviceName);\n\t\t\t\tcaps.setCapability(\"platformVersion\", deviceVersion);\n\t\t\t} else if (os.equalsIgnoreCase(\"ios\")) {\n\t\t\t\tcaps.setCapability(\"platformName\", \"iOS\");\n\t\t\t\tcaps.setCapability(\"deviceName\", deviceName);\n\t\t\t\tcaps.setCapability(\"platformVersion\", deviceVersion);\n\t\t\t\tif (browser.equalsIgnoreCase(\"safari\")) {\n\t\t\t\t\tcaps.setBrowserName(\"Safari\");\n\t\t\t\t} else {\n\t\t\t\t\tcaps.setCapability(\"app\", \"safari\");\n\t\t\t\t\tcaps.setBrowserName(\"iPhone\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcaps.setPlatform(Platform.ANY);\n\t\t\t}\n\n\t\t\tif (version != null && !(version.equalsIgnoreCase(\"\") && !(version.equalsIgnoreCase(\"null\")))) {\n\t\t\t\t// caps.setVersion(version);\n\t\t\t}\n\t\t\tSystem.out.println(caps.asMap());\n\t\t\tdriver = new RemoteWebDriver(new URL(remoteGridUrl), caps);\n\t\t\t((RemoteWebDriver) driver).setFileDetector(new LocalFileDetector());\n\t\t\tSystem.out.println(\"Session ID: \" + ((RemoteWebDriver) driver).getSessionId());\n\t\t} else {\n\t\t\tif (browser.equalsIgnoreCase(\"IE\")) {\n\t\t\t\tString driverPath = getConfiguration().getIEDriverPath();\n\t\t\t\tif ((driverPath == null) || (driverPath.trim().length() == 0)) {\n\t\t\t\t\tdriverPath = \"IEDriverServer.exe\";\n\t\t\t\t}\n\t\t\t\tSystem.setProperty(\"webdriver.ie.driver\", driverPath);\n\t\t\t\tDesiredCapabilities capabilities = DesiredCapabilities.internetExplorer();\n\t\t\t\tcapabilities.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS,\n\t\t\t\t\t\tfalse);\n\t\t\t\tcapabilities.setCapability(InternetExplorerDriver.REQUIRE_WINDOW_FOCUS, false);\n\t\t\t\tcapabilities.setCapability(InternetExplorerDriver.ENABLE_PERSISTENT_HOVERING, true);\n\t\t\t\tcapabilities.setCapability(InternetExplorerDriver.NATIVE_EVENTS, false);\n\t\t\t\tcapabilities.setCapability(InternetExplorerDriver.IGNORE_ZOOM_SETTING, true);\n\t\t\t\tdriver = new InternetExplorerDriver(capabilities);\n\n\t\t\t} else if (browser.equalsIgnoreCase(\"GCH\") || browser.equalsIgnoreCase(\"chrome\")) {\n\t\t\t\tString driverPath = getConfiguration().getChromeDriverPath();\n\t\t\t\tif ((driverPath == null) || (driverPath.trim().length() == 0)) {\n\t\t\t\t\tdriverPath = \"chromedriver.exe\";\n\t\t\t\t}\n\t\t\t\tSystem.setProperty(\"webdriver.chrome.driver\", driverPath);\n\t\t\t\tChromeOptions options = new ChromeOptions();\n\t\t\t\toptions.addArguments(\"--test-type\");\n\t\t\t\toptions.addArguments(\"chrome.switches\", \"--disable-extensions\");\n\t\t\t\toptions.addArguments(\"start-maximized\");\n\t\t\t\tdriver = new ChromeDriver();\n\t\t\t} else if (browser.equalsIgnoreCase(\"safari\")) {\n\t\t\t\tdriver = new SafariDriver();\n\t\t\t}\n\n\t\t\telse {\n\t\t\t\tSystem.setProperty(\"webdriver.firefox.profile\", \"default\");\n\t\t\t\tdriver = new FirefoxDriver();\n\t\t\t}\n\n\t\t}\n\n\t\tdriver.manage().timeouts().implicitlyWait(GLOBALTIMEOUT, TimeUnit.SECONDS);\n\t\t// isExecutionOnMobile = this.browser.equalsIgnoreCase(\"iPhone\") ||\n\t\t// this.browser.equalsIgnoreCase(\"android\");\n\t\t// if (!isExecutionOnMobile) {\n\t\t// driver.manage().window().maximize();\n\t\t// }\n\t\treturn driver;\n\n\t}", "@Override\n\tpublic EmbeddedBrowser get() {\n\t\tLOGGER.debug(\"Setting up a Browser\");\n\t\t// Retrieve the config values used\n\t\tImmutableSortedSet<String> filterAttributes =\n\t\t configuration.getCrawlRules().getPreCrawlConfig().getFilterAttributeNames();\n\t\tlong crawlWaitReload = configuration.getCrawlRules().getWaitAfterReloadUrl();\n\t\tlong crawlWaitEvent = configuration.getCrawlRules().getWaitAfterEvent();\n\n\t\t// Determine the requested browser type\n\t\tEmbeddedBrowser browser = null;\n\t\tEmbeddedBrowser.BrowserType browserType = configuration.getBrowserConfig().getBrowsertype();\n\t\ttry {\n\t\t\tswitch (browserType) {\n\t\t\t\tcase FIREFOX:\n\t\t\t\t\tbrowser =\n\t\t\t\t\t newFireFoxBrowser(filterAttributes, crawlWaitReload, crawlWaitEvent);\n\t\t\t\t\tbreak;\n\t\t\t\tcase INTERNET_EXPLORER:\n\t\t\t\t\tbrowser =\n\t\t\t\t\t WebDriverBackedEmbeddedBrowser.withDriver(\n\t\t\t\t\t new InternetExplorerDriver(),\n\t\t\t\t\t filterAttributes, crawlWaitEvent, crawlWaitReload);\n\t\t\t\t\tbreak;\n\t\t\t\tcase CHROME:\n\t\t\t\t\tbrowser = newChromeBrowser(filterAttributes, crawlWaitReload, crawlWaitEvent);\n\t\t\t\t\tbreak;\n\t\t\t\tcase REMOTE:\n\t\t\t\t\tbrowser =\n\t\t\t\t\t WebDriverBackedEmbeddedBrowser.withRemoteDriver(configuration\n\t\t\t\t\t .getBrowserConfig().getRemoteHubUrl(), filterAttributes,\n\t\t\t\t\t crawlWaitEvent, crawlWaitReload);\n\t\t\t\t\tbreak;\n\t\t\t\tcase PHANTOMJS:\n\t\t\t\t\tbrowser =\n\t\t\t\t\t newPhantomJSDriver(filterAttributes, crawlWaitReload, crawlWaitEvent);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new IllegalStateException(\"Unrecognized browsertype \"\n\t\t\t\t\t + configuration.getBrowserConfig().getBrowsertype());\n\t\t\t}\n\t\t} catch (IllegalStateException e) {\n\t\t\tLOGGER.error(\"Crawling with {} failed: {}\", browserType.toString(), e.getMessage());\n\t\t\tthrow e;\n\t\t}\n\t\tplugins.runOnBrowserCreatedPlugins(browser);\n\t\treturn browser;\n\t}", "public WebDriver createWebDriver()\n {\n WebDriver result = null;\n \n LoggingHelper.LogInfo(getClass().getName(), \"Initializing the FirefoxDriver instance.\");\n try \n { \n result = new FirefoxDriver(); \n } \n catch(Exception e)\n {\n LoggingHelper.LogError(getClass().getName(), \"Cannot initialize the FirefoxDriver: %s\", e.toString());\n throw e;\n }\n \n LoggingHelper.LogVerbose(getClass().getName(), \"Succesfully initialized the FirefoxDriver instance.\"); \n return result;\n }", "public WebDriver getwiniumDriver(){\n\t\treturn winiumDriver;\n\t}", "SeleniumFactory getSeleniumFactory();", "public Driver getDriver() throws InterruptedException {\n return drivers.take();\n }", "private static WebDriver getDriver(browsers browser) {\n\t\t\t\tLOG.log(Level.CONFIG, \"Requested driver: \" + browser);\n\t\t// 1. WebDriver instance is not created yet\n\t\tif (driver == null) {\n\t\t\tLOG.log(Level.CONFIG, \"No previous driver found\");\n\t\t\tdriver = newWebDriver( browser);\n\t\t\treturn driver;\n\t\t}\n\t\ttry {\n\t\t\tdriver.getCurrentUrl();//touch with stick\n\t\t} catch (Throwable t) {\n\t\t\tt.printStackTrace();\n\t\t\tnewWebDriver( browser);\n\t\t\treturn driver;\n\t\t}\n\t\treturn driver;\n\t}", "@BeforeClass\n public static void instanceDriver() {\n ChromeOptions options = ConfigUtil.chromeOptions();\n driver = new ChromeDriver(options);\n wait = new WebDriverWait(driver, WEB_DRIVER_TIMEOUT);\n }", "public WebDriver getBrowserObject(BrowserType btype) throws Exception {\n\t\ttry {\n\t\t\tswitch(btype){\n\t\t\tcase Chrome:\n\t\t\t\tChromeBrowser chrome = ChromeBrowser.class.newInstance();\n\t\t\t\tChromeOptions chromeOptions = chrome.getChromeOptions();\n\t\t\t\treturn chrome.getChromeDriver(chromeOptions);\n\t\t\tcase FireFox:\n\t\t\t\tFirefoxBrowser ff = FirefoxBrowser.class.newInstance();\n\t\t\t\tFirefoxOptions ffOptions = ff.getFirefoxOptions();\n\t\t\t\treturn ff.getFirefoxDriver(ffOptions);\n\t\t\t\t\n\t\t\tcase Iexplorer:\n\t\t\t\tIExploreBrowser ie = IExploreBrowser.class.newInstance();\n\t\t\t\tInternetExplorerOptions ieoptions = ie.getIExplorerCapabilities();\n\t\t\t\treturn ie.getIExplorerDriver(ieoptions);\n\t\t\t\n\t\t\tdefault:\n\t\t\t\tthrow new Exception(\"Driver not found \"+btype.name());\n\t\t\t}\n\t\t}\n\t\tcatch(Exception e) {\n\t\t\tlog.info(e.getMessage());\n\t\t\tthrow e;\n\t\t}\n\t}", "public static SingletonWebDriver getInstance(boolean NewDriverCreate){\n if(instance == null || NewDriverCreate){\n synchronized(sync){\n if(instance == null || NewDriverCreate)\n instance = new SingletonWebDriver();\n }\n }\n return instance;\n }", "private static WebDriver launchDriver(WebDriver driver)\n\t{\n\t\tswitch (getBrowserType())\n\t\t{\n\t\t\tcase InternetExplorer:\n\t\t\t{\n\t\t\t\tdriver = launchInternetExplorer();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase Chrome:\n\t\t\t{\n\t\t\t\tdriver = launchChrome();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tdefault:\n\t\t\t{\n\t\t\t\tdriver = launchFirefox();\n\t\t\t\tbreak;\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tdriver.manage().timeouts().implicitlyWait(getImplicitWaitTime(), TimeUnit.SECONDS);\n\t\twaitPageLoad = new WebDriverWait(driver, getPageLoadWaitTime());\n\t\twaitAjaxLoad = new WebDriverWait(driver, getAjaxLoadWaitTime());\n\t\tjavaScriptExecutor = (JavascriptExecutor) driver;\n\t\t\n\t\treturn driver;\n\t}", "public DriverService getDriverService() {\n return driverService;\n }", "public static void setDriver(WebDriver webDriver) {\n driver = webDriver;\n }", "public static WebDriver ie()\r\n\t{\r\n\t\tSystem.setProperty(\"webdriver.ie.driver\",System.getProperty(\"user.dir\")+\"\\\\IE\\\\IEDriverServer.exe\");\r\n\t\tgk = new InternetExplorerDriver();\r\n\t\treturn gk;\r\n\t}", "public static WebDriver chrome()\r\n\t{\r\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",System.getProperty(\"user.dir\")+\"\\\\Chrome\\\\chromedriver.exe\");\r\n\t\tgk = new ChromeDriver();\r\n\t\treturn gk;\r\n\t}", "@Override\r\n public WebDriver createWebDriver() {\n MutableCapabilities capabilities = createSpecificGridCapabilities(webDriverConfig);\r\n capabilities.merge(driverOptions);\r\n \r\n // \r\n gridConnector.uploadMobileApp(capabilities);\r\n\r\n // connection to grid is made here\r\n driver = getDriver(gridConnector.getHubUrl(), capabilities);\r\n\r\n setImplicitWaitTimeout(webDriverConfig.getImplicitWaitTimeout());\r\n if (webDriverConfig.getPageLoadTimeout() >= 0 && SeleniumTestsContextManager.isWebTest()) {\r\n setPageLoadTimeout(webDriverConfig.getPageLoadTimeout());\r\n }\r\n\r\n this.setWebDriver(driver);\r\n\r\n runWebDriver();\r\n\r\n ((RemoteWebDriver)driver).setFileDetector(new LocalFileDetector());\r\n\r\n return driver;\r\n }", "public String getDriver() {\n return driver;\n }", "public String getDriver() {\n return driver;\n }", "private void setWebdriver() throws Exception {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",\n\t\t\t\tcurrentDir + fileSeparator + \"lib\" + fileSeparator + \"chromedriver.exe\");\n\t\tcapability = DesiredCapabilities.chrome();\n\t\tChromeOptions options = new ChromeOptions();\n\t\toptions.addArguments(\"--disable-extensions\");\n\t\toptions.addArguments(\"disable-infobars\");\n\t\tcapability.setCapability(ChromeOptions.CAPABILITY, options);\n\t\tdriver = new ChromeDriver(capability);\n\t\tdriver.manage().deleteAllCookies();\n\t\t_eventFiringDriver = new EventFiringWebDriver(driver);\n\t\t_eventFiringDriver.get(getUrl());\n\t\t_eventFiringDriver.manage().window().maximize();\n\n\t}", "@Before\n public synchronized static WebDriver openBrowser() {\n String browser = System.getProperty(\"BROWSER\");\n\n\n if (driver == null) {\n try {\n //Kiem tra BROWSER = null -> gan = chrome\n if (browser == null) {\n browser = System.getenv(\"BROWSER\");\n if (browser == null) {\n browser = \"chrome\";\n }\n }\n switch (browser) {\n case \"chrome\":\n WebDriverManager.chromedriver().setup();\n driver = new ChromeDriver();\n break;\n case \"firefox\":\n WebDriverManager.firefoxdriver().setup();\n driver = new FirefoxDriver();\n break;\n case \"chrome_headless\":\n WebDriverManager.chromedriver().setup();\n ChromeOptions options = new ChromeOptions();\n options.addArguments(\"headless\");\n options.addArguments(\"window-size=1366x768\");\n driver = new ChromeDriver(options);\n break;\n default:\n WebDriverManager.chromedriver().setup();\n driver = new ChromeDriver();\n break;\n }\n } catch (UnreachableBrowserException e) {\n driver = new ChromeDriver();\n } catch (WebDriverException e) {\n driver = new ChromeDriver();\n } finally {\n Runtime.getRuntime().addShutdownHook(new Thread(new BrowserCleanup()));\n }\n driver.get(\"http://demo.guru99.com/v4/\");\n driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);\n driver.manage().window().maximize();\n log.info(\"----------- START BRWOSER -----------\");\n\n }\n return driver;\n }", "public String getDriver() {\r\n return driver;\r\n }", "public WebDriver initializeDriver() {\n System.setProperty(\"webdriver.chrome.driver\", projectPath + \"//src//main//resources//chromedriver\");\n driver = new ChromeDriver();\n driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n driver.manage().window().maximize();\n return driver;\n }", "public void initDriver() {\n if (getBrowser().equals(\"firefox\")) {\n WebDriverManager.firefoxdriver().setup();\n if (System.getProperty(\"headless\") != null) {\n FirefoxOptions firefoxOptions = new FirefoxOptions();\n firefoxOptions.setHeadless(true);\n driver = new FirefoxDriver(firefoxOptions);\n } else {\n driver = new FirefoxDriver();\n }\n } else {\n WebDriverManager.chromedriver().setup();\n if (System.getProperty(\"headless\") != null) {\n ChromeOptions chromeOptions = new ChromeOptions();\n chromeOptions.setHeadless(true);\n driver = new ChromeDriver(chromeOptions);\n } else {\n driver = new ChromeDriver();\n }\n }\n }", "public static WebDriver getLocalChromeDriver() {\n WebDriverManager.chromedriver().setup();\n return new ChromeDriver();\n }", "public WebDriver LaunchChromeBrowserReturnIt() {\n\t\ttry {\n\t\t\tSystem.setProperty(\"webdriver.chrome.driver\",\n\t\t\t\t\t\"/TestSuit/lib/chromedriver.exe\");\n\t\t\tdriver = new ChromeDriver(); // Launch chrome\n\n\t\t} catch (Exception e) {\n\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn driver;\n\n\t}", "private void createNewDriverInstance() {\n String browser = props.getProperty(\"browser\");\n if (browser.equals(\"firefox\")) {\n FirefoxProfile profile = new FirefoxProfile();\n profile.setPreference(\"intl.accept_languages\", language);\n driver = new FirefoxDriver();\n } else if (browser.equals(\"chrome\")) {\n ChromeOptions options = new ChromeOptions();\n options.setBinary(new File(chromeBinary));\n options.addArguments(\"--lang=\" + language);\n driver = new ChromeDriver(options);\n } else {\n System.out.println(\"can't read browser type\");\n }\n }", "public WebDriver WebDriverManager() throws IOException {\n\t\tFileInputStream fis = new FileInputStream(\n\t\t\t\tSystem.getProperty(\"user.dir\") + \"//src//test//resources//global.properties\");\n\t\tProperties prop = new Properties();\n\t\tprop.load(fis);\n\t\tString url = prop.getProperty(\"QAUrl\");\n\t\tString browser_properties = prop.getProperty(\"browser\");\n\t\tString browser_maven = System.getProperty(\"browser\");\n\t\t// result = testCondition ? value1 : value2\n\n\t\tString browser = browser_maven != null ? browser_maven : browser_properties;\n\n\t\tif (driver == null) {\n\n\t\t\tif (browser.equalsIgnoreCase(\"chrome\")) {\n\n\t\t\t\t// Setting system properties of ChromeDriver\n\t\t\t\tSystem.setProperty(\"webdriver.chrome.driver\",\n\t\t\t\t\t\tSystem.getProperty(\"user.dir\") + \"\\\\src\\\\test\\\\resources\\\\chromedriver.exe\");\n\n\t\t\t\t// add after 111 version throwing errors\n\t\t\t\tChromeOptions options = new ChromeOptions();\n\t\t\t\toptions.addArguments(\"--remote-allow-origins=*\");\n\n\t\t\t\t// Creating an object of ChromeDriver\n\t\t\t\tdriver = new ChromeDriver(options);// driver gets the life\n\n\t\t\t}\n\n\t\t\tif (browser.equalsIgnoreCase(\"firefox\")) {\n\t\t\t\tSystem.setProperty(\"webdriver.gecko.driver\",\n\t\t\t\t\t\t\"C:\\\\Users\\\\limon.hossain\\\\eclipse-workspace\\\\libs\\\\geckodriver 5\");\n\n\t\t\t\tdriver = new FirefoxDriver();\n\t\t\t}\n\t\t\t// Specifiying pageLoadTimeout and Implicit wait\n\t\t\tdriver.manage().timeouts().implicitlyWait(Duration.ofSeconds(5));\n\t\t\tdriver.manage().deleteAllCookies();\n\t\t\tdriver.manage().window().maximize();\n\n\t\t\t// launching the specified URL\n\t\t\tdriver.get(url);\n\t\t}\n\n\t\treturn driver;\n\n\t}", "public WebDriver getDriver(DesiredCapabilities capability) throws MalformedURLException {\r\n\t\tif (gridMode) {\r\n\t\t\treturn new RemoteWebDriver(new URL(\"http://192.168.106.36:5555/wd/hub\"), getBrowserCapabilities(browser,capability));\r\n\t\t} else {\r\n\t\t\tswitch (browser.toLowerCase()) {\r\n\t\t\tcase \"firefox\":\r\n\t\t\t\tstartGeckoDriver();\r\n\t\t\t\tFirefoxOptions firefoxOptions = new FirefoxOptions();\r\n\t\t\t\tfirefoxOptions.merge(capability);\r\n\t\t\t\treturn new FirefoxDriver(firefoxOptions);\r\n\r\n\t\t\tcase \"chrome\":\r\n\t\t\t\tstartChromeDriver();\r\n\t\t\t\tChromeOptions chromeOptions = new ChromeOptions();\r\n\t\t\t\tchromeOptions.merge(capability);\r\n\t\t\t\treturn new ChromeDriver(chromeOptions);\r\n\r\n\t\t\tdefault:\r\n\t\t\t\tSystem.out.println(\"Selecting firefox as default browser.\");\r\n\t\t\t\tstartGeckoDriver();\r\n\t\t\t\tFirefoxOptions defaultOptions = new FirefoxOptions();\r\n\t\t\t\tdefaultOptions.merge(capability);\r\n\t\t\t\treturn new FirefoxDriver(defaultOptions);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static WebDriver startBrowser() {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"./driver/chromedriver.exe\");\n\t\t\n\t\t// Create ChromeDriver object, launch Chrome browser\n\t\t WebDriver driver = new ChromeDriver();\n\t\t \n\t\t// Create ChromeDriver object, launch Chrome browser\n\t\tdriver.get(\"http://techfios.com/test/107/\");\n\t\treturn driver;\n\t}", "public WebDriver initDriver (Properties prop) {\r\n\t\tString browserName = prop.getProperty(\"browser\");\r\n\t\tif(browserName.equals(\"chrome\")) {\r\n\t\t\toptionsManager = new OptionsManager(prop);\r\n\t\t\tSystem.setProperty(\"webdriver.chrome.driver\",\"./src/test/resources/chrome/chromedriver.exe\");\r\n\t\t\tdriver = new ChromeDriver(optionsManager.getChromeOptions());\r\n\t\t}else if(browserName.equals(\"firefox\")) {\r\n\t\t\toptionsManager = new OptionsManager(prop);\r\n\t\t\tSystem.setProperty(\"webdriver.gecko.driver\",\"./src/test/resources/firefox/geckodriver.exe\");\r\n\t\t\tdriver = new FirefoxDriver(optionsManager.getFirefoxOptions());\r\n\t\t}\r\n\t\t\r\n\t\teventDriver = new EventFiringWebDriver(driver);\r\n\t\teventListener = new WebEventListener();\r\n\t\teventDriver.register(eventListener);\r\n\t\tdriver = eventDriver;\r\n\t\t\r\n\t\tdriver.manage().window().maximize();\r\n\t\tdriver.manage().deleteAllCookies();\r\n\t\tdriver.manage().timeouts().implicitlyWait(15, TimeUnit.SECONDS);\r\n\t\tdriver.get(prop.getProperty(\"url\"));\r\n\t\treturn driver;\r\n\t}", "public void loadDriver() {\n\t\t\n\t\t//get() method is used to open an URL and it will wait till the whole page gets loaded.\n\t\twebDriver.get(\"https://www.google.co.in/\");\n\t}", "public static WebDriver getDriver(String browsername)\n\t{\n\t\t\n\t\tWebDriver dri;\n\t\t\n\t\t\n\t\tif(browsername.equalsIgnoreCase(\"chrome\")) {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",\"C:\\\\Chrome_Driver\\\\chromedriver.exe\"); \n\t\tdri = new ChromeDriver();\n\t\t}\n\t\t\n\t\telse{\n\t\t\t\n\t\t\tSystem.setProperty(\"webdriver.edge.driver\",\"C:\\\\Edge_Driver\\\\msedgedriver.exe\"); \n\t\t\tdri = new ChromeDriver(); //replace else if loop with switch\n\t\t\t\n\t\t}\n\t\t\n//\t\telse{\n//\t\t\t\n//\t\t\tSystem.setProperty(\"webdriver.chrome.driver\",\"C:\\\\Chrome_Driver\\\\chromedriver.exe\"); \n//\t\t\tdri = new ChromeDriver();\n//\t\t\t\n//\t\t}\n\t\t\n\t\treturn dri;\n\t\t\n\t}", "public Capabilities getCapabilities(WebDriver driver) {\n return ((RemoteWebDriver) driver).getCapabilities();\n }", "private WebDriver getDriver(URL url, MutableCapabilities capability){\r\n \tdriver = null;\r\n \t\r\n \tSystemClock clock = new SystemClock();\r\n\t\tlong end = clock.laterBy(retryTimeout * 1000L);\r\n\t\tException currentException = null;\r\n \t\r\n\t\twhile (clock.isNowBefore(end)) {\r\n\t\t\ttry {\r\n\t\t\t\tdriver = new RemoteWebDriver(url, capability);\r\n\t\t\t\tbreak;\r\n\t\t\t} catch (WebDriverException e) {\r\n\t\t\t\tlogger.warn(\"Error creating driver, retrying: \" + e.getMessage());\r\n\t\t\t\tcurrentException = e;\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif (driver == null) {\r\n\t\t\tthrow new SeleniumGridException(\"Cannot create driver on grid, it may be fully used\", currentException);\r\n\t\t}\r\n \t\r\n \treturn driver;\r\n }", "public ChromeDriver build()\n\t{\n\t\ttry\n\t\t{\n\t\t\tDesiredCapabilities capabilities = DesiredCapabilities.chrome();\n\t\t\tURL url = ClassLoader.getSystemResource( metadata.getBinary() );\n\t\t\tSystem.setProperty( \"webdriver.chrome.driver\", new File( url.toURI() ).getAbsolutePath() );\n\t\t\tChromeOptions co = new ChromeOptions();\n\t\t\t//Map<String, Object> preferences = Maps.newHashMap();\n\t\t\t//preferences.put( \"browser.startup.homepage\", configuration.baseUrl().toString() );\n\t\t\t//preferences.put( \"browser.startup.page\", START_WITH_HOME_PAGE );\n\t\t\t//capabilities.setCapability( ChromeOptions.CAPABILITY, preferences );\n\t\t\tChromeDriver driver = new ChromeDriver( capabilities );\n\t\t\tdriver.get( configuration.baseUrl().toString() );\n\t\t\treturn driver;\n\t\t}\n\t\tcatch ( Exception e )\n\t\t{\n\t\t\tlogger.error( e.getMessage() );\n\t\t\tthrow new WebDriverException( e );\n\t\t}\n\t}", "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 String getDriverClass() {\n return driverClass;\n }", "private static WebDriver getIEDriver() {\n\t\treturn null;\n\t}", "private void setLocalWebdriver() {\n\n DesiredCapabilities capabilities = new DesiredCapabilities();\n capabilities.setJavascriptEnabled(true);\n capabilities.setCapability(\"handlesAlerts\", true);\n switch (getBrowserId(browser)) {\n case 0:\n capabilities.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS,\n Boolean.valueOf(System.getProperty(\"IGNORE_SECURITY_DOMAINS\", \"false\")));\n driver.set(new InternetExplorerDriver(capabilities));\n break;\n case 1:\n driver.set(new FirefoxDriver(capabilities));\n break;\n case 2:\n driver.set(new SafariDriver(capabilities));\n break;\n case 3:\n driver.set(new ChromeDriver(capabilities));\n break;\n default:\n throw new WebDriverException(\"Browser not found: \" + browser);\n }\n }", "public GoogleAutomation() {\n\t\t\n\t\t//The setProperty() method of Java system class sets the property of the system which is indicated by a key.\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"driver//chromedriver.exe\");\n\t\t\n\t\t//initilize webDriver \n\t\twebDriver = new ChromeDriver();\n\t}", "public static WebDriver getDriver(String testName) {\n WebDriver driver = getLocalChromeDriver();\n /* * * * * * * * * * * * * * * * * * * * * * * * */\n\n driver.manage().window().maximize();\n return driver;\n }", "public DatabaseDriver getDriver() {\r\n return driver;\r\n }", "protected JavascriptExecutor getExecutor() {\n\t\treturn ((JavascriptExecutor) driver);\n\t}", "public static String getDriver(){\n\t\treturn HIVE_DRIVER;\n\t}", "public static WebContext getInstance() {\n return webContext;\n }", "@Override\n protected RemoteWebDriver createLocalDriver() {\n return new FirefoxDriver();\n }", "public Page(WebDriver webDriver) {\n this.webDriver = webDriver;\n\t}", "public DriverConfig createDriver()\n {\n DriverConfig driver = new DriverConfig(this);\n \n _driverList.add(driver);\n \n return driver;\n }", "public static WebDriver setUp() {\n\t\n \t\n \tSystem.setProperty(\"webdriver.chrome.driver\", \"drivers\\\\chromedriver.exe\"); //if it doesn't work we can check with user.dir...\n \tdriver = new ChromeDriver(); //launch the Browser it opens empty page\n \tdriver.manage().window().maximize();\n \tdriver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS); //to wait globally\n \tdriver.get(\"http://166.62.36.207/humanresources/symfony/web/index.php/auth/login\");\n \t \n \treturn driver; //return object of the driver \t\n}", "RemoteWebDriver getDriver(String browserName) {\n\t\tlogger.info(System.getProperty(\"os.name\"));\n\t\ttry {\n\t\t\tif (DriverFactory.getDriverPool().get(browserName) == null) {\n\t\t\t\tif (System.getProperty(\"location\").equalsIgnoreCase(\"local\")) {\n\t\t\t\t\tif (\"firefox\".equals(System.getProperty(\"browser\"))) {\n\t\t\t\t\t\tFirefoxOptions firefoxOptions = new FirefoxOptions().setProfile(new FirefoxProfile());\n\t\t\t\t\t\tfirefoxOptions.setAcceptInsecureCerts(true);\n\t\t\t\t\t\tSystem.setProperty(\"webdriver.gecko.driver\",\n\t\t\t\t\t\t\t\tPaths.get(workspace, \"src\", \"main\", \"resources\", \"geckodriver\").toString());\n\t\t\t\t\t\tdriver = new FirefoxDriver(firefoxOptions);\n\t\t\t\t\t\tdriver.manage().deleteAllCookies();\n\t\t\t\t\t\tdriver.manage().window().maximize();\n\t\t\t\t\t} else if (\"chrome\".equals(System.getProperty(\"browser\"))) {\n\t\t\t\t\t\tSystem.setProperty(CHROME_DRIVER_STR,\n\t\t\t\t\t\t\t\tSystem.getProperty(\"user.dir\") +\"\\\\drivers\\\\chromedriver.exe\");\n\t\t\t\t\t\tChromeOptions chromeOptions = new ChromeOptions();\n\t\t\t\t\t\tif (\"headless\".equals(System.getProperty(\"state\")))\n\t\t\t\t\t\t\tchromeOptions.addArguments(\"headless\");\n\t\t\t\t\t\tchromeOptions.setCapability(CapabilityType.UNEXPECTED_ALERT_BEHAVIOUR,\n\t\t\t\t\t\t\t\tUnexpectedAlertBehaviour.ACCEPT);\n\t\t\t\t\t\tchromeOptions.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true);\n\t\t\t\t\t\tchromeOptions.addArguments(\"ignore-certificate-errors\");\n\t\t\t\t\t\tchromeOptions.addArguments(\"disable-popup-blocking\");\n\t\t\t\t\t\tchromeOptions.addArguments(\"start-maximized\");\n\t\t\t\t\t\tdriver = new ChromeDriver(chromeOptions);\n\t\t\t\t\t\tdriver.manage().deleteAllCookies();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (\"firefox\".equals(System.getProperty(\"browser\"))) {\n\t\t\t\t\t\tFirefoxOptions firefoxOptions = new FirefoxOptions().setProfile(new FirefoxProfile());\n\t\t\t\t\t\tfirefoxOptions.setAcceptInsecureCerts(true);\n\t\t\t\t\t\tSystem.setProperty(\"webdriver.gecko.driver\",\n\t\t\t\t\t\t\t\tPaths.get(workspace, \"src\", \"main\", \"resources\", \"geckodriver.exe\").toString());\n\t\t\t\t\t\tdriver = new RemoteWebDriver(new URL(PropertyHelper.getProperties(\"REMOTE_HUB_URL\")),\n\t\t\t\t\t\t\t\tfirefoxOptions);\n\t\t\t\t\t\tdriver.manage().window().maximize();\n\t\t\t\t\t} else if (\"chrome\".equals(System.getProperty(\"browser\"))) {\n\t\t\t\t\t\tSystem.setProperty(CHROME_DRIVER_STR,\n\t\t\t\t\t\t\t\tPaths.get(workspace, \"src\", \"main\", \"resources\", \"chromedriver.exe\").toString());\n\t\t\t\t\t\tChromeOptions chromeOptions = new ChromeOptions();\n\t\t\t\t\t\tif (\"headless\".equals(System.getProperty(\"state\")))\n\t\t\t\t\t\t\tchromeOptions.addArguments(\"headless\");\n\t\t\t\t\t\tchromeOptions.setCapability(CapabilityType.UNEXPECTED_ALERT_BEHAVIOUR,\n\t\t\t\t\t\t\t\tUnexpectedAlertBehaviour.ACCEPT);\n\t\t\t\t\t\tchromeOptions.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true);\n\t\t\t\t\t\tchromeOptions.addArguments(\"ignore-certificate-errors\");\n\t\t\t\t\t\tchromeOptions.addArguments(\"disable-popup-blocking\");\n\t\t\t\t\t\tchromeOptions.addArguments(\"start-maximized\");\n\n\t\t\t\t\t\tdriver = new RemoteWebDriver(new URL(MainUtil.HubUrl), chromeOptions);\n\n\t\t\t\t\t\tlogger.info(\"Execution Processed To Hub : \" + MainUtil.HubUrl);\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tDriverFactory.getDriverPool().put(browserName, driver);\n\t\t\t\tdriver.manage().timeouts().pageLoadTimeout(60, TimeUnit.SECONDS);\n\t\t\t\tdriver.manage().timeouts().implicitlyWait(40, TimeUnit.SECONDS);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(\"Error creating the driver\", e);\n\t\t}\n\t\treturn driver;\n\t}", "public WebDriver createWebDriverInstance(String Browser) throws MalformedURLException\n\t{\n\t\tif(d==null && Browser.equals(\"Firefox\"))\n\t\t{\n\n\t\t\td = new FirefoxDriver();\n\t\t\tlogger.info(\"--FireFox Browser has opened \");\n\t\t}\n\n\t\telse if(d==null && Browser.equals(\"Chrome\"))\n\t\t{\n\t\t\tChromeOptions options = new ChromeOptions();\n\t\t\toptions.addArguments(\"start-maximized\");\n\t\t\tDesiredCapabilities capabilities = new DesiredCapabilities(DesiredCapabilities.chrome());\n\t\t\tcapabilities.setCapability (CapabilityType.ACCEPT_SSL_CERTS, true);\n\t\t\tcapabilities.setCapability (ChromeOptions.CAPABILITY,options);\n\t\t\tChromeDriverManager.getInstance().setup();\n\t\t\t\n\t\t\t//Don't Remember Passwords by default\n\t\t\tMap<String, Object> prefs = new HashMap<String, Object>();\n\t\t\tprefs.put(\"credentials_enable_service\", false);\n\t\t\tprefs.put(\"profile.password_manager_enabled\", false);\n\t\t\toptions.setExperimentalOption(\"prefs\", prefs);\n\t\t\t/*\n\t\t\tString path =System.getProperty(\"user.dir\")+File.separator+\"chromedriver.exe\";\n\t\t\tSystem.setProperty(\"webdriver.chrome.driver\", path);\n\t\t\tChromeOptions options = new ChromeOptions();\n\t\t\tDesiredCapabilities caps = DesiredCapabilities.chrome();*/\n\t\t\td = new ChromeDriver(capabilities);\n\t\t\tlogger.info(\"--Chrome Browser has opened \");\n\t\t}\n\n\t\telse if (d==null && Browser.equals(\"IE\"))\n\t\t{\n\t\t\tString path =\"binary/IEDriverServer.exe\";\n\t\t\tSystem.setProperty(\"webdriver.ie.driver\", path);\n\t\t\tlogger.info(\"--IEDriver has setup\");\n\t\t\tDesiredCapabilities caps = DesiredCapabilities.internetExplorer();\n\t\t\tcaps.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS,true);\n\t\t\tcaps.setCapability(\"requireWindowFocus\", true);\n\t\t\tcaps.setCapability(\"enablePersistentHover\", true);\n\t\t\tcaps.setCapability(\"native events\", true);\n\t\t\td = new InternetExplorerDriver(caps);\n\t\t\tlogger.info(\"--IE Browser has opened \");\n\t\t}\n\t\telse if (d==null && Browser.equals(\"IE32bit\"))\n\t\t{\n\t\t\tString path =\"binary/IEDriverServer_32bit.exe\";\n\t\t\tSystem.setProperty(\"webdriver.ie.driver\", path);\n\t\t\tlogger.info(\"--IEDriver has setup\");\n\t\t\tDesiredCapabilities caps = DesiredCapabilities.internetExplorer();\n\t\t\tcaps.setCapability(\n\t\t\t\t\tInternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS,\n\t\t\t\t\ttrue);\n\t\t\tcaps.setCapability(\"requireWindowFocus\", true);\n\t\t\tcaps.setCapability(\"enablePersistentHover\", false);\n\t\t\tcaps.setCapability(\"native events\", true);\n\t\t\td = new InternetExplorerDriver(caps);\n\t\t\tlogger.info(\"--IE Browser has opened \");\n\t\t}\n\t\treturn d;\n\n\n\t}", "public static WebDriver getRemoteWebDriver(String userName) {\n String browser = PropertyLoader.getProperty(\"browser\");\n System.setProperty(\"webdriver.firefox.marionette\", \".\\\\geckodriver.exe\");\n WebDriver driver = null;\n if (browser.equals(\"chrome\")) {\n return new ChromeDriver();\n } else {\n driver = new FirefoxDriver();\n }\n driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n driver.get(PropertyLoader.getSiteURL());\n login(driver, userName);\n return driver;\n }" ]
[ "0.83622444", "0.831062", "0.826181", "0.8064571", "0.80283916", "0.80000824", "0.7965836", "0.7880296", "0.78595513", "0.78064394", "0.77831113", "0.7769205", "0.77657133", "0.7673166", "0.7673166", "0.76226366", "0.76017475", "0.756391", "0.75323963", "0.74994534", "0.74791366", "0.74501914", "0.74358267", "0.73957074", "0.73806095", "0.7368151", "0.733733", "0.73372364", "0.7299796", "0.72594917", "0.7225476", "0.7200081", "0.709052", "0.7067196", "0.70092255", "0.69793415", "0.69654405", "0.69474584", "0.6917659", "0.6900505", "0.6858641", "0.67488474", "0.6718072", "0.6702832", "0.66674775", "0.66667295", "0.6652485", "0.6630212", "0.64920366", "0.64870095", "0.6479333", "0.6440728", "0.6414845", "0.63948876", "0.63833195", "0.63297886", "0.6308227", "0.6271476", "0.6261373", "0.6221927", "0.61975306", "0.61215985", "0.6117581", "0.6116894", "0.6114862", "0.6114862", "0.6104618", "0.6097878", "0.60935044", "0.60743874", "0.60563976", "0.60492337", "0.6043385", "0.60363495", "0.6032263", "0.602986", "0.59980357", "0.5993766", "0.5968758", "0.59512204", "0.5936241", "0.59212136", "0.5901596", "0.58911824", "0.5856347", "0.58204776", "0.5816434", "0.58163136", "0.5812981", "0.5810021", "0.58080226", "0.58072746", "0.5779771", "0.5776993", "0.5763604", "0.5762925", "0.57511157", "0.5750591", "0.5733732", "0.57322747" ]
0.783434
9
Method to get the properties value.
public String getProperty(String propertyName) { Properties properties = new Properties(); FileReader fileReader; try { fileReader = new FileReader(new File("src\\main\\resources\\default.properties")); properties.load(fileReader); } catch (Exception e) { e.printStackTrace(); } String value = properties.getProperty(propertyName); return value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getProperty();", "java.lang.String getProperty();", "String getProperty();", "String getProperty();", "String getProperty();", "private String getPropertyValue() {\n return EmfPropertyHelper.getValue(itemPropertyDescriptor, eObject);\n }", "Property getProperty();", "Property getProperty();", "public String getPropValue(String propertyName){\n\n return pro.getProperty(propertyName);\n\n }", "final public Object getValue()\n {\n return getProperty(VALUE_KEY);\n }", "public String getValueProperty() {\r\n return getAttributeAsString(\"valueProperty\");\r\n }", "public String getPropValue() {\n return propValue;\n }", "public Properties getProperty() {\r\n return properties;\r\n }", "public abstract Object getValue(Context context) throws PropertyException;", "public static String getPropertyValue(String key){\n return properties.getProperty(key);\n }", "public String getProperty() {\n Object ref = property_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n property_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }", "String getProperty(String name);", "public String getValue() {\n\t\tString value;\n\t\ttry {\n\t\t\tvalue = this.getString(\"value\");\n\t\t} catch (Exception e) {\n\t\t\tvalue = null;\n\t\t}\n\t\treturn value;\n\t}", "public String getProperty(String name);", "public Properties getValue() throws ContextInitializationException {\n PropertiesHolder propertiesRef = getReferencedProperties();\n if (propertiesRef != null) {\n return propertiesRef.getValue();\n }\n return null;\n }", "public String getPropertyValue(String propertyName){\n\t\treturn (String) properties.get(propertyName);\n\t}", "String getProperty(String property);", "public String getProperty() {\n Object ref = property_;\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 property_ = s;\n return s;\n }\n }", "public String getValue(String key) {\n\t\t\treturn properties.get(key);\n\t\t}", "public String getProperty() {\n return \"\";\n }", "@Override\n\t\t\tpublic Object getPropertyValue() {\n\t\t\t\treturn null;\n\t\t\t}", "public final Object get() {\n return getValue();\n }", "public String getProperty(String name){\r\n\t\treturn properties.getProperty(name);\r\n\t}", "public Property getProperty() {\n\t\treturn _property;\n\t}", "public String get(String key) {\n return this.properties.getProperty(key);\n }", "public String getValue() {\n return getMethodValue(\"value\");\n }", "public Integer getProperty() {\n\t\t\treturn null;\n\t\t}", "public String get(final String name) {\r\n return (String) properties.get(name);\r\n }", "protected abstract String getPropertyValue(Server instance);", "com.google.protobuf.ByteString\n getPropertyBytes();", "public Object getValue (Context context) throws PropertyException\n {\n return context.getProperty(_names);\n //return context.getProperty(_names[0]);\n }", "public String getValue(String key) {\r\n\t\t\treturn prop.getProperty(key);\r\n\t\t}", "Object getProperty(String name);", "java.lang.String getProperties();", "public Object getProperty(String name) {\n return properties.get(name);\n }", "<T> T getValue(Property<T> property);", "public Object getProperty(String propertyName){\n return properties.get(propertyName);\n }", "com.google.protobuf.ByteString\n getPropertyBytes();", "public String get(String key) {\n return this.properties.getProperty(key);\n }", "public String getStringValue() {\n if (value == null) return null;\n PropertyEditor propertyEditor = PropertyEditors.getEditor(clazz);\n propertyEditor.setValue(value);\n return propertyEditor.getAsText();\n }", "public String getProperty( String name )\n {\n return getProperty( name, false );\n }", "private String getValueFromProperty(String key) {\n\t\treturn properties.getProperty(key);\n\n\t}", "public DatatypeProp getProperty() {\n return property;\n }", "public Object getProperty(Object key) {\r\n\t\treturn properties.get(key);\r\n\t}", "public String getProperty(String key) {\n String value = properties.getProperty(key);\n return value;\n }", "public String getProperty(String name) {\n return this.getProperty(name, null);\n }", "public Object getValue()\r\n {\r\n return this.value;\r\n }", "public Object getValue() {\n\t\t\treturn value;\n\t\t}", "public Object getValue(){\n \treturn this.value;\n }", "Object getPropertytrue();", "String getProperty(String key);", "String getProperty(String key);", "String getProperty(String key);", "Object getProperty(String requestedProperty) {\n return properties.getProperty(requestedProperty);\n }", "public Object getValue()\r\n\t{\r\n\t\treturn m_value;\r\n\t}", "public String getValue(){\n\t\treturn _value;\n\t}", "public String getValue(){\n\t\treturn this.value;\n\t}", "int getProperty0();", "public Object getValue() {\n\t\treturn value;\n\t}", "public Object getValue() {\n\t\treturn value;\n\t}", "public Value getValue(){\n return this.value;\n }", "public com.google.protobuf.ByteString\n getPropertyBytes() {\n Object ref = property_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n property_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public Object getValue()\n {\n\treturn value;\n }", "@JSProperty\n String getValue();", "@Override\n\t\tpublic V getValue(){\n\t\t\treturn value;\n\t\t}", "@JsProperty String getValue();", "public String getValue() {\n\t\treturn (String) get_Value(\"Value\");\n\t}", "V getValue() {\n return value;\n }", "Object getProperty(String key);", "public com.google.protobuf.ByteString\n getPropertyBytes() {\n Object ref = property_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n property_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "int getProperty2();", "public Object getValue() { return this.value; }", "public Object getProperty(String name)\n {\n return m_props.get(name);\n }", "public Object getValue() {\n return value;\n }", "public Object getValue() {\n return value;\n }", "public Object getValue() {\n return value;\n }", "public Object getValue() {\n return value;\n }", "public Object getValue() {\n return value;\n }", "public String getProperty(String name)\n {\n return _propertyEntries.get(name);\n }", "public Object getValue()\n {\n return value;\n }", "public Object getProperty(String name) {\n if (properties != null) {\n return properties.get(name);\n }\n return null;\n }", "public String get() {\n return this.value;\n }", "public String get() {\n return value;\n\t}", "public Object getValue() {\r\n return value;\r\n }", "public String retrieveProperty(String propertyName)\r\n\t{\r\n\t\tlogger.ctinfo(\"CTPRU00008\", propertyName);\r\n\t\tString propertyValue = null;\r\n\t\tpropertyValue = retrieveProperty(this.propertyFileName, propertyName);\r\n\t\tlogger.ctinfo(\"CTPRU00009\");\r\n\t\treturn propertyValue;\r\n\t}", "public abstract Object getPropertyValue(String propertyName)\n throws ModelException;", "public String getJavaProperty() {\n return this.javaProperty;\n }", "public String getJavaProperty() {\n return this.javaProperty;\n }", "public String getJavaProperty() {\n return this.javaProperty;\n }", "public String getJavaProperty() {\n return this.javaProperty;\n }", "public String getJavaProperty() {\n return this.javaProperty;\n }", "public String getJavaProperty() {\n return this.javaProperty;\n }", "public String getJavaProperty() {\n return this.javaProperty;\n }", "public String getJavaProperty() {\n return this.javaProperty;\n }", "public String getJavaProperty() {\n return this.javaProperty;\n }", "public String getJavaProperty() {\n return this.javaProperty;\n }" ]
[ "0.7730787", "0.76492935", "0.7645827", "0.7645827", "0.7645827", "0.7615028", "0.7546338", "0.7546338", "0.75217324", "0.73181313", "0.7244739", "0.723052", "0.7178366", "0.71760416", "0.70534265", "0.6989808", "0.69461954", "0.6935586", "0.6933752", "0.6927686", "0.69060606", "0.6901107", "0.68978506", "0.68951327", "0.68845475", "0.68823093", "0.6861572", "0.6853179", "0.6852805", "0.68500805", "0.6850011", "0.6846756", "0.6829262", "0.6816708", "0.6809023", "0.6806353", "0.67927325", "0.67861366", "0.67807525", "0.67634", "0.67316926", "0.67274994", "0.67087144", "0.6683455", "0.66643274", "0.66562366", "0.6643044", "0.6642398", "0.6641336", "0.66398233", "0.66337246", "0.6633522", "0.66227406", "0.662265", "0.66217285", "0.6619293", "0.6619293", "0.6619293", "0.6614357", "0.66081417", "0.65766954", "0.65635157", "0.65448487", "0.6528436", "0.6528436", "0.6526444", "0.6525549", "0.65252966", "0.65174246", "0.65083134", "0.6506329", "0.6506118", "0.65027106", "0.6491036", "0.6489322", "0.6485495", "0.64787805", "0.6473957", "0.64739186", "0.64739186", "0.64739186", "0.64739186", "0.64739186", "0.6473558", "0.64711577", "0.6470064", "0.64613634", "0.6453853", "0.6453765", "0.6443411", "0.644284", "0.6433502", "0.6433502", "0.6433502", "0.6433502", "0.6433502", "0.6433502", "0.6433502", "0.6433502", "0.6433502", "0.6433502" ]
0.0
-1
Method to log with message.
public void log(String message) { logger.info(message); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void log(Message message);", "public void log(String message) {\n\t}", "@Override\n public void log(String message) {\n }", "@Override\r\n\tprotected void logMessage(String message) {\n\t\t\r\n\t}", "public void log(String msg) {\n\n\t}", "void log(String message) {\n System.out.println(buildMessage(message));\n }", "private void log(String message) {\n System.out.println( message );\n sb.append( message ).append( \"\\n\" );\n }", "public void logMessage( Object p_msg);", "private void log(String message) {\n System.out.println(message);\n }", "public void log(String message) {\n log(message, MSG_INFO);\n }", "private void log(String message) {\n System.out.println(message);\n }", "public void logs(Object message) {\n System.out.println(message.toString());\n }", "abstract void logMessage(String message);", "protected void log(String message) {\n task.log(message);\n }", "public void log (Object msg) {\n getLogEvent().addMessage (msg);\n }", "public void log(String message) {\n logger.log(\"[\" + game.getName() + \"] \" + message);\n }", "public void log(String message) {\r\n log.append(\"[\" + new SimpleDateFormat(\"HH:mm:ss\").format(new Date()) + \"] \" + message + \"\\n\");\r\n System.out.println(\"[\" + new SimpleDateFormat(\"HH:mm:ss\").format(new Date()) + \"] \" + message);\r\n }", "protected final void message(String message) {\r\n Harness.log(name, message);\r\n }", "protected void logMessage(String message) {\n\n m_Log.logMessage(message);\n }", "public void log(String text) {\n }", "private static void log(String message) {\n System.out.println(message);\n }", "@Override\n\tpublic void log(String msg) throws IOException {\n\t\t\n\t}", "private void log(String message) {\r\n\t\tif (ChartFrameSelectParametersMenuActionListener.printLog && Main.isLoggingEnabled()) {\r\n\t\t\tSystem.out.println(this.getClass().getName() + \".\" + message);\r\n\t\t}\r\n\t}", "public void log(String message){\n Date date = new Date();\n String pattern = \"hh:mm:ss\";\n SimpleDateFormat simpleDateFormat = new SimpleDateFormat(pattern);\n String dateText = simpleDateFormat.format(date);\n System.out.println(\"LOG \" + dateText + \": \" + message);\n }", "public void logthis(String msg) {\n logger.append(msg + \"\\n\");\n Log.d(TAG, msg);\n }", "@Override\n\tpublic void log(Level level, String message) {\n\n\t}", "public void log(Marker level, String... message);", "void log(Level level, String message);", "private void log(String message) {\r\n\t\tif (AxisDisplaySettingsPanel.printLog && Main.isLoggingEnabled()) {\r\n\t\t\tSystem.out.println(this.getClass().getName() + \".\" + message);\r\n\t\t}\r\n\t}", "protected void logMsg(String message) {\n\t\tlogTextArea.appendText(message + \"\\n\");\n\t}", "private void log(String message) {\n if (this.listener != null) {\n message = \"CollabNet Tracker: \" + message;\n this.listener.getLogger().println(message);\n }\n }", "@Override\n\tpublic void log(Level level, CharSequence message) {\n\n\t}", "private void log(String pMessage) {\n\t\tif (logging)\n\t\t\tSystem.out.println(pMessage);\n\t}", "public void log(String message) {\n Bukkit.getConsoleSender().sendMessage(getPrefix() + message);\n }", "private void log(String msg) {\n\t\tSystem.out.println(new Date() + \": \" + msg);\n\t}", "private static final void log(String msg) {\n\t\tlog.println(msg);\n\t}", "@Override\n\tpublic void log(Level level, Object message) {\n\n\t}", "@Override\n\tpublic void log(Level level, Message msg) {\n\n\t}", "private void log(String msg) {\r\n\t\tif (logger != null) {\r\n\t\t\tlogger.append(msg);\r\n\t\t\tlogger.println();\r\n\t\t}\r\n\t}", "@Override\n protected void log(String tag, String msg) {\n Log.i(tag, \"[you can use your custom logger here \\\"]\" + msg);\n }", "public void info(Object message)\n/* */ {\n/* 145 */ if (message != null) {\n/* 146 */ getLogger().info(String.valueOf(message));\n/* */ }\n/* */ }", "@Override\n\tpublic void log(Level level, Marker marker, CharSequence message) {\n\n\t}", "public void log(String message) {\n Log.i(tag, \"TIME: \" + message + \": \" + String.valueOf(get()) + \" ms\");\n }", "protected void log(Object msg) {\n\t\n\t\tSystem.out.println(\"MusicDataAccessor: \" + msg);\n\t}", "@Override\n\tpublic void log(Level level, String message, Object... params) {\n\n\t}", "public void onLogMessage(String message);", "private static void log(String msg) {\n Log.d(LOG_TAG, msg);\n }", "@Override\n\tpublic void log(Level level, Marker marker, Object message) {\n\n\t}", "protected void log(String msg) {\n\t\tif(isLogging) {\n\t\t\tSystem.out.println(\"[TRACKER \" + id() + \"] \" + msg);\n\t\t}\n\t}", "private static void log(String aMsg){\n\t System.out.println(aMsg);\n\t }", "public void writeToControllerGameLog(String message) {\n controller.getUIController().writeToLogBox(message);\n }", "protected abstract void log(T level, Object message);", "protected void log(final String message) {\n Log.v(BuildConfig.TAG, message);\n }", "public static void Log(String message){\n\t\tLogger log = Logger.getLogger(Test1.class.getName());\n\t\tlog.severe(message);\n\t}", "@Override\n\tpublic void log(Level level, Marker marker, Message msg) {\n\n\t}", "java.lang.String getLogMessage();", "@Override\n\tpublic void log(Level level, Marker marker, String message, Object... params) {\n\n\t}", "public static void log(String message) {\n\t\tSystem.out.println(message + RESET);\n\t}", "public void log(String txt);", "@Override\n\tpublic void log(Level level, Marker marker, String message) {\n\n\t}", "private static void log(String msg) {\n System.out.println(msg);\n }", "public void log(String message)\n {\n try \n {\n BufferedWriter errorLogWriter = new BufferedWriter(new FileWriter(this.errorLog));\n errorLogWriter.write(Logger.dateFormat.format(Calendar.getInstance().getTime()));\n errorLogWriter.write(message);\n errorLogWriter.close();\n }\n catch (IOException ex)\n {\n System.err.println(\"Cannot write into log : \" + ex.getMessage());\n }\n }", "public void log(String level,String message) {\n this.level = level;\n this.message = message;\n execute();\n }", "@Override\n\t\t\t\t\t\t\tpublic void log(String msg, int level, Date date, StackTraceElement trace) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}", "private static void addToLog(String message) {\n\t\ttry {\n\t\t\tDateFormat df = new SimpleDateFormat(\"dd/MM/yy HH:mm:ss:SS\");\n\t\t\tDate dateobj = new Date();\n\t\t\tlog.write(df.format(dateobj) + \": \" + message + \"\\n\");\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(\"Error With the Log File\");\n\t\t\tSystem.err.println(\"Exiting...\");\n\t\t\tSystem.exit(1);\n\t\t};\n\t}", "public void log(String msg)\n {\n Bukkit.getServer().getConsoleSender().sendMessage(color(\"&c&l[LOG]&f \" + msg));\n }", "abstract void logCustom(String tag, String message);", "public static void log(String msg) {\r\n Log.d(TAG, msg);\r\n }", "abstract protected void logInternal(int level, String message);", "public void sendMessageToLog(String message) {\n LogMessage msg = new LogMessage();\n msg.setMessage(message);\n msg.setUser(loginBean.getLoggedInUser());\n msg.setDate(new Date());\n context.createProducer().send(myQueue, msg);\n }", "void logTiMessages(final String msg);", "public void logMsg(String msg, String... param) {\n messageContainer.setVisible(true);\n messageContainer.setText(msg);\n for (String string : param) {\n System.out.println(string); \n }\n }", "public static void log(String message) {\n SimpleDateFormat sdf = new SimpleDateFormat(\"dd/MM/yyyy HH:mm:ss\");\n Timestamp timestamp = new Timestamp(System.currentTimeMillis());\n String log = sdf.format(timestamp) + \" - \" + message;\n System.out.println(log);\n try {\n writeLogToFile(log, LOG_FILE_PATH);\n } catch (IOException e) {\n System.err.println(e.getMessage());\n }\n }", "public void logMsg(String msg) {\r\n if (this.logger != null) {\r\n logger.info(msg);\r\n }\r\n }", "private final void log(String msg, Object subject) {\n if (Log.get().isLoggable(LEVEL))\n Log.get().log(LEVEL, msg + \": \" + subject);\n }", "private void logMessage(String msg) {\n\n\t\tlog.logMsg(\"(L\" + lexAnalyser.getLineCount() + \")\" + msg + \"\\n\");\n\n\t\t// System.out.println(\"(L\" + lexAnalyser.getLineCount() + \")\" + msg);\n\n\t}", "public static void log(Object caller, Level level, String message){ \n\t\tlogger.log(level, message);\n }", "@Override\n public void log()\n {\n }", "public void logMessage(String msg) {\n messageLogs.add(msg);\n }", "protected void log(String s ) {\r\n\tmessageSB.append( s ).append(\"\\r\\n\");\r\n }", "private void logMessage(String message) {\n Log.i(TAG, message);\n\n// Output message to TextView\n mLog.append(message + \"\\n\");\n\n// Adjust scroll position to make last line visible\n Layout layout = mLog.getLayout();\n if (layout != null) {\n int scrollAmount = layout.getLineTop(mLog.getLineCount()) - mLog.getHeight();\n mLog.scrollTo(0, scrollAmount > 0 ? scrollAmount : 0);\n }\n }", "public void log(String message)\n {\n try {inner.log(message);}\n catch (IOException e)\n\t{addFailure(e);}\n }", "private void PrintLogMessageOnTextChat(String message)\n\t{\n\t\tApplicationManager.textChat.writeLog(message);\n\n\t}", "protected void Info(String message) {\n logger.logMessage(message);\n }", "public static void log(Context context, String message){\n if(logging){\n String tag = context.getClass().getName();\n android.util.Log.d(tag, message);\n }\n }", "@Override\n public void updateLog(String msg) {\n\n setText2Log(msg);\n }", "protected final void log(String msg)\r\n {\r\n Debug.println(\"Server: \" + msg);\r\n }", "private void appendLog(final String message) {\n\t\trunOnUiThread(new Runnable() {\n//\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tmLogConsole.setText(mLogConsole.getText() + \"\\n\"\n\t\t\t\t\t\t+ DateFormat.getTimeInstance(DateFormat.MEDIUM).format(new Date()) + \"\\t\\t\" + message);\n\t\t\t}\n\t\t});\n\t}", "@Override\n public void log(String text) {\n jTextAreaLog.append(text+\"\\n\");\n }", "private void println(String message) {\n Log.println(level, tag, message);\n }", "public static void log(Class clz, String message){\n if(logging){\n String tag = clz.getName();\n android.util.Log.d(tag, message);\n }\n }", "public static void log(String message) {\n\t\t\r\n\t\ttry{\r\n\t\t if(!log.exists()){\r\n\t\t System.out.println(\"We had to make a new file.\");\r\n\t\t log.createNewFile();\r\n\t\t }\r\n\r\n\t\t FileWriter fileWriter = new FileWriter(log, !firstWrite);\r\n\r\n\t\t BufferedWriter bufferedWriter = new BufferedWriter(fileWriter);\r\n\t\t bufferedWriter.write(message + '\\n');\r\n\t\t bufferedWriter.close();\r\n\t\t} catch(IOException e) {\r\n\t\t System.out.println(\"COULD NOT LOG!!\");\r\n\t\t}\r\n\t\t\r\n\t\tfirstWrite = false;\r\n\t}", "public void log(String message) {\n\tif (verbose) {\n\t System.out.println(toString() + \": \" + message);\n }\n }", "void log();", "void log(HandlerInput input, String message) {\n System.out.printf(\"[%s] [%s] : %s]\\n\",\n input.getRequestEnvelope().getRequest().getRequestId().toString(),\n new Date(),\n message);\n }", "public synchronized void log(String msg) {\n\t\tSystem.err.println(msg);\n\t}", "public void logMessage(HistoricalMessage message) {\n if (message.getBody() != null) {\r\n logQueue.add(message);\r\n }\r\n }", "void log(String string);", "private static void log(Level level, Object message) {\n logger.info(LogUtil.class.getName(),level, message,null);\n }", "@Override\n\tpublic void log(Level level, Marker marker, String message, Object p0) {\n\n\t}" ]
[ "0.8298338", "0.8293636", "0.8263618", "0.7991101", "0.7916075", "0.77613705", "0.77019405", "0.76755935", "0.76727134", "0.76674277", "0.761649", "0.7579003", "0.7575794", "0.7553569", "0.75488204", "0.75371486", "0.7535349", "0.7503623", "0.74894977", "0.74800885", "0.74640125", "0.7418949", "0.73577124", "0.73555994", "0.7346058", "0.729365", "0.7285641", "0.7282444", "0.72749424", "0.72502375", "0.7245234", "0.72186357", "0.7214612", "0.7201634", "0.71868193", "0.71614814", "0.7160917", "0.7114669", "0.71070683", "0.7105653", "0.7096987", "0.709669", "0.70916426", "0.7087523", "0.7086971", "0.7065244", "0.70634884", "0.7058531", "0.7055978", "0.7049844", "0.70419955", "0.70329595", "0.7021696", "0.70129216", "0.70119584", "0.70109", "0.7004209", "0.6998894", "0.699531", "0.6989191", "0.6980966", "0.69790477", "0.6954353", "0.69480354", "0.69283485", "0.6919666", "0.6915678", "0.6910963", "0.6888925", "0.6886649", "0.6876883", "0.68729985", "0.6872208", "0.6868318", "0.68611336", "0.686092", "0.68606186", "0.6851921", "0.6846008", "0.6844608", "0.68397385", "0.68309397", "0.6818346", "0.681254", "0.6789049", "0.6787199", "0.6764913", "0.6760142", "0.6752645", "0.67523885", "0.67412883", "0.673853", "0.67232484", "0.6719698", "0.6692845", "0.6685139", "0.6684516", "0.6675702", "0.666795", "0.6665" ]
0.73385376
25
If string is more than 10 chars ERROR
public static void main(String[] args) { Scanner scan = new Scanner(System.in); // Declare the maximum length final int maxLength = 10; // Input string System.out.println("Please, enter the word: "); String word = scan.nextLine(); // Declare length of the word int stringLength = word.length(); // Condition "Ternary' String result = (stringLength > maxLength) ? "ERROR! Wrong length of the word!" : "Great job, the length of your word is " + stringLength; System.out.println(result); // Condition "if...else" /* if (stringLength > max) { System.out.println("ERROR! Wrong length of the word!"); } else { System.out.println("Great job, the length of your word is " + stringLength); }*/ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean isValidInput(String input) \r\n {\r\n\t \r\n return input!=null&&input.length()<=10;\r\n \r\n }", "private static String testString(String str, int minLen, int maxLen) throws Exception {\n if (str.length() > maxLen || str.length() < minLen) {\n throw new Exception(str + \" has a length not in [\" + minLen + \", \" + maxLen + \"]\");\n }\n return str;\n }", "private void validate(String s, int length, String msg) {\n Logger.getLogger(getClass()).info(\"valore della stringa inserita\"+s);\n \tif (s != null && s.length()>length)\n throw new IllegalArgumentException(msg);\n }", "public static boolean isAtLeastXCharacters(String value, int x) {\r\n\t\ttry {\r\n\t\t\treturn value.length() >= x;\r\n\t\t}\r\n\t\tcatch(Exception e) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "private static boolean checkLength(String password) {\n \treturn password.length() >= minLength;\n }", "private boolean isPhoneValid(String password) {\n return password.length() == 10;\r\n }", "public static boolean isValidLength(String test) {\n return test.length() <= MAX_CHARACTERS;\n }", "protected void checkMaxSizeText(String text, int maxLength, String error)\r\n\t\t\tthrows ArticleInputMaxSizeException {\r\n\t\tif (text.length() > maxLength) {\r\n\t\t\tthrow new ArticleInputMaxSizeException(error);\r\n\t\t}\r\n\t}", "Boolean checkLength(String detail);", "private void checkLength(String value, int maxLength) throws WikiException {\r\n\t\tif (value != null && value.length() > maxLength) {\r\n\t\t\tthrow new WikiException(new WikiMessage(\"error.fieldlength\", value, Integer.valueOf(maxLength).toString()));\r\n\t\t}\r\n\t}", "public static boolean paswordLengt(String password){\n\n return password.length() >= 10;\n }", "public static boolean hasBetweenSixAndNineChars(String password)\r\n {\r\n return (password.length() > 5 && password.length() < 10);\r\n }", "public static boolean check(String s)\n {\n if (s.length() < 0 || s.length() > 10)\n {\n return true;\n }\n for (int i = 0 ; i < s.length(); i++)\n {\n if ((s.charAt(i) < 'a' || s.charAt(i) > 'z') && \n (s.charAt(i) < 'A' || s.charAt(i) > 'Z') && \n (s.charAt(i) < '0' || s.charAt(i) > '9'))\n {\n return true;\n }\n }\n return false;\n }", "public static boolean minCharRequirementPassed(String toCheck, int limit) {\n if (toCheck == null) return false;\n return toCheck.length() >= limit;\n }", "private String checkLimitText(String s, int limit) {\n\n if (s == null) {\n s = \"\";\n }\n\n if (s.length() > limit) {\n s = s.substring(0, limit);\n s = s + \"...\";\n }\n\n return s;\n }", "public boolean checkLength(String password) {\n return password.matches(\"^.{8,25}$\");\n }", "public MinSubStringMaxCharactersTest(String testName) {\n super(testName);\n }", "private boolean isPasswordValid(String password) {\n return password.length() > 6;\n }", "private boolean isPasswordValid(String password) {\n return password.length() > 6;\n }", "private static String checkAddress(String raw) \n\t{\n\t\t// Check to see if the length is greater than the maxLength of user input.\n\t\tif(raw.length() > maxLength) \n\t\t{\n\t\t\treturn \"\";\n\t\t}\n\t\treturn raw;\n\t}", "@Test\n public void testFirstNameMaxLength()\n {\n String invalid = repeatM(21);\n owner.setFirstName(invalid);\n assertInvalid(owner, \"firstName\", \"First name must be between 2 and 20 characters\", invalid);\n }", "@Test\n\tpublic void invalidLengthShort() {\n\t\tboolean result = validator.isValid(\"73602851\");\n\t\tassertFalse(result);\n\t}", "public static boolean isPasswordValid(String password) {\n if (password.length() > 50) { \n return false;\n } else { \n char c;\n int count = 1; \n for (int i = 0; i < password.length(); i++) {\n c = password.charAt(i);\n // If the character is a space\n if (c == ' '){ \n return false;\n }\n else if (Character.isDigit(c)) {\n count++;\n if (count > 6) { \n return false;\n } \n }\n }\n }\n return true;\n }", "private boolean checkLengthPlateNumber(EditText text, TextInputLayout TFB, String massage) {\n if(text.getText().toString().length() > 10)\n {\n TFB.setErrorEnabled(true);\n TFB.setError(massage);\n return false;\n }\n else\n {\n TFB.setErrorEnabled(false);\n return true;\n }\n }", "@Test\n public void testPasswordMinLength()\n {\n String invalid = repeatM(7);\n owner.setPassword(invalid);\n assertInvalid(owner, \"password\", \"Password must be at least 8 characters in length\", invalid);\n }", "int getMaxStringLiteralSize();", "public static String validString(String message, int minLength, int maxLength){\n boolean success = false;\n String line = \"\";\n do {\n line = readLine(message).trim();\n if (inRange(line.length(), minLength, maxLength))\n success = true;\n else\n System.out.println(\"El número máximo de caracteres es \" + \n maxLength + \"... \");\n } while(!success);\n return line;\n }", "private boolean isPasswordValid(String password) {\r\n return password != null && password.trim().length() > 5;\r\n }", "private boolean checkLengthDeviceSerialEditText (EditText text, TextInputLayout TFB, String massage) {\n if(text.getText().toString().length() > 10 || text.getText().toString().length() < 10)\n {\n TFB.setErrorEnabled(true);\n TFB.setError(massage);\n return false;\n }\n else\n {\n TFB.setErrorEnabled(false);\n return true;\n }\n\n\n }", "private boolean isPasswordValid(String password) {\n return password != null && password.trim().length() > 5;\n }", "private boolean isValid(String input){\n return input.length() == 10 && input.matches(\"-?\\\\d+(\\\\.\\\\d+)?\");\n //check its digits\n }", "public static boolean passwordLongEnough(String password) {\n if (password.length() < 8) return false;\n else return true;\n }", "public String nameValidate() {\r\n String regex = \"[a-zA-Z]{1,10}\";\r\n\r\n // create user input\r\n Scanner scanner = new Scanner(System.in);\r\n\r\n while (true) {\r\n System.out.print(\"Enter the name: \");\r\n String input = scanner.nextLine();\r\n // check if user enter a string between 1-10\r\n if (input.matches(regex)) {\r\n return input;\r\n } else {\r\n System.out.println(\"Please enter a correct name, name's length should between 1 and 10.\");\r\n }\r\n }\r\n\r\n }", "public void testOtacTooLong()\n {\n form.setVerificationCode(\"123456789\");\n validator.validate(form, errors);\n assertTrue(errors.hasErrors());\n }", "public static boolean validatePassword(String password){\n return password.length() >= MIN_CHARACTERS;\n }", "private boolean validMessage(String message){\r\n //35 lines of text seems to be the max\r\n //TODO check if its a character limit and not a newline limit in iteration 4\r\n int newLines = 0;\r\n for(int i = 1; i < message.length(); i++)\r\n if(message.substring(i-1, i).equals(\".\")){\r\n newLines++;\r\n }\r\n return newLines <= this.lineBound;\r\n }", "@Test\r\n\tpublic void testIsValidPasswordTooShort()\r\n\t{\r\n\t\ttry{\r\n\t\t\tassertTrue(PasswordCheckerUtility.isValidPassword(\"flgk1\"));\r\n\t\t}\r\n\t\tcatch(LengthException e)\r\n\t\t{\r\n\t\t\tassertTrue(\"Successfully threw a lengthExcepetion\",true);\r\n\t\t}\r\n\t}", "private boolean isPasswordValid(String password) {\n return (password.length() >= 4 && password.length() < 20);\n }", "public InvalidOntologyName(int length) {\n super(String.format(\"Ontology name is too long (%d)\", length));\n }", "private boolean isPasswordValid(String password) {\n return (password.length() >= 6) && (password.length() <= 30);\n }", "private String validateString(String data, String defaultValue, int minLength, int maxLength)\n {\n return (data.length() < minLength || data.length() > maxLength) ? defaultValue : data;\n }", "public static boolean isUsernameValid(String username) {\n if (username.length() > 50) { \n return false;\n } else { \n char c;\n int count = 1; \n for (int i = 0; i < username.length(); i++) {\n c = username.charAt(i);\n if (!Character.isLetterOrDigit(c)) { \n return false;\n }\n // If the character is a space\n else if (c == ' '){ \n return false;\n }\n else if (Character.isDigit(c)) {\n count++;\n if (count > 6) { \n return false;\n } \n }\n }\n }\n return true;\n }", "private boolean isPasswordValid(String password) {\n return password.length() > 4;\r\n }", "private boolean isPasswordValid(String password) {\n return password.length() > 4;\r\n }", "private boolean isPasswordValid(String password) {\n return password.length() > 4;\r\n }", "private static boolean isBadInput(String s) {\n\t\tString[] split = s.split(\"\\\\s+\");\n\t\tif (split.length != 3) {\n\t\t\tSystem.err.printf(\"Unknow length: %d\\n\", split.length);\n\t\t\treturn true;\n\t\t}\n\t\ttry {\n\t\t\tInteger.parseInt(split[0]);\n\t\t\tInteger.parseInt(split[2]);\n\t\t} catch (NumberFormatException e) {\n\t\t\tSystem.err.printf(\"Input numbers only.\\n\");\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tif (split[1].length() != 1) {\n\t\t\tSystem.err.printf(\"Operator should be one character.\\n\");\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public static boolean validateMobile(String phone){\n int k=0;\n k=phone.length();\n if(k==10){\n return true;\n }\n return false;\n }", "private boolean isPasswordValid(String password) {\n //TODO: Replace this with your own logic\n return password.length() > 7;\n }", "@Test\n\tpublic void caseNameWithWrongLength() {\n\t\tString caseName = \"le\";\n\t\ttry {\n\t\t\tCaseManagerValidator.isCharAllowed(caseName);\n\t\t\tfail();\n\t\t} catch (ValidationException e) {\n\t\t}\n\t}", "private static boolean above_limit(String a)\n {\n int sum = 0;\n for(int x = 0; x < a.length(); x++)\n {\n sum += (find_cost(\"\"+a.charAt(x)));\n }\n if(sum >= library.return_capacity() || sum <= library.return_lowercost())\n return false;\n return true;\n }", "private boolean isValidPassword(final String thePassword) {\n return thePassword.length() > PASSWORD_LENGTH;\n }", "private boolean isPasswordValid(String password) {\n return password.length() > 4;\n }", "public void makeErrors() {\n Random rnd = new Random();\n String charset = \"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz\";\n for (int i = 0; i < message.length(); i += 3) {\n message.setCharAt(i + rnd.nextInt(3),\n charset.charAt(rnd.nextInt(charset.length())));\n }\n }", "void setMaxStringLiteralSize(int value);", "private boolean isPasswordValid(String password) {\n return password.length() > 4;\n }", "private boolean isPasswordValid(String password) {\n return password.length() > 4;\n }", "private boolean isPasswordValid(String password) {\n return password.length() > 4;\n }", "private boolean isPasswordValid(String password) {\n return password.length() > 4;\n }", "private boolean isPasswordValid(String password) {\n return password.length() > 4;\n }", "private boolean isPasswordValid(String password) {\n return password.length() > 4;\n }", "private boolean isPasswordValid(String password) {\n return password.length() > 4;\n }", "private boolean isPasswordValid(String password) {\n return password.length() > 4;\n }", "private boolean isPasswordValid(String password) {\n return password.length() > 4;\n }", "private boolean isPasswordValid(String password) {\n return password.length() > 4;\n }", "private boolean isPasswordValid(String password) {\n return password.length() > 4;\n }", "private boolean isPasswordValid(String password) {\n return password.length() > 4;\n }", "private boolean isPasswordValid(String password) {\n return password.length() > 4;\n }", "private boolean isPasswordValid(String password) {\n return password.length() > 4;\n }", "private boolean isPasswordValid(String password) {\n return password.length() > 4;\n }", "private boolean isPasswordValid(String password) {\n return password.length() > 4;\n }", "private boolean isPasswordValid(String password) {\n return password.length() > 4;\n }", "private boolean isPasswordValid(String password) {\n return password.length() > 4;\n }", "@Test\n\tpublic void invalidLengthLong() {\n\t\tboolean result = validator.isValid(\"73102851691\");\n\t\tassertFalse(result);\n\t}", "public void stinException(String nameField, Editable stringAnalize, int max) throws Exceptions {\n if(stringAnalize.toString().isEmpty()){\n throw new Exceptions(\"You need to insert the \"+nameField);\n }\n if(stringAnalize.length()>max){\n throw new Exceptions(\"You need to insert less than \"+max+\" characters\");\n }\n try{\n if(Double.parseDouble(stringAnalize.toString())!=321312.123) {\n throw new Exceptions(\"The \" + nameField + \" could not be a number\");\n }\n }catch(Exceptions fs){\n throw new Exceptions(\"The \" + nameField + \" could not be a number\");\n }catch(Exception e){\n }\n }", "public boolean firstNameTwoCharactersLong(String fName){\n boolean message = true;\n //If(firstnameLength is < 2) print to error + \"first name must be atleast 2 characters\"\n if(fName.length() < 2){\n errorMessage = errorMessage + \"The first name must be at least 2 characters long.\\n\";\n //Then make False and return\n message = false;\n }\n return message;\n\n }", "private boolean isLengthCorrect(final String token) {\n return token.length() == VALID_TOKEN_LENGTH;\n }", "private boolean isPasswordValid(String password) {\n return password.length() >= 4;\n }", "public static boolean isOverEight(String mj) {\n\t\tif (mj.length() < 8) {\n\t\t\tSystem.out.println(\"Password must be over 8 characters!\");\n\t\t\treturn false;\n\t\t} else return true;\n\t}", "private C0054e m186a(CharSequence charSequence, RuntimeException runtimeException) {\n String obj;\n if (charSequence.length() > 64) {\n obj = charSequence.subSequence(0, 64).toString() + \"...\";\n } else {\n obj = charSequence.toString();\n }\n return new C0054e(\"Text '\" + obj + \"' could not be parsed: \" + runtimeException.getMessage(), charSequence, 0, runtimeException);\n }", "@Test\n public void testSanitizeText() {\n assertEquals(text.length() - 9, WordUtil.sanitizeText(text).length());\n }", "private boolean isValidMobile(String phone) {\n if (!Pattern.matches(\"[a-zA-Z]+\", phone)) {\n return phone.length() == 10;\n }\n return false;\n }", "private String validateChar(String text) {\n char[] validChars = new char[text.length()];\n int validCount = 0;\n for (int i = 0; i < text.length(); i++) {\n char c = text.charAt(i);\n boolean valid = (c >= 0x20 && c <= 0xd7ff) || (c >= 0xe000 && c <= 0xfffd);\n if (valid) {\n validChars[validCount++] = c;\n } else {\n if (c == 10) // LineBreak\n {\n validChars[validCount++] = c;\n }\n }\n }\n return new String(validChars, 0, validCount);\n }", "public static boolean validigits(String pass){\n\t\tif (pass.length()>=8){\n\t\t\treturn true;\n\t\t}\n\t\telse \n\t\t\treturn false;\n\t}", "private void passwordvalidation( String password ) throws Exception {\r\n if ( password != null ) {\r\n if ( password.length() < 6 ) {\r\n throw new Exception( \"Le mot de passe doit contenir au moins 6 caracteres.\" );\r\n }\r\n } else {\r\n throw new Exception( \"Merci de saisir votre mot de passe.\" );\r\n }\r\n }", "private static boolean checkPassword(String password) {\n if (password.length() <= 6) {\n return false; // Password too short.\n } else for (int i = 0; i < password.length(); i++) {\n if (Character.isWhitespace(password.charAt(i))) {\n return false; // Password has whitespace.\n }\n }\n return true;\n }", "private void checkInput(String input)throws Exception{\n\n if (input.getBytes(\"UTF-8\").length > 255){\n throw new IOException(\"Message too long\");\n\n }\n try {\n if (Integer.parseInt(input) < 0 || Integer.parseInt(input) > 65535) {\n throw new IOException(\"Port not valid\");\n }\n }catch (NumberFormatException e){\n //nothing should happen\n }\n }", "int minLength();", "public static void checkMinLength(String name, int minLength) throws MinSizeExceededException{\n \n if(name.length()<minLength) throw new MinSizeExceededException(\"Length of name is too short! MinLength=\" + minLength + \", ActualLength=\" + name.length());\n }", "public StringLengthValidator(int minCharacters, int maxCharacters) {\n this.min = minCharacters;\n this.max = maxCharacters;\n }", "public boolean isPwLength5to12Characters(String password) {\n\t\t//return password.matches(\"^(?=[\\\\s\\\\S]{5,12}$)[a-zA-Z0-9]*[^$%^&*;:,<>?()\\\\\\\"']*$\");\n\t\treturn password.length() >= 5 && password.length() <= 12;\n\t}", "public String setTenLenString(String sInput) {\n String sReturn = sInput;\n int nCount = 10 - sReturn.length();\n for (int i = 0; i < nCount; i++) {\n sReturn += \" \";\n }\n return sReturn;\n\n }", "private boolean isPasswordValid(String password) {\n return (password.length() > 4);\n }", "public static boolean isPasswordValid(String password){\n return password.length() >= 6;\n }", "private boolean isPasswordValid(String password) {\n return password.length() > 4 && password.equals(\"123456\");\n }", "private static boolean m4389a(String str) {\n return str != null && str.length() != 0 && Pattern.compile(\"^[0-9A-Fa-f]{13,18}+$\").matcher(str).matches() && str.indexOf(\"000000000\") == -1 && str.indexOf(\"111111111\") == -1 && str.indexOf(\"222222222\") == -1 && str.indexOf(\"333333333\") == -1 && str.indexOf(\"444444444\") == -1 && str.indexOf(\"555555555\") == -1 && str.indexOf(\"666666666\") == -1 && str.indexOf(\"777777777\") == -1 && str.indexOf(\"888888888\") == -1 && str.indexOf(\"999999999\") == -1;\n }", "public void testRandomStrings() throws Exception {\n checkRandomData(random(), a, 200 * RANDOM_MULTIPLIER);\n }", "public static String moreLenString(int n) {\n\t\tif (n <= 0) {\n\t\t\tthrow new ArgsErrorException();\n\t\t}\n\t\treturn String.format(RString.MORE_LEN_STRING, n);\n\t}", "private boolean isPasswordValid(String password)\n {\n return password.length() > MagazzinoService.getPasswordMinLength(this);\n }", "protected String limit(String value, int length)\n\t{\n\t\tif (value == null) return null;\n\t\tif (value.length() > length)\n\t\t{\n\t\t\treturn value.substring(0, length);\n\t\t}\n\t\treturn value;\n\t}", "public static boolean isGoodField(String input) {\n if (input == null || input.isEmpty() || input.length() < 6)\n return false;\n return true;\n }" ]
[ "0.7303226", "0.65640897", "0.6530132", "0.648764", "0.64801645", "0.6361945", "0.63610214", "0.63510734", "0.63218045", "0.6282103", "0.6267675", "0.62654775", "0.62237006", "0.6152451", "0.6082005", "0.6078566", "0.60764545", "0.6040444", "0.6040444", "0.6029708", "0.60123676", "0.5992957", "0.59868854", "0.5986721", "0.598356", "0.59486264", "0.59209937", "0.5869876", "0.58571655", "0.58530146", "0.585021", "0.58491915", "0.5847989", "0.5836867", "0.582767", "0.5826076", "0.58231306", "0.5822988", "0.58060014", "0.58016217", "0.5788853", "0.5745385", "0.57413495", "0.57413495", "0.57413495", "0.57380044", "0.5732307", "0.57323", "0.5718396", "0.571171", "0.5704542", "0.56980276", "0.56723976", "0.5664832", "0.56394005", "0.56394005", "0.56394005", "0.56394005", "0.56394005", "0.56394005", "0.56394005", "0.56394005", "0.56394005", "0.56394005", "0.56394005", "0.56394005", "0.56394005", "0.56394005", "0.56394005", "0.56394005", "0.56394005", "0.56394005", "0.5635931", "0.56353754", "0.56249297", "0.56174105", "0.56161946", "0.55955845", "0.5595472", "0.5593331", "0.5591085", "0.557987", "0.5577611", "0.55764085", "0.5575992", "0.5565789", "0.5563631", "0.5551726", "0.5551706", "0.55501425", "0.55489165", "0.55488527", "0.55358523", "0.5530841", "0.55208296", "0.5519936", "0.5519897", "0.55128807", "0.55120885", "0.5510759" ]
0.572152
48
Initialize panel for the deck
private void initPanelDeck() { gsp.panelDeck = gsp.createPanel(100, 50, 50, 50, 0, 0, 400, 350); gsp.buttonDeck = new JButton(); gsp.setImageIcon("Deck", gsp.buttonDeck); gsp.labelLastCard = new JLabel(); gsp.updateLastCardView(); gsp.panelDeck.add(gsp.buttonDeck); gsp.panelDeck.add(gsp.labelLastCard); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initDecks() {\n\t\tDeck[] decks = new Deck[2];\n\t\tdecks[0] = charDeck;\n\t\tdecks[1] = mainDeck;\n\n\t\tfor (int i = 0; i < decks.length; i++) {\n\t\t\tDeck d = decks[i];\n\t\t\td.setNrOfShownCards(d.getDeckSize());\n\t\t\td.setShownLines(showLines);\n\t\t\td.setLineLength(lineLength);\n\t\t\td.setHandPosRelative(-21, -20);\n\t\t\td.reset();\n\t\t}\n\t}", "public GamePanel() {\n setBackground(new Color(0, 200, 0));\n deck = new Deck();\n mainPiles = new Pile[7];\n suitPiles = new Pile[4];\n setInitialLayout(deck);\n deckPile = new Pile(deck.getX() + Card.WIDTH + GamePanel.HORI_DISPL, deck.getY(), Pile.DECK_PILE);\n selectedPile = null;\n CardListener listener = new CardListener(this);\n this.addMouseListener(listener);\n this.addMouseMotionListener(listener);\n this.setFocusable(true);\n }", "private void initializeDeck() {\n drawPile.clear();\n\n for (ICard.Color color : ICard.Color.values()) {\n // Numbered cards\n drawPile.add(new NumberedCard(color, 0));\n for (int value = 1; value < 10; value++) {\n drawPile.add(new NumberedCard(color, value));\n drawPile.add(new NumberedCard(color, value));\n }\n\n // Special cards\n drawPile.add(new SkipCard(color));\n drawPile.add(new SkipCard(color));\n\n drawPile.add(new ReverseCard(color));\n drawPile.add(new ReverseCard(color));\n\n drawPile.add(new DrawTwoCard(color));\n drawPile.add(new DrawTwoCard(color));\n }\n\n for (int i = 0; i < 4; i++) {\n drawPile.add(new WildCard());\n drawPile.add(new WildFourCard());\n }\n }", "public Deck() {\n System.out.println(\"Inside deck\");\n cards = new ArrayList<>();\n fillDeck();\n }", "public kinpanel() {\n initComponents();\n }", "public DashBoardPanel() {\n initComponents();\n }", "public Deck() {\n generateDeckOfCards();\n }", "private void initialize() {\n this.setLayout(new CardLayout());\n this.setName(this.extension.getMessages().getString(\"spiderajax.options.title\"));\n \t if (Model.getSingleton().getOptionsParam().getViewParam().getWmUiHandlingOption() == 0) {\n \t \tthis.setSize(391, 320);\n \t }\n this.add(getPanelProxy(), getPanelProxy().getName()); \n \t}", "private void initializeDecks()\n\t{\n\t\tdiscardRestrictedCards();\n\t\t\n\t\tboard.getRandomEventCardDeck().shuffleDeck();\n\t\tboard.getPersonalityCardDeck().shuffleDeck();\n\t\tDeck<Card> brownCards = new Deck<Card>();\n\t\tDeck<Card> greenCards = new Deck<Card>();\n\t\tfor(Card card : board.getPlayerCardDeck())\n\t\t{\n\t\t\tif(card.getType() == Card.CardType.GreenPlayerCard)\n\t\t\t{\n\t\t\t\tgreenCards.addCard(card);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tbrownCards.addCard(card);\n\t\t\t}\n\t\t}\n\t\tbrownCards.shuffleDeck();\n\t\tgreenCards.shuffleDeck();\n\t\tboard.getPlayerCardDeck().clear();\n\t\tboard.getPlayerCardDeck().addAll(brownCards);\n\t\tboard.getPlayerCardDeck().addAll(greenCards);\n\t}", "public Deck(){\n\t\tcards = new ArrayList<>(deckSize);\n\t\tdeck = new int[deckSize];\n\t}", "public abstract void init(JPanel panel);", "public void initialise()\r\n {\n Deck d = new Deck();\r\n d.shuffle();\r\n //Deal cards to players\r\n Iterator<Card> it = d.iterator();\r\n int count = 0;\r\n while (it.hasNext())\r\n {\r\n players[count % nosPlayers].addCard(it.next());\r\n it.remove();\r\n ++count;\r\n }\r\n //Initialise Discards\r\n discards = new Hand();\r\n //Chose first player\r\n currentPlayer = 0;\r\n currentBid = new Bid();\r\n currentBid.setRank(Card.Rank.TWO);\r\n }", "private void initializeDeck() {\r\n\t\t// Loop over the 4 card suits\r\n\t\tfor (Suit suit : Suit.values()) {\r\n\t\t\t// Loop over 13 card types\r\n\t\t\tfor (CardType value : CardType.values()) {\r\n\t\t\t\tcards.addCard(new Card(suit, value));\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public Deck() {\n this.allocateMasterPack();\n this.init(1);\n }", "private void initialize() {\n this.setLayout(new CardLayout());\n this.setName(Constant.messages.getString(\"ports.options.title\"));\n this.add(getPanelPortScan(), getPanelPortScan().getName());\n }", "public Deck()\r\n\t{\r\n\t\tcards = new String[DECK_SIZE];\r\n\t\t\r\n\t\tnewDeck();\r\n\t}", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setBounds(100, 100, 600, 600);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tcard = new CardLayout(0, 0);\n\t\tframe.getContentPane().setLayout(card);\n\n\t\tJPanel panel = new JPanel();\n\t\tpanel.setBackground(Color.WHITE);\n\t\tframe.getContentPane().add(panel, \"name_6126640247321\");\n\n\t\tpanel.add(cdFilmePanel);\n\n\t\tJPanel panel_1 = new JPanel();\n\t\tpanel_1.setBackground(Color.WHITE);\n\t\tframe.getContentPane().add(panel_1, \"name_6128366176959\");\n\n\t\tpanel_1.add(fdFilmePanel);\n\n\t\tJMenuBar menuBar = new JMenuBar();\n\t\tframe.setJMenuBar(menuBar);\n\n\t\tJMenu mnNewMenu = new JMenu(\"Filmes\");\n\t\tmenuBar.add(mnNewMenu);\n\n\t\tJMenuItem mntmNewMenuItem_1 = new JMenuItem(\"New menu item\");\n\t\tmntmNewMenuItem_1.setAction(action);\n\t\tmnNewMenu.add(mntmNewMenuItem_1);\n\n\t\tJMenuItem mntmNewMenuItem = new JMenuItem(\"New menu item\");\n\t\tmntmNewMenuItem.setAction(action_1);\n\t\tmnNewMenu.add(mntmNewMenuItem);\n\t}", "public Deck() { // This constructor creates a standard deck\n\n\tcards = new Card[52];\n\tint k=0;\n\t\n\tfor (int i=0; i<4; i++)\n\t for (int j=2; j<15; j++){\n\t\tcards[k]= new Card (j, i);\n\t\tk++;\n\t\t }\n\t \n\n\tshuffle();\n\t\n\tcardsLeft = 52;\n\t/*\tfor (int i=0; i<52; i++)\n\t\tSystem.out.println (cards[i]);*/\n }", "public Deck()\n\t{\n\t\t//call other Constructor defining one deck with out shuffling\n\t\tthis(false);\n\t}", "public GamePanel()\n {\n super();\n setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));\n \n CARD_BACK.add(new CardPanel(\"img/cards/BACK.png\"));\n \n //The code below is just for reference\n// dealerCards = new ArrayList<>();\n// for (int i = 0; i < dealerInHand.size(); i++)\n// {\n// dealerCards.add(new CardPanel(\"img/cards/\" + dealerInHand.get(i) + \".png\"));\n// }\n// \n// playerCardsOne = new ArrayList<>();\n// for (int i = 0; i < playerInHandOne.size(); i++)\n// {\n// playerCardsOne.add(new CardPanel(\"img/cards/\" + playerInHandOne.get(i) + \".png\"));\n// }\n// \n// playerCardsTwo = new ArrayList<>();\n// for (int i = 0; i < playerInHandTwo.size(); i++)\n// {\n// playerCardsTwo.add(new CardPanel(\"img/cards/\" + playerInHandTwo.get(i) + \".png\"));\n// }\n //The code above is just for reference\n \n dealerDeckContainer = new CardDeckContainer();\n dealerStatContainer = new JPanel(new BorderLayout());\n dealerStatContainer.setOpaque(false);\n JLabel dealerStatTitle = new JLabel(\"Dealer in Hand\");\n dealerStatTitle.setForeground(Color.WHITE);\n dealerStatTitle.setHorizontalAlignment(JLabel.CENTER);\n dealerStatTitle.setFont(new Font(\"\", Font.PLAIN, 12));\n dealerStatPoint.setForeground(Color.WHITE);\n dealerStatPoint.setHorizontalAlignment(JLabel.CENTER);\n dealerStatPoint.setFont(new Font(\"\", Font.PLAIN, 12));\n dealerStatContainer.add(dealerStatTitle, BorderLayout.NORTH);\n dealerStatContainer.add(dealerStatPoint, BorderLayout.CENTER);\n \n playerDeckOneContainer = new CardDeckContainer();\n playerStatOneContainer = new JPanel(new BorderLayout());\n playerStatOneContainer.setOpaque(false);\n JLabel playerStatOneTitle = new JLabel(\"Player in Hand\");\n playerStatOneTitle.setForeground(Color.WHITE);\n playerStatOneTitle.setHorizontalAlignment(JLabel.CENTER);\n playerStatOneTitle.setFont(new Font(\"\", Font.PLAIN, 12));\n playerStatOnePoint.setForeground(Color.WHITE);\n playerStatOnePoint.setHorizontalAlignment(JLabel.CENTER);\n playerStatOnePoint.setFont(new Font(\"\", Font.PLAIN, 12));\n playerStatOneDescription.setForeground(Color.WHITE);\n playerStatOneDescription.setHorizontalAlignment(JLabel.CENTER);\n playerStatOneDescription.setFont(new Font(\"\", Font.BOLD, 12));\n playerStatOneContainer.add(playerStatOneTitle, BorderLayout.NORTH);\n playerStatOneContainer.add(playerStatOnePoint, BorderLayout.CENTER);\n playerStatOneContainer.add(playerStatOneDescription, BorderLayout.SOUTH);\n \n playerDeckTwoContainer = new CardDeckContainer(new CardDeckPanel(CARD_BACK));\n playerStatTwoContainer = new JPanel(new BorderLayout());\n playerStatTwoContainer.setOpaque(false);\n JLabel playerStatTwoTitle = new JLabel(\"Player Hand 2\");\n playerStatTwoTitle.setForeground(Color.WHITE);\n playerStatTwoTitle.setHorizontalAlignment(JLabel.CENTER);\n playerStatTwoTitle.setFont(new Font(\"\", Font.PLAIN, 12));\n playerStatTwoPoint.setForeground(Color.WHITE);\n playerStatTwoPoint.setHorizontalAlignment(JLabel.CENTER);\n playerStatTwoPoint.setFont(new Font(\"\", Font.PLAIN, 12));\n playerStatTwoDescription.setForeground(Color.WHITE);\n playerStatTwoDescription.setHorizontalAlignment(JLabel.CENTER);\n playerStatTwoDescription.setFont(new Font(\"\", Font.BOLD, 12));\n playerStatTwoContainer.add(playerStatTwoTitle, BorderLayout.NORTH);\n playerStatTwoContainer.add(playerStatTwoPoint, BorderLayout.CENTER);\n playerStatTwoContainer.add(playerStatTwoDescription, BorderLayout.SOUTH);\n \n gameStatPanel = new JPanel();\n gameStatPanelPlayerName = new JLabel();\n gameStatPanelCurrentChips = new JLabel();\n gameStatPanelCurrentBet = new JLabel();\n gameStatPanelPlayerName.setFont(new Font(\"\", Font.PLAIN, 14));\n gameStatPanelPlayerName.setForeground(Color.WHITE);\n gameStatPanelPlayerName.setBorder(new EmptyBorder(0, 0, 0, 5));\n gameStatPanelCurrentChips.setFont(new Font(\"\", Font.PLAIN, 14));\n gameStatPanelCurrentChips.setForeground(Color.WHITE);\n gameStatPanelCurrentChips.setBorder(new EmptyBorder(0, 5, 0, 5));\n gameStatPanelCurrentBet.setFont(new Font(\"\", Font.PLAIN, 14));\n gameStatPanelCurrentBet.setForeground(Color.WHITE);\n gameStatPanelCurrentBet.setBorder(new EmptyBorder(0, 5, 0, 0));\n gameStatPanel.add(gameStatPanelPlayerName);\n gameStatPanel.add(gameStatPanelCurrentChips);\n gameStatPanel.add(gameStatPanelCurrentBet);\n gameStatPanel.setOpaque(false);\n \n gameButtonPanel = new JPanel(cardLayout);\n betButtonPanel = new JPanel();\n playButtonPanel = new JPanel();\n JLabel pleaseBet = new JLabel(\"Please bet: \");\n pleaseBet.setFont(new Font(\"\", Font.PLAIN, 14));\n pleaseBet.setForeground(Color.WHITE);\n betButtonPanel.add(pleaseBet);\n betField = new JTextField();\n betField.setFont(new Font(\"\", Font.PLAIN, 14));\n betField.setPreferredSize(new Dimension(80, 28));\n betButtonPanel.add(betField);\n JButton betButton = new JButton(\"Bet\");\n JButton backButton = new JButton(\"Back\");\n betButtonPanel.add(betButton);\n betButtonPanel.add(backButton);\n betButtonPanel.setOpaque(false);\n \n hitButton = new JButton(\"Hit\");\n standButton = new JButton(\"Stand\");\n doubleButton = new JButton(\"Double\");\n //JButton splitButton = new JButton(\"Split\");\n //splitButton.setEnabled(false);\n playButtonPanel.add(hitButton);\n playButtonPanel.add(standButton);\n playButtonPanel.add(doubleButton);\n //playButtonPanel.add(splitButton);\n playButtonPanel.setOpaque(false);\n gameButtonPanel.add(\"betbutton\", betButtonPanel);\n gameButtonPanel.add(\"playbutton\", playButtonPanel);\n gameButtonPanel.setOpaque(false);\n \n add(gameStatPanel);\n add(dealerDeckContainer);\n add(playerDeckTwoContainer);\n add(playerDeckOneContainer);\n add(gameButtonPanel);\n \n this.addComponentListener(new ComponentAdapter()\n {\n @Override\n public void componentShown(ComponentEvent e)\n {\n Game.initGame();\n }\n });\n \n betButtonPanel.addComponentListener(new ComponentAdapter()\n {\n @Override\n public void componentShown(ComponentEvent e)\n {\n betField.setText(\"\");\n if (BlackJack.player.getChip() <= 0)\n {\n JOptionPane.showMessageDialog(null, \"You are penniless!\", \"Information\", JOptionPane.INFORMATION_MESSAGE);\n User.deleteUserByName(BlackJack.player.getName());\n BlackJack.player = new Player(true);\n BlackJack.dealer = new Player(false);\n BlackjackFrame.cardLayout.show(getParent(), \"welcome\");\n }\n hitButton.setEnabled(true);\n standButton.setEnabled(true);\n doubleButton.setEnabled(true);\n BlackJack.player.setBet(0);\n BlackJack.player.getHandOne().clear();\n BlackJack.player.getHandTwo().clear();\n BlackJack.dealer.getHandOne().clear();\n GamePanel.gameStatPanelPlayerName.setText(\"Player: \" + BlackJack.player.getName());\n GamePanel.gameStatPanelCurrentChips.setText(\"Chips: \" + BlackJack.player.getChip());\n GamePanel.gameStatPanelCurrentBet.setText(\"Bet: 0\");\n GamePanel.gameStatPanel.repaint();\n }\n });\n \n betField.addKeyListener(new KeyAdapter()\n {\n @Override\n public void keyTyped(KeyEvent e)\n {\n int keyChar = e.getKeyChar();\n if (keyChar < KeyEvent.VK_0 || keyChar > KeyEvent.VK_9)\n {\n e.consume();\n }\n }\n });\n \n betButton.addActionListener(new ActionListener()\n {\n @Override\n public void actionPerformed(ActionEvent e)\n {\n Game.bet(Integer.parseInt(betField.getText()));\n }\n });\n \n backButton.addActionListener(new ActionListener()\n {\n @Override\n public void actionPerformed(ActionEvent e)\n {\n int choice = JOptionPane.showConfirmDialog(null, \"Do you want to go back to main menu?\\nYour record will be saved.\", \"Go Back\", JOptionPane.YES_NO_OPTION);\n if (choice == JOptionPane.YES_OPTION)\n {\n User.updateUser();\n BlackJack.player = new Player(true);\n BlackJack.dealer = new Player(false);\n BlackjackFrame.cardLayout.show(getParent(), \"welcome\");\n }\n }\n });\n \n hitButton.addActionListener(new ActionListener()\n {\n @Override\n public void actionPerformed(ActionEvent e)\n {\n doubleButton.setEnabled(false);\n Game.hit();\n }\n });\n \n standButton.addActionListener(new ActionListener()\n {\n @Override\n public void actionPerformed(ActionEvent e)\n {\n hitButton.setEnabled(false);\n standButton.setEnabled(false);\n doubleButton.setEnabled(false);\n playerStatOneDescription.setText(\"Stand\");\n playerStatOneDescription.repaint();\n Game.dealerGame();\n }\n });\n \n doubleButton.addActionListener(new ActionListener()\n {\n @Override\n public void actionPerformed(ActionEvent e)\n {\n hitButton.setEnabled(false);\n standButton.setEnabled(false);\n doubleButton.setEnabled(false);\n if (!Game.doubleDown())\n {\n hitButton.setEnabled(true);\n standButton.setEnabled(true);\n doubleButton.setEnabled(false);\n }\n }\n });\n \n }", "public void init() {\r\n\t\t/*\r\n\t\t * Initialize panel for base\r\n\t\t */\r\n\t\tbaseList = GameMap.getBaseList();\r\n\t\tthis.add(new BaseInfoPanel(baseList.getFirst(), controlPanel));\r\n\t}", "private void initCards() {\n for(int i = 0; i< noOfColumns; i++) {\n for (int j = 0; j < noOfRows; j++) {\n cards[i][j] = new Card(new Paint(), CardState.FACE_DOWN);\n }\n }\n setRandomColors();\n }", "private Card init_chart_card() {\n\t\t\n\t\tChartBarCards card = new ChartBarCards(getActivity());\n\t\t\n\t\tCardExpand expand = new CardExpand(getActivity());\n\t\tcard.addCardExpand(expand);\n\t\tcard.setBackgroundResource(getResources().getDrawable(R.drawable.card_back));\n\t\treturn card;\n\t}", "public BankPanel() {\r\n\t super();\r\n\t}", "private void initCards() {\n\t\tArrayList<Card> cardsChart = new ArrayList<Card>();\n\t\tCard card = init_info_card(tmp.getFull(), tmp.getStatus(), tmp.getDue_date());\n\t\tcardsChart.add(card);\n\t\tcard = init_fulfilled_card();\n\t\tcardsChart.add(card);\n\t\tcard = init_proof_card();\n\t\tcardsChart.add(card);\n\t\tcard = init_chart_detail_card();\n\t\tcardsChart.add(card);\n\t\t\n\t\t/*for (int i = 0; i < 5; i++) {\n\t\t\tcard = init_chart_card();\n\t\t\tcardsChart.add(card);\n\t\t}*/\n\t\tCardArrayAdapter mCardArrayAdapterGrades = new CardArrayAdapter(getActivity(), cardsChart);\n\n\t\tCardListView listView = (CardListView) getActivity().findViewById(R.id.card_list);\n\t\tif (listView != null) {\n\t\t\tlistView.setAdapter(mCardArrayAdapterGrades);\n\t\t}\n\t}", "private void initializeDeck() {\r\n deck = new ArrayList<>(52);\r\n\r\n for (String suit : SUITS) {\r\n for (String rank : RANKS) {\r\n deck.add(new Card(rank, suit)); // adds 52 cards to the deck (13 ranks, 4 suits)\r\n }\r\n }\r\n }", "public Deck() {\n this.deck = new LinkedList<>();\n }", "void fillDeck()\n\t{\n\t\t\n\t\tfor ( byte decks = 0 ; decks < howManyDecks ; decks++ )\n\t\t\tfor ( byte suit = 0 ; suit < 4 ; suit++ )\n\t\t\t\tfor ( byte value = 1 ; value < 14 ; value++ ) \n\t\t\t\t\tdeck.add ( new Card (value , suit , true) );\n\t}", "public Deck( ) {\r\n int ordinal;\r\n alalSets = new ArrayList<>();\r\n \r\n // load the cards\r\n for ( ordinal = 1; ordinal <= 13; ordinal++) {\r\n for( int iCount = 1; iCount <= 4; iCount++) {\r\n // the deck adds one set which contains one card\r\n \r\n ArrayList<Card> redCardSet = new ArrayList<>();\r\n Card redCard = new Card();\r\n redCard.value = ordinal;\r\n redCard.color = Enums.RED;\r\n redCardSet.add(redCard); // add card to set\r\n alalSets.add( redCardSet ); // add set to deck\r\n\r\n ArrayList<Card> blackCardSet = new ArrayList<>();\r\n Card blackCard = new Card();\r\n blackCard.value = ordinal;\r\n blackCard.color = Enums.BLACK;\r\n blackCardSet.add(blackCard);\r\n alalSets.add( blackCardSet );\r\n }\r\n }\r\n }", "private void initPanel() {\n\t\tthis.panel = new JPanel();\n\t\tthis.panel.setBounds(5, 5, 130, 20);\n\t\tthis.panel.setLayout(null); \n\n\t}", "public void initChestDeck() {\n\t\tchestDeck = new Deck();\n\t\tfor (int i = 0; i < 16; i++) {\n\t\t\tchestDeck.addCard(new Card(i + 16));\n\t\t}\n\t\t//makes cards random\n\t\tchestDeck.shuffle();\n\t}", "public ResourceDeck(JComponent container){\n super(container);\n deck = new ArrayList<ResourceCard>();\n populateDeck();\n }", "public WeaponPanel() {\n initComponents();\n }", "public void onModuleLoad() {\n\t\t//create our main panel\n\t\tfinal DeckPanel panels = new DeckPanel(); \n\t\tRootPanel.get(\"panel\").add(panels);\n\t\t//create our stage panels\n\t\tfinal LoginPanel login = new LoginPanel(panels,wwwordzService);\n\t\tfinal GamePanel game = new GamePanel(panels,wwwordzService); \n\t\tfinal RankingPanel ranking = new RankingPanel(panels,wwwordzService);\n\t\t//add stage panels to main panel\n\t\tpanels.add(login);\n\t\tpanels.add(game);\n\t\tpanels.add(ranking);\n\t\tpanels.showWidget(0);\n\t\t\n\n\t}", "public Panel() {\n }", "public Panel() {\n initComponents();\n\n\n }", "private void InitializeDeck(){\n //Spades\n\n deck.add(\"spadesace\");\n deck.add(\"spadesjack\");\n deck.add(\"spadesqueen\");\n deck.add(\"spadesking\");\n deck.add(\"spades2\");\n deck.add(\"spades3\");\n deck.add(\"spades4\");\n deck.add(\"spades5\");\n deck.add(\"spades6\");\n deck.add(\"spades7\");\n deck.add(\"spades8\");\n deck.add(\"spades9\");\n deck.add(\"spades10\");\n\n\n //Diamonds\n deck.add(\"diamondsace\");\n deck.add(\"diamondsjack\");\n deck.add(\"diamondsqueen\");\n deck.add(\"diamondsking\");\n deck.add(\"diamonds2\");\n deck.add(\"diamonds3\");\n deck.add(\"diamonds4\");\n deck.add(\"diamonds5\");\n deck.add(\"diamonds6\");\n deck.add(\"diamonds7\");\n deck.add(\"diamonds8\");\n deck.add(\"diamonds9\");\n deck.add(\"diamonds10\");\n\n //Clubs\n deck.add(\"clubsace\");\n deck.add(\"clubsjack\");\n deck.add(\"clubsqueen\");\n deck.add(\"clubsking\");\n deck.add(\"clubs2\");\n deck.add(\"clubs3\");\n deck.add(\"clubs4\");\n deck.add(\"clubs5\");\n deck.add(\"clubs6\");\n deck.add(\"clubs7\");\n deck.add(\"clubs8\");\n deck.add(\"clubs9\");\n deck.add(\"clubs10\");\n\n //Hearts\n deck.add(\"heartsace\");\n deck.add(\"heartsjack\");\n deck.add(\"heartsqueen\");\n deck.add(\"heartsking\");\n deck.add(\"hearts2\");\n deck.add(\"hearts3\");\n deck.add(\"hearts4\");\n deck.add(\"hearts5\");\n deck.add(\"hearts6\");\n deck.add(\"hearts7\");\n deck.add(\"hearts8\");\n deck.add(\"hearts9\");\n deck.add(\"hearts10\");\n\n Collections.shuffle(deck);\n\n for(int i = 0; i < deck.size(); i++){\n System.out.println(deck.get(i));\n }\n }", "private void setUpPanel() { \n this.setPreferredSize(new Dimension(myWidth, myHeight)); \n // Set this panel as a grid panel with 1 column, 6 rows. \n this.setLayout(new GridLayout(NUM_ROWS, 1)); \n // Create the next piece panel.\n this.myNextPiece = new TetrisNextPiecePanel();\n this.add(myNextPiece); \n // Add another panel which will show game instruction.\n final HowToPlayPanel instructionsPanel = new HowToPlayPanel();\n this.add(instructionsPanel);\n // add the last panel which will show the scores, level, game state etc.\n this.setUpLastPanel();\n }", "public void buildDeck(){\n\t\tfor(int i = 0; i < deckSize; i++){\n\t\t\tdeck[i] = i;\n\t\t}\n\t}", "public Deck()\n {\n deck = new ArrayList<>();\n }", "public PanelAmigo() {\n initComponents();\n \n }", "public ECCPanel() {\n initComponents();\n \n }", "public Deck() {\n deck = new ArrayList<>();\n for (Color d : Color.values()) {\n for (Value e : Value.values()) {\n Card c = new Card(d, e);\n deck.add(c);\n }\n }\n }", "public void initialDeck()\t{\n\t\tdeck1 = new Deck();\n\t\tdeck2 = new Deck();\n\t\tdeck1.shuffle();\n\t\tdeck2.shuffle();\n\t\tdeck1 = deck1.combine(deck2);\n\t\tdeck1.shuffle();\n\t}", "public DrawPanel() {\n initComponents();\n }", "public Game() {\n //Create the deck of cards\n cards = new Card[52 * numDecks];\n cards = initialize(cards, numDecks);\n cards = shuffleDeck(cards, numDecks);\n }", "public JPanelGameState() {\n initComponents();\n initLabelsArray();\n }", "public ComandaPanel() {\n\n initComponents();\n // comanda = new Comanda();\n }", "public PlayerPanel(Game game) {\n super(game);\n initComponents();\n setBorder(GUIConstants.PANEL_BORDER);\n cardLabels = new ArrayList<>();\n cardLabels.add(card1Label);\n cardLabels.add(card2Label);\n }", "public BlackPanel() \r\n {\r\n super(\"Seeds\", \"Seeds\");\r\n initComponents();\r\n \r\n // Set up some defaults variables\r\n putWizardData(\"blackWords\", \" \");\r\n }", "public BigTwoDeck(){\r\n\t\tinitialize();\r\n\t}", "private void init() {\n colors = new int[] {Color.BLUE, Color.GREEN, Color.YELLOW, Color.MAGENTA};\n cardsClicked = new Card[clicksLimit];\n playerManager = new PlayerManager();\n freezeCardPaint = new Paint();\n linePaint = new Paint();\n freezeCardPaint.setColor(Color.GRAY);\n linePaint.setColor(Color.BLACK);\n setNoOfColumns(4);\n setNoOfRows(4);\n setGameCards();\n }", "public Deck(){\n\t\tcount = 51;\n\t\tcards = new Card[52];\n\t\trand = new Random();\n\t\tfor(Suit suit : Suit.values()){\n\t\t\tfor (int i = 2; i < 15; i++) {\n\t\t\t\tcards[suit.ordinal()*13 + i - 2] = new Card(suit,i);\n\t\t\t}\n\t\t}\n\t}", "private void initDiceGridPanel() {\n\t\tdicePanel = new JPanel(new GridLayout(GRID, GRID));\n\t\tdicePanel.setPreferredSize(new Dimension(400, 400));\n\t\tdicePanel.setBorder(BorderFactory.createTitledBorder(\"Boggle Board\"));\n\t\tdieListener = new DieListener();\n\t\tint x, y;\n\t\t//int dieCounter = 0;\n\t\tdieGrid = new DieButton[GRID][GRID];\n\t\tfor (y = 0; y < GRID; y++) {\n\t\t\tfor (x = 0; x < GRID; x++) {\n\t\t\t\tdieGrid[y][x] = new DieButton(\"\");\n\t\t\t\tdieGrid[y][x].setFont(new Font(\"Arial\", Font.BOLD, 40));\n\t\t\t\tdieGrid[y][x].setFocusable(false);\n\t\t\t\tdieGrid[y][x].setRow(y);\n\t\t\t\tdieGrid[y][x].setCol(x);\n\t\t\t\tdieGrid[y][x].addActionListener(dieListener);\n\t\t\t\tdicePanel.add(dieGrid[y][x]);\n\t\t\t}\n\t\t}\n\t}", "public void initDrawPile(boolean shuffle) {\r\n\t\tCard tmp;\r\n\t\tfor (String c : Card.COLORS) {\r\n\t\t\tfor (int v : Card.VALUES) {\r\n\t\t\t\ttmp = new Card(v, c);\r\n\t\t\t\tdrawPile.addCard(tmp);\r\n\t\t\t}\r\n\t\t}\r\n\t\tdrawPile.addCard(new Card(0, Card.JOKERS[0]));\r\n\t\tdrawPile.addCard(new Card(0, Card.JOKERS[1]));\r\n\t\tif (shuffle)\r\n\t\t\tdrawPile.shuffle();\r\n\t}", "public PaperSettingsJPanel() {\n initComponents();\n }", "public void initialize()\r\n {\r\n game = new Blackjack();\r\n \r\n dealerCardList = new ArrayList<ImageShape>(8);\r\n playerCardList = new ArrayList<ImageShape>(8);\r\n \r\n setBackgroundColor(Color.green);\r\n height = getHeight();\r\n width = getWidth();\r\n cardWidth = 72;\r\n cardHeight = 96;\r\n \r\n for (float i = 0; i < 2 * cardHeight; i = i + cardHeight)\r\n {\r\n for (float j = 0; j < cardWidth*4; j = j + cardWidth)\r\n {\r\n RectF rect = new RectF(0.0f, 0.0f, cardWidth, cardHeight);\r\n ImageShape topCardSpace = new ImageShape(\"cardspace\", rect);\r\n topCardSpace.setPosition(j, i);\r\n dealerCardList.add(topCardSpace);\r\n add(topCardSpace);\r\n }\r\n }\r\n \r\n for (float i = height - 2*cardHeight; i < height; i = i + cardHeight)\r\n {\r\n for (float j = 0; j <cardWidth*4; j = j + cardWidth)\r\n {\r\n RectF rect = new RectF(0.0f, 0.0f, cardWidth, cardHeight);\r\n ImageShape bottomCardSpace = new ImageShape(\"cardspace\", rect);\r\n bottomCardSpace.setPosition(j, i);\r\n playerCardList.add(bottomCardSpace);\r\n add(bottomCardSpace);\r\n }\r\n }\r\n }", "public Deck() {\n cards = new Card[52];\n size = 0;\n for (int suit = Card.SPADES; suit <= Card.CLUBS; suit++) {\n for (int rank = Card.ACE; rank <= Card.KING; rank++) {\n cards[size] = new Card(rank, suit);\n size += 1;\n }\n }\n }", "public Deck() {\n deck = new LinkedList<>();\n for (int i = 1; i < FACE_VALUES + 1; i++) {\n deck.add(new Card(i, SPADES));\n deck.add(new Card(i, CLUB));\n deck.add(new Card(i, DIAMOND));\n deck.add(new Card(i, HEART));\n }\n }", "private void initialize() {\r\n\t\r\n\t\tpanel = new JPanel();\r\n\t\tpanel.setBounds(0, 0, 300, 100);\r\n\t\tpanel.setLayout(null);\r\n\t\t\r\n\t\ttxtQas = new JTextField();\r\n\t\ttxtQas.setToolTipText(\"\");\r\n\t\ttxtQas.setBounds(124, 11, 166, 20);\r\n\t\tpanel.add(txtQas);\r\n\t\ttxtQas.setColumns(10);\r\n\t\t\r\n\t\tJLabel lblId = new JLabel(\"ID: \");\r\n\t\tlblId.setBounds(10, 14, 46, 14);\r\n\t\tpanel.add(lblId);\r\n\t\t\r\n\t\tbtnExcluirItem = new JButton(\"Excluir Item\");\r\n\t\tbtnExcluirItem.setBounds(10, 70, 99, 23);\r\n\t\tpanel.add(btnExcluirItem);\r\n\r\n\t}", "public void init() {\r\n\t\tcards = new ArrayList<Card>();\r\n\t\tfor(Card card : Card.values()) {\r\n\t\t\tcards.add(card);\r\n\t\t}\r\n\t}", "private void setUpPanel() {\n this.panel = new JPanel();\n functions = new JPanel();\n panel.setPreferredSize(new Dimension(Screen.screenWidth, Screen.screenHeight));\n\n int borderBottom = Screen.screenHeight / 8;\n if (Screen.screenHeight > 1400) {\n borderBottom = Screen.screenHeight / 7;\n }\n\n panel.setBorder(BorderFactory.createEmptyBorder(80, Screen.border, borderBottom, Screen.border));\n panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));\n functions.setPreferredSize(new Dimension(600, 500));\n functions.setLayout(cardLayout);\n }", "public WithdrawPanel() {\n initComponents();\n }", "@Override\n\tpublic void init() {\n\t\t\n\t\t// Set your level dimensions.\n\t\t// Note that rows and columns cannot exceed a size of 16\n\t\tsetDimensions(4, 4);\n\t\t\n\t\t// Select your board type\n\t\tsetBoardType(BoardType.CHECKER_BOARD);\n\n\t\t// Select your grid colors.\n\t\t// You need to specify two colors for checker boards\n\t\tList<Color> colors = new ArrayList<Color>();\n\t\tcolors.add(new Color(255, 173, 179, 250)); // stale blue\n\t\tcolors.add(new Color(255, 255, 255, 255)); // white\n\t\tsetColors(colors);\n\t\t\n\t\t// Specify the level's rules\n\t\taddGameRule(new DemoGameRule());\n\t\t\n\t\t// Retrieve player IDs\n\t\tList<String> playerIds = getContext().getGame().getPlayerIds();\n\t\tString p1 = playerIds.get(0);\n\t\tString p2 = playerIds.get(1);\n\n\t\t// Add your entities to the level's universe\n\t\t// using addEntity(GameEntity) method\n\t\taddEntity(new Pawn(this, p1, EntityType.BLACK_PAWN, new Point(0, 0)));\n\t\taddEntity(new Pawn(this, p2, EntityType.WHITE_PAWN, new Point(3, 3)));\n\t}", "public GamePanel() {\n this.setLayout(null);\n\n initializeStateLabel();\n\n initializePileLabel();\n\n initializeSetColorButton();\n\n initializeDrawButton();\n initializeHideButton();\n\n this.setVisible(true);\n }", "public HoaDonJPanel() {\n initComponents(); \n this.init();\n }", "private void initialize() {\r\n this.setSize(new Dimension(374, 288));\r\n this.setContentPane(getJPanel());\r\n this.setResizable(false);\r\n this.setModal(true);\r\n this.setTitle(\"颜色选择面板\");\r\n addJPanel();\r\n\t}", "public Records_Panel() {\n\t\tsuper();\n\t\tinitialize();\n\t}", "public NewFetureKeyPanel() {\n initComponents();\n }", "public GamesPanel() {\n initComponents();\n }", "public AppoinmentPanel() {\n initComponents();\n }", "@Override\n\tpublic void Init(JPanel panel) {\n\n\t\tfor (int i = 0; i < tracks.size(); i++) {\n\t\t\tfor (Track track : tracks) {\n\t\t\t\tif (track.GetLevel() == i+ 1) {\n\t\t\t\t\ttrack.AtomInit(200 + 50 * i, panel);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public CardTable(String title, int numCardsPerHand, int numPlayers) {\n super(); //Call JFrame's constructor.\n this.handPanels = new JPanel[numPlayers];\n //Verify that the input is valid. Fix it if it is not.\n if (numCardsPerHand < 0 || numCardsPerHand > CardTable.MAX_CARDS_PER_HAND)\n this.numCardsPerHand = 20;\n this.numCardsPerHand = numCardsPerHand;\n if (numPlayers < 2 || numPlayers > CardTable.MAX_PLAYERS)\n this.numPlayers = numPlayers;\n if (title == null)\n title = \"\";\n //Set some of the window's attributes.\n this.setTitle(title);\n this.setSize(800, 600);\n this.setMinimumSize(new Dimension(800, 600));\n this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n //The card table will use a BorderLayout style. This allows each panel\n //To have a different height. This allows for a larger play area and smaller\n //hand areas.\n BorderLayout layout = new BorderLayout();\n this.setLayout(layout);\n\n //Both the comptuer and human hand panels will use the flow layout.\n FlowLayout flowLayout = new FlowLayout(FlowLayout.LEFT);\n //Crate a titled border for the display of labels indicating\n //what each panel is for.\n TitledBorder border = new TitledBorder(\"Computer Hand\");\n this.handPanels[0] = new JPanel();\n this.handPanels[0].setLayout(flowLayout);\n this.handPanels[0].setPreferredSize(new Dimension((int) this.getMinimumSize().getWidth() - 50, 105));\n //Use a JScrollPane in case the cards per hand is greater than can be displayed in the panel\n //without a scroll bar.\n JScrollPane scrollComputerHand = new JScrollPane(this.handPanels[0]);\n scrollComputerHand.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_NEVER);\n scrollComputerHand.setBorder(border);\n this.add(scrollComputerHand, BorderLayout.NORTH);\n\n //Create the playing area.\n border = new TitledBorder(\"Playing Area\");\n //The play area will use a grid layout, so that the played cards, labels, and\n //status text can be displayed in neat columns.\n GridLayout gridLayoutCardsArea = new GridLayout(1, 2);\n GridLayout gridLayoutStatusArea = new GridLayout(1, 1);\n pnlPlayArea = new JPanel();\n pnlPlayArea.setBorder(border);\n layout = new BorderLayout();\n pnlPlayArea.setLayout(layout);\n\n pnlTimer = new JPanel();\n pnlTimer.setLayout(gridLayoutStatusArea);\n pnlPlayedCards = new JPanel();\n pnlPlayedCards.setLayout(gridLayoutCardsArea);\n pnlPlayerText = new JPanel();\n pnlPlayerText.setLayout(gridLayoutCardsArea);\n pnlStatusText = new JPanel();\n pnlStatusText.setLayout(gridLayoutStatusArea);\n pnlPlayedCards.setPreferredSize(new Dimension((int) this.getMinimumSize().getWidth() - 50, 150));\n pnlPlayerText.setPreferredSize(new Dimension(100, 30));\n pnlStatusText.setPreferredSize(new Dimension(100, 30));\n pnlPlayArea.add(pnlTimer, BorderLayout.EAST);\n pnlPlayArea.add(pnlPlayedCards, BorderLayout.NORTH);\n pnlPlayArea.add(pnlPlayerText, BorderLayout.CENTER);\n pnlPlayArea.add(pnlStatusText, BorderLayout.SOUTH);\n this.add(pnlPlayArea, BorderLayout.CENTER);\n ///Create the human's hand area.\n border = new TitledBorder(\"Human Hand\");\n this.handPanels[1] = new JPanel();\n this.handPanels[1].setLayout(flowLayout);\n this.handPanels[1].setPreferredSize(new Dimension((int) this.getMinimumSize().getWidth() - 50, 105));\n JScrollPane scrollHumanHand = new JScrollPane(this.handPanels[1]);\n scrollHumanHand.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_NEVER);\n scrollHumanHand.setBorder(border);\n this.add(scrollHumanHand, BorderLayout.SOUTH);\n }", "public TablePanel( PokerClient gui){\n\t\t//card = selectCard; Card selectCard,\n\t\tparent = gui;\n\t}", "public PrintsPanel() {\n initComponents();\n createPanels();\n\n }", "public PanelIniciarSesion() {\n initComponents();\n }", "@Override\n public void setupPanel()\n {\n\n }", "public QATrackerView(){\n initComponents();\n addPanel();\n }", "private void init() {\r\n\t\tthis.panel.setLayout(new BoxLayout(this.panel, BoxLayout.PAGE_AXIS));\r\n\t\tthis.labelTitle = new JLabel(\"Edit your weapons\");\r\n\t\tthis.labelTitle.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n\t\tthis.initFilter();\r\n\t\tthis.initList();\r\n\t\tthis.list.setSelectedIndex(0);\r\n\t\tthis.initInfo();\r\n\t\tthis.initButton();\r\n\r\n\t\tJPanel panelWest = new JPanel();\r\n\t\tpanelWest.setLayout(new BoxLayout(panelWest, BoxLayout.PAGE_AXIS));\r\n\t\tJPanel panelCenter = new JPanel();\r\n\t\tpanelCenter.setLayout(new BoxLayout(panelCenter, BoxLayout.LINE_AXIS));\r\n\r\n\t\tpanelWest.add(this.panelFilter);\r\n\t\tpanelWest.add(Box.createRigidArea(new Dimension(0, 5)));\r\n\t\tpanelWest.add(this.panelInfo);\r\n\t\tpanelCenter.add(panelWest);\r\n\t\tpanelCenter.add(Box.createRigidArea(new Dimension(10, 0)));\r\n\t\tthis.panelList.setPreferredSize(new Dimension(300, 150));\r\n\t\tpanelCenter.add(this.panelList);\r\n\r\n\t\tthis.panel.add(this.labelTitle);\r\n\t\tthis.panel.add(Box.createRigidArea(new Dimension(0, 10)));\r\n\t\tthis.panel.add(panelCenter);\r\n\t\tthis.panel.add(Box.createRigidArea(new Dimension(0, 10)));\r\n\t\tthis.panel.add(this.panelButton);\r\n\r\n\t}", "private void fillDeck(){\r\n this.cards = new ArrayList<Card>();\r\n int cardPerSuit = this.deckSize/4;\r\n \r\n for( Suit Su: suits ){\r\n for(int i = 0; i < cardPerSuit; i++){\r\n this.cards.add(i, new Card(i+2, Su.ordinal()));\r\n }\r\n }\r\n \r\n }", "public Hand(Shuffleable cards) {\n this.setLayout(new BorderLayout());\n this.cards = cards;\n this.busted = false; //Player not busted by default\n this.value = 0; //Value starts at 0\n values.add(0);\n nameLabel = new JLabel(\"\", SwingConstants.LEFT); //Initializes name label\n valueLabel = new JLabel(\"Value: \" + value, SwingConstants.LEFT); //Initilizes value label\n cardPane = new JPanel(new FlowLayout());\n cardPane.setBackground(Color.GREEN); //Background color green\n this.add(nameLabel, BorderLayout.NORTH);\n this.add(valueLabel, BorderLayout.SOUTH);\n this.add(cardPane, BorderLayout.CENTER);\n }", "public PlayerPanel() {\n initComponents();\n\n panel.initializeButtons(\n new javax.swing.JButton[]{addPlayerButton, editPlayerButton, deletePlayerButton},\n new javax.swing.JButton[]{cancelPlayerButton, savePlayerButton}\n );\n }", "public void initialize(){\t\t\n\n\t\tsetBounds(100, 100, 900, 620);\n\t\tcontentPane = new JPanel();\n\t\tcontentPane.setBackground(SystemColor.control);\n\t\tcontentPane.setBorder(new EmptyBorder(5, 5, 5, 5));\n\t\tcontentPane.setLayout(null);\n\t\tsetLayout(null);\n\n\t\t//build the image of the board for toggling the active squares\n\t\t//buildBoardImage();\n\n\t\tboardView = new BoardView(new Color(20,200,160), model, 1, app);\n\t\tboardView.builderInitialize(app);\n\t\tboardView.setSize(408, 440);\n\t\tboardView.setLocation(39, 158);\n\t\tadd(boardView);\n\n\t\tcomboBox = new JComboBox<String>();\n\t\tcomboBox.setModel(new DefaultComboBoxModel<String>(new String[] {\"Puzzle\", \"Lightning\", \"Theme\"}));\n\t\tcomboBox.setToolTipText(\"\");\n\t\tcomboBox.setMaximumRowCount(3);\n\t\tcomboBox.setBounds(593, 158, 97, 26);\n\t\tcomboBox.addItemListener(this);\n\t\tthis.add(comboBox, \"ComboBox\");\n\n\t\tJLabel lblTitle = new JLabel(\"LetterCraze: Builder\");\n\t\tlblTitle.setFont(new Font(\"Impact\", Font.BOLD | Font.ITALIC, 40));\n\t\tlblTitle.setBounds(39, 11, 522, 109);\n\t\tadd(lblTitle);\n\n\t\tpnlLevelSwitch = new JPanel();\n\t\tpnlLevelSwitch.setName(\"pnlLevelSwitch\");\n\t\tpnlLevelSwitch.setBounds(479, 192, 379, 362);\n\t\tpnlLevelSwitch.setLayout(new CardLayout());\n\t\tadd(pnlLevelSwitch);\n\n\t\tJPanel pnlPuzzle = new BuilderPuzzlePanelView(labelFont);\n\t\tpnlLevelSwitch.add(pnlPuzzle, \"Puzzle\");\n\t\tpnlPuzzle.setBackground(new Color(102,255,102));\n\t\tpnlPuzzle.setLayout(null);\n\n\t\tJPanel pnlLightning = new BuilderLightningPanelView();\n\t\tpnlLightning.setBackground(Color.ORANGE);\n\t\tpnlLevelSwitch.add(pnlLightning, \"Lightning\");\n\t\tpnlLightning.setLayout(null);\n\n\n\t\tJPanel pnlTheme = new BuilderThemePanelView(labelFont);\n\t\tpnlTheme.setBackground(Color.PINK);\n\t\tpnlLevelSwitch.add(pnlTheme, \"Theme\");\n\t\tpnlTheme.setLayout(null);\n\n\t\tcontentPane.setVisible(true);\n\t\tcontentPane.repaint();\n\t\tJButton btnReset = new JButton(\"Reset Level\");\n\t\tbtnReset.addMouseListener(new ResetBoardSquaresController(this, model));\n\t\tbtnReset.setBounds(39, 118, 107, 29);\n\t\tadd(btnReset);\n\n\t\tJButton btnSaveLevel = new JButton(\"Save And Exit\");\n\t\tbtnSaveLevel.setBounds(156, 118, 111, 29);\n\t\tbtnSaveLevel.addMouseListener(new SaveLevelController(this, cardLayoutPanel, model));\n\t\t//btnSaveLevel.addMouseListener(new ExitWithoutSavingController(this, cardLayoutPanel, model));\n\t\tadd(btnSaveLevel);\n\n\t\tJLabel lblLevelType = new JLabel(\"Level Type\");\n\t\tlblLevelType.setFont(labelFont);\n\t\tlblLevelType.setBounds(491, 158, 92, 26);\n\t\tadd(lblLevelType);\n\n\t\tJButton btnCloseWithoutSaving = new JButton(\"Close Without Saving\");\n\t\t//TODO replace with close builder controller\n\t\tbtnCloseWithoutSaving.addMouseListener(new ExitWithoutSavingController(this, cardLayoutPanel, model));\n\t\tbtnCloseWithoutSaving.setBounds(273, 118, 174, 29);\n\t\tadd(btnCloseWithoutSaving);\n\t\t\n\t\tJButton btnPreviewLevel = new JButton(\"Show Me The Money!\");\n\t\tbtnPreviewLevel.addMouseListener(new PreviewLevelController(this, model, cardLayoutPanel));\n\t\tbtnPreviewLevel.setBounds(491, 118, 199, 29);\n\t\tadd(btnPreviewLevel);\n\t\trepaint();\n\t}", "private void setupPanels() {\n\t\tsplitPanel.addEast(east, Window.getClientWidth() / 5);\n\t\tsplitPanel.add(battleMatCanvasPanel);\n\t\tpanelsSetup = true;\n\t}", "public void initChanceDeck() {\n\t\tchanceDeck = new Deck();\n\t\tfor (int i = 0; i < 16; i++) {\n\t\t\tchanceDeck.addCard(new Card(i));\n\t\t}\n\t\t//shuffled to make the order random\n\t\tchanceDeck.shuffle();\n\t}", "public void setUpHUDPanel() {\n\n\t\t//Criando e configurando painel que apresenta botoes de acoes\n\t\tthis.playerOptionPanel = new JPanel(null);\n\t\tthis.playerOptionPanel.setBounds(730, 315, 275, 235);\n\t\tthis.playerOptionPanel.setOpaque(false);\n\n\t\t//Criando e configurando botao para jogar/manipular dado\n\t\tthis.moveButton = new JButton(\"JOGAR O DADO\");\n\t\tthis.moveButton.setBounds(45, 25, 175, 45);\n\t\tthis.moveButton.setActionCommand(\"MOVE\");\n\t\tthis.moveButton.setMnemonic(KeyEvent.VK_M);\n\t\tthis.moveButton.setToolTipText(\"Cique aqui para jogar o dado e realizar o movimento\");\n\n\t\t//Adicionando tratador de evento para clique no botao\n\t\tthis.moveButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent event) {\n\t\t\t\tmanipulaDice();\n\t\t\t}\n\t\t});\n\n\t\t//Criando e configurando botao para realizar palpite\n\t\tthis.suggestButton = new JButton(\"REALIZAR PALPITE\");\n\t\tthis.suggestButton.setBounds(45, 90, 175, 45);\n\t\tthis.suggestButton.setActionCommand(\"SUGGEST\");\n\t\tthis.suggestButton.setMnemonic(KeyEvent.VK_S);\n\t\tthis.suggestButton.setEnabled(false);\n\t\tthis.suggestButton.setToolTipText(\"Clique aqui para realizar sugestão\");\n\n\t\t//Criando e configurando botao para realizar acusacao\n\t\tthis.accuseButton = new JButton(\"ACUSAR\");\n\t\tthis.accuseButton.setBounds(45, 160, 175, 45);\n\t\tthis.accuseButton.setActionCommand(\"ACCUSE\");\n\t\tthis.accuseButton.setMnemonic(KeyEvent.VK_A);\n\t\tthis.accuseButton.setToolTipText(\"Clique para fazer acusacao. OBS: Acusacao incorreta poderá te eliminar do jogo.\");\n\n\t\t//Adicionando os botoes corretamente no painel\n\t\tthis.playerOptionPanel.add(this.moveButton);\n\t\tthis.playerOptionPanel.add(this.suggestButton);\n\t\tthis.playerOptionPanel.add(this.accuseButton);\n\n\t\t//Incluindo painel em painel maior\n\t\tthis.add(this.playerOptionPanel);\n\t}", "private void initCultistCardDeck(){\n unusedCultist = new ArrayList<Cultist>();\n \n unusedCultist.add(new Cultist(\"No puedes dejar de ser sectario\", 1));\n unusedCultist.add(new Cultist(\"No puedes dejar de ser sectario\", 2));\n unusedCultist.add(new Cultist(\"No puedes dejar de ser sectario\", 1));\n unusedCultist.add(new Cultist(\"No puedes dejar de ser sectario\", 2));\n unusedCultist.add(new Cultist(\"No puedes dejar de ser sectario\", 1));\n unusedCultist.add(new Cultist(\"No puedes dejar de ser sectario\", 1));\n \n Collections.shuffle(unusedCultist);\n }", "private void initComposants() {\r\n\t\tselectionMatierePanel = new SelectionMatierePanel(1);\r\n\t\ttableauPanel = new TableauPanel(1);\r\n\t\tadd(selectionMatierePanel, BorderLayout.NORTH);\r\n\t\tadd(tableauPanel, BorderLayout.SOUTH);\r\n\t\t\r\n\t}", "public void initGameMode() {\n\n for (JPanel p : attached) {\n mainPanel.remove(p);\n }\n mainPanel.setLayout(null);\n initNavigationBar();\n\n marketFrame = new MarketFrame(gui);\n productionDeckFrame = new ProductionDeckFrame(gui);\n reserveFrame = new ReserveFrame();\n\n gameboardPanel = new GameboardPanel(gui);\n gameboardPanel.setBounds(0, 0, 800, 572);\n mainPanel.add(gameboardPanel);\n serverMessagePanel = new ServerMessagePanel();\n serverMessagePanel.setBounds(800, 0, 380, 275);\n mainPanel.add(serverMessagePanel);\n leaderCardsPanel = new LeaderCardsPanel(gui);\n leaderCardsPanel.setBounds(805, 280, leaderWidth, leaderHeight);\n mainPanel.add(leaderCardsPanel);\n\n\n this.setVisible(false);\n }", "private void initialize()\n {\n for(int i=0;i<4;i++)\n {\n foundationPile[i]= new Pile(Rank.ACE);\n foundationPile[i].setRules(true, false, false, false, true,false, true);\n } \n for(int i=0;i<7;i++)\n {\n tableauHidden[i] = new Pile();\n tableauVisible[i] = new Pile(Rank.KING);\n tableauVisible[i].setRules(false, true, false, false, false,false, true);\n } \n deck.shuffle();\n deck.shuffle();\n dealGame();\n }", "public Main(String title) {\n\t\tsuper(title);\n\t\tsetBounds(100, 100, 800, 600);\n\t setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t \n\t cardPanel = new JPanel();\n\t CardLayout cl = new CardLayout();\n\t cardPanel.setLayout(cl);\n\t \n\t game = new DrawingSurface(this);\n\t game.init();\n\t menu = new OptionPanel(this); \n\t customize = new CustomizePanel(this);\n\t end = new EndPanel(this);\n\t settings = new SettingsPanel(this);\n\t \n\t cardPanel.add(menu, \"1\");\n\t cardPanel.add(game, \"2\");\n\t cardPanel.add(customize, \"3\");\n\t cardPanel.add(end, \"4\");\n\t cardPanel.add(settings, \"5\");\n\t add(cardPanel);\n\t addKeyListener(game);\n\t \n\t setVisible(true);\n\t}", "public Deck() {\n\t\trand = new Random();\n\t\trand.setSeed(System.currentTimeMillis());\n\t\twhile(deck.size()<52){\n\t\t\tint suit = rand.nextInt(4);\n\t\t\tint rank = rand.nextInt(13);\n\t\t\tString card = this.rank[rank] +\" of \" + this.suit[suit];\n\t\t\tdeck.add(card);\n\t\t}\n\t}", "@Override\n protected void init() {\n ChanceCard card = new ChanceCard(\"Advance to Freas Hall (Collect $200)\", 0, 0, 0, \"none\", Card.CardType.MOVE_TO);\n deck.add(card);\n card = new ChanceCard(\"Go back 3 spaces\", 0, -3, 0, \"none\", Card.CardType.MOVE);\n deck.add(card);\n card = new ChanceCard(\"You got hungry at 2am in the morning and decided to buy Dominos. Pay $15\", -15, 0, 0, \"none\", Card.CardType.BANK_TRANSACTION);\n deck.add(card);\n card = new ChanceCard(\"You have won a crossword competition- Collect $100\", 100, 0, 0, \"none\", Card.CardType.BANK_TRANSACTION);\n deck.add(card);\n card = new ChanceCard(\"Make general repairs on all your property-For each house pay $25-For each hotel $100\", 0, 0, 0, \"none\", Card.CardType.STREET_REPAIRS);\n deck.add(card);\n card = new ChanceCard(\"Advance to Dana- If you pass Freas Hall, collect $200\", 0, 0, 24, \"none\", Card.CardType.MOVE_TO);\n deck.add(card);\n card = new ChanceCard(\"Advance to Larison- If you pass Freas Hall, collect $200\", 0, 0, 11, \"none\", Card.CardType.MOVE_TO);\n deck.add(card);\n card = new ChanceCard(\"You forget to do your project and are bailed out by your classmates. Pay each player $50\", 50, 0, 24, \"none\", Card.CardType.PLAYER_TRANSACTION);\n deck.add(card);\n card = new ChanceCard(\"You got first selection in the housing lottery. Advance to the Senior Apartments.\", 0, 0, 39, \"none\", Card.CardType.MOVE_TO);\n deck.add(card);\n card = new ChanceCard(\"Housing ran out of dorms to put you. Advance to Vedder. - If you pass Freas Hall, collect $200\", 0, 0, 1, \"none\", Card.CardType.MOVE_TO);\n deck.add(card);\n card = new ChanceCard(\"You got caught drinking in your dorm by P-Safe. Pay fee of $50\", -50, 0, 24, \"none\", Card.CardType.BANK_TRANSACTION);\n deck.add(card);\n card = new ChanceCard(\"You left your car on Moore Ave overnight and got a ticket. Pay fee of $20\", -20, 0, 24, \"none\", Card.CardType.BANK_TRANSACTION);\n deck.add(card);\n card = new ChanceCard(\"You got caught swiping someone else into the caf. Pay fee of $15\", -15, 0, 24, \"none\", Card.CardType.BANK_TRANSACTION);\n deck.add(card);\n card = new ChanceCard(\"Your mom sent you a care package. Advance 2 spaces.\", 0, 2, 24, \"none\", Card.CardType.MOVE);\n deck.add(card);\n card = new ChanceCard(\"Facilities found mold in your air conditioning unit. Pay fee of $30\", -30, 0, 24, \"none\", Card.CardType.BANK_TRANSACTION);\n deck.add(card);\n card = new ChanceCard(\"You got the internship you applied for! Collect $200.\", 200, 0, 24, \"none\", Card.CardType.BANK_TRANSACTION);\n deck.add(card);\n\n shuffle();\n }", "public void initTurnPanel() {\n this.turnPanel = new JPanel();\n int turnPanelWidth = 0;\n Font f = new Font(\"Helvetica\", Font.BOLD, 18);\n\n turnPanel.setBackground(new Color(0xeaf1f7));\n turnPanel.setLayout(new GridLayout(1, nicknames.size(), 0, 0));\n\n for (int i = 0; i < nicknames.size(); i++) {\n turnPanelWidth = turnPanelWidth + nicknames.get(i).getText().length();\n nicknames.get(i).setFont(f);\n nicknames.get(i).setSize(new Dimension(nicknames.get(i).getText().length() * letterOffset, buttonHeight));\n turnPanel.add(nicknames.get(i));\n }\n turnPanelWidth = turnPanelWidth*letterOffset;\n turnPanel.setPreferredSize(new Dimension(turnPanelWidth+50*nicknames.size(), buttonHeight));\n\n blankLabels = new JLabel[2];\n for (int i = 0; i < blankLabels.length; i++) {\n blankLabels[i] = new JLabel();\n blankLabels[i].setPreferredSize(new Dimension(80, buttonHeight));\n navigationBar.add(blankLabels[i]);\n }\n\n this.navigationBar.add(turnPanel);\n }", "public static void initialisePanel(){\n\t\t\n\t\tBrewPanel = new JPanel();\n\t\tBrewPanel.setLayout(new MigLayout(\"\", \"[grow][65px:n:65px]\", \"[20px:n:20px][25px:n:25px][grow]\"));\n\t\t\n\t\t\n\t\t//Header\n\t\tBrewHeader = new JLabel(\"Brew\");\n\t\tBrewHeader.setFont(new Font(\"Tahoma\", Font.BOLD, 18));\n\t\tBrewPanel.add(BrewHeader, \"cell 0 0,grow\");\n\t\t\n\t\t\n\t\t//Subtitle\n\t\tBrewSubtitle = new JLabel(\"Browse and edit the brew database.\");\n\t\tBrewSubtitle.setFont(new Font(\"Tahoma\", Font.ITALIC, 13));\n\t\tBrewPanel.add(BrewSubtitle, \"cell 0 1,growx,aligny top\");\n\t\t\n\t\tbtnPrintBrew = new JButton();\n\t\tbtnPrintBrew.setIcon(new ImageIcon(BrewPanel.class.getResource(\"/images/print.png\")));\n\t\tbtnPrintBrew.setToolTipText(\"Save currently selected brew data to printable .pdf\");\n\t\tBrewPanel.setVisible(true);\n \tbtnPrintBrew.setVisible(false);\n\t\tbtnPrintBrew.setEnabled(false);\n\t\tBrewPanel.add(btnPrintBrew, \"cell 1 0\");\n\t\t\n\t\t//Tabbed Pane\n\t\ttabbedBrewPane = new JTabbedPane(JTabbedPane.TOP);\n\t\tBrewPanel.add(tabbedBrewPane, \"cell 0 2 2,grow\");\n\t\t\t\t\n\t\t\n\t\t//Brew Search Tab\n\t\tBrewSearchPanel.initialisePanel();\t\t\n\t\ttabbedBrewPane.addTab(\"Search\", null, BrewSearchPanel.tabbedBrewSearchPanel, null);\n\t\t\n\t\t\n\t\t//Brew Data Tab\n\t\tBrewDataPanel.initialisePanel();\t\t\n\t\ttabbedBrewPane.addTab(\"Brew Data\", null, BrewDataPanel.tabbedBrewDataPanel, null);\n\t\t\n\t\t\n\t\t//Brew Notes Tab\n\t\tBrewNotesPanel.initialisePanel();\n\t\ttabbedBrewPane.addTab(\"Brew Notes\", null, BrewNotesPanel.tabbedBrewNotesPanel, null);\n\t\t\n\t\t\n\t\t//Brew Pictures Tab\n\t\tBrewPicturesPanel.initialisePanel();\n\t\ttabbedBrewPane.addTab(\"Brew Pictures\", null, BrewPicturesPanel.tabbedBrewPicturesPanel, null);\n\t\t\n\t\t\n\t\t//Brew Pictures Tab\n\t\tBrewCostPanel.initialisePanel();\n\t\ttabbedBrewPane.addTab(\"Brew Costs\", null, BrewCostPanel.tabbedBrewCostPanel, null);\n\t\t\t\t\n\t\t\n\t\t//Add New Brew Tab\n\t\tBrewAddPanel.initialisePanel();\n\t\ttabbedBrewPane.addTab(\"Add New Brew\", new ImageIcon(BrewPanel.class.getResource(\"/images/new.png\")), BrewAddPanel.tabbedBrewAddPanel, null);\n\t\t\n\t\t\n\t\t//Set some tabs disabled initially\n\t\ttabbedBrewPane.setEnabledAt(1, false);\n\t\ttabbedBrewPane.setEnabledAt(2, false);\n\t\ttabbedBrewPane.setEnabledAt(3, false);\n\t\ttabbedBrewPane.setEnabledAt(4, false);\n\t\t\n\t \t\n\t\t//Add it all to the main window\n\t\tLegacyApp.WineBrewDBFrame.getContentPane().add(BrewPanel, \"cell 0 0,grow\");\n\t\tBrewPanel.setVisible(false);\n\n\t\t\n\t\tBrewPanelStatus = \"Initialised\";\n\t\t\n\t\t\n\t\t//Add print button listener\n\t\tbtnPrintBrew.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tJFileChooser c = new JFileChooser();\n\t\t\t int rVal = c.showSaveDialog(LegacyApp.WineBrewDBFrame);\n\t\t\t if (rVal == JFileChooser.APPROVE_OPTION) {\t\t\t \t \t \n\t\t\t\t\tString pdflocation = c.getCurrentDirectory().toString() + LegacyApp.OSSlash + c.getSelectedFile().getName() + \".pdf\";\n\t\t\t\t\tBrewPDF.createPDF(pdflocation);\t \t \n\t\t\t \t \n\t\t\t }\n\t\t\t if (rVal == JFileChooser.CANCEL_OPTION) {\n\t\t\t \t \n\t\t\t }\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t\ttabbedBrewPane.addChangeListener(new ChangeListener() {\n\t\t // This method is called whenever the selected tab changes\n\t\t public void stateChanged(ChangeEvent evt) {\n\t\t JTabbedPane pane = (JTabbedPane)evt.getSource();\n\n\t\t // Get current tab\n\t\t int sel = pane.getSelectedIndex();\n\t\t if(sel == 0 || sel == 5){\n\t\t \tbtnPrintBrew.setVisible(false);\n\t\t \t\tbtnPrintBrew.setEnabled(false);\n\t\t }else{\n\t\t \tbtnPrintBrew.setVisible(true);\n\t\t \t\tbtnPrintBrew.setEnabled(true);\n\t\t }\n\t\t }\n\t\t});\n\t}", "public EOProductPanel2() {\n initComponents();\n }", "private void fillDeck() {\n int index = 0;\n for (int suit = 1; suit <= 4; suit++) {\n for (int rank = 1; rank <= 13; rank++) {\n deck[index] = new Card(rank, suit);\n index++;\n\n }\n }\n }", "public GameLostPanel() {\n initComponents();\n }", "public void createDecks(){\r\n\t\tfor (int j = 10; j < 20; j++){\r\n\t\t\taddCard(new Card(cardNames[j]));\r\n\t\t}\r\n\t}", "public CardLayoutJFrame() {\n initComponents();\n }" ]
[ "0.719594", "0.7115909", "0.6981892", "0.6690193", "0.65887696", "0.6584487", "0.6576372", "0.65454036", "0.6539031", "0.6537882", "0.6525106", "0.65222245", "0.6518992", "0.6484119", "0.6473679", "0.6471748", "0.6470181", "0.64628476", "0.6443131", "0.6400156", "0.63925785", "0.6389737", "0.63850707", "0.6381693", "0.6367088", "0.6364241", "0.63345", "0.63296574", "0.6317165", "0.6306474", "0.6304806", "0.6284364", "0.62759393", "0.6274215", "0.6269141", "0.62434065", "0.62391335", "0.6235647", "0.62157553", "0.61965847", "0.61859953", "0.61790174", "0.61744875", "0.6168039", "0.6166698", "0.61623853", "0.6155699", "0.6145218", "0.6141389", "0.61253333", "0.61231995", "0.6111174", "0.60985214", "0.6097832", "0.6095022", "0.60915744", "0.60814136", "0.6075993", "0.6061474", "0.60589033", "0.6050586", "0.6049979", "0.6049852", "0.60442066", "0.60439223", "0.6043356", "0.60428053", "0.60273194", "0.60248834", "0.60222757", "0.60188794", "0.60172886", "0.6010805", "0.6009316", "0.6000488", "0.5998003", "0.5995827", "0.59808725", "0.59777015", "0.5977064", "0.5976505", "0.59714866", "0.5966928", "0.5961158", "0.59529287", "0.5949567", "0.59466577", "0.59348154", "0.59334326", "0.5931135", "0.59223914", "0.5919035", "0.5918538", "0.5913765", "0.5912415", "0.59112155", "0.59074116", "0.5907082", "0.5902519", "0.58945084" ]
0.8333881
0
Create a measures recorder
public MeasuresRecorder(String modelName) { super(modelName); currentNanoTime = () -> timeCount; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testCreateScalableQuantizedRecorder() throws IOException, InterruptedException {\n System.out.println(\"createScalableQuantizedRecorder\");\n Object forWhat = \"test1\";\n String unitOfMeasurement = \"ms\";\n int sampleTime = 1000;\n int factor = 10;\n int lowerMagnitude = 0;\n int higherMagnitude = 3;\n int quantasPerMagnitude = 10;\n MeasurementRecorder result = RecorderFactory.createScalableQuantizedRecorder(\n forWhat, unitOfMeasurement, sampleTime, factor, lowerMagnitude, higherMagnitude, quantasPerMagnitude);\n for (int i=0; i<500; i++) {\n result.record(i);\n Thread.sleep(20);\n }\n long endTime = System.currentTimeMillis();\n System.out.println(RecorderFactory.RRD_DATABASE.generateCharts(startTime, endTime, 1200, 600));\n System.out.println(RecorderFactory.RRD_DATABASE.getMeasurements());\n ((Closeable)result).close();\n \n }", "@Test\n public void testCreateScalableQuantizedRecorderSource() throws IOException, InterruptedException {\n System.out.println(\"createScalableQuantizedRecorderSource\");\n Object forWhat = \"bla\";\n String unitOfMeasurement = \"ms\";\n int sampleTime = 1000;\n int factor = 10;\n int lowerMagnitude = 0;\n int higherMagnitude = 3;\n int quantasPerMagnitude = 10;\n MeasurementRecorderSource result = RecorderFactory.createScalableQuantizedRecorderSource(\n forWhat, unitOfMeasurement, sampleTime, factor, lowerMagnitude, higherMagnitude, quantasPerMagnitude);\n for (int i=0; i<5000; i++) {\n result.getRecorder(\"X\"+ i%2).record(i);\n Thread.sleep(1);\n }\n long endTime = System.currentTimeMillis();\n System.out.println(RecorderFactory.RRD_DATABASE.generateCharts(startTime, endTime, 1200, 600));\n System.out.println(RecorderFactory.RRD_DATABASE.getMeasurements());\n ((Closeable)result).close();\n }", "private void startRecording() {\n\n }", "public void startRecording(){\n String samplerateString = null, buffersizeString = null;\n if (Build.VERSION.SDK_INT >= 17) {\n AudioManager audioManager = (AudioManager) this.getSystemService(Context.AUDIO_SERVICE);\n samplerateString = audioManager.getProperty(AudioManager.PROPERTY_OUTPUT_SAMPLE_RATE);\n buffersizeString = audioManager.getProperty(AudioManager.PROPERTY_OUTPUT_FRAMES_PER_BUFFER);\n }\n samplerateString= \"48000\";\n buffersizeString = \"256\";\n\n System.loadLibrary(\"FrequencyDomain\");\n FrequencyDomain(Integer.parseInt(samplerateString), Integer.parseInt(buffersizeString));\n }", "private void startRecording() {\n // When start recording, create a file with format yyyyMMdd_HHmmss.3gp\n // y, M, d, H, m,s are year, month, day, hour, minite and second when start recording\n String currentDateAndTime = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n curRecordingFileName = APP_STORAGE + \"/\" + currentDateAndTime + \".3gp\";\n Log.e(TAG, \"Start recording file: \" + curRecordingFileName);\n\n mRecorder = new MediaRecorder();\n mRecorder.setAudioSource(MediaRecorder.AudioSource.MIC);\n mRecorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);\n mRecorder.setOutputFile(curRecordingFileName);\n mRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);\n\n try {\n mRecorder.prepare();\n } catch (IOException e) {\n Log.e(TAG, \"Couldn't prepare and start MediaRecorder\");\n }\n\n mRecorder.start();\n }", "private void startRecording() {\n Date now = new Date(System.currentTimeMillis());\n fileName = \"AccelerometerData_\" + sdf.format(now) + \"_sampling_\" + listenerSampling + \"microsec.csv\";\n String directory = Environment.getExternalStorageDirectory() + \"/_Parka/AccelerometerCsvFile\";\n\n csvWriter.createFile(fileName,directory);\n startTime = csvWriter.getStartTime();\n\n String headFileStr = \"Millisec\" + \",\" + \"TimeStamp\" + \",\"\n + \"Acce X\" + \",\" + \"Acce Y\" + \",\" + \"Acce Z\" + \",\"\n + \"Stop engine\"+\",\\n\";\n csvWriter.writeHeadFile(headFileStr);\n\n registerListener();\n Toast.makeText(this, \"START RECORDING | \"\n + \"file name = \" + fileName, Toast.LENGTH_SHORT).show();\n }", "private void createRecordedActivity(RecordingService recordingService, double elevationGain, Profile profile) {\n ArrayList<LatLng> latLngs = new ArrayList<>();\n for (Location location : recordingService.getLocations()) {\n latLngs.add(new LatLng(location.getLatitude(), location.getLongitude()));\n }\n\n Duration duration = getDurationFromTimeView();\n Sport sport = Sport.convertToSport(activityView.getText().toString());\n\n int calories = CalorieCalculator.calculateCalories(profile, duration, sport);\n\n RecordedActivity recordedActivity = new RecordedActivity(latLngs, duration,\n sport, recordingService.getDistance() / 1000,\n recordingService.getAverageSpeed(), (float)elevationGain, calories);\n\n Intent intent = new Intent(this, SaveRecordingActivity.class);\n intent.putExtra(SaveRecordingActivity.RECORDED_ACTIVITY, recordedActivity);\n intent.putExtra(HomeActivity.FRAGMENT_ID, getIntent().getIntExtra(HomeActivity.FRAGMENT_ID, 0));\n startActivity(intent);\n finish();\n }", "LogRecorder getLogRecorder();", "LogRecorder getLogRecorder();", "private void record(){\n clear();\n recording = true;\n paused = false;\n playing = false;\n setBtnState();\n recorder = new Recorder(audioFormat);\n new Thread(recorder).start();\n }", "private void measure() {\n // input warmup time can be estimated by observing the time required for startRecording() to return.\r\n //\r\n managerBufferSize = AudioRecord.getMinBufferSize(sampleRate, AudioFormat.CHANNEL_IN_MONO,\r\n AudioFormat.ENCODING_PCM_16BIT);\r\n AudioRecord recorder = new AudioRecord(MediaRecorder.AudioSource.MIC,\r\n sampleRate,\r\n AudioFormat.CHANNEL_IN_MONO, AudioFormat.ENCODING_PCM_16BIT,\r\n managerBufferSize);\r\n\r\n if (recorder == null || recorder.getState() != AudioRecord.STATE_INITIALIZED) {\r\n Toast.makeText(this, \"can't initialize AudioRecord\", Toast.LENGTH_SHORT).show();\r\n return;\r\n }\r\n\r\n long t = System.currentTimeMillis();\r\n recorder.startRecording();\r\n long iw = (System.currentTimeMillis() - t);\r\n recorder.stop();\r\n\r\n //\r\n // determines audio warmup by seeing how long a Hardware Abstraction Layer (HAL) write() takes to stabilize.\r\n //\r\n\r\n AudioTrack player = new AudioTrack(AudioManager.STREAM_MUSIC,\r\n sampleRate,\r\n AudioFormat.CHANNEL_OUT_MONO, AudioFormat.ENCODING_PCM_16BIT,\r\n managerBufferSize, AudioTrack.MODE_STREAM);\r\n player.play();\r\n byte[] buf = new byte[frameSize * 2];\r\n\r\n final int n = 50;\r\n long[] d = new long[n];\r\n t = System.currentTimeMillis();\r\n for (int i = 0; i < n; ++i) {\r\n player.write(buf, 0, buf.length);\r\n d[i] = System.currentTimeMillis() - t;\r\n t = System.currentTimeMillis();\r\n Log.d(TAG, \"write block:\" + d[i] + \"ms\");\r\n }\r\n player.stop();\r\n\r\n Toast.makeText(this, \"Input warmup:\" + iw + \"ms\", Toast.LENGTH_LONG).show();\r\n }", "void avRecorderSetup() {\n\r\n\t\t \r\n imw = ToolFactory.makeWriter(file.getAbsolutePath());//or \"output.avi\" or \"output.mov\"\r\n imw.open();\r\n imw.setForceInterleave(true);\r\n imw.addVideoStream(0, 0, IRational.make((double)vidRate), widthCapture, heightCapture);\r\n audionumber = imw.addAudioStream(audioStreamIndex, audioStreamId, channelCount, sampleRate);\r\n isc = imw.getContainer().getStream(0).getStreamCoder();\r\n bgr = new BufferedImage(widthCapture, heightCapture, BufferedImage.TYPE_3BYTE_BGR);\r\n sTime = fTime = System.nanoTime();\r\n }", "public GeppettoRecordingCreator(String name)\n\t{\n\t\t_fileName = name;\n\t}", "private void startRecording() {\n myAudioRecorder = new MediaRecorder();\n myAudioRecorder.setAudioSource(MediaRecorder.AudioSource.MIC);\n myAudioRecorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);\n\n\n Log.i(\"METHOD\", \"Recording exists. File is called: \" + recordedPhrase);\n recordedPhrase = \"audioRecording_\" + num + \".3gp\";\n// recording = new File(Environment.getExternalStorageDirectory(), recordedPhrase);\n myAudioRecorder.setOutputFile(recordedPhrase);\n myAudioRecorder.setAudioEncoder(MediaRecorder.OutputFormat.AMR_NB);\n\n // Record audio while button is held\n try {\n // Start recording\n myAudioRecorder.prepare();\n myAudioRecorder.start();\n Log.i(\"METHOD\", \"Audio recorder prepared\");\n } catch (IOException e){\n e.printStackTrace();\n }\n Toast.makeText(getApplication(), \"Audio recording\", Toast.LENGTH_LONG).show();\n }", "private MediaRecorder createMediaRecorder(Size videoSize, File file) {\n try {\n MediaRecorder mediaRecorder = new MediaRecorder();\n\n mediaRecorder.setVideoSource(MediaRecorder.VideoSource.SURFACE);\n\n mediaRecorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);\n mediaRecorder.setOutputFile(file.getAbsolutePath());\n mediaRecorder.setVideoEncodingBitRate(VIDEO_ENCODING_BIT_RATE);\n mediaRecorder.setVideoFrameRate(VIDEO_FRAME_RATE);\n mediaRecorder.setVideoSize(videoSize.getWidth(), videoSize.getHeight());\n mediaRecorder.setVideoEncoder(VIDEO_ENCODER);\n\n// Camera.Parameters p = camera.getParameters();\n// p.setPreviewFpsRange( 30000, 30000 ); // 30 fps\n// if ( p.isAutoExposureLockSupported() )\n// p.setAutoExposureLock( true );\n// camera.setParameters( p );\n\n return mediaRecorder;\n } catch (Exception e) {\n LOG.warn(\"Failed to create media recorder\", e);\n recordingFailed(e);\n }\n return null;\n }", "public void startRecording() {\n heartRateBroadcastReceiver = new HeartRateBroadcastReceiver();\n LocalBroadcastManager.getInstance(activity).registerReceiver(heartRateBroadcastReceiver, new IntentFilter(LiveRecordingActivity.ACTION_RECEIVE_HEART_RATE));\n }", "@Override\n\tpublic void measures() {\n\t\t\n\t\tsetTempo(240);\n\t\t\n\t\tkey = \"G\";\n\t\t\n\t\tmeasure(0);\n\t\t\n\t\taddNote(\"D5q\",A,T);\n\t\t\n\t\taddRest(\"q\",B);\n\t\t\n\t\tmeasure(1);\n\t\t\n\t\taddNotes(\"G5q G5i A5i G5i F5i\",T);\n\t\t\n\t\taddRest(\"q\",B);\n\t\taddNotes(\"B3q G4q\",B);\n\t\t\n\t\tmeasure(2);\n\t\t\n\t\taddNotes(\"E5q E5q E5q\",T);\n\t\t\n\t\taddNotes(\"C4h+E4h\",B);\n\t\taddRest(\"q\",B);\n\t\t\n\t\tmeasure(3);\n\t\t\n\t\taddNotes(\"A5q A5i B5i A5i G5i\",T);\n\t\t\n\t\taddRest(\"q\",B);\n\t\taddNotes(\"C#4q A4q\",B);\n\t\t\n\t\tmeasure(4);\n\t\t\n\t\taddNotes(\"F5q D5q D5q\",T);\n\t\t\n\t\taddNotes(\"D4h+F4h\",B);\n\t\taddRest(\"q\",B);\n\t\t\n\t\tmeasure(5);\n\t\t\n\t\taddNotes(\"B5q B5i C6i B5i A5i\",T);\n\t\t\n\t\taddRest(\"q\",B);\n\t\taddNotes(\"G4q D5q\",B);\n\t\t\n\t\tmeasure(6);\n\t\t\n\t\taddNotes(\"G5q E5q D5i D5i\",T);\n\t\t\n\t\taddNotes(\"C5h+E5h\",B);\n\t\taddRest(\"q\",B);\n\t\t\n\t\tmeasure(7);\n\t\t\n\t\taddNotes(\"E5q A5q F5q\",T);\n\t\t\n\t\taddNotes(\"C5h D5q\",B);\n\t\t\n\t\tmeasure(8);\n\t\t\n\t\taddNotes(\"G5h D5q\",T);\n\t\t\n\t\taddNotes(\"G4h+B4h\",B);\n\t\taddRest(\"q\",B);\n\t\t\n\t\tmeasure(9);\n\t\t\n\t\taddNotes(\"G5q G5q G5q\",T);\n\t\t\n\t\taddNote(\"B4h.\",A,B);\n\t\t\n\t\tmeasure(10);\n\t\t\n\t\taddNotes(\"F5h F5q\",T);\n\t\t\n\t\taddNotes(\"A4h A4q\",B);\n\t\t\n\t\tmeasure(11);\n\t\t\n\t\taddNotes(\"G5q F5q E5q\",T);\n\t\t\n\t\taddNotes(\"B4q A4q G4q\",B);\n\t\t\n\t\tmeasure(12);\n\t\t\n\t\taddNotes(\"D5h A5q\",T);\n\t\t\n\t\taddNotes(\"F4h A4q\",B);\n\t\t\n\t\tmeasure(13);\n\t\t\n\t\taddNotes(\"B5q A5q G5q\",T);\n\t\t\n\t\taddNotes(\"B4q A4q G4q\",B);\n\t\t\n\t\tmeasure(14);\n\t\t\n\t\taddNotes(\"D6q D5q D5i D5i\",T);\n\t\t\n\t\taddNotes(\"D5q D4q\",B);\n\t\taddRest(\"q\",B);\n\t\t\n\t\tmeasure(15);\n\t\t\n\t\taddNotes(\"E5q A5q F5q\",T);\n\t\t\n\t\taddNotes(\"C5h D5q\",B);\n\t\t\n\t\tmeasure(16);\n\t\t\n\t\taddNote(\"G5h\",A,T);\n\t\taddRest(\"q\",T);\n\t\t\n\t\taddNotes(\"G4h+B4h\",B);\n\t\taddRest(\"q\",B);\n\t\t\n\t\tmeasure(17);\n\t}", "public void record() {\n stats.record();\n }", "private void setupRecord() {\n\t\tint bufferSize = AudioRecord.getMinBufferSize(SAMPLE_RATE,\n\t\t\t\tAudioFormat.CHANNEL_CONFIGURATION_MONO,\n\t\t\t\tAudioFormat.ENCODING_PCM_16BIT);\n\t\taudioRecorder = new AudioRecord(MediaRecorder.AudioSource.MIC,\n\t\t\t\tSAMPLE_RATE, AudioFormat.CHANNEL_CONFIGURATION_MONO,\n\t\t\t\tAudioFormat.ENCODING_PCM_16BIT, bufferSize);\n\n\t\t// Create AudioTrack object to playback the audio.\n\t\tint iMinBufSize = AudioTrack.getMinBufferSize(SAMPLE_RATE,\n\t\t\t\tAudioFormat.CHANNEL_CONFIGURATION_STEREO,\n\t\t\t\tAudioFormat.ENCODING_PCM_16BIT);\n\t\taudioTracker = new AudioTrack(AudioManager.STREAM_MUSIC, SAMPLE_RATE,\n\t\t\t\tAudioFormat.CHANNEL_CONFIGURATION_MONO,\n\t\t\t\tAudioFormat.ENCODING_PCM_16BIT, iMinBufSize * 10,\n\t\t\t\tAudioTrack.MODE_STREAM);\n\n\t\taudioTracker.play();\n\t}", "public void setVadRecorder(){\n }", "public void testZRecordingCreation() {\n\t\tsolo.pressSpinnerItem(3, 1);\n\t\tsolo.clickOnText(\"Begin Rehearsing\");\n\t\tsolo.clickOnText(\"Rec\");\n\t\tsolo.clickOnText(\"Rec\");\n\t\tsolo.typeText(0, \"testName\");\n\t\tsolo.clickOnText(\"Save\");\n\t\t// If file exists already then overwrite it\n\t\tif (solo.searchButton(\"Yes\")) {\n\t\t\tsolo.clickOnButton(\"Yes\");\n\t\t}\n\t\tsolo.pressMenuItem(4);\n\t\tassertTrue(solo.searchText(\"testName\"));\n\t}", "public void startRecording() {\r\n\t\t( new Thread() {\r\n\t\t\tpublic void run() {\r\n\t\t\t\tstart(); // startAudioRecording\r\n\t\t\t}\r\n\t\t} ).start();\r\n\t}", "public MMTMeasurement(){\n }", "private void startRecord() {\n try {\n if (mIsRecording) {\n setupMediaRecorder();\n } else if (mIsTimelapse) {\n setupTimelapse();\n }\n SurfaceTexture surfaceTexture = mTextureView.getSurfaceTexture();\n surfaceTexture.setDefaultBufferSize(mPreviewSize.getWidth(), mPreviewSize.getHeight());\n Surface previewSurface = new Surface(surfaceTexture);\n Surface recordSurface = mMediaRecorder.getSurface();\n mCaptureRequestBuilder = mCameraDevice.createCaptureRequest(CameraDevice.TEMPLATE_RECORD);\n mCaptureRequestBuilder.addTarget(previewSurface);\n mCaptureRequestBuilder.addTarget(recordSurface);\n\n mCameraDevice.createCaptureSession(Arrays.asList(previewSurface, recordSurface, mImageReader.getSurface()),\n new CameraCaptureSession.StateCallback() {\n\n\n @Override\n public void onConfigured(CameraCaptureSession session) {\n\n mRecordCaptureSession = session;\n\n try {\n mRecordCaptureSession.setRepeatingRequest(mCaptureRequestBuilder.build(), null, null);\n } catch (CameraAccessException e) {\n e.printStackTrace();\n }\n }\n\n @Override\n public void onConfigureFailed(@NonNull CameraCaptureSession session) {\n\n }\n }, null);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public void record() throws Exception {\n\n\tString sDatabase = \"\"; // Some services may not have this value.\n\tString sSchema = \"\"; // Some services may not have this value.\n\n\t// If the start has not been defined yet, throw exception.\n\tif (dtStart == null) {\n\t throw new Exception(\n\t\t \"Start timer is not initialized in measurement collection class.\");\n\t}\n\n\t// Stop the timer if it was not defined yet.\n\tif (dtEnd == null) {\n\t stopTimer();\n\t}\n\n\t// Get the hostname\n\tInetAddress addr = InetAddress.getLocalHost();\n\tString hostname = addr.getHostName();\n\n\t// Log the usage in logs directory. This log contains more\n\t// information then what's being logged in CQ.\n\tString sUser = xCqUser.getUsername();\n\tString sClient = xCqClient.getClientName();\n\tif (xCqUser.getDatabase() != null) {\n\t sDatabase = xCqUser.getDatabase();\n\t}\n\tif (xCqUser.getSchema() != null) {\n\t sSchema = xCqUser.getSchema();\n\t}\n\n\tString sRecord = sClient + \";\" + sUser + \";\" + sService + \";\"\n\t\t+ sDatabase + \";\" + sSchema + \";\" + dtStart.toString() + \";\"\n\t\t+ dtEnd.toString() + \";\" + getDuration() + \";\" + hostname\n\t\t+ \";\\n\";\n\n\t// Append to the file.\n\tappend(sRecord);\n }", "public void startRecording() {\n // prepare the recorder\n if (!prepareMediaRecorder()) {\n Toast.makeText(VideoCapture.getSelf(), \"Fail in prepareMediaRecorder()!\\n - Ended -\",\n Toast.LENGTH_LONG).show();\n VideoCapture.getSelf().finish();\n }\n\n // start the recording\n mediaRecorder.start();\n mIsRecording = true;\n\n // start snapshots\n mSnapshotSensor.startSnapshot();\n }", "public void testSurfaceRecordingTimeLapse() {\n assertTrue(testRecordFromSurface(false /* persistent */, true /* timelapse */));\n }", "Meter createMeter();", "public void record(){\n\t}", "private MetricsRecord toMetricsRecord(TMetricsRecord tmr) {\n MetricsRecord mr = new MetricsRecord(tmr.getTimestamp());\n if (tmr.getLongMetrics() != null) {\n mr.setLongMetrics(tmr.getLongMetrics());\n }\n if (tmr.getDoubleMetrics() != null) {\n mr.setDoubleMetrics(tmr.getDoubleMetrics());\n }\n if (tmr.getBinaryMetrics() != null) {\n mr.setBinaryMetrics(tmr.getBinaryMetrics());\n }\n return mr;\n }", "@Override\n public List<String> getMeasures() {\n return measures;\n }", "public void testPersistentSurfaceRecordingTimeLapse() {\n assertTrue(testRecordFromSurface(true /* persistent */, true /* timelapse */));\n }", "public Microwave()\n {\n this.powerLevel = 1;\n this.timeToCook = 0;\n this.startTime = 0;\n }", "public StageGenoSamplesRecord() {\n\t\tsuper(StageGenoSamples.STAGE_GENO_SAMPLES);\n\t}", "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 }", "public void testSurfaceRecording() {\n assertTrue(testRecordFromSurface(false /* persistent */, false /* timelapse */));\n }", "public ExperimentRecord() {\n super(Experiment.EXPERIMENT);\n }", "public Record( int id, String recorder, String contactNum, String email, Site site, Species species,\n double longitude, double latitude, Date time, char abundance, String scenePhoto, String specimenPhoto )\n {\n this.id = id;\n this.recorder = recorder;\n this.contactNum = contactNum;\n this.email = email;\n this.site = site;\n this.species = species;\n this.time = time;\n this.longitude = longitude;\n this.latitude = latitude;\n this.abundance = abundance;\n this.scenePhoto = scenePhoto;\n this.specimenPhoto = specimenPhoto;\n }", "public ModelRecorder(ACTRRuntime runtime)\n {\n\t super(runtime);\n }", "private static void record(boolean train) {\n\t\t// IF its training mode then record initial training instances with labels FOR TRAINING\n\t\tif (train) {\n\t\t\tfor (int j = 0; j < words.length; j++) {\n\t\t\t\tSystem.out.println(\"Please make hand gesture for **\" + words[j]\n\t\t\t\t\t\t+ \"** now.\");\n\t\t\t\tcountdown();\n\t\t\t\tdataCollector.insertName(words[j], \"N/A\");\n\n\t\t\t\t// Automatic mode\n\t\t\t\tboolean motion = true;\n\t\t\t\tboolean activated = false;\n\t\t\t\tdouble distance = 0.0;\n\t\t\t\tlong timestamp = -1;\n\t\t\t\tlong elapsed_time = 0;\n\t\t\t\tint track = 0;\n\t\t\t\tdouble data[] = null;\n\t\t\t\twhile (motion) {\n\t\t\t\t\thub.run(READING_FREQUENCY);\n\n\t\t\t\t\t// Activate the recording here when detecting initial\n\t\t\t\t\t// motion\n\t\t\t\t\tif (activated == false) {\n\t\t\t\t\t\tdistance = (Data.calcEuclideanDistance(data,\n\t\t\t\t\t\t\t\tdataCollector.getData()));\n\t\t\t\t\t\tif (distance > 3) {\n\t\t\t\t\t\t\ttimestamp = dataCollector.getTimeStamp();\n\t\t\t\t\t\t\tactivated = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdata = dataCollector.getData();\n\t\t\t\t\t}\n\n\t\t\t\t\t// Deactivate the recording here by updating the data\n\t\t\t\t\t// every 1/2 seconds and detecting if motion has been\n\t\t\t\t\t// made or no\n\t\t\t\t\telse {\n\t\t\t\t\t\tdataCollector.saveDataToInstance(words[j], train);\n\t\t\t\t\t\ttrack++;\n\n\t\t\t\t\t\telapsed_time += dataCollector.getTimeStamp()\n\t\t\t\t\t\t\t\t- timestamp;\n\t\t\t\t\t\ttimestamp = dataCollector.getTimeStamp();\n\n\t\t\t\t\t\t// Update the data every 1/2 second\n\t\t\t\t\t\tif (elapsed_time > 200000) {\n\t\t\t\t\t\t\telapsed_time = 0;\n\t\t\t\t\t\t\tdistance = (Data.calcEuclideanDistance(data,dataCollector.getData()));\n\t\t\t\t\t\t\t// System.out.println(distance);\n\t\t\t\t\t\t\tif (distance < 0.5) {\n\t\t\t\t\t\t\t\t// System.out.println(track);\n\t\t\t\t\t\t\t\ttrack = 0;\n\t\t\t\t\t\t\t\tmotion = false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdata = dataCollector.getData();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tSystem.out.println(Arrays.toString(data));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\n\t\t\t}\n\t\t}\n\n\t\t// Otherwise just record to Instances without applying labels for TESTING\n\t\telse {\n\t\t\tcountdown();\n//\t\t\t// Automatic mode+\n\t\t\tSystem.out.println(\"Reading Calibrating Data.......\");\n\t\t\tdataCollector.startCalibration(hub, READING_FREQUENCY); // let the user start at idle position, record data and reset data to zero.\n\t\t\tSystem.out.println((\"Calibration Data Reading Completed!\"));\n\t\t\tint columns = 0;\n\t\t\twhile (columns++ < 300) {\n\t\t\t\t// run the event loop for READING_FREQUENCY milliseconds and\n\t\t\t\t// record all values within this time\n\t\t\t\thub.run(READING_FREQUENCY);\n\t\t\t\tdataCollector.saveDataToInstance(null, train);\n\t\t\t\t//dataCollector.saveDataToInstanceDom(null, train);\n\t\t\t}\n\t\t\t\n\t\t}\n//\t\t\tboolean motion = true;\n//\t\t\tboolean activated = false;\n//\t\t\tdouble distance = 0.0;\n//\t\t\tlong timestamp = -1;\n//\t\t\tlong elapsed_time = 0;\n//\t\t\tint track = 0;\n//\t\t\tdouble data[] = null;\n//\t\t\twhile (motion) {\n//\t\t\t\thub.run(READING_FREQUENCY);\n//\t\t\t\t// Activate the recording here when detecting initial motion\n//\t\t\t\tif (activated == false) {\n//\t\t\t\t\tdistance = (Data.calcEuclideanDistance(data,dataCollector.getData()));\n//\t\t\t\t\tif (distance > 3) {\n//\t\t\t\t\t\ttimestamp = dataCollector.getTimeStamp();\n//\t\t\t\t\t\tactivated = true;\n//\t\t\t\t\t}\n//\t\t\t\t\tdata = dataCollector.getData();\n//\t\t\t\t}\n//\n//\t\t\t\t// Deactivate the recording here by updating the data\n//\t\t\t\t// every 1/2 seconds and detecting if motion has been\n//\t\t\t\t// made or no\n//\t\t\t\telse {\n//\t\t\t\t\tdataCollector.saveDataToInstance(null, train);\n////\t\t\t\t\tSystem.out.println(dataCollector.getData());\n//\t\t\t\t\ttrack++;\n//\n//\t\t\t\t\telapsed_time += dataCollector.getTimeStamp() - timestamp;\n//\t\t\t\t\ttimestamp = dataCollector.getTimeStamp();\n//\n//\t\t\t\t\t// Update the data every 1/2 second\n//\t\t\t\t\tif (elapsed_time > 200000) {\n//\t\t\t\t\t\telapsed_time = 0;\n//\t\t\t\t\t\tdistance = (Data.calcEuclideanDistance(data,dataCollector.getData()));\n//\t\t\t\t\t\t// System.out.println(distance);\n//\t\t\t\t\t\tif (distance < 0.5) {\n//\t\t\t\t\t\t\t// System.out.println(track);\n//\t\t\t\t\t\t\ttrack = 0;\n//\t\t\t\t\t\t\tmotion = false;\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\tdata = dataCollector.getData();\n//\t\t\t\t\t}\n//\t\t\t\t}\n//\t\t\t}\n\t\t}", "@Override\n public void run() {\n // This method will be executed once the timer is over\n // Start your app main activity\n startRecording();\n }", "@TargetApi(Build.VERSION_CODES.LOLLIPOP)\n private void startScreenRecord(final Intent intent) {\n if (DEBUG) {\n Log.v(TAG, \"startScreenRecord:sMuxer=\" + sMuxer);\n }\n synchronized (sSync) {\n if (sMuxer == null) {\n\n videoEncodeConfig = (VideoEncodeConfig) intent.getSerializableExtra(EXTRA_VIDEO_CONFIG);\n audioEncodeConfig = (AudioEncodeConfig) intent.getSerializableExtra(EXTRA_AUDIO_CONFIG);\n\n final int resultCode = intent.getIntExtra(EXTRA_RESULT_CODE, 0);\n // get MediaProjection\n final MediaProjection projection = mMediaProjectionManager.getMediaProjection(resultCode, intent);\n if (projection != null) {\n\n int width = videoEncodeConfig.width;\n int height = videoEncodeConfig.height;\n final DisplayMetrics metrics = getResources().getDisplayMetrics();\n\n if (videoEncodeConfig.width == 0 || videoEncodeConfig.height == 0) {\n width = metrics.widthPixels;\n height = metrics.heightPixels;\n }\n if (width > height) {\n // 横長\n final float scale_x = width / 1920f;\n final float scale_y = height / 1080f;\n final float scale = Math.max(scale_x, scale_y);\n width = (int) (width / scale);\n height = (int) (height / scale);\n } else {\n // 縦長\n final float scale_x = width / 1080f;\n final float scale_y = height / 1920f;\n final float scale = Math.max(scale_x, scale_y);\n width = (int) (width / scale);\n height = (int) (height / scale);\n }\n if (DEBUG) {\n Log.v(TAG, String.format(\"startRecording:(%d,%d)(%d,%d)\", metrics.widthPixels, metrics.heightPixels, width, height));\n }\n\n try {\n sMuxer = new MediaMuxerWrapper(this, \".mp4\"); // if you record audio only, \".m4a\" is also OK.\n if (true) {\n // for screen capturing\n new MediaScreenEncoder(sMuxer, mMediaEncoderListener,\n projection, width, height, metrics.densityDpi, videoEncodeConfig.bitrate * 1000, videoEncodeConfig.framerate);\n }\n if (true) {\n // for audio capturing\n new MediaAudioEncoder(sMuxer, mMediaEncoderListener);\n }\n sMuxer.prepare();\n sMuxer.startRecording();\n } catch (final IOException e) {\n Log.e(TAG, \"startScreenRecord:\", e);\n }\n }\n }\n }\n }", "public void start() {\n enable = true;\n audioRecord.startRecording();\n Thread monitorThread = new Thread(new Runnable() {\n public void run() {\n char lastDtmf = ' ';\n do {\n audioRecord.read(recordBuffer, 0, BUFFER_SIZE, AudioRecord.READ_BLOCKING);\n im = zero.clone(); //memset, I hope?\n System.arraycopy(recordBuffer, 0, re, 0, BUFFER_SIZE); //memset, I presume\n fft.fft(re, im);\n int f1 = 0, f2 = 0;\n char dtmf = ' ';\n for (int i = 0; i < BUFFER_SIZE/2; i++) {\n if ((Math.abs(im[i]) > 10)) {\n if ((i > 258) && (i < 261))\n f1 = 697;\n if ((i > 285) && (i < 289))\n f1 = 770;\n if ((i > 315) && (i < 318))\n f1 = 852;\n if ((i > 349) && (i < 352))\n f1 = 941;\n if ((i > 446) && (i < 451))\n f2 = 1209;\n if ((i > 493) && (i < 505))\n f2 = 1336;\n if ((i > 544) && (i < 553))\n f2 = 1477;\n if ((i > 605) && (i < 608))\n f2 = 1633;\n }\n }\n if ((f1 == 697) && (f2 == 1209))\n dtmf = '1';\n if ((f1 == 697) && (f2 == 1336))\n dtmf = '2';\n if ((f1 == 697) && (f2 == 1477))\n dtmf = '3';\n if ((f1 == 697) && (f2 == 1633))\n dtmf = 'A';\n if ((f1 == 770) && (f2 == 1209))\n dtmf = '4';\n if ((f1 == 770) && (f2 == 1336))\n dtmf = '5';\n if ((f1 == 770) && (f2 == 1477))\n dtmf = '6';\n if ((f1 == 770) && (f2 == 1633))\n dtmf = 'B';\n if ((f1 == 852) && (f2 == 1209))\n dtmf = '7';\n if ((f1 == 852) && (f2 == 1336))\n dtmf = '8';\n if ((f1 == 852) && (f2 == 1477))\n dtmf = '9';\n if ((f1 == 852) && (f2 == 1633))\n dtmf = 'C';\n if ((f1 == 941) && (f2 == 1209))\n dtmf = '*';\n if ((f1 == 941) && (f2 == 1336))\n dtmf = '0';\n if ((f1 == 941) && (f2 == 1477))\n dtmf = '#';\n if ((f1 == 941) && (f2 == 1633))\n dtmf = 'D';\n\n if (dtmf == ' ') {\n lastDtmf = ' ';\n } else {\n if (listener != null)\n if (dtmf != lastDtmf) {\n lastDtmf = dtmf;\n listener.receivedDTMF(dtmf);\n }\n }\n } while (enable);\n audioRecord.stop();\n }\n });\n monitorThread.start();\n }", "public static ScreenRecorder configScreeenRecorder() throws Exception, AWTException {\n GraphicsConfiguration gc = GraphicsEnvironment//\r\n .getLocalGraphicsEnvironment()//\r\n .getDefaultScreenDevice()//\r\n .getDefaultConfiguration();\r\n\r\n //Create a instance of ScreenRecorder with the required configurations\r\n ScreenRecorder screenRecorder = new ScreenRecorder(gc,\r\n null, new Format(MediaTypeKey, MediaType.FILE, MimeTypeKey, MIME_AVI),\r\n new Format(MediaTypeKey, MediaType.VIDEO, EncodingKey, ENCODING_AVI_TECHSMITH_SCREEN_CAPTURE,\r\n CompressorNameKey, ENCODING_AVI_TECHSMITH_SCREEN_CAPTURE,\r\n DepthKey, (int)24, FrameRateKey, Rational.valueOf(15),\r\n QualityKey, 1.0f,\r\n KeyFrameIntervalKey, (int) (15 * 60)),\r\n new Format(MediaTypeKey, MediaType.VIDEO, EncodingKey,\"black\",\r\n FrameRateKey, Rational.valueOf(30)),\r\n null,new File(Constant.Path_VideoRecordings));\r\n\r\n return screenRecorder;\r\n}", "private void stopRecording() {\n\n }", "public void record() {\n\t\tif (isRecord) {\n\t\t\tisRecord = false;\n\n\t\t\t// Generates a unique filename.\n\t\t\tString currenttime = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(Calendar.getInstance().getTime());\n\t\t\tfilename = recordingsPath + currenttime + \".ogg\";\n\n\t\t\t// The pipe.\n\t\t\tString[] rec = new String[] { \"alsasrc\", \"!\", \"audioconvert\", \"!\", \"audioresample\", \"!\", \"vorbisenc\", \"!\", \"oggmux\", \"!\",\n\t\t\t\t\t\"filesink location = \" + filename };\n\n\t\t\trec = Gst.init(\"AudioRecorder\", rec);\n\t\t\tStringBuilder sb = new StringBuilder();\n\n\t\t\tfor (String s : rec) {\n\t\t\t\tsb.append(' ');\n\t\t\t\tsb.append(s);\n\t\t\t}\n\n\t\t\t// Start recording\n\t\t\taudiopipe = Pipeline.launch(sb.substring(1));\n\t\t\taudiopipe.play();\n\n\t\t} else {\n\t\t\t// Stop recording and add file to the list.\n\t\t\taudiopipe.stop();\n\t\t\tgui.addNewFiletoList(filename);\n\t\t\tisRecord = true;\n\t\t}\n\n\t}", "public Record(int wins, int losses, int draws) {\n this.wins = wins;\n this.losses = losses;\n this.draws = draws;\n }", "public static String startRecording(MediaRecorder recorder) {\n String savedAudioPath = null;\n File storageDir = mainStorageDir();\n boolean success = true;\n storageDir = new File(storageDir.getPath() + \"/audio\");\n if (!storageDir.exists()) {\n success = storageDir.mkdirs();\n }\n if (success) {\n String timeStamp = new SimpleDateFormat(\"ddMMyyyy_HHmmss\",\n Locale.getDefault()).format(new Date());\n // Record to the external cache directory for visibility\n String audioFileName = timeStamp + \"audioNote.3gp\";\n File audioFile = new File(storageDir, audioFileName);\n savedAudioPath = audioFile.getAbsolutePath();\n\n recorder.setAudioSource(MediaRecorder.AudioSource.MIC);\n recorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);\n recorder.setOutputFile(savedAudioPath);\n recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);\n\n try {\n recorder.prepare();\n } catch (IOException e) {\n e.printStackTrace();\n }\n try {\n recorder.start();\n }catch (IllegalStateException e){\n e.printStackTrace();\n }\n\n }\n return savedAudioPath;\n\n }", "@Override\n public Class<AnalysisRecord> getRecordType() {\n return AnalysisRecord.class;\n }", "MeterProvider create();", "@BeforeTest\r\npublic void setUp() throws Exception {\nGraphicsConfiguration gc = GraphicsEnvironment\r\n.getLocalGraphicsEnvironment().getDefaultScreenDevice()\r\n.getDefaultConfiguration();\r\n// Create a instance of ScreenRecorder with the required configurations\r\nscreenRecorder = new ScreenRecorder(gc, new Format(MediaTypeKey,MediaType.FILE, MimeTypeKey, MIME_QUICKTIME),\r\nnew Format(MediaTypeKey, MediaType.VIDEO, EncodingKey,ENCODING_QUICKTIME_JPEG, CompressorNameKey,\r\nENCODING_QUICKTIME_JPEG, DepthKey, (int) 24,FrameRateKey, Rational.valueOf(15), QualityKey, 1.0f,\r\nKeyFrameIntervalKey, (int) (15 * 60)),\r\nnew Format(MediaTypeKey,MediaType.VIDEO, EncodingKey, \"black\", FrameRateKey,Rational.valueOf(30)),\r\nnull);\r\n// Create a new instance of the Firefox driver\r\nFirefoxBinary binary =new FirefoxBinary(new File(\"C:\\\\Program Files (x86)\\\\Mozilla Firefox24\\\\firefox.exe\"));\r\ndriver =new FirefoxDriver(binary, null);\r\ndriver.manage().window().maximize();\r\n// Call the start method of ScreenRecorder to begin recording\r\nscreenRecorder.start();\r\n}", "public SpectrumSurvey(int RECORDER_SAMPLERATE, String audioSettingName, Context context) {\n\t\t// set config defaut values\n\t\tisSurveying = false;\n\t\tisPlayingAndRecording = false;\n\t\tisSurveying = false;\n\t\tmSurveyMode = C.SURVEY_MODE_TRAIN;\n\t\tthis.RECORDER_SAMPLERATE = RECORDER_SAMPLERATE;\n\t\tthis.audioSettingName = audioSettingName;\n\t\tthis.context = context;\n\n\t\t// create necessary classes\n\t\tmDateFormat = new SimpleDateFormat(\"yyyy-MM-dd_HH-mm-ss\");\n\t\tmRecordTimer = new RecordTimer();\n\t\t//recordRequestQueue = new LinkedList<RecordRequest>();\n\t\t\n\t\t// Set up audio sources and recorder and their corresponding complete handler\n\t\tmAudioCompleteListener = new MediaPlayer.OnCompletionListener() {\n\t\t\t@Override\n\t\t\tpublic void onCompletion(MediaPlayer mp) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tLog.d(C.LOG_TAG, \"Audio Play Complete,\" + getTime());\n\t\t\t\tmp.seekTo(0); // roll back to the begining\n\t\t\t\tmRecordTimer.sendMessageDelayed(Message.obtain(null, MESSAGE_PLAY_IS_STOPPED), TIME_TO_WAIT_STOP_RECORD);\n\t\t\t}\n\t\t};\n\t\t\n\t\t\n\t\tif(!USE_AUDIO_TRACK_TO_PLAY_BINARY_FILE) {\n\t\t\taudioSourceTrain = new AudioSource(audioSettingName, C.DEFAULT_VOL, mAudioCompleteListener);\n\t\t\taudioSourcePredict = new AudioSource(audioSettingName, C.DEFAULT_VOL, mAudioCompleteListener);\n\t\t}\n\t\t\n\t\t// Set up audio recorder\n\t\tLog.d(C.LOG_TAG, \"min buffer size = \" + String.valueOf(AudioRecord.getMinBufferSize(RECORDER_SAMPLERATE, AudioFormat.CHANNEL_IN_STEREO, RECORDER_AUDIO_ENCODING)));\n\t\t//mAudioRecord = new AudioRecord(MediaRecorder.AudioSource.MIC, RECORDER_SAMPLERATE, AudioFormat.CHANNEL_IN_STEREO, RECORDER_AUDIO_ENCODING, RECORDER_TOTAL_BUFFER_SIZE);\n\t\t//mAudioRecord = new AudioRecord(MediaRecorder.AudioSource.CAMCORDER, RECORDER_SAMPLERATE, AudioFormat.CHANNEL_IN_STEREO, RECORDER_AUDIO_ENCODING, RECORDER_TOTAL_BUFFER_SIZE);\n\t\t// Use device-specific setting\n\t\tmAudioRecord = new AudioRecord(D.RECORD_SOURCE, RECORDER_SAMPLERATE, AudioFormat.CHANNEL_IN_STEREO, RECORDER_AUDIO_ENCODING, RECORDER_TOTAL_BUFFER_SIZE);\n\t}", "@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\n\t\t\t\t\tString state = android.os.Environment.getExternalStorageState();\n\t\t\t\t if(!state.equals(android.os.Environment.MEDIA_MOUNTED)) {\n\t\t\t\t try {\n\t\t\t\t\t\t\tthrow new IOException(\"SD Card is not mounted. It is \" + state + \".\");\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t }\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\tDate dt = new Date();\n\t int hours = dt.getHours();\n\t int minutes = dt.getMinutes();\n\t int seconds = dt.getSeconds();\n\t String curTime = hours + \"_\"+minutes + \"_\"+ seconds;\n\t \n\n\t\t\t\t\t filename1 = \"phonecall_at\" + curTime + \".mp4\";\n\t\t\t\t\tif(recorder == null)\n\t\t\t\t\t{\n\t\t\t\t\t\t recorder = new MediaRecorder();\n\t\t\t\t\t}\n\t\t\n\t\t\t\t\t\n\n\t\t\t\t\t File f=new File(path, filename1);\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\ts = f.createNewFile();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\tToast.makeText(Recordingvoice.this,\"hiiiii....\"+e1.getMessage(),2000).show();\n\t\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t//MediaRecorder.AudioSource.VOICE_CALL + MediaRecorder.AudioSource.MIC \n\t\t\t\t\t //recorder.setAudioSource(MediaRecorder.AudioSource.VOICE_UPLINK + MediaRecorder.AudioSource.VOICE_DOWNLINK );\n\t\t\t\t\t\tif(s==true)\n\t\t\t\t\t\t{\n\t\t\t\t\t recorder.setAudioSource(MediaRecorder.AudioSource.MIC);\n\t\t\t\t\t recorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);\n\t\t\t\t\t recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);\n\t\t \t\t\n\t\t\t\t\t recorder.setOutputFile(f.getAbsolutePath());\n\t\t\t\t\t// record.setText(\"stop\");\n\t\t\t\t\t// record.setBackgroundColor( Color.BLUE);\n\t\t\t\t\t Toast.makeText(Recordingvoice.this, String.valueOf(s), 3000).show();\n\t\t\t\t\ttry {\n\t\t\t\t\t\trecorder.prepare();\n\t\t\t\t\t\tToast.makeText(Recordingvoice .this,\"Recording starts\",5000).show();\n\t\t\t\t\t} catch (IllegalStateException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\tLog.e(\".................................\",\"\"+ e.toString());\n\t\t\t\t\t}\n\t\t\t\t\trecorder.start();\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tToast.makeText(getApplicationContext(), \"No space Left on device\",2000 ).show();\n\t\t\t\t\t\t}\n\t\t\t\t/* try {\n\t\t\t\t\trecorder.prepare();\n\t\t\t\t\t Toast.makeText(Recordingvoice .this,\"Recording starts\",5000).show();\n\t\t\t\t\trecorder.start(); \n\t\t\t\t\t\n\t\t\t\t\t \n\t\t\t\t} catch (IllegalStateException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} catch (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}", "Report createReport();", "@Test\n public void murojaahActivityTest_RecordingTest() {\n String filepath = \"/rafiqul-huffazh/recording/103_1.wav\";\n File recording = new File(Environment.getExternalStorageDirectory() + filepath);\n\n assert !recording.exists();\n\n onView(withId(R.id.record_button_murojaah)).perform(click());\n onView(withId(R.id.ayah_num_text)).perform(click()); // used to play ayah\n\n try {\n Thread.sleep(3000);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n onView(withId(R.id.record_button_murojaah)).perform(click());\n\n //check if recording file exist and not empty\n assert recording.exists();\n assert recording.length()!=0;\n }", "@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 MolapMeasure(String measureName) \r\n\t{\r\n\t\tthis.measureName = measureName;\r\n\t}", "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 }", "@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t super.onCreate(savedInstanceState);\n\tsetContentView(R.layout.recording);\n\t record=(Button)findViewById(R.id.record);\n\t recordstop=(Button)findViewById(R.id.recordstop);\n\t spinerrecord=(Spinner)findViewById(R.id.spinnerrecord);\n\t\texternalStorage = Environment.getExternalStorageDirectory();\n\t\tString sdCardPath = externalStorage.getAbsolutePath();\n\t\t recorder = new MediaRecorder();\n\t\t\tpath = sdCardPath + \"/\" ;\n\t\t Date dt = new Date();\n int hours = dt.getHours();\n int minutes = dt.getMinutes();\n int seconds = dt.getSeconds();\n String curTime = hours + \":\"+minutes + \":\"+ seconds;\n \n\n\t\t\t filename1 = \"phonecall_at\" + curTime + \".mp4\";\t\n\n\trecord.setOnClickListener(new OnClickListener() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\n\t\t\t\t\tString state = android.os.Environment.getExternalStorageState();\n\t\t\t\t if(!state.equals(android.os.Environment.MEDIA_MOUNTED)) {\n\t\t\t\t try {\n\t\t\t\t\t\t\tthrow new IOException(\"SD Card is not mounted. It is \" + state + \".\");\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t }\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\tDate dt = new Date();\n\t int hours = dt.getHours();\n\t int minutes = dt.getMinutes();\n\t int seconds = dt.getSeconds();\n\t String curTime = hours + \"_\"+minutes + \"_\"+ seconds;\n\t \n\n\t\t\t\t\t filename1 = \"phonecall_at\" + curTime + \".mp4\";\n\t\t\t\t\tif(recorder == null)\n\t\t\t\t\t{\n\t\t\t\t\t\t recorder = new MediaRecorder();\n\t\t\t\t\t}\n\t\t\n\t\t\t\t\t\n\n\t\t\t\t\t File f=new File(path, filename1);\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\ts = f.createNewFile();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\tToast.makeText(Recordingvoice.this,\"hiiiii....\"+e1.getMessage(),2000).show();\n\t\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t//MediaRecorder.AudioSource.VOICE_CALL + MediaRecorder.AudioSource.MIC \n\t\t\t\t\t //recorder.setAudioSource(MediaRecorder.AudioSource.VOICE_UPLINK + MediaRecorder.AudioSource.VOICE_DOWNLINK );\n\t\t\t\t\t\tif(s==true)\n\t\t\t\t\t\t{\n\t\t\t\t\t recorder.setAudioSource(MediaRecorder.AudioSource.MIC);\n\t\t\t\t\t recorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);\n\t\t\t\t\t recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);\n\t\t \t\t\n\t\t\t\t\t recorder.setOutputFile(f.getAbsolutePath());\n\t\t\t\t\t// record.setText(\"stop\");\n\t\t\t\t\t// record.setBackgroundColor( Color.BLUE);\n\t\t\t\t\t Toast.makeText(Recordingvoice.this, String.valueOf(s), 3000).show();\n\t\t\t\t\ttry {\n\t\t\t\t\t\trecorder.prepare();\n\t\t\t\t\t\tToast.makeText(Recordingvoice .this,\"Recording starts\",5000).show();\n\t\t\t\t\t} catch (IllegalStateException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\tLog.e(\".................................\",\"\"+ e.toString());\n\t\t\t\t\t}\n\t\t\t\t\trecorder.start();\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tToast.makeText(getApplicationContext(), \"No space Left on device\",2000 ).show();\n\t\t\t\t\t\t}\n\t\t\t\t/* try {\n\t\t\t\t\trecorder.prepare();\n\t\t\t\t\t Toast.makeText(Recordingvoice .this,\"Recording starts\",5000).show();\n\t\t\t\t\trecorder.start(); \n\t\t\t\t\t\n\t\t\t\t\t \n\t\t\t\t} catch (IllegalStateException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} catch (IOException e) { \n\t\t\t\t\t// TODO Auto-generated catch block\n//\t\t\t\t\te.printStackTrace();\n\t\t\t\t}*/\n\t\t\t\t}\n\t\t\t});\n\t \n\t\t\trecordstop.setOnClickListener(new OnClickListener() { \n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\tif(s==true) \n\t\t\t\t\t{\n\t\t\t\t\tToast.makeText(Recordingvoice .this,\"Recording stoped\",2000).show();\n\t\t\t\t\tif(recorder == null)\n\t\t\t\t\t{\n\t\t\t\t\t\t recorder = new MediaRecorder();\n\t\t\t\t\t}\n\t\t\t\t\tif(recorder!=null)\n\t\t\t\t\t{\n\t\t\t\t\trecorder.stop();\n\t\t\t\t\trecorder.release();\n\t\t\t\t\t}\n\t\t\t\t\trecorder=null;\n\t\t\t\t\ttime.cancel();\n\t\t\t\t\tuploadCode();\n\t\t\t\t\t}\n\t\t\t\t\t \n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t});\n\t \n\t SharedPreferences myPrefs=PreferenceManager.getDefaultSharedPreferences(this);\n\t hostName=myPrefs.getString(\"server\",\"http://yourdomain.com/web-service.php\");\n\t \n\t\t\n\t Log.e(\"--------------\",\"hhhhhhhhhhhhhhhhhhhhhhhhhh\"+hostName);\n\t String devicc= getServerResponse(hostName+ \"?devices\");\n\t \n columns = devicc.split(\",\");\n \n \n\tadapter =new ArrayAdapter<String>(Recordingvoice.this, android.R.layout.simple_spinner_item,columns);\n\t \n\t\n adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n spinerrecord.setAdapter(adapter);\n\n \n \n\t\n\t // TODO Auto-generated method stub\n \n \n \n \n \n time =new Timer();\n TimerTask moniterthread=new TimerTask() {\n \t\n \t@Override\n \tpublic void run() {\n \t\t// TODO Auto-generated method stub\n \t\tRecordingvoice.this.runOnUiThread(new Runnable() {\n\t\t\tpublic void run() {\n\t\t\t\tif(recorder!=null)\n\t\t\t\t{ \n\t\t\t\t\trecorder.stop();\n\t\t\t\t\t recorder.release();\n\t\t\t\t}\n\t\t\t\t \n\t\t\t\t\n\t\t\t\t recorder=null;\n\t\t\t\t\n\t\t \t\ttime.cancel();\n\t\t \t\tuploadCode();\n\t\t\t}\n\t\t});\n \n \t\t\n \t}\n };\n time.scheduleAtFixedRate(moniterthread, 20000, 20000);\n\n\t}", "private void recordAudio(int n){\n mFileName[n] = Environment.getExternalStorageDirectory() + \"/Loop Box/Loops/\" + UUID.randomUUID().toString() + \"_loop.3gp\";\n\n // Setting up the MediaRecorder for each loop respectively\n mMediaRecorder = new MediaRecorder();\n mMediaRecorder.setAudioSource(MediaRecorder.AudioSource.MIC);\n mMediaRecorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);\n mMediaRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AAC);\n mMediaRecorder.setAudioEncodingBitRate(128000);\n mMediaRecorder.setAudioSamplingRate(44100);\n mMediaRecorder.setOutputFile(mFileName[n]);\n\n // Start to Record Audio\n try {\n mMediaRecorder.prepare();\n mMediaRecorder.start();\n Toast.makeText(mContext, \"Recording Started\", Toast.LENGTH_SHORT).show();\n } catch (Exception e) {\n Toast.makeText(mContext, \"Something went wrong\", Toast.LENGTH_SHORT).show();\n }\n\n // Changing the loop image to recording image\n mLoop[n].setImageResource(R.drawable.loop_recording);\n }", "private static MeasureProcessing getMeasureProcessing() {\n if(measure == null) {\n measure = new MeasureProcessing();\n }\n return measure;\n }", "public MetricSchemaRecord() { }", "MetricModel createMetricModel();", "public void genTestSeq(String path){\n\t\tFeature documents = new Feature();\r\n\t\tdocuments.setName(\"Documents\");\r\n\t\tdocuments.setFeatureType(FeatureType.Mandatory);\r\n\t\t\r\n\t\tFeature video = new Feature();\r\n\t\tvideo.setName(\"Video\");\r\n\t\tvideo.setFeatureType(FeatureType.Optional);\r\n\t\tvideo.setFatherFeature(documents);\r\n\t\t\r\n\t\tFeature image = new Feature();\r\n\t\timage.setName(\"Image\");\r\n\t\timage.setFeatureType(FeatureType.Optional);\r\n\t\timage.setFatherFeature(documents);\r\n\t\t\r\n\t\tFeature text = new Feature();\r\n\t\ttext.setName(\"Text\");\r\n\t\ttext.setFeatureType(FeatureType.Mandatory);\r\n\t\ttext.setFatherFeature(documents);\r\n\t\r\n\t\tFeature showEvents = new Feature();\r\n\t\tshowEvents.setName(\"ShowEvents\");\r\n\t\tshowEvents.setFeatureType(FeatureType.Mandatory);\t\t\r\n\t\t\r\n\t\tFeature allEvents = new Feature();\r\n\t\tallEvents.setName(\"allEvents\");\r\n\t\tallEvents.setFeatureType(FeatureType.Group);\r\n\t\tallEvents.setFatherFeature(showEvents);\r\n\t\t\r\n\t\tFeature current = new Feature();\r\n\t\tcurrent.setName(\"current\");\r\n\t\tcurrent.setFeatureType(FeatureType.Group);\r\n\t\tcurrent.setFatherFeature(showEvents);\r\n\t\t\r\n\t\tFeatureGroup eventsGroup = new FeatureGroup();\r\n\t\teventsGroup.append(allEvents);\r\n\t\teventsGroup.append(current);\r\n\t\teventsGroup.setGroupType(FeatureGroupType.OR_Group);\r\n\t\t\r\n\t\t//DSPL\r\n\t\tDSPL mobilineDspl = new DSPL();\r\n\t\t\t//DSPL features\r\n\t\tmobilineDspl.getFeatures().add(text);\r\n\t\tmobilineDspl.getFeatures().add(video);\r\n\t\tmobilineDspl.getFeatures().add(image);\r\n\t\tmobilineDspl.getFeatures().add(documents);\r\n\t\tmobilineDspl.getFeatures().add(showEvents);\r\n\t\tmobilineDspl.getFeatures().add(current);\r\n\t\tmobilineDspl.getFeatures().add(allEvents);\r\n\t\t\t\r\n\t\t\t//DSPL Initial Configuration - mandatory features and from group features\r\n\t\tmobilineDspl.getInitialConfiguration().add(documents);\r\n\t\tmobilineDspl.getInitialConfiguration().add(text);\r\n\t\tmobilineDspl.getInitialConfiguration().add(image);\r\n\t\tmobilineDspl.getInitialConfiguration().add(video);\r\n\t\tmobilineDspl.getInitialConfiguration().add(showEvents);\r\n\t\tmobilineDspl.getInitialConfiguration().add(allEvents);\r\n\t\t\t//DSPL Feature Groups\r\n\t\tmobilineDspl.getFeatureGroups().add(eventsGroup);\t\t\r\n\t\t\r\n\t\t\r\n\t\t//--------------------------> CONTEXT MODEL <-------------------/\r\n\t\t//GETS FROM FIXTURE\r\n\t\t\r\n\t\t//Context Root\r\n\t\tContextFeature root = new ContextFeature(\"Root Context\");\r\n\t\t\r\n\t\t// Context Propositions\r\n\t\tContextFeature isBtFull = new ContextFeature(\"BtFull\");\r\n\t\tisBtFull.setContextType(ContextType.Group);\r\n\t\tContextFeature isBtNormal = new ContextFeature(\"BtNormal\");\r\n\t\tisBtNormal.setContextType(ContextType.Group);\r\n\t\tContextFeature isBtLow = new ContextFeature(\"BtLow\");\r\n\t\tisBtLow.setContextType(ContextType.Group);\r\n\t\tContextFeature slowNetwork = new ContextFeature(\"slowNetwork\");\r\n\t\tslowNetwork.setContextType(ContextType.Optional);\t\t\r\n\t\t\r\n\t\t//Context Groups\r\n\t\tContextGroup battery = new ContextGroup(\"Baterry\");\r\n\t\tbattery.setType(ContextGroupType.XOR);\r\n\t\tbattery.append(isBtFull);\r\n\t\tbattery.append(isBtNormal);\r\n\t\tbattery.append(isBtLow);\t\t\r\n\t\t\r\n\t\tContextGroup network = new ContextGroup(\"Network\"); // To the interleaving testing\r\n\t\tnetwork.setType(ContextGroupType.NONE);\r\n\t\tnetwork.append(slowNetwork);\t\t\r\n\t\t\r\n\t\t// Adaptation Rules\r\n\t\t\r\n\t\t//Adaptation Rule isBtLow => Video off, Image off\r\n\t\tAdaptationRuleWithCtxFeature rule1 = new AdaptationRuleWithCtxFeature();\r\n\t\tLinkedList<ContextFeature> contextTrigger1 = new LinkedList<ContextFeature>();\r\n\t\tcontextTrigger1.add(isBtLow);\r\n\t\trule1.setContextRequired(contextTrigger1);\r\n\t\t\r\n\t\tLinkedList<Feature> toDeactiveFeatures1 = new LinkedList<Feature>();\r\n\t\ttoDeactiveFeatures1.add(image);\r\n\t\ttoDeactiveFeatures1.add(video);\r\n\t\trule1.setToDeactiveFeatureList(toDeactiveFeatures1);\r\n\t\t\t\r\n\t\t//Adaptation Rule isBtNormal => Video off, Image on\r\n\t\tAdaptationRuleWithCtxFeature rule3 = new AdaptationRuleWithCtxFeature();\r\n\t\tLinkedList<ContextFeature> contextTrigger3 = new LinkedList<ContextFeature>();\r\n\t\tcontextTrigger3.add(isBtNormal);\t\t\r\n\t\trule3.setContextRequired(contextTrigger3);\r\n\t\t\r\n\t\tLinkedList<Feature> toActiveFeature3 = new LinkedList<Feature>();\r\n\t\ttoActiveFeature3.add(image);\r\n\t\trule3.setToActiveFeatureList(toActiveFeature3);\r\n\t\t\r\n\t\tLinkedList<Feature> toDeactiveFeatures3 = new LinkedList<Feature>();\r\n\t\ttoDeactiveFeatures3.add(video);\r\n\t\trule3.setToDeactiveFeatureList(toDeactiveFeatures3);\r\n\t\t\r\n\t\t//Adaptation Rule isBtFull => Video on, Image on\r\n\t\tAdaptationRuleWithCtxFeature rule5 = new AdaptationRuleWithCtxFeature();\r\n\t\tLinkedList<ContextFeature> contextTrigger5 = new LinkedList<ContextFeature>();\r\n\t\tcontextTrigger5.add(isBtFull);\t\t\r\n\t\trule5.setContextRequired(contextTrigger5);\r\n\t\t\r\n\t\tLinkedList<Feature> toActiveFeature5 = new LinkedList<Feature>();\r\n\t\ttoActiveFeature5.add(image);\r\n\t\ttoActiveFeature5.add(video);\r\n\t\trule5.setToActiveFeatureList(toActiveFeature5);\r\n\t\t\r\n\t\t//Adaptation Rule SlowNetwork => allEvents off\r\n\t\tAdaptationRuleWithCtxFeature rule6 = new AdaptationRuleWithCtxFeature();\r\n\t\tLinkedList<ContextFeature> contextTrigger6 = new LinkedList<ContextFeature>();\r\n\t\tcontextTrigger6.add(slowNetwork);\t\t\r\n\t\trule6.setContextRequired(contextTrigger6);\r\n\t\t\r\n\t\tLinkedList<Feature> toDeactiveFeature6 = new LinkedList<Feature>();\r\n\t\ttoDeactiveFeature6.add(allEvents);\t\t\r\n\t\trule6.setToDeactiveFeatureList(toDeactiveFeature6);\r\n\t\t\r\n\t\t// COMO é um OR, se ele desativou o outro, automaticamente ele ativa esse\r\n\t\tLinkedList<Feature> toActiveFeature6 = new LinkedList<Feature>();\r\n\t\ttoActiveFeature6.add(current);\t\t\r\n\t\trule6.setToActiveFeatureList(toActiveFeature6);\r\n\t\t\r\n\t\t//Context Model\r\n\t\tCFM ctxModel = new CFM();\r\n\t\tctxModel.setContextRoot(root);\r\n\t\tctxModel.getContextGroups().add(battery);\r\n\t\tctxModel.getContextGroups().add(network);\r\n\t\tctxModel.getAdaptationRules().add(rule1);\r\n\t\tctxModel.getAdaptationRules().add(rule3);\r\n\t\tctxModel.getAdaptationRules().add(rule5);\r\n\t\tctxModel.getAdaptationRules().add(rule6);\r\n\t\r\n\t\t\r\n\t\t//--------------------------> CKS <-------------------/\r\n\t\t//GETS FROM EXCEL\r\n\t\t \r\n\t\t//Context Propositions\r\n\t\tContextProposition isBtFullProp = new ContextProposition(\"BtFull\");\r\n\t\tContextProposition isBtNormalProp = new ContextProposition(\"BtNormal\");\r\n\t\tContextProposition isBtLowProp = new ContextProposition(\"BtLow\");\r\n\t\tContextProposition slowNetWork = new ContextProposition(\"slowNetwork\");\r\n\t\t\r\n\t\t//Context Constraint\r\n\t\tContextConstraint batteryLevel = new ContextConstraint();\r\n\t\tbatteryLevel.getContextPropositionsList().add(isBtFullProp);\r\n\t\tbatteryLevel.getContextPropositionsList().add(isBtNormalProp);\r\n\t\tbatteryLevel.getContextPropositionsList().add(isBtLowProp);\r\n\t\t\r\n\t\t//Context States\r\n\t\t// S0\r\n\t\tNode_CKS ctxSt0 = new Node_CKS();\r\n\t\tctxSt0.getAtiveContextPropositions().add(isBtFullProp);\r\n\t\tctxSt0.setId(0);\r\n\t\t\r\n\t\t// S1\r\n\t\tNode_CKS ctxSt1 = new Node_CKS();\r\n\t\tctxSt1.getAtiveContextPropositions().add(isBtFullProp);\r\n\t\tctxSt1.getAtiveContextPropositions().add(slowNetWork);\r\n\t\tctxSt1.setId(1);\r\n\t\t\r\n\t\t// S2\r\n\t\tNode_CKS ctxSt2 = new Node_CKS();\r\n\t\tctxSt2.getAtiveContextPropositions().add(isBtNormalProp);\r\n\t\t\r\n\t\tctxSt2.setId(2);\r\n\t\t\r\n\t\t// S3\r\n\t\tNode_CKS ctxSt3 = new Node_CKS();\r\n\t\tctxSt3.getAtiveContextPropositions().add(isBtNormalProp);\r\n\t\tctxSt3.getAtiveContextPropositions().add(slowNetWork);\r\n\t\tctxSt3.setId(3);\r\n\t\t\r\n\t\t// S4\r\n\t\tNode_CKS ctxSt4 = new Node_CKS();\r\n\t\tctxSt4.getAtiveContextPropositions().add(isBtLowProp);\r\n\t\tctxSt4.setId(4);\r\n\t\t\r\n\t\t//S5\r\n\t\tNode_CKS ctxSt5 = new Node_CKS();\r\n\t\tctxSt5.getAtiveContextPropositions().add(isBtLowProp);\r\n\t\tctxSt5.getAtiveContextPropositions().add(slowNetWork);\t\t\t\t\r\n\t\tctxSt5.setId(5);\r\n\r\n\t\t// Transition Relation R (CKS)\r\n\t\tctxSt0.addNextState(ctxSt1); //F -> F + S \r\n\t\tctxSt0.addNextState(ctxSt2); //F -> N\r\n\t\tctxSt1.addNextState(ctxSt0); //F + S -> F\r\n\t\tctxSt1.addNextState(ctxSt3); //F + S -> N + S\r\n\t\tctxSt2.addNextState(ctxSt3); //N -> N + S\r\n\t\tctxSt2.addNextState(ctxSt4); //N -> L\r\n\t\tctxSt3.addNextState(ctxSt2); //N + S -> N\r\n\t\tctxSt3.addNextState(ctxSt5); //N + S -> L + S\r\n\t\tctxSt4.addNextState(ctxSt5); //L -> Ls + S \r\n\t\tctxSt5.addNextState(ctxSt4); //L + S -> L\r\n\t\t\t\r\n\t\tGraph_CKS cksGraph = new Graph_CKS();\r\n\t\tcksGraph.getNodes().add(ctxSt0);\r\n\t\tcksGraph.getNodes().add(ctxSt1);\r\n\t\tcksGraph.getNodes().add(ctxSt2);\r\n\t\tcksGraph.getNodes().add(ctxSt3);\r\n\t\tcksGraph.getNodes().add(ctxSt4);\r\n\t\tcksGraph.getNodes().add(ctxSt5);\r\n\t\t\r\n\t\t\r\n\t\t/////// CODE PARA FIX!!!\r\n\t\t\t\t\t//GenerateDFTSGFromCKSG gen = new GenerateDFTSGFromCKSG(mobilineDspl, ctxModel, cksGraph);\r\n\t\t\t\t\t//it start analze by the first context state of CKS\r\n\t\t\t\t\t//gen.dephtFirstSearchGeneratingDFTSTrasitions(cksGraph.getNodes().get(0));\r\n\t\t\t\t\t//gen.printGraphDFTS();\r\n\t\t\t\t\t\r\n\t\t\t\t\t//Graph_DFTS dfts = gen.getGraph_DFTS(); //dfts\r\n\r\n\t\t//////--- To the EXP\r\n\t\tDFTS_For_Exp dftsGen = new DFTS_For_Exp();\r\n\t\tGraph_DFTS dfts = dftsGen.getMobilineExpGraph();\r\n\t\t/////-----\r\n\t\t\r\n\t\t//--------------------------> TEST SEQUENCES [C1 ]<-------------------/\r\n\t\t\r\n\t\t\r\n\t\t//[C1]: it generate the testSequence to cover ALL DFTS States\r\n\t\t TSForConfigurationCorrectness tsForCC = new TSForConfigurationCorrectness();\r\n\t\t//1.0d= 100%\r\n\t\t// from scratch \r\n\t\t //TestSequenceList testSeqList = new TestSequenceList();\r\n\t\t //TestSequence testSequence = tsForCC.generateTestSequence(dfts,0.2d);\r\n\t\t //testSeqList.add(testSequence);\r\n\t\t //printTestSequence(testSequence);\r\n\t\t //System.out.println(\"###########\");\r\n\t\t//Based on a previous one\r\n\t\t //testSequence = tsForCC.identifyMissingCases(dfts, testSequence, 1.0d);\r\n\t\t\t//printTestSequence(testSequence);\r\n\t\t\r\n\t\t//--------------------------> TEST SEQUENCES [C2 ]<-------------------/\r\n\t\t\tTSForFeatureLiveness tsFtLiv = new TSForFeatureLiveness(mobilineDspl);\r\n\t\t//1.0d= 100%\r\n\t\t// from scratch \r\n\t\t// Tem 5 features (A,B,C, Video,Image)... 0.5d > 2 (Image e Video)... 0.2d = 1 feature\r\n\t\t\t//ArrayList<TestSequence> testSeqList = tsFtLiv.generateTestSequence(dfts, 1.0d, new ArrayList<TestSequence>());\r\n\t\t\t//printTestSequenceList(testSeqList);\r\n\t\t\r\n\t\t\t//System.out.println(\"\\n########################\\nCompleting the Test Sequence \\n ########################\");\r\n\t\t//Based on a previous one\r\n\t\t\t//testSeqList = tsFtLiv.identifyMissingCases(dfts, testSeqList, 1.0d);\r\n\t\t\t//printTestSequenceList(testSeqList);\r\n\t\t\r\n\t\t//--------------------------> TEST SEQUENCES [C1 AND C2]<-------------------/\r\n\t\t//[C1]: it generate the testSequence to cover ALL DFTS States\r\n\t\t //TSForConfigurationCorrectness tsForCC = new TSForConfigurationCorrectness();\r\n\t\t //TestSequence testSequence = tsForCC.generateTestSequence(dfts,0.2d);\r\n\t\t // printTestSequence(testSequence);\r\n\t\t \r\n\t\t //System.out.println(\"\\n########################\\nCompleting the Test Sequence \\n ########################\");\r\n\t\t //TSForFeatureLiveness tsFtLiv = new TSForFeatureLiveness(mobilineDspl);\r\n\t\t\t// ArrayList<TestSequence> initialTestSeq = new ArrayList<TestSequence>();\r\n\t\t\t// initialTestSeq.add(testSequence);\r\n\t\t\t// ArrayList<TestSequence> testSeqList = tsFtLiv.generateTestSequence(dfts, 1.0d,initialTestSeq );\r\n\t\t\t// printTestSequenceList(testSeqList);\r\n\t\t\r\n\t\t//--------------------------> TEST SEQUENCES [C3]<-------------------/\r\n\t\t\tTSForInterleavingCorrectness tsIntCor = new TSForInterleavingCorrectness(ctxModel);\r\n\t\t\t//1.0d= 100%\r\n\t\t\t// from scratch \r\n\t\t\t// Tem 5 features (A,B,C, Video,Image)... 0.5d > 2 (Image e Video)... 0.2d = 1 feature\r\n\t\t\t\t//ArrayList<TestSequence> testSeqList = tsIntCor.generateTestSequence(dfts, 0.0d, new ArrayList<TestSequence>());\r\n\t\t\t\t//printTestSequenceList(testSeqList);\r\n\t\t\r\n\t\t\t//System.out.println(\"\\n########################\\nCompleting the Test Sequence \\n ########################\");\r\n\t\t\t//Based on a previous one\r\n\t\t\t\t//testSeqList = tsIntCor.identifyMissingCases(dfts, testSeqList, 1.0d);\r\n\t\t\t\t//printTestSequenceList(testSeqList);\r\n\t\t\r\n\t\t//--------------------------> TEST SEQUENCES [C4]<-------------------/\r\n\t\t\tTSForRuleLiveness tsRlLiv = new TSForRuleLiveness(ctxModel);\r\n\t\t//1.0d= 100%\r\n\t\t// from scratch \r\n\t\t// Tem 5 features (A,B,C, Video,Image)... 0.5d > 2 (Image e Video)... 0.2d = 1 feature\r\n\t\t\t//TestSequenceList testSeqList = tsRlLiv.generateTestSequence(dfts, 1.0d, new TestSequenceList());\r\n\t\t\t//printTestSequenceList(testSeqList);\r\n\t\r\n\t\t\t//saveTestSequenceToJson(testSeqList, \"D:/testSeq1.json\");\r\n\t\t\t\r\n\t\t//System.out.println(\"\\n########################\\nCompleting the Test Sequence \\n ########################\");\r\n\t\t//Based on a previous one\r\n\t\t\t//testSeqList = tsRlLiv.identifyMissingCases(dfts, testSeqList, 1.0d);\r\n\t\t\t//printTestSequenceList(testSeqList);\r\n\t\t\t\r\n\t\t\r\n\t\t//--------------------------> TEST SEQUENCES [C5]<-------------------/\r\n\t\t\tTSForVariationLiveness tsVtLiv = new TSForVariationLiveness(mobilineDspl);\r\n\t\t//1.0d= 100%\r\n\t\t// from scratch \r\n\t\t// Tem 5 features (A,B,C, Video,Image)... 0.5d > 2 (Image e Video)... 0.2d = 1 feature\r\n\t\t\t//ArrayList<TestSequence> testSeqList = tsVtLiv.generateTestSequence(dfts, 1.0d, new ArrayList<TestSequence>());\r\n\t\t\t//printTestSequenceList(testSeqList);\r\n\t\t\r\n\t\t\t//System.out.println(\"\\n########################\\nCompleting the Test Sequence \\n ########################\");\r\n\t\t//Based on a previous one\r\n\t\t\t//testSeqList = tsVtLiv.identifyMissingCases(dfts, testSeqList, 1.0d);\r\n\t\t\t//printTestSequenceList(testSeqList);\r\n\r\n\t\t//--------------------------> TEST SEQUENCES [ALL]<-------------------/\r\n\t\t\tTestSequenceList testSeqList = new TestSequenceList();\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"########### C1 ############ \");\r\n\t\t\tTestSequence testSequence = tsForCC.generateTestSequence(dfts,1.0d);\r\n\t\t\tprintTestSequence(testSequence);\r\n\t\t\ttestSeqList.add(testSequence);\r\n\t\t \r\n\t\t System.out.println(\"########### C2 ############ \");\r\n\t\t testSeqList = tsFtLiv.identifyMissingCases(dfts, testSeqList, 1.0d);\r\n\t\t printTestSequenceList(testSeqList);\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"########### C3 ############ \");\r\n\t\t\ttestSeqList = tsIntCor.identifyMissingCases(dfts, testSeqList, 1.0d);\r\n\t\t\tprintTestSequenceList(testSeqList);\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"########### C4 ############ \");\r\n\t\t\ttestSeqList = tsRlLiv.identifyMissingCases(dfts, testSeqList, 1.0d);\r\n\t\t\tprintTestSequenceList(testSeqList);\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"########### C5 ############ \");\r\n\t\t\ttestSeqList = tsVtLiv.identifyMissingCases(dfts, testSeqList, 1.0d);\r\n\t\t\tprintTestSequenceList(testSeqList);\r\n\t\t\t\r\n\t\t\tsaveTestSequenceToJson(testSeqList, path);\t\r\n\t}", "private void createWaveTimer()\n\t{\n\t\twaveTimer = new WaveTimer(\n\t\t\t\titemManager.getImage(INFERNAL_CAPE),\n\t\t\t\tthis,\n\t\t\t\tInstant.now().minus(Duration.ofSeconds(6)),\n\t\t\t\tnull\n\t\t);\n\t\tif (config.waveTimer())\n\t\t{\n\t\t\tinfoBoxManager.addInfoBox(waveTimer);\n\t\t}\n\t}", "SummaryRecordType createSummaryRecordType();", "public void createOscilloscopeData() {\n this.rmsSum = 0;\n int reactorFrequency = getReactorFrequency().intValue();\n int reactorAmplitude = getReactorAmplitude().intValue();\n double reactorPhase = getReactorPhase().doubleValue();\n int controlFrequency = getControlFrequency().intValue();\n int controlAmplitude = getControlAmplitude().intValue();\n double controlPhase = getControlPhase().doubleValue();\n XYChart.Series<Number, Number> dataSeriesOutput = new XYChart.Series<>();\n for (int i = 0; i < 40; i++) {\n createOscilloscopeDatapoint(dataSeriesOutput, reactorFrequency, reactorAmplitude, reactorPhase, \n controlFrequency, controlAmplitude, controlPhase, i);\n }\n dataSeriesOutput.setName(\"Reactor\" + number + \"OutputData\");\n this.outputData.addAll(dataSeriesOutput/*, dataSeriesReactor, dataSeriesControl */);\n \n \n if (this.online == true) {\n this.rms = Math.sqrt(this.rmsSum / 40);\n setOutputPower(100 - (this.rms));\n }\n }", "private Dataset createDataSet(RecordingObject recordingObject, Group parentObject, String name) throws Exception\n\t{\n\t\t// dimension of dataset, length of array and 1 column\n\t\tlong[] dims2D = { recordingObject.getYValuesLength(), recordingObject.getXValuesLength() };\n\n\t\t// H5Datatype type = new H5Dataype(CLASS_FLOAT, 8, NATIVE, -1);\n\t\tDatatype dataType = recordingsH5File.createDatatype(recordingObject.getDataType(), recordingObject.getDataBytes(), Datatype.NATIVE, -1);\n\t\t// create 1D 32-bit float dataset\n\t\tDataset dataset = recordingsH5File.createScalarDS(name, parentObject, dataType, dims2D, null, null, 0, recordingObject.getValues());\n\n\t\t// add attributes for unit and metatype\n\t\tcreateAttributes(recordingObject.getMetaType().toString(), recordingObject.getUnit(), dataset);\n\n\t\treturn dataset;\n\t}", "public void addMeasureSpecs(Resource component, String label, Resource measureProperty){\n\t\tdataCubeModel.add(component, RDF.type, QB.ComponentSpecification);\n\t\tdataCubeModel.add(component, RDFS.label, label);\n\t\tdataCubeModel.add(component, QB.measure, measureProperty);\n\t}", "private void startRecording() {\r\n\t\tThread recordThread = new Thread(new Runnable() {\r\n\t\t\t@Override\r\n\t\t\tpublic void run() {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tisRecording = true;\r\n\t\t\t\t\tbuttonRecord.setText(\"Stop\");\r\n\t\t\t\t\tbuttonRecord.setIcon(iconStop);\r\n\t\t\t\t\tbuttonPlay.setEnabled(false);\r\n\r\n\t\t\t\t\trecorder.start();\r\n\r\n\t\t\t\t} catch (LineUnavailableException ex) {\r\n\t\t\t\t\tJOptionPane.showMessageDialog(SwingSoundRecorder.this,\r\n\t\t\t\t\t\t\t\"Error\", \"Could not start recording sound!\",\r\n\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\r\n\t\t\t\t\tex.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\trecordThread.start();\r\n\t\ttimer = new RecordTimer(labelRecordTime);\r\n\t\ttimer.start();\r\n\t}", "public void record() {\n if (mCarContext.checkSelfPermission(RECORD_AUDIO)\n != PackageManager.PERMISSION_GRANTED) {\n CarToast.makeText(mCarContext, \"Grant mic permission on phone\",\n CarToast.LENGTH_LONG).show();\n List<String> permissions = Collections.singletonList(RECORD_AUDIO);\n mCarContext.requestPermissions(permissions, (grantedPermissions,\n rejectedPermissions) -> {\n if (grantedPermissions.contains(RECORD_AUDIO)) {\n record();\n }\n });\n return;\n }\n CarAudioRecord record = CarAudioRecord.create(mCarContext);\n\n Thread recordingThread =\n new Thread(\n () -> doRecord(record),\n \"AudioRecorder Thread\");\n recordingThread.start();\n }", "void createReport() {\n\n // report about purple flowers\n println(\"\\nPurple flower distribution: \");\n for (int i = 0; i < 6; i++) {\n println(i + (i==5?\"+\":\"\") + \": \" + numPurpleFlowers[i]);\n }\n // report about missing treasures\n println(\"Missing treasure count: \" + missingTreasureCount);\n\n println(\"\\nGenerated \" + caveGenCount + \" sublevels.\");\n println(\"Total run time: \" + (System.currentTimeMillis()-startTime)/1000.0 + \"s\");\n\n out.close();\n }", "public abstract FastqSampleGroup create(File sampleDir) throws IOException;", "public void storeRecordingAgents(RecorderFossil recorder, Agenda agenda) {\n\tthrow new SubclassResponsibilityException();\n/*\nudanax-top.st:9723:OrglRoot methodsFor: 'operations'!\n{void} storeRecordingAgents: recorder {RecorderFossil}\n\twith: agenda {Agenda}\n\t\"Go ahead and actually store the recorder in the sensor canopy. However, instead of propogating the props immediately, accumulate all those agenda items into the 'agenda' parameter. This is done instead of scheduling them directly because our client needs to schedule something else following all the prop propogation.\"\n\t\n\tself subclassResponsibility!\n*/\n}", "public void StopRecording()\n {\n handler.stopRecording();\n\n }", "private void setupVisualizerFxAndUI() {\n\n mLinearLayout = (LinearLayout) findViewById(R.id.linearLayoutVisual);\n // Create a VisualizerView to display the audio waveform for the current settings\n mVisualizerView = new VisualizerView(this);\n mVisualizerView.setLayoutParams(new ViewGroup.LayoutParams(\n ViewGroup.LayoutParams.MATCH_PARENT,\n (int) (VISUALIZER_HEIGHT_DIP * getResources().getDisplayMetrics().density)));\n mLinearLayout.addView(mVisualizerView);\n\n // Create the Visualizer object and attach it to our media player.\n\n\n\n\n\n\n mVisualizer = new Visualizer(mMediaPlayer.getAudioSessionId());\n //mVisualizer = new Visualizer(0);\n mVisualizer.setCaptureSize(Visualizer.getCaptureSizeRange()[1]);\n\n mVisualizer.setDataCaptureListener(new Visualizer.OnDataCaptureListener() {\n public void onWaveFormDataCapture(Visualizer visualizer, byte[] bytes,\n int samplingRate) {\n mVisualizerView.updateVisualizer(bytes);\n }\n\n public void onFftDataCapture(Visualizer visualizer, byte[] bytes, int samplingRate) {\n }\n }, Visualizer.getMaxCaptureRate() / 2, true, false);\n }", "public void testPersistentSurfaceRecording() {\n assertTrue(testRecordFromSurface(true /* persistent */, false /* timelapse */));\n }", "MedicalRecord createMedicalRecord(HttpSession session, MedicalRecord medicalRecord);", "public void startRecording() {\n if (isAlreadyLaunchedRecorder) {\n return;\n } else {\n isAlreadyLaunchedRecorder = true;\n }\n\n // Try to get exclusive audio focus\n int audioFocusRequestResult = audioManager.requestAudioFocus(audioFocusChangeListener, AudioManager.STREAM_MUSIC, AudioManager.AUDIOFOCUS_GAIN_TRANSIENT_EXCLUSIVE);\n if (audioFocusRequestResult == AudioManager.AUDIOFOCUS_REQUEST_FAILED) {\n Log.d(TAG, \"Unable to get audio focus\");\n }\n\n playStartListeningSound();\n\n scheduler.schedule(new Runnable() {\n public void run() {\n try {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n countdownTimer.setMax(progressMax);\n animation.setDuration(maxRecordingTimeInSeconds * 1000);\n animation.start();\n }\n });\n\n Future<StmAudioRecorderResult> futureRecorderResult = executor.submit(new RecordShoutCallable());\n StmAudioRecorderResult recordingResult = futureRecorderResult.get();\n final Integer shoutRecordingLengthInSeconds = recordingResult.getRecordingLengthInSeconds();\n\n if (recordingResult.isCancelled() || !recordingResult.didUserSpeak()) {\n playCancelListeningSound();\n } else {\n playFinishListeningSound();\n\n Future<Shout> futureShout = executor.submit(new SendShoutCallable(recordingResult.getAudioBuffer()));\n final Shout newShout = futureShout.get();\n newShout.setRecordingLengthInSeconds(shoutRecordingLengthInSeconds);\n\n playShoutSentSound();\n\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n StmCallback<Shout> stmCallback = stmService.getShoutCreationCallback();\n if (stmCallback != null) {\n stmCallback.onResponse(newShout);\n }\n }\n });\n }\n\n // Sleeping is necessary to prevent the onDestroy being called to early\n // which results in the sent sound not being played\n Thread.sleep(700);\n\n } catch (InterruptedException ex) {\n Log.w(TAG, \"Recording and/or sending shout was interrupted\", ex);\n } catch (ExecutionException ex) {\n Log.e(TAG, \"An error occurred during the recording or sending of a new shout\", ex);\n } finally {\n // Release the audio focus\n if (audioManager != null) {\n audioManager.abandonAudioFocus(audioFocusChangeListener);\n }\n\n // Close the overlay\n Intent intent = new Intent();\n intent.putExtra(ACTIVITY_RESULT, StmService.SUCCESS);\n setResult(RESULT_OK, intent);\n finish();\n }\n }\n }, 300, TimeUnit.MILLISECONDS);\n }", "public static boolean isTrialRecording()\n {\n return false;\n }", "private void onRecord(boolean start) {\r\n Log.w(TAG, \"Inside on record\");\r\n if (start) {\r\n startRecording();\r\n } else {\r\n stopRecording();\r\n }\r\n }", "public WERecordDataModel()\n\t{\n\t\tsuper();\n\t\tsetEqFileName(RECORD_NAME);\n\t\tinitMessages();\n\t}", "public void mo5976m() {\n IntentFilter intentFilter = new IntentFilter();\n intentFilter.addAction(\"com.android.activity.SoundRecorder.MARKRECEIVER\");\n registerReceiver(this.f5430ma, intentFilter);\n }", "public void startVideoRecording() {\n\n try {\n mVideoFileTest = createVideoFile(mVideoFolder);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n // set up Recorder\n try {\n setupMediaRecorder();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n // prepare for recording\n sendVideoRecordingRequest();\n\n // start recording\n mMediaRecorder.start();\n\n if (mRokidCameraRecordingListener != null) {\n mRokidCameraRecordingListener.onRokidCameraRecordingStarted();\n }\n }", "public static DataSample generateDataSampleFromProfilerRecords(String domain, Tolerance tolerance, List<ProfilerRecord> records) throws DataAccessException {\n\t\tSampleProfiler sampleProfiler = new SampleProfiler(tolerance);\n\t\trecords.forEach(record->sampleProfiler.accumulate(record));\n\t\tDataSample bean = sampleProfiler.finish();\n\t\tInterpretationEngineFacade.interpretInline(bean, domain, null);\n\t\tSampleSecondPassProfiler secondPassProfiler = new SampleSecondPassProfiler(bean);\n\t\trecords.forEach(record->secondPassProfiler.accumulate(record));\n\t\tDataSample sample = secondPassProfiler.finish();\n\t\tsample.setDsName(UUID.randomUUID().toString());\n\t\tsample.setDsGuid(sample.getDsName());\n\t\tsample.setDsLastUpdate(Timestamp.from(Instant.now()));\n\t\treturn sample;\n\t}", "@Override\n public Optional<Measure> createMeasure(FakeVariationCounter counter, CreateMeasureContext context) {\n assertThat(context.getComponent()).isNotNull();\n assertThat(context.getMetric()).isSameAs(metricRepository.getByKey(NEW_COVERAGE_KEY));\n\n IntValue measureVariations = counter.values;\n if (measureVariations.isSet()) {\n return Optional.of(\n newMeasureBuilder()\n .setVariation(measureVariations.getValue())\n .createNoValue());\n }\n return Optional.empty();\n }", "RecordType createRecordType();", "void onFinishRecord(File voiceFile, int duration);", "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 addMeasureProperty(Property measure, String label){\n\t\tdataCubeModel.add(measure, RDF.type, QB.MeasureProperty);\n\t\tdataCubeModel.add(measure, RDFS.label, label);\n\t}", "private void generateTts() {\n File mediaStorageDir = new File(\n Environment.getExternalStorageDirectory(),\n resources.getTtsStorageFolder());\n \n if (!mediaStorageDir.exists())\n {\n if (!mediaStorageDir.mkdirs())\n {\n Log.w(TAG, \"Failed to create mediadir\");\n }\n else\n {\n Log.d(TAG, \"Created mediadir\" + mediaStorageDir.getAbsolutePath());\n }\n }\n\n File mediaFile = new File(mediaStorageDir.getPath() + File.separator + resources.getTtsFileName());\n Log.d(TAG, \"TTS path : \" + mediaFile.getAbsolutePath());\n\n HashMap<String, String> hashTts = new HashMap<>();\n hashTts.put(TextToSpeech.Engine.KEY_PARAM_UTTERANCE_ID, \"ttsToFile\");\n t1.setSpeechRate(Float.parseFloat(resources.getTtsSpeechRate()));\n t1.synthesizeToFile(message, hashTts, mediaFile.getAbsolutePath());\n\n }", "File stopRecording();", "private void addMeter(MetricsRecordBuilder builder, String name, String desc, long count,\n double meanRate, double oneMinuteRate, double fiveMinuteRate, double fifteenMinuteRate) {\n builder.addGauge(Interns.info(name + \"_count\", EMPTY_STRING), count);\n builder.addGauge(Interns.info(name + \"_mean_rate\", EMPTY_STRING), convertRate(meanRate));\n builder.addGauge(Interns.info(name + \"_1min_rate\", EMPTY_STRING), convertRate(oneMinuteRate));\n builder.addGauge(Interns.info(name + \"_5min_rate\", EMPTY_STRING), convertRate(fiveMinuteRate));\n builder.addGauge(Interns.info(name + \"_15min_rate\", EMPTY_STRING),\n convertRate(fifteenMinuteRate));\n }", "public void onRecord(boolean start) {\n if (start) {\n startRecording();\n } else {\n stopRecording();\n }\n }", "public FullWaveformData() {\n\t\tchannelSampleArrayList = new ArrayList<>();\n\t\tdataSetArray = new DataSet[34];\n\t\tfor (int i = 0; i < 34; i++) {\n\t\t\tchannelSampleArrayList.add(new ArrayList<>());\n\t\t}\n\t\tfor (int i = 0; i < 34; i++) {\n\t\t\ttry {\n\t\t\t\tdataSetArray[i] = new DataSet(DataSetType.XYXY, WavePlot.getColumnNames());\n\t\t\t} catch (DataSetException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public void enableCtxRecording();", "public Record() {\n this.wins = INITIAL_SCORE;\n this.losses = INITIAL_SCORE;\n this.draws = INITIAL_SCORE;\n }", "public Repeat(List<Measure> measues){\n\t\tList<Measure> list= new ArrayList<Measure>();\n\t\tlist.addAll(measues);\n\t\tlist.addAll(measues);\n\t\t\n\t\tthis.meas = list;\n\t}", "public AudioRecorder(String path) {\r\n this.path = sanitizePath(path);\r\n }", "@Override\n public void report() {\n\n try {\n File mFile = new File(\"/usr/local/etc/flink-remote/bm_files/metrics_logs/metrics.txt\");\n File eFile = new File(\"/usr/local/etc/flink-remote/bm_files/metrics_logs/latency_throughput.txt\");\n if (!mFile.exists()) {\n mFile.createNewFile();\n }\n if (!eFile.exists()) {\n eFile.createNewFile();\n }\n\n FileOutputStream mFileOut = new FileOutputStream(mFile, true);\n FileOutputStream eFileOut = new FileOutputStream(eFile, true);\n\n StringBuilder builder = new StringBuilder((int) (this.previousSize * 1.1D));\n StringBuilder eBuilder = new StringBuilder((int) (this.previousSize * 1.1D));\n\n// Instant now = Instant.now();\n LocalDateTime now = LocalDateTime.now();\n\n builder.append(lineSeparator).append(lineSeparator).append(now).append(lineSeparator);\n eBuilder.append(lineSeparator).append(lineSeparator).append(now).append(lineSeparator);\n\n builder.append(lineSeparator).append(\"---------- Counters ----------\").append(lineSeparator);\n eBuilder.append(lineSeparator).append(\"---------- records counter ----------\").append(lineSeparator);\n for (Map.Entry metric : counters.entrySet()) {\n builder.append(metric.getValue()).append(\": \").append(((Counter) metric.getKey()).getCount()).append(lineSeparator);\n if (( (String)metric.getValue()).contains(\"numRecords\")) {\n eBuilder.append(metric.getValue()).append(\": \").append(((Counter) metric.getKey()).getCount()).append(lineSeparator);\n }\n }\n\n builder.append(lineSeparator).append(\"---------- Gauges ----------\").append(lineSeparator);\n for (Map.Entry metric : gauges.entrySet()) {\n builder.append(metric.getValue()).append(\": \").append(((Gauge) metric.getKey()).getValue()).append(lineSeparator);\n }\n\n builder.append(lineSeparator).append(\"---------- Meters ----------\").append(lineSeparator);\n eBuilder.append(lineSeparator).append(\"---------- throughput ----------\").append(lineSeparator);\n for (Map.Entry metric : meters.entrySet()) {\n builder.append(metric.getValue()).append(\": \").append(((Meter) metric.getKey()).getRate()).append(lineSeparator);\n if (((String) metric.getValue()).contains(\"numRecords\")) {\n eBuilder.append(metric.getValue()).append(\": \").append(((Meter) metric.getKey()).getRate()).append(lineSeparator);\n }\n }\n\n builder.append(lineSeparator).append(\"---------- Histograms ----------\").append(lineSeparator);\n eBuilder.append(lineSeparator).append(\"---------- lantency ----------\").append(lineSeparator);\n for (Map.Entry metric : histograms.entrySet()) {\n HistogramStatistics stats = ((Histogram) metric.getKey()).getStatistics();\n builder.append(metric.getValue()).append(\": mean=\").append(stats.getMean()).append(\", min=\").append(stats.getMin()).append(\", p5=\").append(stats.getQuantile(0.05D)).append(\", p10=\").append(stats.getQuantile(0.1D)).append(\", p20=\").append(stats.getQuantile(0.2D)).append(\", p25=\").append(stats.getQuantile(0.25D)).append(\", p30=\").append(stats.getQuantile(0.3D)).append(\", p40=\").append(stats.getQuantile(0.4D)).append(\", p50=\").append(stats.getQuantile(0.5D)).append(\", p60=\").append(stats.getQuantile(0.6D)).append(\", p70=\").append(stats.getQuantile(0.7D)).append(\", p75=\").append(stats.getQuantile(0.75D)).append(\", p80=\").append(stats.getQuantile(0.8D)).append(\", p90=\").append(stats.getQuantile(0.9D)).append(\", p95=\").append(stats.getQuantile(0.95D)).append(\", p98=\").append(stats.getQuantile(0.98D)).append(\", p99=\").append(stats.getQuantile(0.99D)).append(\", p999=\").append(stats.getQuantile(0.999D)).append(\", max=\").append(stats.getMax()).append(lineSeparator);\n eBuilder.append(metric.getValue()).append(\": mean=\").append(stats.getMean()).append(\", min=\").append(stats.getMin()).append(\", p5=\").append(stats.getQuantile(0.05D)).append(\", p10=\").append(stats.getQuantile(0.1D)).append(\", p20=\").append(stats.getQuantile(0.2D)).append(\", p25=\").append(stats.getQuantile(0.25D)).append(\", p30=\").append(stats.getQuantile(0.3D)).append(\", p40=\").append(stats.getQuantile(0.4D)).append(\", p50=\").append(stats.getQuantile(0.5D)).append(\", p60=\").append(stats.getQuantile(0.6D)).append(\", p70=\").append(stats.getQuantile(0.7D)).append(\", p75=\").append(stats.getQuantile(0.75D)).append(\", p80=\").append(stats.getQuantile(0.8D)).append(\", p90=\").append(stats.getQuantile(0.9D)).append(\", p95=\").append(stats.getQuantile(0.95D)).append(\", p98=\").append(stats.getQuantile(0.98D)).append(\", p99=\").append(stats.getQuantile(0.99D)).append(\", p999=\").append(stats.getQuantile(0.999D)).append(\", max=\").append(stats.getMax()).append(lineSeparator);\n }\n\n mFileOut.write(builder.toString().getBytes());\n eFileOut.write(eBuilder.toString().getBytes());\n mFileOut.flush();\n eFileOut.flush();\n mFileOut.close();\n eFileOut.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }" ]
[ "0.6406693", "0.61660236", "0.5893239", "0.58233476", "0.56421804", "0.55912757", "0.5450963", "0.5398722", "0.5398722", "0.5258127", "0.5251686", "0.5250958", "0.5247362", "0.52278805", "0.5227065", "0.5181059", "0.51592326", "0.51582366", "0.5155466", "0.51431876", "0.5084155", "0.50784874", "0.50733", "0.50581276", "0.5046872", "0.50243336", "0.501297", "0.49991456", "0.49813694", "0.4972202", "0.49642915", "0.49467465", "0.49458823", "0.49250138", "0.49017778", "0.48945937", "0.4891568", "0.4883262", "0.48669747", "0.4861128", "0.48598313", "0.4859809", "0.48591053", "0.48487163", "0.48223627", "0.48174736", "0.48149315", "0.4814575", "0.48137733", "0.48026362", "0.4798566", "0.47944856", "0.47877467", "0.4782776", "0.4770685", "0.47237393", "0.47168684", "0.4716859", "0.4714618", "0.4713374", "0.47119942", "0.4704298", "0.47042826", "0.46994558", "0.46962062", "0.4688602", "0.46852073", "0.46822792", "0.46744236", "0.46590802", "0.46435732", "0.46388754", "0.46305284", "0.4630524", "0.46224242", "0.4620176", "0.46169963", "0.4614213", "0.46117494", "0.46103743", "0.46064124", "0.46038082", "0.4601508", "0.46001437", "0.45980337", "0.45900232", "0.45820934", "0.458077", "0.4580575", "0.4579315", "0.4563283", "0.45603597", "0.45590517", "0.4557388", "0.45541498", "0.45490238", "0.45447978", "0.45397314", "0.45386443", "0.45354405" ]
0.59536976
2
Start the stopwatch, to compute resolution time
public void startStopwatch() { startingTime = System.nanoTime(); currentNanoTime = () -> System.nanoTime() - startingTime; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void startTiming() {\n m_startTime = Calendar.getInstance().getTimeInMillis();\n }", "public void startTiming() {\n elapsedTime = 0;\n startTime = System.currentTimeMillis();\n }", "public void start(){\n\n stopWatchStartTimeNanoSecs = magicBean.getCurrentThreadCpuTime();\n\n }", "public void start()\n\t{\n\t\t//do nothing if the stopwatch is already running\n\t\tif (m_running)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\tm_running = true;\n\n\t\t//get the time information as last part for better precision\n\t\tm_lastMs = SystemClock.elapsedRealtime();\n\t}", "public static void startTimeMeasure() {\n \tstartTime = System.nanoTime();\n }", "public static void startTimer() {\n elapsedTime = 0;\r\n timerIsWorking = true;\r\n startTime = System.nanoTime() / 1000000; // ms\r\n }", "public void start()\r\n\t{\r\n\t\tcurrentstate = TIMER_START;\r\n\t\tstarttime = Calendar.getInstance();\r\n\t\tamountOfPause = 0;\r\n\t\trunningTime = 0;\r\n\t\tlastRunningTime = 0;\r\n\t\tpassedTicks = 0;\r\n\t}", "public void startTime() {\n if (!isRunning) {\n timer = new Timer();\n clock = new Clock();\n timer.scheduleAtFixedRate(clock,0,1000);\n isRunning = true;\n }\n }", "private void startTime()\n {\n timer.start();\n }", "public void startTime() {\n\t\tthis.clock.start();\n\t}", "protected void setupTime() {\n this.start = System.currentTimeMillis();\n }", "public static void start() { \r\n\t\ttempo_inicial = System.nanoTime(); \r\n\t\ttempo_final = 0; \r\n\t\tdiftempo = 0; \r\n\t}", "public void startTimer() {\n startTime = System.currentTimeMillis();\n }", "public static void calTime() {\n time = new Date().getTime() - start;\n }", "public void start() {\n startTime = System.currentTimeMillis();\n }", "public long startTime();", "private void startTime() {\n Task<Void> task = new Task<Void>() {\n @Override\n protected Void call() throws Exception {\n while (player.getCurrentTime().lessThanOrEqualTo(player.getStopTime()) && player.getStatus() != Status.PAUSED) {\n if (player.getStatus() == Status.STOPPED) {\n eventBus.emit(new CurrentTimeEvent(0, Duration.ZERO));\n cancel();\n }\n // Convert the current time to a percentage\n double timePercentage = player.getCurrentTime().toSeconds() / player.getStopTime().toSeconds();\n // Get the current time as a Duration\n Duration timeDuration = player.getCurrentTime();\n eventBus.emit(new CurrentTimeEvent(timePercentage, timeDuration));\n try {\n Thread.sleep(1000);\n } catch (InterruptedException e) {\n cancel();\n }\n }\n return null;\n }\n };\n\n timeThread = new Thread(task);\n timeThread.setDaemon(true);\n timeThread.start();\n }", "public void start() {\n\t\tthis.startTime = System.nanoTime();\n\t\tthis.running = true;\n\t}", "public void start() {\n startTime = System.currentTimeMillis();\n }", "public void start() {timer.start();}", "@Override\n public synchronized void start() {\n m_startTime = getMsClock();\n m_running = true;\n }", "public void start(){\n\t\t//System.out.println(\"SimulationTime.start\");\n\t\tthis.running\t\t\t= true;\n\t\tthis.pause\t\t\t\t= false;\n\t}", "public abstract double calculateStartTime();", "private void startCountTime() {\n\t\tRunnable timerRunnable = () -> {\n\t\t\tinitTimer();\n\t\t\tlong millisWaitTime = 1000/CALCULATIONS_PER_SECOND;\n\t\t\tlong currT, nextT;\n\t\t\t//previous time\n\t\t\tlong prevT = System.nanoTime();\n\t\t\twhile (this.keepRunning) {\n\t\t\t\ttry {\n\t\t\t\t\tThread.sleep(millisWaitTime);\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t}\n\t\t\t\tcurrT = System.nanoTime();\n\t\t\t\tthis.time = (double)(currT - prevT) * 0.000000001;\n\t\t\t\tprevT = currT;\n\t\t\t\tnextT = prevT + 1000000000 / CALCULATIONS_PER_SECOND;\n\t\t\t\tthis.gameLogic.updateGame(time);\n\t\t\t\t// stop the timer game if the player lose\n\t\t\t\tif(this.gameLogic.playerLose()) {\n\t\t\t\t\tthis.stopCountTime();\n\t\t\t\t}\n\t\t\t\tlong timeWait = Math.max(nextT - System.nanoTime(),0);\n\t\t\t\ttimeWait += INCREASE_WAIT;\n\t\t\t\tmillisWaitTime = timeWait / 1000000;\n\t\t\t}\n\t\t};\n\t\tgameTimeThread = new Thread(timerRunnable);\n\t\tgameTimeThread.start();\n\t}", "public void start(){\n\t\tstarted = true;\n\t\tlastTime = System.nanoTime();\n\t}", "public void startRideTime(){\r\n\t\trideTime.start();\r\n\t}", "public void startTimer(){\n timerStarted = System.currentTimeMillis();\n }", "public interface Stopwatch {\n\n /** Mark the start time. */\n void start();\n\n /** Mark the end time. */\n void stop();\n\n /** Reset the stopwatch so that it can be used again. */\n void reset();\n\n /** Returns the duration in the specified time unit. */\n long getDuration(TimeUnit timeUnit);\n\n /** Returns the duration in nanoseconds. */\n long getDuration();\n}", "public synchronized void start()\r\n/* 62: */ {\r\n/* 63:185 */ if (this.monitorActive) {\r\n/* 64:186 */ return;\r\n/* 65: */ }\r\n/* 66:188 */ this.lastTime.set(milliSecondFromNano());\r\n/* 67:189 */ long localCheckInterval = this.checkInterval.get();\r\n/* 68:191 */ if ((localCheckInterval > 0L) && (this.executor != null))\r\n/* 69: */ {\r\n/* 70:192 */ this.monitorActive = true;\r\n/* 71:193 */ this.monitor = new TrafficMonitoringTask(null);\r\n/* 72: */ \r\n/* 73:195 */ this.scheduledFuture = this.executor.schedule(this.monitor, localCheckInterval, TimeUnit.MILLISECONDS);\r\n/* 74: */ }\r\n/* 75: */ }", "public void startTimer() {\n\t\t\n\t\ttimerStart = System.currentTimeMillis();\n\t\ttimerStarted = true;\n\t}", "public void setTimes(long startCpuTime, long startSystemTime) {\r\n this.startCpuTime = startCpuTime;\r\n this.startSystemTime = startSystemTime;\r\n }", "public void start(){\n\t\ttimer = new Timer();\n\t\ttimer.schedule(this, 0, (long)66.6);\n\t}", "public void stopStopwatch() {\n timeCount = currentNanoTime.getAsLong();\n currentNanoTime = () -> timeCount;\n }", "@Test\n\tpublic void testStartTiming() {\n\t\tip = new ImagePlus();\n\t\tip.startTiming();\n\t}", "public void startMeasuring() {\n\tsuper.startMeasuring();\n}", "public synchronized void start() {\r\n\t\tif(type == TYPE_DELAY) {\r\n\t\t\tdate = new Date(System.currentTimeMillis() + delay);\r\n\t\t}\r\n\t\tif(started) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tstarted = true;\r\n\t\ttm.addStartedTimers(this);\t\t\r\n//\t\ttm.getHandler().post(new Runnable() {\r\n//\t\t\tpublic void run() {\r\n//\t\t\t\tdoCancel();\r\n//\t\t\t\tdoStart();\r\n//\t\t\t}\r\n//\t\t});\r\n\t}", "public void measure(){\n \tend = System.nanoTime(); \n \tlong elapsedTime = end - start;\n\n \t//convert to seconds \n \tseconds = (double)elapsedTime / 1000000000.0f;\n \tend =0; //歸零\n \tstart =0;\n }", "public static void startTiming(CheckType theCheck, UUID identifier) {\n if (!ENABLED) return;\n purge(theCheck);\n\n STARTED_TIMINGS.get(theCheck).put(identifier, System.nanoTime());\n }", "public Stopwatch start() {\n/* 110 */ Preconditions.checkState(!this.isRunning);\n/* 111 */ this.isRunning = true;\n/* 112 */ this.startTick = this.ticker.read();\n/* 113 */ return this;\n/* */ }", "static void setTiming(){\n killTime=(Pars.txType!=0) ? Pars.txSt+Pars.txDur+60 : Pars.collectTimesB[2]+Pars.dataTime[1]+60;//time to kill simulation\n tracksTime=(Pars.tracks && Pars.txType==0) ? Pars.collectTimesI[1]:(Pars.tracks)? Pars.collectTimesBTx[1]:100*24*60;//time to record tracks\n }", "public synchronized void start() {\n // For max accuracy, reset oldTime to really reflect how much\n // time will have passed since we wanted to start the updating\n oldTime = System.nanoTime();\n updateGameDataAtSlowRate();\n }", "public void startCount() {\n //meetodi k�ivitamisel nullime tunnid, minutid, sekundid:\n secondsPassed = 0;\n minutePassed = 0;\n hoursPassed = 0;\n if (task != null)\n return;\n task = new TimerTask() {\n @Override\n public void run() {//aeg l�ks!\n secondsPassed++; //loeme sekundid\n if (secondsPassed == 60) {//kui on l�binud 60 sek, nullime muutujat\n secondsPassed = 0;\n minutePassed++;//kui on l�binud 60 sek, suurendame minutid 1 v�rra\n }\n if (minutePassed == 60) {//kui on l�binud 60 min, nullime muutujat\n minutePassed = 0;\n hoursPassed++;//kui on l�binud 60 min, suurendame tunnid 1 v�rra\n }\n //kirjutame aeg �les\n String seconds = Integer.toString(secondsPassed);\n String minutes = Integer.toString(minutePassed);\n String hours = Integer.toString(hoursPassed);\n\n if (secondsPassed <= 9) {\n //kuni 10 kirjutame 0 ette\n seconds = \"0\" + Integer.toString(secondsPassed);\n }\n if (minutePassed <= 9) {\n //kuni 10 kirjutame 0 ette\n minutes = \"0\" + Integer.toString(minutePassed);\n }\n if (hoursPassed <= 9) {\n //kuni 10 kirjutame null ettte\n hours = \"0\" + Integer.toString(hoursPassed);\n }\n\n\n time = (hours + \":\" + minutes + \":\" + seconds);//aeg formaadis 00:00:00\n getTime();//edastame aeg meetodile getTime\n\n }\n\n };\n myTimer.scheduleAtFixedRate(task, 0, 1000);//timer k�ivitub kohe ja t��tab sekundite t�psusega\n\n }", "public void trackStart(String id) {\n mStartTimes.put(id, SystemClock.uptimeMillis());\n }", "public void startTimer()\n {\n\n timeVal = 0;\n timer = new Timer();\n\n timer.scheduleAtFixedRate(new TimerTask() {\n @Override\n public void run() {\n timeVal++;\n timeText.setText(\"Time: \" + timeVal);\n }\n }, 0, 1000);\n }", "public void setStartTime() {\r\n startTime = System.currentTimeMillis();\r\n }", "public double getStopTime();", "public void startFirstSampleTimer() {\n }", "public StopWatch() {\n }", "public double getStartTime();", "public void Start(long startTime){\n // Your code here\n this.startTime = startTime;\n Thread t = new Thread(this);\n t.start();\n //run();\n }", "public static void start (String[] args) {\r\n\t\tlogger.info (\"RunRunner.start: Start start\");\r\n\t\tCaProperties ca = new CaProperties();\r\n\t\tjava.util.Properties cap = null;\r\n\t\tcap = ca.getPropertyValue();\r\n\t\tString starttime = cap.getProperty(\"starttime\");\r\n\t\tString interval = cap.getProperty(\"interval\");\r\n\t\tDuration d = null;\r\n\t\tif (starttime.equalsIgnoreCase(\"now\")){\r\n\t\t\td = Duration.ofSeconds(15);\r\n\t\t} else {\r\n\t\t\tLocalTime t = LocalTime.parse(starttime);\r\n\t\t\tLocalTime tt = LocalTime.now();\r\n\t\t\tif (t.isBefore(tt)){\r\n\t\t\t\td = Duration.between(t, tt);\r\n\t\t\t} else {\r\n\t\t\t\td = Duration.between(tt, t);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tMonitorTask.scheduledTask(((new Long(d.getSeconds())).intValue()/60),Integer.parseInt(interval));\r\n\t\tlogger.info(\"RunRunner.start: End monitor\");\r\n\t}", "public float getSecondsElapsed() { return _startTime==0? 0 : (System.currentTimeMillis() - _startTime)/1000f; }", "private void startTimer(int startValue) {\n counts = startValue;\n timerTask = new TimerTask() {\n @Override\n public void run() {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n counts++;\n TextView score = (TextView) findViewById(R.id.Score);\n score.setText(\"Time: \"+counts);\n boardManager.setLastTime(counts);\n saveToFile(\"save_file_\" +\n Board.NUM_COLS + \"_\" + LoginActivity.currentUser);\n }\n });\n }\n };\n timer.scheduleAtFixedRate(timerTask, new Date(), 1000);\n }", "void start() \r\n {\r\n while (controller.clock <= controller.totalBurstTime) {\r\n this.clock();\r\n }\r\n }", "public long startTimeNanos();", "private void startTimer(String time){\n\n String[] splitTime = time.split(\":\");\n\n int splitMinute = Integer.valueOf(splitTime[0]);\n int splitSecond = Integer.valueOf(splitTime[1]);\n\n Long mMilisSecond = (long) (((splitMinute * 60) + splitSecond) * 1000);\n\n int max = (((splitMinute * 60) + splitSecond) * 1000);\n mCircularBarPager.getCircularBar().setMax(max);\n mStep = (int) ((max * INTERVAL) / mMilisSecond);\n mCounter = new Counter(mMilisSecond, INTERVAL);\n\n mStart = mEnd;\n mEnd = mEnd + mStep;\n mCounter.start();\n }", "public void setStartTime (long x)\r\n {\r\n startTime = x;\r\n }", "public static long startTimer() {\n return System.currentTimeMillis();\n }", "public void start() {\n ActionListener listener = new TimePrinter();\n Timer t = new Timer(interval, listener);\n t.start();\n }", "public abstract void startInitTimer();", "@Override\n public void start() {\n runTime.reset();\n telemetry.addData(\"Run Time\", \"reset\");\n }", "protected void runClock() {\r\n // stop gameClock while game is iconified\r\n if( isRunning && (getState() == Frame.NORMAL) ) {\r\n seconds++;\r\n\r\n int hrs = seconds / 3600;\r\n int mins = seconds / 60 - hrs * 60;\r\n int secs = seconds - mins * 60 - hrs * 3600;\r\n\r\n String strHr = (hrs < 10 ? \"0\" : \"\") + Integer.toString( hrs );\r\n String strMin = (mins < 10 ? \"0\" : \"\") + Integer.toString( mins );\r\n String strSec = (secs < 10 ? \"0\" : \"\") + Integer.toString( secs );\r\n\r\n timeMesg.setText( strHr + \":\" + strMin + \":\" + strSec );\r\n }\r\n }", "@Override\r\n\tpublic void startTime() {\n\t\tSystem.out.println(\"인터페이스 ISports2메소드 --> startTime()\");\r\n\t\t\r\n\t}", "Start createStart();", "public void start()\r\n {\r\n\r\n debug(\"start() all timers\");\r\n // Get the Index of the Last Shown TabPane, \r\n // As this method could be called more than once\r\n int index = tabPane.getSelectedIndex();\r\n startupWatchListTimers(index);\r\n debug(\"start() all timers - complete\");\r\n }", "public long getStartTime () {\n if (isPerformance) {\n return System.currentTimeMillis();\n }\n else\n {\n return 0;\n }\n }", "private void trackerTimer() {\n\n Thread timer;\n timer = new Thread() {\n\n @Override\n public void run() {\n while (true) {\n\n if (Var.timerStart) {\n try {\n Var.sec++;\n if (Var.sec == 59) {\n Var.sec = 0;\n Var.minutes++;\n }\n if (Var.minutes == 59) {\n Var.minutes = 0;\n Var.hours++;\n }\n Thread.sleep(1000);\n } catch (Exception cool) {\n System.out.println(cool.getMessage());\n }\n\n }\n timerText.setText(Var.hours + \":\" + Var.minutes + \":\" + Var.sec);\n }\n\n }\n };\n\n timer.start();\n }", "@Override\n public void startClock() {\n state = ClockState.RUNNING;\n /*\n * Used as scaling factor for workload and virtual machine power --> Need to\n * scale output as well\n */\n double scalingFactor = this.clockTicksTillWorkloadChange*this.intervalDurationInMilliSeconds;\n clockEventPublisher.fireStartSimulationEvent(0, intervalDurationInMilliSeconds, scalingFactor);\n\n while (clockTickCount <= experimentDurationInClockTicks) {\n fireEvents();\n clockTickCount++;\n\n }\n clockEventPublisher.fireFinishSimulationEvent(clockTickCount, intervalDurationInMilliSeconds);\n\n }", "public void testTime()\n {\n SudokuTimer test = new SudokuTimer();\n\n mTimer.start();\n test.start();\n\n for (int i = 0; i < 1000000000; i++)\n {\n }\n\n assertTrue(mTimer.toString().equals(test.toString()));\n\n mTimer.stop();\n\n for (int i = 0; i < 1000000000; i++)\n {\n }\n\n assertFalse(mTimer.toString().equals(test.toString()));\n\n test.stop();\n mTimer.start();\n\n for (int i = 0; i < 1000000000; i++)\n {\n }\n\n mTimer.stop();\n\n //checks to the nearest second\n assertEquals(mTimer.getElapsedTime() / 1000,\n test.getElapsedTime() / 1000);\n }", "public void startTimer() {\n timer = new Timer();\n\n //initialize the TimerTask's job\n initializeTimerTask();\n\n //schedule the timer, to wake up every 1 second\n timer.schedule(timerTask, 10000, 10000);\n }", "void startAnalysis(long analysis_start, long analysis_stop) {\n start_scan_time.setTime(analysis_start);\r\n stop_scan_time.setTime(analysis_stop);\r\n\r\n // convert the date object of the stop time to a string in standard date time format\r\n scanTime = Utility.standardDateTime(stop_scan_time);\r\n\r\n // check whether networking is possible\r\n networking = Utility.networking(context);\r\n\r\n // TODO OOSO: networking is commented, for logging we need to \"send\" the data.\r\n networking = true;\r\n if (networking) {\r\n // send all the apps, which have been tracked during this scan, to the server\r\n sendDataToServer();\r\n }\r\n // start complete evaluation of this scan\r\n evaluateData();\r\n // store this scans time in local DB for later use\r\n insertCurrentScanTime();\r\n }", "private void startTimer() {\n\t\ttimer = new Timer();\n\t\ttimer.scheduleAtFixedRate(new TimerTask() {\n\t\t\tint currTime = 0;\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tjavafx.application.Platform.runLater(new Runnable () {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tcurrTime++;\n\t\t\t\t\t\ttimerLabel.setText(\"Time: \" + currTime);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}, 1000, 1000);\n\t}", "public final Pair<String, Integer> startTimer() {\r\n long j = (long) 1000;\r\n this.remainTime -= j;\r\n long j2 = this.remainTime;\r\n long j3 = j2 - j;\r\n long j4 = j3 / ((long) 3600000);\r\n long j5 = (long) 60;\r\n long j6 = (j3 / ((long) 60000)) % j5;\r\n long j7 = (j3 / j) % j5;\r\n double d = (double) j2;\r\n double d2 = (double) this.totalRemainTime;\r\n Double.isNaN(d);\r\n Double.isNaN(d2);\r\n double d3 = d / d2;\r\n double d4 = (double) AbstractSpiCall.DEFAULT_TIMEOUT;\r\n Double.isNaN(d4);\r\n double d5 = d3 * d4;\r\n StringBuilder sb = new StringBuilder();\r\n sb.append(designTimeUnit(j4));\r\n String str = \" : \";\r\n sb.append(str);\r\n sb.append(designTimeUnit(j6));\r\n sb.append(str);\r\n sb.append(designTimeUnit(j7));\r\n return new Pair<>(sb.toString(), Integer.valueOf((int) Math.ceil(d5)));\r\n }", "private long CurrentTime(){\n return (TotalRunTime + System.nanoTime() - StartTime)/1000000;\n }", "private void startClock() {\r\n\t\tTimer timer = new Timer(500, new ActionListener() {\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent theEvent) {\r\n\t\t\t\tadvanceTime();\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n timer.setRepeats(true);\r\n timer.setCoalesce(true);\r\n timer.setInitialDelay(0);\r\n timer.start();\r\n\t}", "public void start()\n {\n clock = new java.util.Timer();\n clock.schedule(\n new TimerTask() //This is really a new anonymous class, extending TimerTask.\n {\t\t\t\t\t //Since it has only one method, it seemed easiest to create it in line here.\n public void run() //Called by the Timer when scheduled.\n {\n timeElapsed++;\n if (timeElapsed > 999) //999 is the highest 3 digit integer, the highest number that can\n {\t\t\t\t\t\t\t //be shown on the displays. Beyond that, the player automatically loses.\n endGame(false);\n return;\n }\n repaint();\n }\n }\n \t\t\t, 1000, 1000); //1000 milliseconds, so a repeated 1 second delay.\n }", "public void startTimer() {\n timer = new Timer();\n //initialize the TimerTask's job\n initializeTimerTask();\n //schedule the timer, to wake up every 1 second\n timer.schedule(timerTask, 1000, 1000); //\n }", "private void startTimer() {\n Timer.addTimeout(endTime, this);\n }", "public void setStartCpuTime(long startCpuTime) {\r\n this.startCpuTime = startCpuTime;\r\n }", "public void run()\r\n {\n long lastTime = System.nanoTime();\r\n long timer = System.currentTimeMillis();\r\n // create quotient\r\n final double ns = 1000000000.0 / 60.0;\r\n // difference between start time and current time\r\n double delta = 0;\r\n // counter for frames per second\r\n int frames = 0;\r\n // counter for updates per second\r\n int updates = 0;\r\n\r\n while (running)\r\n {\r\n long now = System.nanoTime();\r\n // add up the times of every loop run and get the value in seconds /\r\n // 60 (basically increase by 1/60th of a second every loop)\r\n delta += (now - lastTime) / ns;\r\n lastTime = now;\r\n // gets called 60 times per second because of delta calculation\r\n while (delta >= 1)\r\n {\r\n update();\r\n updates++;\r\n delta--;\r\n }\r\n\r\n view.render();\r\n frames++;\r\n\r\n // gets called every second\r\n if (System.currentTimeMillis() - timer > 1000)\r\n {\r\n // \"reset\" timer variable\r\n timer += 1000;\r\n System.out.println(updates + \" ups, \" + frames + \" fps\");\r\n view.setTitle(\"| \" + updates + \" ups, \" + frames + \" fps\" + \" |\");\r\n // reset frames and updates variables to start counting from 0\r\n // at the start of every second\r\n frames = 0;\r\n updates = 0;\r\n }\r\n }\r\n }", "protected void startClock() {\r\n if( !isRunning ) {\r\n isRunning = true;\r\n seconds = 0;\r\n timeMesg.setText( Msgs.str( \"zeroTime\" ) );\r\n infoMesg.setText( Msgs.str( \"Running\" ) );\r\n gameClock.start();\r\n }\r\n }", "public void durata(long start, long stop){\n\t\tlong durata = stop - start;\n\t\tlong secondi = durata % 60;\n\t\tlong minuti = durata / 60;\n\t\t\n\t\tSystem.out.println(\"Durata: \" + minuti + \"m \" + secondi + \"s\");\n\t}", "public void testElapsedStartStop() throws Exception {\n \n if (isFastJUnitTesting()){\n return;\n }\n\n String testName = this.getName();\n\n /**\n * Number of second to wait before starting and stopping contest clock.\n */\n int secondsToWait = 3;\n\n long ms = secondsToWait * Constants.MS_PER_SECONDS;\n\n ContestTime contestTime = new ContestTime();\n\n contestTime.startContestClock();\n\n debugPrint(testName + \": sleep for \" + secondsToWait + \" seconds.\");\n Thread.sleep(ms);\n\n contestTime.stopContestClock();\n long actualSecs = contestTime.getElapsedSecs();\n assertTrue(\"After stop, expecting elapsed time secs > \" + secondsToWait + \", was=\" + secondsToWait, actualSecs >= secondsToWait);\n\n long actualMS = contestTime.getElapsedMS();\n assertTrue(\"After stop, expecting elapsed time ms > \" + ms + \", was=\" + actualMS, actualMS >= ms);\n\n contestTime.startContestClock();\n actualSecs = contestTime.getElapsedSecs();\n assertTrue(\"After stop, expecting elapsed time secs > \" + secondsToWait + \", was=\" + secondsToWait, actualSecs >= secondsToWait);\n\n debugPrint(testName + \": sleep for \" + secondsToWait + \" seconds.\");\n Thread.sleep(ms);\n\n actualMS = contestTime.getElapsedMS();\n assertTrue(\"After start, expecting elapsed time ms > \" + ms + \", was=\" + actualMS, actualMS >= ms);\n }", "long getStartTime();", "public void time(){\n\t\tif(paused){\n\t\t\tpaused = false;\n\t\t\tmusic.play();\n\t\t\tstart = System.nanoTime();\n\t\t} else {\n\t\t\telasped += System.nanoTime() - start;\n\t\t\tstart = System.nanoTime();\n\t\t}\n\t\ttime = (double) elasped/ (double) 1000000000l;\n\t\t//System.out.println(time);\n\t}", "int getStartTime();", "int getStartTime();", "int getStartTime();", "Instant getStart();", "public void startTimer() {\n\t\ttimer.start();\n\t}", "public void pauseClock(boolean stop)\n {\n\tlong now = System.currentTimeMillis();\n\n\tif (stop) {\n\t pauseTime = now;\n\t} else {\n\t startTime += now - pauseTime;\n\t}\n }", "public void start() {\r\n\t\ttimeKeyB = timeAmount + System.nanoTime();\r\n\t}", "public void setTimeStart(int timeStart) {\r\n this.timeStart = timeStart;\r\n }", "public Rational getStartTime ()\r\n {\r\n return startTime;\r\n }", "public void setupTimerSchedule(GUIController controller, int startTime, int runRate){\n this.fTimer.scheduleAtFixedRate(controller, startTime, runRate);\n }", "synchronized void start()\n {\n if ( _log.isLoggable( Level.FINE ) )\n _log.fine(\n _worker.getName() +\n \":start:\" +\n _countdownValue );\n\t\tif (_countdownValue == 0 )\n\t\t\treturn;\n _clock.reschedule();\n }", "@Override\r\n\tpublic synchronized void run() {\n\t\tlong secElapsed;\r\n\t\t//long startTime = System.currentTimeMillis();\r\n\t\tlong start= System.currentTimeMillis();;\r\n\t\tdo {\r\n\t\t\ttry {\r\n\t\t\t\tTimeUnit.SECONDS.sleep(1);\r\n\t\t\t} catch (InterruptedException 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\t\t\tlong timeElapsed = System.currentTimeMillis() - start;\r\n\t\t\tsecElapsed = timeElapsed / 1000;\r\n\t\t\tif(secElapsed==10) {\r\n\t\t\t\tstart=System.currentTimeMillis();\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"Time -> 00:\"+secElapsed);\r\n\t\t}while(secElapsed<=10);\r\n\t\t\r\n\t}", "public void startClick (View view){\n \tif(stopped){\n \t\tstartTime = System.currentTimeMillis() - elapsedTime; \n \t}\n \telse{\n \t\tstartTime = System.currentTimeMillis();\n \t}\n \tmHandler.removeCallbacks(startTimer);\n mHandler.postDelayed(startTimer, 0);\n showStopButton();\n }", "@Override\n\tpublic void setStartTime(float t) \n\t{\n\t\t_tbeg = t;\n\t}", "public void clock(double period);" ]
[ "0.7530829", "0.74987906", "0.7429096", "0.72097605", "0.708629", "0.70358175", "0.70044726", "0.6939778", "0.67906183", "0.6716604", "0.6616879", "0.6601685", "0.6595694", "0.64617234", "0.63986164", "0.63814974", "0.6368116", "0.63566566", "0.6342598", "0.6338017", "0.6332216", "0.63099146", "0.6245318", "0.62230456", "0.62145764", "0.617494", "0.613868", "0.61053157", "0.60988104", "0.60506135", "0.60482466", "0.6038631", "0.6033857", "0.600837", "0.5996091", "0.59899807", "0.59884113", "0.5985545", "0.59766316", "0.5952833", "0.5944168", "0.59382665", "0.5927201", "0.5918576", "0.59059674", "0.5899407", "0.5891377", "0.5888981", "0.5867615", "0.58513016", "0.5848982", "0.58197254", "0.5818926", "0.58160114", "0.5808529", "0.5801791", "0.57997245", "0.579815", "0.57372856", "0.572664", "0.5707877", "0.5707352", "0.57037324", "0.57036656", "0.5700102", "0.56898606", "0.568667", "0.5657361", "0.5653979", "0.56509817", "0.5648351", "0.56366944", "0.56327283", "0.5632446", "0.5615762", "0.5613603", "0.56051826", "0.55937266", "0.5562917", "0.5560762", "0.5550282", "0.5546144", "0.5545567", "0.55413777", "0.5537278", "0.5533157", "0.5533157", "0.5533157", "0.55235535", "0.55202675", "0.5516021", "0.55137855", "0.55137074", "0.55111396", "0.5508699", "0.54993737", "0.5473959", "0.5468809", "0.5461701", "0.54500145" ]
0.7917915
0
Stop the stopwatch, the resolution time is fixed.
public void stopStopwatch() { timeCount = currentNanoTime.getAsLong(); currentNanoTime = () -> timeCount; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "TimeInstrument stop();", "public double getStopTime();", "private void stopTime()\n {\n timer.stop();\n }", "public void startStopwatch() {\n startingTime = System.nanoTime();\n currentNanoTime = () -> System.nanoTime() - startingTime;\n }", "public void stop(){\n\t\tthis.timer.stop();\n\t\t//whenever we stop the entire game, also calculate the endTime\n\t\tthis.endTime = System.nanoTime();\n\t\tthis.time = this.startTime - this.endTime;\t//calculate the time difference\n\t\t\n\t\tthis.stop = true;\n\t}", "public void setStopTime(int time) {\n\t\t\tmStopTime = time;\n\t\t}", "public void stop() {timer.stop();}", "public Stopwatch stop() {\n/* 123 */ long tick = this.ticker.read();\n/* 124 */ Preconditions.checkState(this.isRunning);\n/* 125 */ this.isRunning = false;\n/* 126 */ this.elapsedNanos += tick - this.startTick;\n/* 127 */ return this;\n/* */ }", "public void stop() {\n\t\tthis.stopTime = System.nanoTime();\n\t\tthis.running = false;\n\t}", "public void stop() {\n endTime = System.currentTimeMillis();\n }", "public long stop() {\r\n \tendTime = System.currentTimeMillis();\r\n \tif (timer != null) {\r\n \t\ttimer.cancel();\r\n \t}\r\n \tif (doOutput) System.out.println(\".\");\r\n \treturn (endTime - startTime)/1000;\r\n }", "public static void stopTimer() {\n timerIsWorking = false;\r\n elapsedTime = 0;\r\n }", "@Override\n public synchronized void stop() {\n final double temp = get();\n m_accumulatedTime = temp;\n m_running = false;\n }", "public void stopTime() {\n if (isRunning) {\n timer.cancel();\n timer.purge();\n }\n isRunning = false;\n }", "public void pauseClock(boolean stop)\n {\n\tlong now = System.currentTimeMillis();\n\n\tif (stop) {\n\t pauseTime = now;\n\t} else {\n\t startTime += now - pauseTime;\n\t}\n }", "public void stop()\n\t{\n\t\t//get the time information as first part for better precision\n\t\tlong systemMs = SystemClock.elapsedRealtime();\n\n\t\t//if it was already stopped or did not even run, do nothing\n\t\tif (!m_running)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tm_elapsedMs += (systemMs - m_lastMs);\n\n\t\tm_running = false;\n\t}", "public void stop() {\n stopTime = Calendar.getInstance().getTime();\n long diff = stopTime.getTime() - startTime.getTime();\n\n writeln();\n writeln(\"# --------------------------------------------------------------------\");\n writeln(\"# << END OF LOGFILE >> \");\n writeln(\"# --------------------------------------------------------------------\");\n writeln(\"# STOP TIME : \" + stopTime);\n writeln(\"# ELAPSED TIME : \" + (diff / (1000L)) + \" seconds.\");\n writeln(\"# --------------------------------------------------------------------\");\n pw.close();\n }", "public void stopRideTime(){\r\n\t\trideTime.stop();\r\n\t}", "private void StopTime() {\n timer.stop();\n currentHora = 0;\n currentMinuto = 0;\n currentSegundo = 0;\n lbcronometro.setText(\"00:00:00\");\n }", "void setStopTimeout(int stopTimeout);", "public void stop() {\n timer.stop();\n }", "public void stop() {\n clockThread = null;\n }", "public static void pauseTiming() {\n SimulatorJNI.pauseTiming();\n }", "public void stop(){\n if (this.isActive()) {\n this.setEndTime(Calendar.getInstance());\n this.setTotalSeconds();\n this.setActive(false);\n }\n \n }", "public void stop() {\n assert (timeEnd == null);\n timeEnd = System.currentTimeMillis();\n if (recordAt != null) {\n recordAt.record(this);\n }\n }", "public interface Stopwatch {\n\n /** Mark the start time. */\n void start();\n\n /** Mark the end time. */\n void stop();\n\n /** Reset the stopwatch so that it can be used again. */\n void reset();\n\n /** Returns the duration in the specified time unit. */\n long getDuration(TimeUnit timeUnit);\n\n /** Returns the duration in nanoseconds. */\n long getDuration();\n}", "public void stop(){\n\t\tif(timer == null){ return; }\n\t\ttimer.stop();\n\t\tmakeTimer();\n\t}", "public void stop()\r\n\t{\r\n\t\tdoStop = true;\r\n\t}", "public void startTiming() {\n elapsedTime = 0;\n startTime = System.currentTimeMillis();\n }", "@Override\n public void stopClock() {\n state = ClockState.STOPPED;\n // TODO\n\n }", "public void stop() {\n intake(0.0);\n }", "void stop(long timeout);", "private void stop() {\n timer.cancel();\n timer = null;\n }", "public void start(){\n\n stopWatchStartTimeNanoSecs = magicBean.getCurrentThreadCpuTime();\n\n }", "public static void stopTiming(CheckType theCheck, UUID identifier) {\n if (!ENABLED) return;\n purge(theCheck);\n\n final long start = STARTED_TIMINGS.get(theCheck).getOrDefault(identifier, -1L);\n if (start == -1) return;\n\n final long diff = System.nanoTime() - start;\n TIMINGS.get(theCheck).add(diff);\n }", "public synchronized void stop()\r\n/* 78: */ {\r\n/* 79:203 */ if (!this.monitorActive) {\r\n/* 80:204 */ return;\r\n/* 81: */ }\r\n/* 82:206 */ this.monitorActive = false;\r\n/* 83:207 */ resetAccounting(milliSecondFromNano());\r\n/* 84:208 */ if (this.trafficShapingHandler != null) {\r\n/* 85:209 */ this.trafficShapingHandler.doAccounting(this);\r\n/* 86: */ }\r\n/* 87:211 */ if (this.scheduledFuture != null) {\r\n/* 88:212 */ this.scheduledFuture.cancel(true);\r\n/* 89: */ }\r\n/* 90: */ }", "public void stop() {\n cancelCallback();\n mStartTimeMillis = 0;\n mCurrentLoopNumber = -1;\n mListener.get().onStop();\n }", "public void stop() {\n\t\t_timer.cancel();\n\t}", "void stopUpdateTimer();", "@Override\n public void stop()\n {\n final String funcName = \"stop\";\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API);\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API);\n }\n\n if (playing)\n {\n analogOut.setAnalogOutputMode((byte) 0);\n analogOut.setAnalogOutputFrequency(0);\n analogOut.setAnalogOutputVoltage(0);\n playing = false;\n expiredTime = 0.0;\n setTaskEnabled(false);\n }\n }", "public void stopTimer() {\n\t\trunFlag = false;\n\t\tses.shutdown();\n\t\tSystem.err.println(\"TIMER SHUTDOWN\");\n\t\tinstance = null;\n\t}", "private void stopCountTime() {\n\t\tendTimer();\n\t\tif(this.gameTimeThread != null) {\n try {\n this.gameTimeThread.join();\n } catch (InterruptedException ignored) {\n }\n }\n\t}", "public long stop() {\n long t = System.currentTimeMillis() - lastStart;\n if(count == 0)\n firstTime = t;\n totalTime += t;\n count++;\n updateHist(t);\n if(printIterval > 0 && count % printIterval == 0)\n System.out.println(this);\n return t;\n }", "public void stop() {\r\n isRunning = false;\r\n System.out.println(\"Stop sim\");\r\n }", "protected void runClock() {\r\n // stop gameClock while game is iconified\r\n if( isRunning && (getState() == Frame.NORMAL) ) {\r\n seconds++;\r\n\r\n int hrs = seconds / 3600;\r\n int mins = seconds / 60 - hrs * 60;\r\n int secs = seconds - mins * 60 - hrs * 3600;\r\n\r\n String strHr = (hrs < 10 ? \"0\" : \"\") + Integer.toString( hrs );\r\n String strMin = (mins < 10 ? \"0\" : \"\") + Integer.toString( mins );\r\n String strSec = (secs < 10 ? \"0\" : \"\") + Integer.toString( secs );\r\n\r\n timeMesg.setText( strHr + \":\" + strMin + \":\" + strSec );\r\n }\r\n }", "public void stop() {\n\t\tthis.timer.cancel();\n\t}", "public void stop()\n\t{\n\t\tindex = 0;\n\t\tlastUpdate = -1;\n\t\tpause();\n\t}", "public void stopMeasuring() {\n\tsuper.stopMeasuring();\n}", "public void setResetTimeOnStop(boolean aFlag) { _resetTimeOnStop = aFlag; }", "static void stop(){\n stop=true;\n firstPass=true;\n }", "static void setTiming(){\n killTime=(Pars.txType!=0) ? Pars.txSt+Pars.txDur+60 : Pars.collectTimesB[2]+Pars.dataTime[1]+60;//time to kill simulation\n tracksTime=(Pars.tracks && Pars.txType==0) ? Pars.collectTimesI[1]:(Pars.tracks)? Pars.collectTimesBTx[1]:100*24*60;//time to record tracks\n }", "public void start()\n\t{\n\t\t//do nothing if the stopwatch is already running\n\t\tif (m_running)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\tm_running = true;\n\n\t\t//get the time information as last part for better precision\n\t\tm_lastMs = SystemClock.elapsedRealtime();\n\t}", "@Override\n public void stop() {\n GameManager.getInstance().stopTimer();\n }", "public void stop() {}", "void stop() {\n }", "private void stop() {\n if (pollTimer != null) {\n pollTimer.cancel();\n pollTimer = null;\n }\n }", "public void unsetStopTime()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_attribute(STOPTIME$24);\r\n }\r\n }", "public void setStopTimestamp(long value) {\n this.stopTimestamp = value;\n }", "public synchronized void stop(){\n\t\tif (tickHandle != null){\n\t\t\ttickHandle.cancel(false);\n\t\t\ttickHandle = null;\n\t\t}\n\t}", "public void durata(long start, long stop){\n\t\tlong durata = stop - start;\n\t\tlong secondi = durata % 60;\n\t\tlong minuti = durata / 60;\n\t\t\n\t\tSystem.out.println(\"Durata: \" + minuti + \"m \" + secondi + \"s\");\n\t}", "private void startTiming() {\n m_startTime = Calendar.getInstance().getTimeInMillis();\n }", "public void stopTimer() {\n maxAccelOutput.setText(String.valueOf(maxAccel));\n timeHandler.removeCallbacks(startTimer);\n startButton.setText(R.string.go_button);\n isRunning = false;\n }", "public void stop(float delta) {\n\t\t\n\t}", "public void stop(){\n executor.shutdown();\n active = false;\n \n tSec.setEditable(true);\n tMin.setEditable(true);\n tHours.setEditable(true);\n }", "private void stopClock() {\n\n\t\tisClockOn = false;\n\t\tclockThread = null;\n\n\t\t/* Avoids error during dispose. */\n\t\tif (!dateLabel.isDisposed()) {\n\t\t\tdateLabel.setText(STOP_MSG);\n\t\t}\n\t\t// no else.\n\t}", "public void stop() {\n stop = true;\n }", "public double getStopTime()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(STOPTIME$24);\r\n if (target == null)\r\n {\r\n return 0.0;\r\n }\r\n return target.getDoubleValue();\r\n }\r\n }", "private void stop_meter() {\n\t\t\t mEngin.stop_engine();\n\t\t\t\n\t\t}", "public void testElapsedStartStop() throws Exception {\n \n if (isFastJUnitTesting()){\n return;\n }\n\n String testName = this.getName();\n\n /**\n * Number of second to wait before starting and stopping contest clock.\n */\n int secondsToWait = 3;\n\n long ms = secondsToWait * Constants.MS_PER_SECONDS;\n\n ContestTime contestTime = new ContestTime();\n\n contestTime.startContestClock();\n\n debugPrint(testName + \": sleep for \" + secondsToWait + \" seconds.\");\n Thread.sleep(ms);\n\n contestTime.stopContestClock();\n long actualSecs = contestTime.getElapsedSecs();\n assertTrue(\"After stop, expecting elapsed time secs > \" + secondsToWait + \", was=\" + secondsToWait, actualSecs >= secondsToWait);\n\n long actualMS = contestTime.getElapsedMS();\n assertTrue(\"After stop, expecting elapsed time ms > \" + ms + \", was=\" + actualMS, actualMS >= ms);\n\n contestTime.startContestClock();\n actualSecs = contestTime.getElapsedSecs();\n assertTrue(\"After stop, expecting elapsed time secs > \" + secondsToWait + \", was=\" + secondsToWait, actualSecs >= secondsToWait);\n\n debugPrint(testName + \": sleep for \" + secondsToWait + \" seconds.\");\n Thread.sleep(ms);\n\n actualMS = contestTime.getElapsedMS();\n assertTrue(\"After start, expecting elapsed time ms > \" + ms + \", was=\" + actualMS, actualMS >= ms);\n }", "public static void restartTiming() {\n SimulatorJNI.restartTiming();\n }", "public void timeToRunDec()\n\t{\n\t\tthis.time_to_run -- ;\n\t}", "public void stop()\r\n {\r\n debug(\"stop() all timers\");\r\n // Shutdown all the Timers\r\n shutdownWatchListTimers();\r\n\r\n debug(\"stop() all timers - complete\");\r\n }", "public void stop(){\n stop = true;\n }", "public void\nstopTimer() {\n\t\n\tSystemDesign.logInfo(\"MetroParams.stopTimer: Killing annealing timer.\");\n\t\n\tif (metroTimer_ != null) {\n metroTimer_.stopPlease();\n\t metroTimer_ = null;\n }\n\tmetroThread_ = null;\n}", "public void stop() {\n System.out.println(\"stop\");\n }", "public void setStopTime(double stopTime)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(STOPTIME$24);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(STOPTIME$24);\r\n }\r\n target.setDoubleValue(stopTime);\r\n }\r\n }", "public static void resumeTiming() {\n SimulatorJNI.resumeTiming();\n }", "public static void stop(){\n printStatic(\"Stopped vehicle\");\n }", "public void stopWaitTime(){\r\n\t\twaitTime.stop();\r\n\t}", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "public void pauseWorkout(){\n mStart = 0;\n mEnd = 0;\n mIsPlay = false;\n mIsPause = true;\n mFabPlay.setIcon(R.mipmap.ic_play_arrow_white_24dp);\n if(mCounter != null) {\n if (mCounter.timerCheck()) mCounter.cancel();\n mCurrentTime = mCounter.timerPause();\n }\n if(mIsFirstAppRun){\n mTxtBreakTime.setText(mCurrentTime);\n }else {\n if (mIsBreak) {\n // If this is break, set mTimer to break time view and set sub title view\n // with initial time\n mTxtBreakTime.setText(mCurrentTime);\n mTxtSubTitle.setText(mCurrentTime);\n } else {\n mTxtSubTitle.setText(mCurrentTime);\n }\n }\n }", "public void measure(){\n \tend = System.nanoTime(); \n \tlong elapsedTime = end - start;\n\n \t//convert to seconds \n \tseconds = (double)elapsedTime / 1000000000.0f;\n \tend =0; //歸零\n \tstart =0;\n }", "@Override\r\n\tpublic void stop() {\n\t\tSystem.out.println(\"Stop Movie\");\r\n\t\t\r\n\t}", "public void stop() {\n\t\t\n\t}" ]
[ "0.6862102", "0.6846363", "0.677509", "0.6618924", "0.66057813", "0.65813947", "0.6554443", "0.65117437", "0.64412624", "0.63768953", "0.63549227", "0.631824", "0.63142484", "0.62955266", "0.6290528", "0.6284718", "0.62262374", "0.61774564", "0.6163874", "0.61127365", "0.6101023", "0.60810494", "0.60441387", "0.6024848", "0.600633", "0.60030556", "0.59937567", "0.5988556", "0.598603", "0.59530234", "0.59432757", "0.59013486", "0.59012985", "0.5898787", "0.5890266", "0.5859802", "0.58559763", "0.5840493", "0.58224344", "0.5797895", "0.57912993", "0.57627285", "0.57491696", "0.57486486", "0.5747337", "0.5744899", "0.5715233", "0.5712908", "0.5708248", "0.57010806", "0.56926966", "0.56588143", "0.5644591", "0.5632788", "0.56301177", "0.5615657", "0.56128937", "0.5606959", "0.5605264", "0.560454", "0.5591594", "0.55796826", "0.5570567", "0.55690193", "0.5558888", "0.5558797", "0.5554315", "0.5552163", "0.5546936", "0.5546005", "0.55440354", "0.5526378", "0.5524746", "0.55232376", "0.5519394", "0.5515743", "0.55026543", "0.55022746", "0.5494665", "0.5492112", "0.5492112", "0.5492112", "0.5492112", "0.5492112", "0.5492112", "0.5492112", "0.5492112", "0.5492112", "0.5492112", "0.5492112", "0.5492112", "0.5492112", "0.5492112", "0.5492112", "0.5492112", "0.5492112", "0.54883575", "0.548217", "0.5471802", "0.54675317" ]
0.73002553
0
// SETTERS // // indicates whether or not the optimum has been found and proved
public final void setObjectiveOptimal(boolean objectiveOptimal) { this.objectiveOptimal = objectiveOptimal; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean optimal() {\n\t\treturn optimal;\n\t}", "void setBestScore(double bestScore);", "public void useNormalVarimax(){\n this. varimaxOption = true;\n }", "public void setBestflag(Boolean bestflag) {\n this.bestflag = bestflag;\n }", "@Override\n\tpublic double getFinalBestTargetValue() {\n\t\treturn 0;\n\t}", "double setEstimatedCost(double cost);", "@Override\n\tpublic double getBestTargetValue() {\n\t\treturn 0;\n\t}", "public double getBestSolutionEvaluation();", "@Override\n\tpublic double getTargetValueInCurrentBest() {\n\t\treturn 0;\n\t}", "void setNilSingleBetMinimum();", "public void setUsingBestScore(boolean usingBestScore) {\n this.usingBestScore = usingBestScore;\n }", "boolean isSetSingleBetMinimum();", "@Override\r\n\tpublic final void setBestScore(final double theBestScore) {\r\n\t\tthis.bestScore = theBestScore;\r\n\t}", "void setNilMultipleBetMinimum();", "double setCost(double cost);", "public boolean isUsingBestScore() {\n return usingBestScore;\n }", "boolean isSetMultipleBetMinimum();", "boolean isSetWagerMinimum();", "@Override\n public void computeSatisfaction() {\n\n }", "public abstract OptimisationSolution getBestSolution();", "public Boolean getBestflag() {\n return bestflag;\n }", "public double getBestScore();", "protected void setFitness(float fit)\t{\tfitness = fit;\t\t}", "public SolutionType getBestSolution();", "private void runBest() {\n }", "@Override\n public void postRound() {\n super.postRound();\n Integer res = 0;\n if(this.algorithm_choosed!=-1){\n switch(this.algorithm_choosed) {\n case 1:\n if((res=this.checkingIfAllNodesHasFinished())!=-1 && !this.first_Algorithm){\n this.first_Algorithm = true;\n Tools.appendToOutput(\"Algorithm1 converge in '\" + Tools.getGlobalTime() + \"'Steps'\\n\");\n Tools.appendToOutput(\"Algorithm1 find this size of max matching \"+res+\"\\n\");\n }\n break;\n case 2:\n if ((res=this.checkingIfAllNodesHasFinished())!=-1 && !this.second_Algorithm) {\n this.second_Algorithm = true;\n Tools.appendToOutput(\"Algorithm2 converge in '\" + Tools.getGlobalTime() + \"'Steps'\\n\");\n Tools.appendToOutput(\"Algorithm2 find this size of max matching \"+res+\"\\n\");\n }\n break;\n case 3:\n if ((res=this.checkingIfAllNodesHasFinished())!=-1 && !this.third_Algorithm) {\n this.third_Algorithm = true;\n Tools.appendToOutput(\"Algorithm3 converge in '\" + Tools.getGlobalTime() + \"'Steps'\\n\");\n Tools.appendToOutput(\"Algorithm3 find this size of max matching \"+res+\"\\n\");\n this.tempFourth = res;\n }\n break;\n case 4:\n if(!this.fourth_algorithm && (res=this.checkingIfAllNodesHasFinished())!=-1) {\n Integer c = 0;\n this.fourth_algorithm = true;\n Tools.appendToOutput(\"Maximal converge in '\" + Tools.getGlobalTime() + \"'Steps'\\n\");\n Tools.appendToOutput(\"Maximal matching size is = \"+res+\"\\n\");\n //log.logln(\"Try to find the optimum!!!\");\n for (Iterator<Node> it = Tools.getNodeList().iterator(); it.hasNext();) {\n MS4Node node = (MS4Node) it.next();\n if(node.isMarried()){\n c+=1;\n }\n node.setFindTheOptimum();\n node.end_flag = false;\n }\n this.printTheMarriages();\n //log.logln(\"Total number of nodes married = \"+c);\n this.tempFourth = res;\n }\n if(this.fourth_algorithm && (res=this.checkingIfAllNodesHasFinished())!=-1 && !this.approximazion_alg){\n Tools.appendToOutput(\"RES ---->\"+res+\"\\n\");\n for(Iterator<Node> it = Tools.getNodeList().iterator();it.hasNext();){\n MS4Node node = (MS4Node)it.next();\n if(node.isSecondMatchDone()){\n //Tools.appendToOutput(\"**NODE with a success in MATCH SECOND ==\"+node.ID+\" \\n\");\n node.setColorToEdgeAndNodes(Color.BLACK, Tools.getNodeByID(node.pointingNode));\n Tools.getNodeByID(node.pointingNode).setColor(node.defaultColor);\n node.setColorToEdgeAndNodes(Color.MAGENTA, Tools.getNodeByID(node.getP_v()));\n ((MS4Node)Tools.getNodeByID(node.getP_v())).isMarried = true;\n MS4Node married = (MS4Node)Tools.getNodeByID(node.getPointingNode());\n married.setColorToEdgeAndNodes(Color.MAGENTA,Tools.getNodeByID(married.getP_v()));\n ((MS4Node)Tools.getNodeByID(married.getP_v())).isMarried = true;\n }\n }\n Integer newRes = checkingIfAllNodesHasFinished();\n Tools.appendToOutput(\"Approx algorithm converge in '\" + Tools.getGlobalTime() + \"'Steps'\\n\");\n Tools.appendToOutput(\"New Maximal matching size is = \"+newRes+\" so improved by \"+(newRes-tempFourth)+\"\\n\");\n //log.logln(\"--------------------APPROX RESULT-----------------------------\");\n Integer count = 0;\n for(Iterator<Node> it = Tools.getNodeList().iterator();it.hasNext();){\n MS4Node node = (MS4Node)it.next();\n if(node.isMarried()) {\n count++;\n }\n }\n this.printTheMarriages();\n //log.logln(\"----------------NUMBER OF MARRIED : \"+count+\"-----------------------------\");\n this.approximazion_alg = true;\n break;\n }\n case 5:\n if ((res=this.checkingIfAllNodesHasFinished())!=-1 && !this.fifth_algorithm) {\n this.fifth_algorithm = true;\n Tools.appendToOutput(\"Algorithm3_probabilistic converge in '\" + Tools.getGlobalTime() + \"'Steps'\\n\");\n Tools.appendToOutput(\"Algorithm3_probabilistic find this size of max matching \" + res + \"\\n\");\n }\n\n }\n }\n }", "void setCost(double cost);", "public OptimismPessimismCalculator() {\n mostPositive = 0;\n mostPositiveDoc = null;\n mostNegative = 0;\n mostNegativeDoc = null;\n biggestDifference = 0;\n biggestDifferenceDoc = null;\n \n publisherOptimism = new HashMap<>();\n publisherPessimism = new HashMap<>();\n regionOptimism = new HashMap<>();\n regionPessimism = new HashMap<>();\n dayOptimism = new HashMap<>();\n dayPessimism = new HashMap<>();\n weekdayOptimism = new HashMap<>();\n weekdayPessimism = new HashMap<>();\n }", "boolean isSetMaximum();", "protected abstract double getDefaultCost();", "public void setPricePerSquareFoot(double newPricePerSquareFoot){\nif(newPricePerSquareFoot > 0){\npricePerSquareFoot = newPricePerSquareFoot;\n}\n}", "public int getOptimalNumNearest();", "public void resetHints() {//use this whenever there's a new graph, or whenever a new game is started!\r\n CalculateScore.hintOneUsed = false;\r\n CalculateScore.hintTwoUsed = false;\r\n CalculateScore.hintThreeUsed = false;\r\n CalculateScore.hintFourUsed = false;\r\n CalculateScore.hintFiveUsed = false;\r\n CalculateScore.hintSixUsed = false;\r\n CalculateScore.hintSevenUsed = false;\r\n CalculateScore.hintEightUsed = false;\r\n CalculateScore.hintNineUsed = false;\r\n hint4 = false;\r\n hint9 = false;\r\n }", "public abstract Boolean higherScoreBetter();", "public boolean isMaximumBetter(){\n return false;\n }", "void setFitnessScore(double score){\n fitnessScore = score;\n }", "public void setOptics(boolean value) {\n this.optics = value;\n }", "@AbstractCustomGlobal.GlobalMethod(menuText=\"Set Threshold Probability\")\n public void setThreshold() {\n if(Tools.getGlobalTime()!=0){\n JOptionPane.showMessageDialog(null, \"You can change this probability only when the simulation start\",\"Alert\", JOptionPane.INFORMATION_MESSAGE);\n return;\n }\n String answer = JOptionPane.showInputDialog(null, \"Set the probability that a node can be selected to run.\");\n // Show an information message\n try{\n double k = Double.parseDouble(answer);\n Iterator<Node> it = Tools.getNodeList().iterator();\n while(it.hasNext()){\n Node n = it.next();\n if(n.getClass() == MSNode.class){\n MSNode n1 = (MSNode)n;\n n1.setThresholdProbability(k);\n }\n if(n.getClass() == MS2Node.class){\n MS2Node n1 = (MS2Node)n;\n n1.setThresholdProbability(k);\n }\n }\n JOptionPane.showMessageDialog(null, \"Well done you have set this value:\"+k,\"Notice\", JOptionPane.INFORMATION_MESSAGE);\n }catch(NumberFormatException e){\n JOptionPane.showMessageDialog(null, \"You must insert a valid double \", \"Alert\", JOptionPane.INFORMATION_MESSAGE);\n }\n }", "Object getBest();", "private void notEligibleForRealMin() {\n eligibleForRealMin = false;\n }", "void setMortgaged(boolean mortgaged);", "public void checkBestScoreAndChangeIt() {\n \tbestTime = readPreference(difficulty);\n \t\n \tif (currentTime < bestTime) {\n \t\tbestTime = currentTime;\n \t\tsavePreference(bestTime, difficulty);\n \t}\n }", "public int getWorth() { return 1; }", "public boolean adjust_satisfy(int satisfy) {\n boolean flag = false;\n switch (satisfy) {\n case 0: {//none satisfied\n this.relax_cpu += 0.1;\n this.relax_memory += 0.1;\n this.relax_qpi += 0.1;\n this.relax_cores += 1;\n break;\n }\n case 1: {//only CPU satisfied\n this.relax_memory += 0.1;\n this.relax_qpi += 0.1;\n this.relax_cores += 1;\n break;\n }\n case 2: {//only memory satisfied\n this.relax_cpu += 0.1;\n this.relax_qpi += 0.1;\n this.relax_cores += 1;\n break;\n }\n case 4: {//only qpi satisfied\n this.relax_memory += 0.1;\n this.relax_cpu += 0.1;\n this.relax_cores += 1;\n break;\n }\n case 8: {//only cores satisfied\n this.relax_cpu += 0.1;\n this.relax_memory += 0.1;\n this.relax_qpi += 0.1;\n }\n case 3: {//cpu and memory satisfied\n this.relax_qpi += 0.1;\n this.relax_cores += 1;\n break;\n }\n case 5: {//cpu and qpi satisfied\n this.relax_memory += 0.1;\n this.relax_cores += 1;\n break;\n }\n case 6: {//memory and qpi satisfied\n this.relax_cpu += 0.1;\n this.relax_cores += 1;\n break;\n }\n case 7: {//all except cores\n this.relax_cores += 1;\n break;\n }\n case 9: {//cpu and cores satisfied\n this.relax_qpi += 0.1;\n this.relax_memory += 0.1;\n break;\n }\n case 10: {//memory and cores satisfied\n this.relax_cpu += 0.1;\n this.relax_qpi += 0.1;\n break;\n }\n case 11: {//all except qpi\n this.relax_qpi += 0.1;\n break;\n }\n case 12: {//qpi and cores satisfied\n this.relax_cpu += 0.1;\n this.relax_memory += 0.1;\n break;\n }\n case 13: {//all except memory\n this.relax_memory += 0.1;\n break;\n }\n case 14: {//all except cpu\n this.relax_cpu += 0.1;\n break;\n }\n }\n\n// if (this.relax_cpu > 1 || this.relax_memory > 1.5 || this.relax_qpi > 1.5) {\n// SOURCE_RATE = SOURCE_RATE * 0.9;\n// flag = true;\n// }\n\n// if (this.relax_cpu > 2) {\n// this.relax_cpu = 2;\n// }\n// if (this.relax_memory > 2) {\n// this.relax_memory = 2;\n// }\n// if (this.relax_qpi > 2) {\n// this.relax_qpi = 2;\n// }\n\n setRelax_cpu(this.relax_cpu);\n setRelax_memory(this.relax_memory);\n setRelax_qpi(this.relax_qpi);\n setRelax_cores(this.relax_cores);\n return flag;\n }", "public void setFinalSolution() {\r\n for(int i=0; i<Config.numberOfSeeds;i++) {\r\n// this.seeds[i].setDurationMilliSec(GLowestState.getDwelltimes()[i]);\r\n// Cur_state[i] = GLowestState.getDwelltimes()[i];\r\n Cur_state[i] = this.seeds[i].getDurationMilliSec();\r\n }\r\n if (Config.SACostFunctionType==3) {\r\n setCur_cost(costCUR());\r\n }\r\n if (Config.SACostFunctionType==2) {\r\n setCur_cost(costCURfinal());\r\n }\r\n if (Config.SACostFunctionType==1) {\r\n setCur_cost(costCURsuper());\r\n }\r\n if (Config.SACostFunctionType==0) {\r\n setCur_cost(costCURsuperfinal());\r\n }\r\n }", "protected void setCost(double cost) \r\n\t{\tthis.cost = cost;\t}", "protected boolean update_best_value(Knapsack knapsack) {\n iteration+=1;\n if (knapsack.get_value()>best_value)\n {\n best_value=knapsack.get_value();\n return true;\n }\n if (iteration%100000==0)\n System.out.println(\"iteration:\"+iteration+\" time:\"+System.currentTimeMillis()+\n \" best_value:\"+best_value);\n return false;\n }", "protected final void calcScore()\n {\n\n m_score = SCORE_OTHER;\n\n if (null == m_targetString)\n calcTargetString();\n }", "@Override\r\n\tpublic void setCost(double newCost) {\n\r\n\t}", "public void evaluate()\r\n {\r\n\tdouble max = ff.evaluate(chromos.get(0),generation());\r\n\tdouble min = max;\r\n\tdouble sum = 0;\r\n\tint max_i = 0;\r\n\tint min_i = 0;\r\n\r\n\tdouble temp = 0;\r\n\r\n\tfor(int i = 0; i < chromos.size(); i++)\r\n\t {\r\n\t\ttemp = ff.evaluate(chromos.get(i),generation());\r\n\t\tif(temp > max)\r\n\t\t {\r\n\t\t\tmax = temp;\r\n\t\t\tmax_i = i;\r\n\t\t }\r\n\r\n\t\tif(temp < min)\r\n\t\t {\r\n\t\t\tmin = temp;\r\n\t\t\tmin_i = i;\r\n\t\t }\r\n\t\tsum += temp;\r\n\t }\r\n\r\n\tbestFitness = max;\r\n\taverageFitness = sum/chromos.size();\r\n\tworstFitness = min;\r\n\tbestChromoIndex = max_i;;\r\n\tworstChromoIndex = min_i;\r\n\tbestChromo = chromos.get(max_i);\r\n\tworstChromo = chromos.get(min_i);\r\n\t\r\n\tevaluated = true;\r\n }", "public void setCost(int cost) {\n/* 79 */ Validate.isTrue((cost > 0), \"The cost must be greater than 0!\");\n/* */ \n/* 81 */ this.cost = cost;\n/* */ }", "@Test\r\n\tpublic void testChangeTheOriginalChooseIsBetterThanNotChange() {\r\n\t\tMontyHall monty = new MontyHall();\r\n\t\tmonty.setChanged(true);\r\n\t\tfloat rateOfChange = monty.rateOfWinThePrizeWithChangeTheOriginalChoose(10);\r\n\t\tmonty.setChanged(false);\r\n\t\tfloat rateOfNotChange = monty.rateOfWinThePrizeWithoutChangeTheOriginalChoose(10);\r\n\t\tassertTrue(rateOfChange > rateOfNotChange);\r\n\r\n\t\t/* count is 100 */\r\n\t\tmonty.setChanged(true);\r\n\t\trateOfChange = monty.rateOfWinThePrizeWithChangeTheOriginalChoose(100);\r\n\t\tmonty.setChanged(false);\r\n\t\trateOfNotChange = monty.rateOfWinThePrizeWithoutChangeTheOriginalChoose(100);\r\n\t\tassertTrue(rateOfChange > rateOfNotChange);\r\n\r\n\t\t/* count is 10000 */\r\n\t\tmonty.setChanged(true);\r\n\t\trateOfChange = monty.rateOfWinThePrizeWithChangeTheOriginalChoose(10000);\r\n\t\tmonty.setChanged(false);\r\n\t\trateOfNotChange = monty.rateOfWinThePrizeWithoutChangeTheOriginalChoose(10000);\r\n\t\tassertTrue(rateOfChange > rateOfNotChange);\r\n\r\n\t\t/* count is 1000000 */\r\n\t\tmonty.setChanged(true);\r\n\t\trateOfChange = monty.rateOfWinThePrizeWithChangeTheOriginalChoose(1000000);\r\n\t\tmonty.setChanged(false);\r\n\t\trateOfNotChange = monty.rateOfWinThePrizeWithoutChangeTheOriginalChoose(1000000);\r\n\t\tassertTrue(rateOfChange > rateOfNotChange);\r\n\t}", "void setGensNoImprovement(int gensNoImprovement);", "public void set_AllSpreadIndexToOne(){\r\n\t//test to see if the fuel moistures are greater than 33 percent.\r\n\t//if they are, set their index value to 1\r\n\tif ((FFM>33)){ // fine fuel greater than 33?\r\n\t\tGRASS=0; \r\n\t\tTIMBER=0;\r\n\t}else{\r\n\t\tTIMBER=1;\r\n\t}\r\n}", "@Input\n public boolean isOptimized() {\n return optimize;\n }", "public boolean hasObjective(){ return this.hasParameter(1); }", "void setNilWagerMinimum();", "public long getBestSolutionTime();", "@Override\n public boolean isMaximum(){\n return super.isMaximum() || speciallyMaximized;\n }", "public void setUsageWeighted(boolean aUsageWeighted) {\n usageWeighted = aUsageWeighted; \n }", "public int getBestValue() {\n return bestValue;\n }", "private void findSmallestCost() {\n int best = 0;\n fx = funFitness[0];\n for (int i = 1; i < population; i++) {\n if (funFitness[i] < fx) {\n fx = funFitness[i];\n best = i;\n }\n }\n //System.arraycopy(currentPopulation[best], 0, bestSolution, 0, dimension);\n copy(bestSolution, currentPopulation[best]);\n }", "double getSolutionCost();", "private void updatePreferences() {\n\n /* Update preferences of the agent */\n patientAgent.updatePreferredAllocations();\n List<AllocationState> newPreferredAllocations = patientAgent.getAllocationStates();\n preferredAllocationsIterator = patientAgent.getAllocationStates().iterator();\n currentSize = patientAgent.getAllocationStates().size();\n\n if (newPreferredAllocations.isEmpty() || iterationsWithNoImprovementCount >= maxIterationsNum) {\n /* We shut down the behaviour if there are no better appointments\n or we exceeded the possible number of non-improving algorithm iterations\n */\n isHappyWithAppointment = true;\n\n } else if (newPreferredAllocations.size() >= currentSize) {\n\n /* No improvement has been made in our algorithm */\n iterationsWithNoImprovementCount++;\n } else {\n\n /* Improved the appointment, resetting the counter */\n iterationsWithNoImprovementCount = 0;\n }\n\n\n }", "protected void setStateToLowestEnergy() {\n\tpoints = bestEverPoints;\n\n\t// make a copy of the best points\n\tbestEverPoints = getPoints();\n\n\tbuildEnergyMatrix();\n\tstateEnergy();\n }", "boolean hasMaxMP();", "boolean hasMaxMP();", "boolean hasMaxMP();", "boolean hasMaxMP();", "boolean hasMaxMP();", "boolean hasMaxMP();", "@Test\n\tpublic void testGA() {\n\t\tGenetic ga = new Genetic(100, 500, 10, SelectionType.TOURNAMENT , 0.6, 0.1);\n\t\tOptimumSolution os = ga.run();\n\t\tSystem.out.println(os.getSolution());\n\t}", "@Override\n public double solutionWeight(){\n return solutionweight;\n }", "@Override\n\tpublic void setHungry() {\n\t\t\n\t}", "@Override\n\tprotected void setCost(double cst) {\n\t\t\n\t}", "void calcFittest(){\n System.out.println(\"Wall hugs\");\n System.out.println(this.wallHugs);\n\n System.out.println(\"Freedom points\");\n System.out.println(this.freedomPoints);\n\n System.out.println(\"Visited points\");\n System.out.println(this.vistedPoints);\n\n this.fitnessScore = freedomPoints - wallHugs - vistedPoints;\n System.out.println(\"Individual fit score: \" + fitnessScore);\n }", "protected void updateBest() {\n\t\tbestScoreView.setText(\"Best: \" + bestScore);\n\t}", "public double bestFitness()\r\n {\r\n\treturn bestFitness;\r\n }", "@Test\r\n\tpublic void calculMetricInferiorTeacherBetterScoreButNoLostPointsTest() {\r\n\t\tAssert.assertEquals(UtilCalculGrade.calculMetricInferior(new ModelValue(25f, 1f), 12f, 13f), new Float(0));\r\n\t}", "public void setGov(int value);", "public int FitVal(){\r\n return _FitVal;\r\n}", "public void setOptimized(boolean optimize) {\n this.optimize = optimize;\n }", "@Override\n\tpublic void verkaufen() {\n\t\tif( (bestand - abgenommeneMenge) < 0)\n\t\t\tthis.setBestand(0);\n\t\telse\n\t\t\tthis.setBestand(this.getBestand() - abgenommeneMenge);\n//\t\tSystem.out.println(\"Bestand danach:\" + bestand);\n\t}", "@Test\r\n\tpublic void calculMetricInferiorStudentBetterScoreTest() {\r\n\t\tAssert.assertEquals(UtilCalculGrade.calculMetricInferior(new ModelValue(25f, 2f), 12f, 8f), new Float(0));\r\n\t}", "@Override\n\tpublic void makeDecision() {\n\t\tint powerMax = (int)(initPower) / 100;\n\t\tint powerMin = (int)(initPower * 0.3) / 100;\n\n\t\t// The value is calculated randomly from 0 to 10% of the initial power\n\t\tRandom rand = new Random();\n\t\tint actualPower = rand.nextInt((powerMax - powerMin) + 1) + powerMin;\n\t\tanswer.setConsumption(actualPower);\n\t}", "protected void adjustToolForMode() {\n if(!staticOptimizationMode) return;\n // Check if have non-inverse dynamics analyses, or multiple inverse dynamics analyses\n boolean foundOtherAnalysis = false;\n boolean advancedSettings = false;\n int numFoundAnalyses = 0;\n InverseDynamics inverseDynamicsAnalysis = null;\n int numStaticOptimizationAnalyses = 0;\n StaticOptimization staticOptimizationAnalysis = null;\n if (false){\n // Since we're not using the model's actuator set, clear the actuator set related fields\n analyzeTool().setReplaceForceSet(true);\n analyzeTool().getForceSetFiles().setSize(0);\n // Mode is either InverseDynamics or StaticOptimization\n for(int i=analyzeTool().getAnalysisSet().getSize()-1; i>=0; i--) {\n Analysis analysis = analyzeTool().getAnalysisSet().get(i);\n //System.out.println(\" PROCESSING ANALYSIS \"+analysis.getType()+\",\"+analysis.getName());\n if(InverseDynamics.safeDownCast(analysis)==null) {\n foundOtherAnalysis = true;\n analyzeTool().getAnalysisSet().remove(i);\n } else{\n numFoundAnalyses++;\n if(numFoundAnalyses==1) {\n inverseDynamicsAnalysis = InverseDynamics.safeDownCast(analysis);\n if(inverseDynamicsAnalysis.getUseModelForceSet() || !inverseDynamicsAnalysis.getOn())\n advancedSettings = true;\n } else {\n analyzeTool().getAnalysisSet().remove(i);\n }\n }\n }\n if(inverseDynamicsAnalysis==null) {\n inverseDynamicsAnalysis = InverseDynamics.safeDownCast(new InverseDynamics().clone());\n setAnalysisTimeFromTool(inverseDynamicsAnalysis);\n //analyzeTool().addAnalysis(inverseDynamicsAnalysis);\n }\n inverseDynamicsAnalysis.setOn(true);\n inverseDynamicsAnalysis.setUseModelForceSet(false);\n \n }\n else { // StaticOptimization assumed\n // Mode is StaticOptimization\n for(int i=analyzeTool().getAnalysisSet().getSize()-1; i>=0; i--) {\n Analysis analysis = analyzeTool().getAnalysisSet().get(i);\n //System.out.println(\" PROCESSING ANALYSIS \"+analysis.getType()+\",\"+analysis.getName());\n if(StaticOptimization.safeDownCast(analysis)==null) {\n foundOtherAnalysis = true;\n analyzeTool().getAnalysisSet().remove(i);\n } else{\n numFoundAnalyses++;\n if(numFoundAnalyses==1) {\n staticOptimizationAnalysis = StaticOptimization.safeDownCast(analysis);\n //if(staticOptimizationAnalysis.getUseModelActuatorSet() || !staticOptimizationAnalysis.getOn())\n // advancedSettings = true;\n } else {\n analyzeTool().getAnalysisSet().remove(i);\n }\n }\n }\n if(staticOptimizationAnalysis==null) {\n staticOptimizationAnalysis = new StaticOptimization(); \n analyzeTool().getAnalysisSet().setMemoryOwner(false);\n analyzeTool().getAnalysisSet().cloneAndAppend(staticOptimizationAnalysis);\n staticOptimizationAnalysis = StaticOptimization.safeDownCast(\n analyzeTool().getAnalysisSet().get(\"StaticOptimization\"));\n }\n staticOptimizationAnalysis.setOn(true);\n staticOptimizationAnalysis.setUseModelForceSet(true);\n analyzeTool().setReplaceForceSet(false);\n }\n if(foundOtherAnalysis || advancedSettings || numFoundAnalyses>1) {\n String message = \"\";\n if(foundOtherAnalysis) message = \"Settings file contained analyses other than requested. The tool will ignore these.\\n\";\n if(numFoundAnalyses>1) message += \"More than one analysis was found. Extras will be ignored.\\n\";\n if(advancedSettings) message += \"Settings file contained an analysis with advanced settings which will be ignored by the tool.\\n\";\n message += \"Please use the analyze tool if you wish to handle different analysis types and advanced analysis settings.\\n\";\n DialogDisplayer.getDefault().notify(new NotifyDescriptor.Message(message, NotifyDescriptor.WARNING_MESSAGE));\n }\n }", "void setMaxValue();", "public void solveSA() {\r\n initState();\r\n for (int ab = 0; ab < Config.NumberOfMetropolisResets; ab++) {\r\n LogTool.print(\"==================== INACTIVE: START CALC FOR OUTER ROUND \" + ab + \"=========================\",\"notification\");\r\n\r\n if (Config.SAverboselvl>1) {\r\n //<editor-fold defaultstate=\"collapsed\" desc=\"My custom code folding\">\r\n LogTool.print(\"SolveSA: Cur_State Read before Metropolis : A)\" + Cur_state[0] + \" B) \" + Cur_state[1] + \" C) \" + Cur_state[2],\"notification\");\r\n LogTool.print(\"Debug: GLS get before loop only once each reset: \" + this.getGlobal_Lowest_state_string(),\"notification\");\r\n LogTool.print(\"Debug: GLC_field get before loop only once each reset: \" + Cur_cost,\"notification\");\r\n LogTool.print(\"Debug: GLC_getter get before loop only once each reset: \" + this.getCur_cost(),\"notification\");\r\n LogTool.print(\"Debug: NXC_field get before loop only once each reset: \" + New_cost,\"notification\");\r\n LogTool.print(\"Debug: NXC_getter get before loop only once each reset: \" + this.getNew_cost(),\"notification\");\r\n //</editor-fold>\r\n }\r\n setCur_cost(costCURsuperfinal()); //One of four possible costNEX variants\r\n //<editor-fold defaultstate=\"collapsed\" desc=\"My custom code folding\">\r\n LogTool.print(\"CUR COST SUPER FINAL \",\"notification\");\r\n LogTool.print(\"SolveSA: Cur_State Read before Metropolis : A)\" + Cur_state[0] + \" B) \" + Cur_state[1] + \" C) \" + Cur_state[2],\"notification\");\r\n LogTool.print(\"Debug: GLS get before loop only once each reset: \" + this.getGlobal_Lowest_state_string(),\"notification\");\r\n LogTool.print(\"Debug: GLC_field get before loop only once each reset: \" + Cur_cost,\"notification\"); \r\n LogTool.print(\"Debug: GLC_getter get before loop only once each reset: \" + this.getCur_cost(),\"notification\");\r\n LogTool.print(\"Debug: NXC_field get before loop only once each reset: \" + New_cost,\"notification\");\r\n LogTool.print(\"Debug: NXC_getter get before loop only once each reset: \" + this.getNew_cost(),\"notification\");\r\n //</editor-fold>\r\n /* [Newstate] with random dwelltimes */\r\n New_state = newstater(); \r\n //<editor-fold defaultstate=\"collapsed\" desc=\"My custom code folding\">\r\n LogTool.print(\"NEW STATE \",\"notification\");\r\n LogTool.print(\"SolveSA: Cur_State Read before Metropolis : A)\" + Cur_state[0] + \" B) \" + Cur_state[1] + \" C) \" + Cur_state[2],\"notification\");\r\n LogTool.print(\"Debug: GLS get before loop only once each reset: \" + this.getGlobal_Lowest_state_string(),\"notification\");\r\n LogTool.print(\"Debug: GLC_field get before loop only once each reset: \" + Cur_cost,\"notification\"); \r\n LogTool.print(\"Debug: GLC_getter get before loop only once each reset: \" + this.getCur_cost(),\"notification\");\r\n LogTool.print(\"Debug: NXC_field get before loop only once each reset: \" + New_cost,\"notification\");\r\n LogTool.print(\"Debug: NXC_getter get before loop only once each reset: \" + this.getNew_cost(),\"notification\");\r\n //</editor-fold>\r\n// newstater();\r\n if (Config.SAverboselvl>1) {\r\n LogTool.print(\"SolveSA: New State before Metropolis: A)\" + New_state[0] + \" B) \" + New_state[1] + \" C) \" + New_state[2],\"notification\");\r\n }\r\n \r\n setNew_cost(costNEXsuperfinal()); //One of four possible costNEX variants\r\n //<editor-fold defaultstate=\"collapsed\" desc=\"My custom code folding\">\r\n LogTool.print(\"NEW COST SUPER FINAL \",\"notification\");\r\n LogTool.print(\"SolveSA: Cur_State Read before Metropolis : A)\" + Cur_state[0] + \" B) \" + Cur_state[1] + \" C) \" + Cur_state[2],\"notification\");\r\n LogTool.print(\"Debug: GLS get before loop only once each reset: \" + this.getGlobal_Lowest_state_string(),\"notification\");\r\n LogTool.print(\"Debug: GLC_field get before loop only once each reset: \" + Cur_cost,\"notification\"); \r\n LogTool.print(\"Debug: GLC_getter get before loop only once each reset: \" + this.getCur_cost(),\"notification\");\r\n LogTool.print(\"Debug: NXC_field get before loop only once each reset: \" + New_cost,\"notification\");\r\n LogTool.print(\"Debug: NXC_getter get before loop only once each reset: \" + this.getNew_cost(),\"notification\");\r\n //</editor-fold>\r\n if (Config.SAverboselvl>1) {\r\n LogTool.print(\"SolveSA: New Cost : \" + New_cost,\"notification\");\r\n }\r\n\r\n /**\r\n * MetropolisLoop\r\n * @param Config.NumberOfMetropolisRounds\r\n */\r\n\r\n for(int x=0;x<Config.NumberOfMetropolisRounds;x++) { \r\n LogTool.print(\"SolveSA Iteration \" + x + \" Curcost \" + Cur_cost + \" Newcost \" + New_cost,\"notification\");\r\n if ((Cur_cost - New_cost)>0) { // ? die Kosten\r\n \r\n if (Config.SAverboselvl>1) {\r\n LogTool.print(\"Fall 1 START\",\"notification\");\r\n }\r\n \r\n if (Config.SAdebug) {\r\n //<editor-fold defaultstate=\"collapsed\" desc=\"My custom code folding\">\r\n LogTool.print(\"SolveSA: (Fall 1) Metropolis NewCost : \" + this.getNew_cost(),\"notification\");\r\n LogTool.print(\"SolveSA: (Fall 1) Metropolis CurCost : \" + this.getCur_cost(),\"notification\");\r\n LogTool.print(\"SolveSA Cost delta \" + (Cur_cost - New_cost) + \" \",\"notification\");\r\n //</editor-fold>\r\n }\r\n Cur_state = New_state;\r\n Cur_cost = New_cost;\r\n if (Config.SAverboselvl>1) {\r\n //<editor-fold defaultstate=\"collapsed\" desc=\"My custom code folding\">\r\n LogTool.print(\"SolveSA: (Fall 1 nach set) Metropolis NewCost : \" + this.getNew_cost(),\"notification\");\r\n LogTool.print(\"SolveSA: (Fall 1 nach set) Metropolis CurCost : \" + this.getCur_cost(),\"notification\");\r\n LogTool.print(\"SolveSA: (Fall 1 nach set): NewState : \" + this.getNew_state_string(),\"notification\");\r\n LogTool.print(\"SolveSA: (Fall 1 nach set): CurState : \" + this.getCur_state_string(),\"notification\");\r\n //</editor-fold>\r\n }\r\n New_state = newstater();\r\n if (Config.SAdebug) {\r\n //<editor-fold defaultstate=\"collapsed\" desc=\"My custom code folding\">\r\n LogTool.print(\"SolveSA C1 after generate: NewCost : \" + this.getNew_cost(),\"notification\");\r\n LogTool.print(\"SolveSA C1 after generate: CurCost : \" + this.getCur_cost(),\"notification\");\r\n LogTool.print(\"SolveSA C1 after generate: NewState : \" + this.getNew_state_string(),\"notification\");\r\n LogTool.print(\"SolveSA C1 after generate: CurState : \" + this.getCur_state_string(),\"notification\");\r\n //</editor-fold>\r\n }\r\n if (Config.SAverboselvl>1) {\r\n LogTool.print(\"Fall 1 STOP \",\"notification\");\r\n }\r\n } else if (Math.exp(-(New_cost - Cur_cost)/temperature)> RandGenerator.randDouble(0.01, 0.99)) {\r\n if (Config.SAverboselvl>1) {\r\n LogTool.print(\"Fall 2 START: Zufallsgenerierter Zustand traegt hoehere Kosten als vorhergehender Zustand. Iteration: \" + x,\"notification\");\r\n }\r\n if (Config.SAdebug) {\r\n //<editor-fold defaultstate=\"collapsed\" desc=\"My custom code folding\">\r\n LogTool.print(\"SolveSA C2 before set: NewCost : \" + this.getNew_cost(),\"notification\");\r\n LogTool.print(\"SolveSA C2 before set: CurCost : \" + this.getCur_cost(),\"notification\");\r\n LogTool.print(\"SolveSA C2 before set: NewState : \" + this.getNew_state_string(),\"notification\");\r\n LogTool.print(\"SolveSA C2 before set: CurState : \" + this.getCur_state_string(),\"notification\");\r\n //</editor-fold>\r\n }\r\n Cur_state = New_state;\r\n Cur_cost = New_cost;\r\n \r\n if (Config.SAdebug) {\r\n //<editor-fold defaultstate=\"collapsed\" desc=\"My custom code folding\">\r\n LogTool.print(\"SolveSA C2 after set: NewCost : \" + this.getNew_cost(),\"notification\");\r\n LogTool.print(\"SolveSA C2 after set: CurCost : \" + this.getCur_cost(),\"notification\");\r\n //</editor-fold>\r\n }\r\n New_state = newstater();\r\n if (Config.SAdebug) {\r\n //<editor-fold defaultstate=\"collapsed\" desc=\"My custom code folding\">\r\n LogTool.print(\"SolveSA C2 after generate: NewCost : \" + this.getNew_cost(),\"notification\");\r\n LogTool.print(\"SolveSA C2 after generate: CurCost : \" + this.getCur_cost(),\"notification\");\r\n LogTool.print(\"SolveSA C2 after generate: NewState : \" + this.getNew_state_string(),\"notification\");\r\n LogTool.print(\"SolveSA C2 after generate: CurState : \" + this.getCur_state_string(),\"notification\");\r\n //</editor-fold>\r\n }\r\n if (Config.SAverboselvl>1) {\r\n LogTool.print(\"Fall 2 STOP: Zufallsgenerierter Zustand traegt hoehere Kosten als vorhergehender Zustand. Iteration: \" + x,\"notification\");\r\n }\r\n } else {\r\n New_state = newstater();\r\n }\r\n temperature = temperature-1;\r\n if (temperature==0) {\r\n break;\r\n }\r\n \r\n setNew_cost(costNEXsuperfinal());\r\n LogTool.print(\"NEW COST SUPER FINAL \",\"notification\");\r\n //<editor-fold defaultstate=\"collapsed\" desc=\"My custom code folding\">\r\n LogTool.print(\"SolveSA: Cur_State Read before Metropolis : A)\" + Cur_state[0] + \" B) \" + Cur_state[1] + \" C) \" + Cur_state[2],\"notification\");\r\n LogTool.print(\"Debug: GLS get before loop only once each reset: \" + this.getGlobal_Lowest_state_string(),\"notification\");\r\n LogTool.print(\"Debug: GLC_field get before loop only once each reset: \" + Cur_cost,\"notification\"); \r\n LogTool.print(\"Debug: GLC_getter get before loop only once each reset: \" + this.getCur_cost(),\"notification\");\r\n LogTool.print(\"Debug: NXC_field get before loop only once each reset: \" + New_cost,\"notification\");\r\n LogTool.print(\"Debug: NXC_getter get before loop only once each reset: \" + this.getNew_cost(),\"notification\");\r\n//</editor-fold>\r\n if ((x==58)&(ab==0)) {\r\n LogTool.print(\"Last internal Iteration Checkpoint\",\"notification\");\r\n if ((Cur_cost - New_cost)>0) {\r\n Cur_state = New_state;\r\n Cur_cost = New_cost; \r\n }\r\n }\r\n if ((x>58)&(ab==0)) {\r\n LogTool.print(\"Last internal Iteration Checkpoint\",\"notification\");\r\n }\r\n }\r\n //<editor-fold defaultstate=\"collapsed\" desc=\"Auskommentierter GLowestState Object Class\">\r\n// if (ab==9) {\r\n// double diff=0;\r\n// }\r\n \r\n // Hier wird kontrolliert, ob das minimalergebnis des aktuellen\r\n // Metropolisloops kleiner ist als das bsiher kleinste\r\n \r\n// if (Cur_cost<Global_lowest_cost) {\r\n// this.setGlobal_lowest_cost(Cur_cost);\r\n// GlobalState GLowestState = new GlobalState(this.Cur_state);\r\n// String rGLSOvalue = GLowestState.getGlobal_Lowest_state_string();\r\n// LogTool.print(\"GLS DEDICATED OBJECT STATE OUTPUT -- \" + GLowestState.getGlobal_Lowest_state_string(),\"notification\");\r\n// this.setGlobal_Lowest_state(GLowestState.getDwelltimes());\r\n // LogTool.print(\"READ FROM OBJECT OUTPUT -- \" + this.getGlobal_Lowest_state_string(),\"notification\");\r\n// LogTool.print(\"DEBUG: CurCost direct : \" + this.getCur_cost(),\"notification\"); \r\n// LogTool.print(\"Debug: Cur<global CurState get : \" + this.getCur_state_string(),\"notification\");\r\n// LogTool.print(\"Debug: Cur<global GLS get : \" + this.getGlobal_Lowest_state_string(),\"notification\");\r\n// this.setGlobal_Lowest_state(this.getCur_state(Cur_state));\r\n// LogTool.print(\"Debug: Cur<global GLS get after set : \" + this.getGlobal_Lowest_state_string(),\"notification\"); \r\n// }\r\n //</editor-fold>\r\n LogTool.print(\"SolveSA: Outer Iteration : \" + ab,\"notification\");\r\n LogTool.print(\"SolveSA: Last Calculated New State/Possible state inner loop (i.e. 99) : \" + this.getNew_state_string(),\"notification\");\r\n// LogTool.print(\"SolveSA: Best Solution : \" + this.getCur_state_string(),\"notification\");\r\n LogTool.print(\"SolveSA: GLS after all loops: \" + this.getGlobal_Lowest_state_string(),\"notification\");\r\n LogTool.print(\"SolveSA: LastNewCost, unchecked : \" + this.getNew_cost(),\"notification\");\r\n LogTool.print(\"SolveSA: CurCost : \" + this.getCur_cost() + \"i.e. lowest State of this round\",\"notification\"); \r\n }\r\n // return GLowestState;\r\n }", "public void setHeuristic(int heuristic) {\n\t\tthis.heuristic = heuristic;\n\t}", "@Test\n public void testSubsequentRunsWithPenalizingConstraint() {\n System.out.println(\" - test subsequent runs with penalizing constraint\");\n // set constraint\n problem.addPenalizingConstraint(constraint);\n // create and add listeners\n AcceptedMovesListener l1 = new AcceptedMovesListener();\n AcceptedMovesListener l2 = new AcceptedMovesListener();\n AcceptedMovesListener l3 = new AcceptedMovesListener();\n searchLowTemp.addSearchListener(l1);\n searchMedTemp.addSearchListener(l2);\n searchHighTemp.addSearchListener(l3);\n // perform 3 times as many runs as usual for this harder problem (maximizing objective)\n System.out.format(\" - low temperature (T = %.7f)\\n\", LOW_TEMP);\n multiRunWithMaximumRuntime(searchLowTemp, MULTI_RUN_RUNTIME, MAX_RUNTIME_TIME_UNIT, 3*NUM_RUNS, true, true);\n System.out.format(\" >>> accepted/rejected moves: %d/%d\\n\", l1.getTotalAcceptedMoves(), l1.getTotalRejectedMoves());\n // constraint satisfied ?\n if(problem.getViolatedConstraints(searchLowTemp.getBestSolution()).isEmpty()){\n System.out.println(\" >>> constraint satisfied!\");\n } else {\n System.out.println(\" >>> constraint not satisfied, penalty \"\n + constraint.validate(searchLowTemp.getBestSolution(), data).getPenalty());\n }\n System.out.format(\" - medium temperature (T = %.7f)\\n\", MED_TEMP);\n multiRunWithMaximumRuntime(searchMedTemp, MULTI_RUN_RUNTIME, MAX_RUNTIME_TIME_UNIT, 3*NUM_RUNS, true, true);\n System.out.format(\" >>> accepted/rejected moves: %d/%d\\n\", l2.getTotalAcceptedMoves(), l2.getTotalRejectedMoves());\n // constraint satisfied ?\n if(problem.getViolatedConstraints(searchMedTemp.getBestSolution()).isEmpty()){\n System.out.println(\" >>> constraint satisfied!\");\n } else {\n System.out.println(\" >>> constraint not satisfied, penalty \"\n + constraint.validate(searchMedTemp.getBestSolution(), data).getPenalty());\n }\n System.out.format(\" - high temperature (T = %.7f)\\n\", HIGH_TEMP);\n multiRunWithMaximumRuntime(searchHighTemp, MULTI_RUN_RUNTIME, MAX_RUNTIME_TIME_UNIT, 3*NUM_RUNS, true, true);\n System.out.format(\" >>> accepted/rejected moves: %d/%d\\n\", l3.getTotalAcceptedMoves(), l3.getTotalRejectedMoves());\n // constraint satisfied ?\n if(problem.getViolatedConstraints(searchHighTemp.getBestSolution()).isEmpty()){\n System.out.println(\" >>> constraint satisfied!\");\n } else {\n System.out.println(\" >>> constraint not satisfied, penalty \"\n + constraint.validate(searchHighTemp.getBestSolution(), data).getPenalty());\n }\n }", "@Override\n\tpublic List<Double> getCurrentBest() {\n\t\treturn null;\n\t}", "private boolean isEligibleForRealMin() {\n return eligibleForRealMin;\n }", "@Override\n public int estimatedDistanceToGoal() {\n return manhattan();\n }", "public void setAwayScore(int a);", "Boolean getSearchObjective();", "public void setFitness(int fit)\n {\n this.fitness=fit;\n }", "void setMinValue();", "private void resetStatistics() {\n worst = Integer.MAX_VALUE;\n best = Integer.MIN_VALUE;\n }", "public void solution() {\n\t\t\n\t}", "protected void calcMinMax() {\n }" ]
[ "0.72625905", "0.6952437", "0.68212485", "0.66443896", "0.64388204", "0.6429592", "0.640956", "0.64036924", "0.63240373", "0.62778276", "0.62296873", "0.62058383", "0.61300004", "0.61147934", "0.61113083", "0.61049074", "0.61007696", "0.60574347", "0.60285556", "0.6016987", "0.5982819", "0.5971357", "0.5931744", "0.59061533", "0.5865397", "0.58521503", "0.58325416", "0.58294624", "0.58121336", "0.58024496", "0.5801273", "0.57852954", "0.57841057", "0.5783091", "0.5771004", "0.57640713", "0.57620835", "0.5753896", "0.5750976", "0.5745781", "0.5739428", "0.5715653", "0.571324", "0.56994694", "0.5692218", "0.5674076", "0.5670983", "0.5658843", "0.56554914", "0.565209", "0.56495106", "0.5640946", "0.56381106", "0.56351286", "0.5631857", "0.5618879", "0.55907434", "0.5589788", "0.55794007", "0.55788", "0.55707186", "0.55620235", "0.5559536", "0.5556532", "0.55507576", "0.55494934", "0.55494934", "0.55494934", "0.55494934", "0.55494934", "0.55494934", "0.5540062", "0.55396783", "0.5537266", "0.5524784", "0.5518353", "0.5516033", "0.5514766", "0.5507257", "0.54942596", "0.54906267", "0.5490233", "0.548787", "0.5485611", "0.548108", "0.5468761", "0.5467119", "0.5453016", "0.5450398", "0.544223", "0.5434071", "0.5432987", "0.54317474", "0.54305124", "0.5423717", "0.542185", "0.54133666", "0.54031837", "0.5401521", "0.539828" ]
0.6278299
9
Reset every measure to its default value (mostly 0)
public void reset() { state = SearchState.NEW; objectiveOptimal = false; solutionCount = 0; timeCount = 0; stopStopwatch(); nodeCount = 0; backtrackCount = 0; failCount = 0; restartCount = 0; depth = 0; maxDepth = 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void reset() {\n this.count = 0;\n this.average = 0.0;\n }", "public void reset(){\n value = 0;\n }", "public void clear() {\n\t\tsample.clear();\n\t\tcount.set(0);\n\t\t_max.set(Long.MIN_VALUE);\n\t\t_min.set(Long.MAX_VALUE);\n\t\t_sum.set(0);\n\t\tvarianceM.set(-1);\n\t\tvarianceS.set(0);\n\t}", "public void reset() {\n\n\t\tazDiff = 0.0;\n\t\taltDiff = 0.0;\n\t\trotDiff = 0.0;\n\n\t\tazMax = 0.0;\n\t\taltMax = 0.0;\n\t\trotMax = 0.0;\n\n\t\tazInt = 0.0;\n\t\taltInt = 0.0;\n\t\trotInt = 0.0;\n\n\t\tazSqInt = 0.0;\n\t\taltSqInt = 0.0;\n\t\trotSqInt = 0.0;\n\n\t\tazSum = 0.0;\n\t\taltSum = 0.0;\n\t\trotSum = 0.0;\n\n\t\tcount = 0;\n\n\t\tstartTime = System.currentTimeMillis();\n\t\ttimeStamp = startTime;\n\n\t\trotTrkIsLost = false;\n\t\tsetEnableAlerts(true);\n\n\t}", "public void zeroValues()\n {\n fx = 0.0f;\n fy = 0.0f;\n fz = 0.0f;\n magnitude = 0.0f;\n }", "public final void reset() {\n\t\tscore = 0;\n\t\tlives = 10;\n\t\tshields = 3;\n\t}", "public void reset() {\n\t\tsuper.reset(); // reset the Reportable, too.\n\n\t\tif (_interArrivalTimeActivated && _interArrivalTally != null)\n\t\t\t_interArrivalTally.reset();\n\t\t\n\t\t// really reset the counter value?\n\t\tif (!this.isResetResistant) {\n\t\t\tthis._value = 0;\n \t this._min = this._max = 0;\n\t\t}\n\t}", "public static void Reset(){\n\t\ttstr = 0;\n\t\ttluc = 0;\n\t\ttmag = 0; \n\t\ttacc = 0;\n\t\ttdef = 0; \n\t\ttspe = 0;\n\t\ttHP = 10;\n\t\ttMP = 0;\n\t\tstatPoints = 13;\n\t}", "public void reset() {\n\t\tinit(0, 0, 1, false);\n\t}", "public void reset() {\n\t\tfor (int i = 0; i < stats.size(); i++) {\n\t\t\tstats.get(i).reset();\n\t\t}\n\t}", "public void reset() {\n sum1 = 0;\n sum2 = 0;\n }", "public void clear() {\n _sample.clear();\n _count = 0;\n _max = null;\n _min = null;\n _sum = BigDecimal.ZERO;\n _m = -1;\n _s = 0;\n }", "public void resetPerformanceMetrics() {\n\t\tdetectionModel.getPrimaryDataModel().getAffectiveDataModel().setInterest(0);\n\t\tdetectionModel.getPrimaryDataModel().getAffectiveDataModel().setEngagement(0);\n\t\tdetectionModel.getPrimaryDataModel().getAffectiveDataModel().setStress(0);\n\t\tdetectionModel.getPrimaryDataModel().getAffectiveDataModel().setRelaxation(0);\n\t\tdetectionModel.getPrimaryDataModel().getAffectiveDataModel().setRelaxation(0);\n\t\tdetectionModel.getPrimaryDataModel().getAffectiveDataModel().setExcitement(0);\n\t}", "static public int resetAllCalsToDefault() {\r\n for (Calibration cal : registeredCals) {\r\n cal.reset();\r\n }\r\n return 0;\r\n }", "@Override\n\tpublic void reset() {\n\t\tfor(int i=0; i<mRemainedCounters; i++){\n\t\t\tfinal ICounter counter = this.mCounters.getFirst();\n\t\t\tcounter.reset();\n\t\t\tthis.mCounters.removeFirst();\n\t\t\tthis.mCounters.addLast(counter);\n\t\t}\n\t\tthis.mRemainedCounters = this.mCounters.size();\n\t}", "public void reset() {\n\t\tArrays.fill(distance,0);\n\t\tused.clear();\n\t}", "private void reset() {\n ms = s = m = h = 0;\n actualizar();\n }", "public void reset() {\n/* 54 */ this.count = 0;\n/* 55 */ this.totalTime = 0L;\n/* */ }", "public void reset ()\r\n\t{\r\n\t\tsuper.reset();\r\n\t\tlastSampleTime = 0;\r\n\t\tfirstSampleTime = 0;\r\n\t\tlastSampleSize = 0;\r\n\t}", "public void resetCounters() {\n\t\t//RobotMap.leftEncoder.reset();\n\t\t//RobotMap.rightEncoder.reset();\n\t\tRobotMap.ahrs.zeroYaw();\n\t\tRobotMap.talonLeft.setSelectedSensorPosition(0, 0, 10);\n\t\tRobotMap.talonRight.setSelectedSensorPosition(0, 0, 10);\n\t\tbearing = 0;\n\t}", "public void reset() {\n counters = null;\n counterMap = null;\n counterValueMap = null;\n }", "private void resetValues() {\n\t\ttotalNet = Money.of(Double.valueOf(0.0), currencyCode);\n\t\ttotalVat = Money.of(Double.valueOf(0.0), currencyCode);\n\t\ttotalGross = Money.of(Double.valueOf(0.0), currencyCode);\n\t}", "public void resetScore(){\n Set<String> keys = CalcScore.keySet();\n for(String key: keys){\n CalcScore.replace(key,0.0);\n }\n\n\n\n }", "public void zero() {\n fill(0);\n }", "public void reset() {\n delta = 0.0;\n solucionActual = null;\n mejorSolucion = null;\n solucionVecina = null;\n iteracionesDiferenteTemperatura = 0;\n iteracionesMismaTemperatura = 0;\n esquemaReduccion = 0;\n vecindad = null;\n temperatura = 0.0;\n temperaturaInicial = 0.0;\n tipoProblema = 0;\n alfa = 0;\n beta = 0;\n }", "public void reset() {\n\t\tscore = 0;\n\t}", "public void resetVariables() {\n\t\tArrays.fill(variables, 0.0);\n\t}", "private void resetStats() {\n }", "public final void setZero() {\n \t\n\t\tthis.m00 = 0.0F;\n\t\tthis.m01 = 0.0F;\n\t\tthis.m02 = 0.0F;\n\t\tthis.m10 = 0.0F;\n\t\tthis.m11 = 0.0F;\n\t\tthis.m12 = 0.0F;\n\t\tthis.m20 = 0.0F;\n\t\tthis.m21 = 0.0F;\n\t\tthis.m22 = 0.0F;\n }", "public void reset () {\n\t\tclearField();\n\t\tstep_ = 0;\n\t}", "public static void reset(){\r\n\t\tx=0;\r\n\t\ty=0;\r\n\t}", "public void reset () {\n if (!this.on) {\n return;\n }\n\n this.currentSensorValue = 0;\n }", "public void reset() {\nsuper.reset();\nsetIncrease_( \"no\" );\nsetSwap_( \"tbr\" );\nsetMultrees_( \"no\" );\nsetRatchetreps_(\"200\");\nsetRatchetprop_(\"0.2\");\nsetRatchetseed_(\"0\");\n}", "private void reset () {\n this.logic = null;\n this.lastPulse = 0;\n this.pulseDelta = 0;\n }", "public void reset()\n {\n cantidad = 0;\n suma = 0;\n maximo = 0; \n minimo = 0; \n \n }", "private void resetMass() {\n\t\tsetOperation(\"\");\n\t}", "@Override\n public void resetAllValues() {\n }", "public void reset() {\r\n minX = null;\r\n maxX = null;\r\n minY = null;\r\n maxY = null;\r\n\r\n minIn = null;\r\n maxIn = null;\r\n\r\n inverted = false;\r\n }", "public void reset()\n {\n currentScore = 0;\n }", "public void clear() {\n sumX = 0d;\n sumXX = 0d;\n sumY = 0d;\n sumYY = 0d;\n sumXY = 0d;\n n = 0;\n }", "public void resetStatistics()\n {\n }", "public void reset(){\r\n \ttablero.clear();\r\n \tfalling = null;\r\n \tgameOver = false;\r\n \tlevel = 0;\r\n \ttotalRows = 0;\r\n \tLevelHelper.setLevelSpeed(level, this);\r\n }", "public void resetZealotCounter() {\n persistentValues.summoningEyeCount = 0;\n persistentValues.totalKills = 0;\n persistentValues.kills = 0;\n saveValues();\n }", "public static void resetStatistics()\r\n {\r\n \t//System.out.println ( \"Resetting statistics\");\r\n count_ = 0; \r\n }", "@Override\r\n\tpublic void reset() {\n\t\tsuper.reset();\r\n\t\tthis.setScale(0.75f);\r\n\t}", "public void reset() {\n\t\tpos.tijd = 0;\r\n\t\tpos.xposbal = xposstruct;\r\n\t\tpos.yposbal = yposstruct;\r\n\t\tpos.hoek = Math.PI/2;\r\n\t\tpos.start = 0;\r\n\t\topgespannen = 0;\r\n\t\tpos.snelh = 0.2;\r\n\t\tbooghoek = 0;\r\n\t\tpos.geraakt = 0;\r\n\t\tgeraakt = 0;\r\n\t\t\r\n\t}", "public void reset() {\n\t\tthis.count = 0;\n\t}", "public void setCountToZero() {\r\n \r\n // set count to 0\r\n count = 0;\r\n }", "public static void resetAll() {\n\t\tfor (int x = 0; x < mSensors.size(); x++) {\n\t\t\tmSensors.get(x).reset();\n\t\t}\n\t}", "public void clear () {\n\n\t\tn_vars = 0;\n\t\tn_values = null;\n\t\tmin_probability = DEF_MIN_PROBABILITY;\n\n\t\tpeak_probability = 0.0;\n\t\tpeak_indexes = null;\n\t\ttotal_probability = 0.0;\n\t\tmarginal_probability = null;\n\t\tmarginal_mode_index = null;\n\t\tmarginal_peak_probability = null;\n\t\tmarginal_peak_indexes = null;\n\t\tmarginal_2d_probability = null;\n\t\tmarginal_2d_mode_index = null;\n\n\t\treturn;\n\t}", "private void resetValues() {\n teamAScoreInt = 0;\n teamBScoreInt = 0;\n teamAFoulScoreInt = 0;\n teamBFoulScoreInt = 0;\n }", "public void ResetCounter()\r\n {\r\n counter.setCurrentValue(this.startValue);\r\n }", "public void resetStats(){\n curA = attack;\n curD = defense;\n curSpA = spAttack;\n curSpD = spDefense;\n curS = speed;\n }", "public void reset() {\r\n active.clear();\r\n missioncontrollpieces = GameConstants.PIECES_SET;\r\n rolled = 0;\r\n phase = 0;\r\n round = 0;\r\n action = 0;\r\n }", "public void reset() {\n\t\tcount = 0;\n\t}", "public void reset() {\n _valueLoaded = false;\n _value = null;\n }", "public synchronized final void reset() {\r\n f_index = getDefaultIndex();\r\n f_userSetWidth = -1;\r\n // by default the first column is sorted the others unsorted\r\n f_sort = getDefaultSort();\r\n }", "void Reset() {\n lq = 0;\n ls = 0;\n }", "public void resetNodes() {\n\tmaxX = -100000;\n\tmaxY = -100000;\n\tminX = 100000;\n\tminY = 100000;\n\taverageX = 0;\n\taverageY = 0;\n }", "public void zero() {\r\n\t\tthis.x = 0.0f;\r\n\t\tthis.y = 0.0f;\r\n\t}", "public void resetCounters() {\n setErrorCounter(0);\n setDelayCounter(0);\n }", "protected void resetInternalState() {\n setStepStart(null);\n setStepSize(minStep.multiply(maxStep).sqrt());\n }", "private void resetStatistics() {\n worst = Integer.MAX_VALUE;\n best = Integer.MIN_VALUE;\n }", "void reset()\n {\n reset(values);\n }", "public void reset() {\r\n\t\tready = false;\r\n\t\twitnessed_max_price = 0.0;\r\n\t\t\r\n\t\tfor (int i = 0; i<no_goods; i++)\r\n\t\t\tfor (int j = 0; j<no_bins; j++)\r\n\t\t\t\tmarg_prob[i][j] = 0.0;\r\n\t\t\r\n\t\tmarg_sum = 0;\r\n\t\t\r\n\t\tfor (HashMap<IntegerArray, double[]> p : this.prob)\r\n\t\t\tp.clear();\r\n\r\n\t\tfor (HashMap<IntegerArray, Integer> s : this.sum)\r\n\t\t\ts.clear();\r\n\t\t\r\n\t\tlog.clear();\r\n\t}", "public void resetPoints() {\n points = 0;\n }", "private void reset() {\n // Init-values\n for (int i = 0; i < cells.length; i++) {\n cells[i] = 0;\n }\n\n // Random colors\n for (int i = 0; i < colors.length; i++) {\n colors[i] = Color.color(Math.random(), Math.random(), Math.random());\n }\n\n // mid = 1.\n cells[cells.length / 2] = 1;\n\n // Clearing canvas\n gc.clearRect(0, 0, canvasWidth, canvasHeight);\n }", "public void resetCounters()\n {\n cacheHits = 0;\n cacheMisses = 0;\n }", "public void reset() {\n\t\txD = x;\n\t\tyD = y;\n\t\taction = 0;\n\t\tdir2 = dir;\n\t\tvisibleToEnemy = false;\n\t\tselected = false;\n\t\t\n\t\tif (UNIT_R == true) {\n\t\t\t// dir = 0;\n\t\t} else if (UNIT_G == true) {\n\t\t\t// dir = 180 / 2 / 3.14;\n\t\t}\n\t}", "public void resetZero() {\n\t\tset((byte) (get() & ~(1 << 7)));\n\t}", "public void reset()\n {\n current = 0;\n highWaterMark = 0;\n lowWaterMark = 0;\n super.reset();\n }", "public void reset() {\n\t\t\t\t\r\n\t\t\t}", "public void reset() {\n tpsAttentePerso = 0;\n tpsAttentePerso2 =0;\n \ttotalTime = 0;\n\tnbVisited = 0;\n moyenne =0;\n }", "public void reset() {\n\tthis.pinguins = new ArrayList<>();\n\tthis.pinguinCourant = null;\n\tthis.pret = false;\n\tthis.scoreGlacons = 0;\n\tthis.scorePoissons = 0;\n }", "@Override\r\n\tpublic void reset() {\r\n\t\tsuper.reset();\r\n\t\tresetMomentObservation();\r\n\t\texpectations.reset();\r\n\t}", "public void resetScore() {\n\t\tthis.score = 0;\n\t}", "protected void reset() {\n leftSkier.reset();\n rightSkier.reset();\n }", "public void reset() {\n this.metricsSent.set(0);\n this.eventsSent.set(0);\n this.serviceChecksSent.set(0);\n this.bytesSent.set(0);\n this.bytesDropped.set(0);\n this.packetsSent.set(0);\n this.packetsDropped.set(0);\n this.packetsDroppedQueue.set(0);\n this.aggregatedContexts.set(0);\n }", "public synchronized void reset()\n\t{\n\t\tm_elapsed = 0;\n\t}", "public void reset() {\n monster.setHealth(10);\n player.setHealth(10);\n\n }", "private void resetVarD() {\n width = 0;\n height = 0;\n sizeY = 0;\n sizeCB = 0;\n sizeCR = 0;\n sizeYc = 0;\n sizeCBc = 0;\n sizeCRc = 0;\n iteradorFreq = 0;\n i = 0;\n FreqY = new HashMap<>();\n FreqCB = new HashMap<>();\n FreqCR = new HashMap<>();\n Ydes = new ArrayList<>();\n CBdes = new ArrayList<>();\n CRdes = new ArrayList<>();\n }", "private void reset() {\n darkSquare.reset();\n lightSquare.reset();\n background.reset();\n border.reset();\n showCoordinates.setSelected(resetCoordinates);\n pieceFont.reset();\n }", "private void reset(){\n plotValues.clear();\n xLabels.clear();\n }", "final void reset() {\r\n\t\t\tsp = 0;\r\n\t\t\thp = 0;\r\n\t\t}", "public void clear() {\n\tn = 0;\n\tArrays.fill(sums, 0.0);\n\tArrays.fill(productsSums, 0.0);\n }", "void reset() {\n count = 0;\n\n }", "public void reset() {\r\n\t\tfor(AnalogInput m_analog : mAnalogs)\r\n\t\t{\r\n\t\t\tif (m_analog != null) {\r\n\t\t\t\tm_analog.resetAccumulator();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void reset () {}", "public void set_AllSpreadIndexToZero(){\r\n\tGRASS=0; \r\n\tTIMBER=0;\r\n}", "@Override\r\n\tpublic void reset() {\n\t\tthis.dcn = null;\r\n\t\tthis.pairs.clear();\r\n\t\tthis.successfulCount = 0;\r\n\t\tthis.failedCount = 0;\r\n\t\tthis.metrics.clear();\r\n\t}", "private void reset() {\n\t\tfor(int i = 0; i < 5; i++) {\n\t\t\treactantAmt[i] = 0;\n\t\t\tproductAmt[i] = 0;\n\t\t\treactantMM[i] = 0;\n\t\t\tproductMM[i] = 0;\n\t\t\treactantMoles[i] = 0;\n\t\t\tproductMoles[i] = 0;\n\t\t\tfinalMolReactant[i] = 0;\n\t\t\tfinalMolProduct[i] = 0;\n\t\t\tremove();\n\t\t}\n\t}", "private void reset() {\n }", "void unset() {\n size = min = pref = max = UNSET;\n }", "private void reset() {\n //todo test it !\n longitude = 0.0;\n latitude = 0.0;\n IDToday = 0L;\n venVolToday = 0L;\n PM25Today = 0;\n PM25Source = 0;\n DBCanRun = true;\n DBRunTime = 0;\n isPMSearchRunning = false;\n isLocationChanged = false;\n isUploadRunning = false;\n refreshAll();\n locationInitial();\n DBInitial();\n sensorInitial();\n }", "private void reset() {\n\t\tsnake.setStart();\n\n\t\tfruits.clear();\n\t\tscore = fruitsEaten = 0;\n\n\t}", "public void reset() {\n solving = false;\n length = 0;\n checks = 0;\n }", "public void reset () {\n lastSave = count;\n count = 0;\n }", "public void reset() {\n\n\t}", "protected void reset () {\n for (Field field : this.map) {\n this.table.putNumber(field.getName(), field.getDefaultValue());\n }\n }", "public void reset()\n {\n setLastItem(NOTHING_HANDLED);\n for (int i = 0; i < counters.length; i++)\n {\n counters[i] = 0;\n }\n for (int j = 0; j < expected.length; j++)\n {\n expected[j] = ITEM_DONT_CARE;\n }\n }", "public void reset() {\n xmin = Float.MAX_VALUE;\n xmax = -Float.MAX_VALUE;\n ymin = Float.MAX_VALUE;\n ymax = -Float.MAX_VALUE;\n zmin = Float.MAX_VALUE;\n zmax = -Float.MAX_VALUE;\n }" ]
[ "0.74109083", "0.7355615", "0.7297729", "0.7166485", "0.7120414", "0.71105325", "0.7089829", "0.7070757", "0.7047723", "0.7036717", "0.70267314", "0.70260215", "0.70162404", "0.6988081", "0.69698656", "0.6929149", "0.6925678", "0.6918592", "0.69074494", "0.68974185", "0.68920356", "0.68917376", "0.6843973", "0.68325317", "0.6829126", "0.68265164", "0.6810577", "0.6807895", "0.6795748", "0.67930347", "0.67829955", "0.67673707", "0.6761503", "0.6746381", "0.67443687", "0.67275244", "0.6726899", "0.6726642", "0.6719441", "0.67176783", "0.67115915", "0.6702029", "0.6697513", "0.6689758", "0.6669806", "0.6664773", "0.66618925", "0.6658459", "0.66550833", "0.6635421", "0.6630699", "0.66104007", "0.6609803", "0.65935254", "0.6591274", "0.6586286", "0.6578732", "0.6577021", "0.6576096", "0.65722233", "0.6569194", "0.6562863", "0.65584433", "0.65546376", "0.65544313", "0.6552079", "0.6533779", "0.653317", "0.65331197", "0.65289545", "0.65258944", "0.6508869", "0.6499349", "0.64993143", "0.6491886", "0.6489424", "0.64764667", "0.6475267", "0.64691275", "0.646454", "0.6463692", "0.64622176", "0.64573085", "0.6451536", "0.64482653", "0.64478", "0.64476013", "0.6445448", "0.64429027", "0.6442483", "0.6442467", "0.6441359", "0.64410144", "0.6437745", "0.6425784", "0.64179546", "0.6416664", "0.64160794", "0.64089036", "0.63983136", "0.6391677" ]
0.0
-1
// INCREMENTERS // // increment node counter
public final void incNodeCount() { nodeCount++; if (depth > maxDepth) { maxDepth = depth; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void incrementCounter()\r\n\t{\r\n\t\tthis.counter++;\r\n\t}", "private void increase(String[] arguments) {\n\t\ttry { \n\t\t\tlastInsertedNode = null;\n\t\t\tint ID = Integer.parseInt(arguments[1]);\n\t int m = Integer.parseInt(arguments[2]);\n\t Node curr = searchID(root, ID);\n\t if(curr != null)\n\t {\n\t \tcurr.count += m;\n\t \tSystem.out.printf(\"%d\\n\", curr.count);\n\t }\n\t else\n\t {\n\t \tinsertNode(ID, m);\n\t \tSystem.out.printf(\"%d\\n\", lastInsertedNode.count);\n\t }\n\t } catch(NumberFormatException e) { \n\t System.out.println(\"Argument not an Integer\");; \n\t }\n\t}", "public void incCounter()\n {\n counter++;\n }", "public void inc(){\n this.current += 1;\n }", "private static void setCounter() {++counter;}", "void incrementCount();", "public void incCount() { }", "public void incCounter(){\n counter++;\n }", "public void inc(String key) {\n if (!keyMap.containsKey(key)) {\n keyMap.put(key, 1);\n DLinkedListNode node = countMap.get(1);\n System.out.println(node);\n if (node == null) {\n node = new DLinkedListNode(1);\n countMap.put(1, node);\n dll.insertAfter(dll.head, node);\n }\n node.keySet.add(key);\n }\n else {\n int count = keyMap.get(key); \n DLinkedListNode oldNode = countMap.get(count);\n oldNode.keySet.remove(key);\n count++;\n keyMap.put(key, count);\n DLinkedListNode newNode = countMap.get(count);\n if (newNode == null) {\n newNode = new DLinkedListNode(count);\n countMap.put(count, newNode);\n dll.insertAfter(oldNode, newNode);\n }\n newNode.keySet.add(key);\n if (oldNode.keySet.size() == 0) {\n dll.remove(oldNode);\n countMap.remove(oldNode.count);\n }\n }\n }", "void incCount() {\n ++refCount;\n }", "public void counter(Topology tp, Node node)\n {\n index[x] = node.getID();\n x++;\n if (x > 1)\n {\n addlink(tp);\n }\n }", "public void UpNumberOfVisitedNodes() {\n NumberOfVisitedNodes++;\n }", "public void increment() {\n increment(1);\n }", "public void inc() {\n inc(1);\n }", "public void incrRefCounter() {\n\t\tthis.refCounter++;\n\t}", "void increase();", "void increase();", "public void incrementRefusals() {\n\t}", "public int my_node_count();", "public void incrementCount() {\n\t\tcount++;\n\t}", "private void incTag() {\n long id = tagId(tag[th()]); // 1\n tag[th()] = newTag(id+1); // 2\n }", "public static int numberOfNodes() { return current_id; }", "public void incrementCount(){\n count+=1;\n }", "int getNodeCount();", "int getNodeCount();", "public void increase() {\r\n\r\n\t\tincrease(1);\r\n\r\n\t}", "public void Increase(int key, int incVal){\n\t\tNode res = increaseKey(root,key,incVal);\n\t\tif(res==nil){\n\t\t\tinsert(key,incVal);\n\t\t\tres = getNode(root,key);\n\t\t\tSystem.out.println(res.count);\n\t\t}else{\n\t\t\n\t\t\tSystem.out.println(res.count);\n\t\t}\n\t}", "public void increment() {\n items++;\n }", "public void increment(){\n value+=1;\n }", "int nodeCount();", "public void IncrementCounter()\r\n {\r\n \tsetCurrentValue( currentValue.add(BigInteger.ONE)); \r\n \r\n log.debug(\"counter now: \" + currentValue.intValue() );\r\n \r\n }", "private void counting(MyBinNode<Type> r){\n if(r != null){\n this.nodes++;\n this.counting(r.left);\n this.counting(r.right);\n }\n }", "public void incrementCount() {\n count++;\n }", "public short getNextNodeID() {\n\t\treturn nodeIdCounter++;\n\t}", "@Override\n public synchronized void increment() {\n count++;\n }", "public void inc(String key) {\n\t\tif(map.containsKey(key)){\n\t\t\tNode n=map.get(key);\n\t\t\tn.val++;\n\t\t\tmoveToHead(n);\n\t\t}\n\t\telse{\n\t\t\tNode n=new Node(key, 1);\n\t\t\tmap.put(key, n);\n\t\t\tinsert(n, tail);\n\t\t}\n\t}", "private static void increaseReference(Counter counter) {\n counter.advance(1);\n }", "public int counter (){\n return currentID;\n }", "public void incrementPacketNumber()\n {\n nextPacketNumber++;\n }", "void incrementAddedCount() {\n addedCount.incrementAndGet();\n }", "public DocumentMutation increment(FieldPath path, byte inc);", "public void increaseCount(){\n myCount++;\n }", "public static void incrInsertions() { ++insertions; }", "public static void increment() {\n\t\tcount.incrementAndGet();\n//\t\tcount++;\n\t}", "public void increasecounter() {\n\t\tmPref.edit().putInt(PREF_CONVERTED, counter + 1).commit();\r\n\t}", "public abstract void increment(int delta);", "public void addCount()\n {\n \tcount++;\n }", "@Override\r\n\tpublic int increase() throws Exception {\n\t\treturn 0;\r\n\t}", "public int nodeCounter() {\n\n\t\tDLNode n = head;\n\t\tint nodeCounter = 0;\n\t\twhile (n != null) {\n\t\t\tn = n.next;\n\t\t\tnodeCounter++;\n\t\t}\n\t\treturn nodeCounter;\n\t}", "public void increase()\n {\n setCount(getCount() + 1);\n }", "public void Increase()\n {\n Increase(1);\n }", "public void setIncrement(Integer increment) {\n this.increment = increment;\n }", "int getNodesCount();", "int getNodesCount();", "private synchronized void increment() {\n count++;\n atomicInteger.incrementAndGet();\n }", "public void increment() {\n this.data++;\n }", "protected void incrementCurrent() {\n current++;\n }", "private synchronized void increment() {\n ++count;\n }", "public void increment(){\n\t\twordCount += 1;\n\t}", "public static void increase(){\n c++;\n }", "public void IncrementCounter()\r\n {\r\n \tif (startAtUsed==false\r\n \t\t\t|| (!counter.encounteredAlready)) {\r\n \t\t// Defer setting the startValue until the list\r\n \t\t// is actually encountered in the main document part,\r\n \t\t// since otherwise earlier numbering (using the\r\n \t\t// same abstract number) would use this startValue\r\n \tcounter.setCurrentValue(this.startValue); \r\n \tlog.debug(\"not encounteredAlready; set to startValue \" + startValue);\r\n \tcounter.encounteredAlready = true;\r\n \tstartAtUsed = true;\r\n \t}\r\n counter.IncrementCounter();\r\n }", "private void increment() {\n for (int i=0; i < 10000; i++) {\n count++;\n }\n }", "void addNode(int node);", "public int inc(Object key)\r\n {\r\n return add(key, 1);\r\n }", "private void incrConnectionCount() {\n connectionCount.inc();\n }", "private int numNodes()\r\n\t{\r\n\t return nodeMap.size();\r\n\t}", "public void incrementNumConnects() {\n this.numConnects.incrementAndGet();\n }", "@Test\n\tpublic void testIncrement() {\n\t\tvar counter = new Counter();\n\t\tassertEquals(0, counter.get());\n\t\tcounter.increment();\n\t\tcounter.increment();\n\t\tassertEquals(2, counter.get());\n\t}", "private synchronized void incrementCount()\n\t{\n\t\tcount++;\n\t}", "public void incrementLoopCount() {\n this.loopCount++;\n }", "public void setCounterpart(Node n)\n\t{\n\t\tcounterpart = n;\n\t}", "public void inc(String name) {\n inc(name, 1);\n }", "public static void increment(VectorClock clock, int... nodes) {\n for(int n: nodes)\n clock.incrementVersion((short) n, clock.getTimestamp());\n }", "public int getNodeCount() {\n return nodeCount;\n }", "public static int getNodeInt(Node curr) {\r\n\t\treturn curr.num;\r\n\t}", "public int increase() {\r\n return ++value;\r\n }", "public static synchronized void increment() {\r\n\t\tcount++;\r\n\t}", "public void inc(String key) {\n int val = 0;\n\n if (!m.containsKey(key)) {\n m.put(key, val + 1);\n } else {\n val = m.get(key);\n m.put(key, val + 1);\n delete(key, val);\n }\n\n insert(key, val + 1);\n }", "public void increment() {\n sync.increment();\n }", "public static int getNumberSimple(NodeInfo node, XPathContext context) throws XPathException {\n \n //checkNumberable(node);\n \n int fingerprint = node.getFingerprint();\n NodeTest same;\n \n if (fingerprint == -1) {\n same = NodeKindTest.makeNodeKindTest(node.getNodeKind());\n } else {\n same = new NameTest(node);\n }\n \n SequenceIterator preceding = node.iterateAxis(Axis.PRECEDING_SIBLING, same);\n \n int i = 1;\n while (true) {\n NodeInfo prev = (NodeInfo)preceding.next();\n if (prev == null) {\n break;\n }\n \n Controller controller = context.getController();\n int memo = controller.getRememberedNumber(prev);\n if (memo > 0) {\n memo += i;\n controller.setRememberedNumber(node, memo);\n return memo;\n }\n \n i++;\n }\n \n context.getController().setRememberedNumber(node, i);\n return i;\n }", "public void next(){\n\t\tif(generated)\n\t\t\tcurr++;\n\t}", "public static synchronized void increment() {\n counter++;\n }", "public void increaseNonce() {\n this.index++;\n }", "private void setId() {\n id = count++;\n }", "public /*synchronized*/ void increment() {\n counter++;\n }", "public void incrementIndex() {\n\t\tindex++;\n\t\tif (nextItem != null) {\n\t\t\tnextItem.incrementIndex();\n\t\t}\n\t}", "public void incrementLevel()\r\n {\r\n counts.addFirst( counts.removeFirst() + 1 );\r\n }", "public interface Incrementor {\n\t\tpublic void incrementTransition (TransitionIterator ti, double count);\n\t\tpublic void incrementInitialState (State s, double count);\n\t\tpublic void incrementFinalState (State s, double count);\n\t}", "public int countNodes() {\n int leftCount = left == null ? 0 : left.countNodes();\n int rightCount = right == null ? 0 : right.countNodes();\n return 1 + leftCount + rightCount;\n }", "private synchronized void incrNumCurrentClients() {\n\t\t\tthis.numCurrentClients++;\n\t\t\tthis.numTotalClients++; // only increases, never decreases\n\t\t}", "void incrementAccessCounter();", "public int getNodeCount() {\n resetAllTouched();\n return recurseNodeCount();\n }", "public void incrementActiveRequests() \n {\n ++requests;\n }", "public static void SetIncrement(int increment){\n\t\tm_Incrementer = increment;\n\t\tSystem.out.println(\"m_Incrementer set to: \"+ m_Incrementer);\n\t}", "public void incrementClients() {\n\t\tconnectedClients.incrementAndGet();\n\t}", "private static int nextID() {\r\n\t\treturn ID++;\r\n\t}", "public void inc()\n {\n _level++;\n calculateIndentationString();\n }", "@Override\r\n\tpublic int getNumberOfNodes() {\n\t\tint leftNumber=0;\r\n\t\tint rightNumber=0;\r\n\t\tif(left!=null){\r\n\t\t\tleftNumber=left.getNumberOfNodes();\r\n\t\t}\r\n\t\tif(right!=null)\r\n\t\t\trightNumber=right.getNumberOfNodes();\r\n\t\treturn leftNumber+rightNumber+1;\r\n\t}", "public void increment() {\n mNewNotificationCount.setValue(mNewNotificationCount.getValue() + 1);\n }", "int numNodes() {\n\t\treturn num_nodes;\n\t}" ]
[ "0.69665724", "0.6900605", "0.6862807", "0.6856345", "0.6847369", "0.6826346", "0.6747851", "0.6744195", "0.66414464", "0.66271424", "0.6625504", "0.6623298", "0.65871894", "0.65085447", "0.6506339", "0.64673835", "0.64673835", "0.6433586", "0.64303786", "0.63706964", "0.63442326", "0.63393915", "0.6336471", "0.6323228", "0.6323228", "0.6300942", "0.6268673", "0.62598634", "0.6251532", "0.62398416", "0.6237176", "0.62312335", "0.6222705", "0.61989987", "0.6160865", "0.6155727", "0.6137555", "0.612893", "0.6094123", "0.60848755", "0.6084533", "0.6072985", "0.606416", "0.6062474", "0.6061488", "0.60608655", "0.60592633", "0.60510254", "0.60410106", "0.6009301", "0.60056496", "0.5996591", "0.59870696", "0.59870696", "0.59791434", "0.5973128", "0.59655035", "0.595423", "0.5948269", "0.5947249", "0.5938852", "0.593263", "0.59205943", "0.591087", "0.5909193", "0.5906587", "0.58999175", "0.5893724", "0.58930874", "0.589102", "0.5885822", "0.5884554", "0.588016", "0.5875059", "0.58748865", "0.58732957", "0.587271", "0.58688295", "0.58650297", "0.58612365", "0.5858933", "0.585769", "0.58468884", "0.5846744", "0.58404475", "0.5831985", "0.5822411", "0.5816767", "0.5811962", "0.57848763", "0.577748", "0.5769796", "0.5768158", "0.57663107", "0.5764068", "0.5761799", "0.57552546", "0.5741426", "0.57406694", "0.5737345" ]
0.69161624
1
Update the current search state
public final void setSearchState(SearchState state) { Objects.requireNonNull(state); this.state = state; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void stateStored (Search search);", "void stateProcessed (Search search);", "void stateBacktracked (Search search);", "public void setNewSearch(String query){\n isNewSearch = true;\n this.query = query;\n }", "void stateRestored (Search search);", "@Override\n public void onSearchTermChanged() {\n }", "private void search() {\n if (isConnected()) {\r\n query = searchField.getText().toString();\r\n mLoader.setVisibility(View.VISIBLE);\r\n emptyStateTextView.setText(\"\");\r\n //restart the loader with the new data\r\n loaderManager.restartLoader(1, null, this);\r\n } else {\r\n String message = getString(R.string.no_internet);\r\n new AlertDialog.Builder(this).setMessage(message).show();\r\n }\r\n }", "public void search() {\r\n \t\r\n }", "public void updateSearchResults(){\n\t\t//removeAll();\n\t\tPrinter currentPrinter;\n\t\tPrinterLabel tableHeader;\n\t\t\n\t\t// Create search results' table header\n\t\ttableHeader = new PrinterLabel(1,MenuWindow.FRAME_WIDTH , MenuWindow.FRAME_HEIGHT,\n\t\t\t\t\"PRINTER\",\"VENDOR\",\"TENSION (ksi)\",\"COMPRESSION (ksi)\",\"IMPACT (lb-ft)\",\"MATERIALS\",\"TOLERANCE (in)\",\"FINISH (\\u00B5in)\", false);\n\n\t\t// Add tool tips for long header categories before adding to GUI\n\t tableHeader.getMaterials().setToolTipText(\"Range of Materials\");\n\t \n\t\tsetLayout(new BoxLayout(this, BoxLayout.Y_AXIS));\n\t\tsetBorder(BorderFactory.createLineBorder(Color.gray));\n\t\tadd(tableHeader);\n\t\ttableHeader.setBackground(Color.lightGray);\n\n\t\t// Populate search results with any printer matches\n\t\tfor(int i = outputList.size()-1; i >=0;i--)\n\t\t{\n\t\t\tcurrentPrinter = outputList.get(i);\n\t\t\tPrinterLabel temp = new PrinterLabel(i+1,MenuWindow.FRAME_WIDTH , MenuWindow.FRAME_HEIGHT,\n\t\t\t\t\tcurrentPrinter.getPrinterName() + \"\",\n\t\t\t\t\tcurrentPrinter.getVendor()+ \"\",\n\t\t\t\t\tcurrentPrinter.getTension()+ \"\",\n\t\t\t\t\tcurrentPrinter.getCompression()+ \"\",\n\t\t\t\t\tcurrentPrinter.getImpact()+ \"\",\n\t\t\t\t\tcurrentPrinter.materialsString()+ \"\",\n\t\t\t\t\tcurrentPrinter.getTolerance()+ \"\",\n\t\t\t\t\tcurrentPrinter.getFinish()+ \"\", true);\n\t\t\ttemp = highlightMatch(temp, currentPrinter);\n\t\t\tadd(temp);\n\t\t}\n\t\tthis.revalidate();\n\t}", "public void updateFromSearchFilters() {\n this.businessTravelReadyModel.checked(ExploreHomesFiltersFragment.this.searchFilters.isBusinessTravelReady());\n ExploreHomesFiltersFragment.this.businessTravelAccountManager.setUsingBTRFilter(this.businessTravelReadyModel.checked());\n this.instantBookModel.checked(ExploreHomesFiltersFragment.this.searchFilters.isInstantBookOnly());\n this.entireHomeModel.checked(ExploreHomesFiltersFragment.this.searchFilters.getRoomTypes().contains(C6120RoomType.EntireHome));\n this.privateRoomModel.checked(ExploreHomesFiltersFragment.this.searchFilters.getRoomTypes().contains(C6120RoomType.PrivateRoom));\n this.sharedRoomModel.checked(ExploreHomesFiltersFragment.this.searchFilters.getRoomTypes().contains(C6120RoomType.SharedRoom));\n SearchMetaData homeTabMetadata = ExploreHomesFiltersFragment.this.dataController.getHomesMetadata();\n if (homeTabMetadata != null && homeTabMetadata.hasFacet()) {\n SearchFacets facets = homeTabMetadata.getFacets();\n this.entireHomeModel.show(facets.facetGreaterThanZero(C6120RoomType.EntireHome));\n this.privateRoomModel.show(facets.facetGreaterThanZero(C6120RoomType.PrivateRoom));\n this.sharedRoomModel.show(facets.facetGreaterThanZero(C6120RoomType.SharedRoom));\n }\n this.priceModel.minPrice(ExploreHomesFiltersFragment.this.searchFilters.getMinPrice()).maxPrice(ExploreHomesFiltersFragment.this.searchFilters.getMaxPrice());\n if (homeTabMetadata == null) {\n this.priceModel.histogram(null).metadata(null);\n } else {\n this.priceModel.histogram(homeTabMetadata.getPriceHistogram()).metadata(homeTabMetadata.getSearch());\n }\n this.priceButtonsModel.selection(ExploreHomesFiltersFragment.this.searchFilters.getPriceFilterSelection());\n this.bedCountModel.value(ExploreHomesFiltersFragment.this.searchFilters.getNumBeds());\n this.bedroomCountModel.value(ExploreHomesFiltersFragment.this.searchFilters.getNumBedrooms());\n this.bathroomCountModel.value(ExploreHomesFiltersFragment.this.searchFilters.getNumBathrooms());\n addCategorizedAmenitiesIfNeeded();\n updateOtherAmenitiesModels();\n updateFacilitiesAmenitiesModels();\n updateHouseRulesAmenitiesModels();\n notifyModelsChanged();\n }", "void searchStarted (Search search);", "private void searchRefresh(){\n adapter = new FoundRecyclerviewAdapter(FoundActivity.this, search);\n v.setAdapter(adapter);\n }", "public void tellChanged(SearchTool searchTool) {\n updateAll();\n }", "void updateAllFilteredLists(Set<String> keywords, Calendar startDate, Calendar endDate,\n Entry.State state, Search... searches);", "private void search()\n {\n JTextField searchField = (currentSearchView.equals(SEARCH_PANE_VIEW))? searchBar : resultsSearchBar;\n String searchTerm = searchField.getText();\n \n showTransition(2000);\n \n currentPage = 1;\n showResultsView(true);\n paginate(1, getResultsPerPage());\n\n if(searchWeb) showResultsTableView(WEB_RESULTS_PANE);\n else showResultsTableView(IMAGE_RESULTS_PANE);\n\n \n showSearchView(RESULTS_PANE_VIEW);\n resultsSearchBar.setText(searchTerm);\n }", "@Override\n\tpublic void search() {\n\t}", "private void setCurSearch(String search)\n\t{\n\t\tif (mToNavi)\n\t\t\tmCurSearch = search;\n\t\telse\n\t\t\tmCurSearchNavi = search;\n\t}", "@Override\n\tpublic boolean onSearchRequested()\n\t{\n \tstartSearch(getCurSearch(), true, null, false);\n \treturn true;\n\t}", "public void prepareSearchForUpdate(Search search) {\r\n\t\tDouble rate = currencyService.getCurrencyRate(search.getEbayCountry().getCurrency(), search.getUser());\r\n\t\tsearch.setMinPrice((int)(search.getMinPrice() * rate));\r\n\t\tsearch.setMaxPrice((int)(search.getMaxPrice() * rate));\r\n\t}", "public void performSearch() {\n History.newItem(MyWebApp.SEARCH_RESULTS);\n getMessagePanel().clear();\n if (keywordsTextBox.getValue().isEmpty()) {\n getMessagePanel().displayMessage(\"Search term is required.\");\n return;\n }\n mywebapp.getResultsPanel().resetSearchParameters();\n //keyword search does not restrict to spots\n mywebapp.addCurrentLocation();\n if (markFilterCheckbox != null) {\n mywebapp.getResultsPanel().getSearchParameters().setLicensePlate(markFilterCheckbox.getValue());\n }\n if (contestFilterCheckbox != null) {\n mywebapp.getResultsPanel().getSearchParameters().setContests(contestFilterCheckbox.getValue());\n }\n if (geoFilterCheckbox != null) {\n mywebapp.getResultsPanel().getSearchParameters().setGeospatialOff(!geoFilterCheckbox.getValue());\n }\n if (plateFilterCheckbox != null) {\n mywebapp.getResultsPanel().getSearchParameters().setLicensePlate(plateFilterCheckbox.getValue());\n }\n if (spotFilterCheckbox != null) {\n mywebapp.getResultsPanel().getSearchParameters().setSpots(spotFilterCheckbox.getValue());\n }\n String color = getValue(colorsListBox);\n mywebapp.getResultsPanel().getSearchParameters().setColor(color);\n String manufacturer = getValue(manufacturersListBox);\n if (manufacturer != null) {\n Long id = new Long(manufacturer);\n mywebapp.getResultsPanel().getSearchParameters().setManufacturerId(id);\n }\n String vehicleType = getValue(vehicleTypeListBox);\n mywebapp.getResultsPanel().getSearchParameters().setVehicleType(vehicleType);\n// for (TagHolder tagHolder : tagHolders) {\n// mywebapp.getResultsPanel().getSearchParameters().getTags().add(tagHolder);\n// }\n mywebapp.getResultsPanel().getSearchParameters().setKeywords(keywordsTextBox.getValue());\n mywebapp.getMessagePanel().clear();\n mywebapp.getResultsPanel().performSearch();\n mywebapp.getTopMenuPanel().setTitleBar(\"Search\");\n //mywebapp.getResultsPanel().setImageResources(resources.search(), resources.searchMobile());\n }", "@Override\n\tpublic boolean onSearchRequested () {\n\t\tif (!searchMode)\n\t\t\ttoggleSearch();\n\t\treturn true;\n\t}", "public void search() {\n }", "void updateAllFilteredLists(Set<String> keywords, Calendar startDate, Calendar endDate,\n Entry.State state, Entry.State state2, Search... searches);", "@Override\r\n public boolean onQueryTextSubmit(String query) {\n searchAdapter.setSearchResults(DataCache.getInstance().getSearchResults(query));\r\n return false;\r\n }", "private void toggleSearch () {\n\t\tsearchMode = !searchMode;\n\t\t\n\t\tif (searchMode) {\n\t\t\t// Go into search mode\n\t\t\t/*\n\t\t\t * Tween in the search bar and keep visible\n\t\t\t */\n\t\t\tif (flyRevealDown == null)\n\t\t\t\tflyRevealDown = AnimationUtils.loadAnimation(this, R.anim.fly_reveal_down);\n\t\t\tsearch.startAnimation(flyRevealDown);\n\t\t\tsearch.setVisibility(View.VISIBLE);\n\t\t\tfilter.requestFocus();\n\t\t\t\n\t\t\t/*\n\t\t\t * Tween out the new memo bar\n\t\t\t */\n\t\t\tif (fadeOut == null)\n\t\t\t\tfadeOut = AnimationUtils.loadAnimation(this, R.anim.fade_out);\n\t\t\tnewMemo.startAnimation(fadeOut);\n\t\t\tnewMemo.setVisibility(View.GONE);\n\t\t\t\n\t\t\t/*\n\t\t\t * Show the keyboard\n\t\t\t */\n\t\t\tinputMethodManager.showSoftInput(filter, 0);\n\t\t} else {\n\t\t\t// Go out of search mode\n\t\t\t/*\n\t\t\t * Hide the keyboard\n\t\t\t */\n\t\t\tinputMethodManager.hideSoftInputFromInputMethod(filter.getWindowToken(), 0);\n\t\t\t\n\t\t\t/*\n\t\t\t * Tween out the search bar and keep invisible\n\t\t\t */\n\t\t\tif (flyConcealUp == null)\n\t\t\t\tflyConcealUp = AnimationUtils.loadAnimation(this, R.anim.fly_conceal_up);\n\t\t\tfilter.setText(\"\");\n\t\t\tsearch.startAnimation(flyConcealUp);\n\t\t\tsearch.setVisibility(View.GONE);\n\t\t\t\n\t\t\t/*\n\t\t\t * Tween in the new memo bar\n\t\t\t */\n\t\t\tif (fadeIn == null)\n\t\t\t\tfadeIn = AnimationUtils.loadAnimation(this, R.anim.fade_in);\n\t\t\tnewMemo.startAnimation(fadeIn);\n\t\t\tnewMemo.setVisibility(View.VISIBLE);\n\t\t}\n\t}", "@Override\r\n\tpublic void search() {\n\r\n\t}", "public void renewSearch(String newVal) {\n\t\tlistView.getSelectionModel().clearSelection();\n\t\tsearchItems.clear();\n\n\t\tif (newVal.equals(\"\")) {\n\t\t\tlistView.setItems(items);\n\t\t\tlog.info(\"All items are displayed\");\n\t\t} else {\n\n\t\t\tif (searchToggle.getSelectedToggle().equals(nameSearch)) {\n\t\t\t\titemsMap.forEach((a, b) -> {\n\t\t\t\t\tif (b.getName().toLowerCase().contains(newVal.toLowerCase())) {\n\t\t\t\t\t\tsearchItems.add(b);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tlog.info(\"Only items with '\" + newVal + \"' in their name are displayed\");\n\n\t\t\t} else if (searchToggle.getSelectedToggle().equals(amountSearch)) {\n\t\t\t\titemsMap.forEach((a, b) -> {\n\t\t\t\t\tif (String.valueOf(b.getAmount()).contains(newVal)) {\n\t\t\t\t\t\tsearchItems.add(b);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tlog.info(\"Only items with '\" + newVal + \"' as their amount are displayed\");\n\n\t\t\t} else if (searchToggle.getSelectedToggle().equals(barcodeSearch)) {\n\t\t\t\titemsMap.forEach((a, b) -> {\n\t\t\t\t\tif (b.getGtin().contains(newVal)) {\n\t\t\t\t\t\tsearchItems.add(b);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tlog.info(\"Only items with '\" + newVal + \"' in their barcode are displayed\");\n\n\t\t\t} else if (searchToggle.getSelectedToggle().equals(categorieSearch)) {\n\t\t\t\titemsMap.forEach((a, b) -> {\n\t\t\t\t\tfor (String cat : b.getCategories()) {\n\t\t\t\t\t\tif (cat.toLowerCase().contains(newVal.toLowerCase())) {\n\t\t\t\t\t\t\tsearchItems.add(b);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tlog.info(\"Only items with '\" + newVal + \"' in their categories are displayed\");\n\t\t\t}\n\n\t\t\tlistView.setItems(searchItems);\n\t\t}\n\t}", "public void performSearch() {\n OASelect<QueryInfo> sel = getQueryInfoSearch().getSelect();\n sel.setSearchHub(getSearchFromHub());\n sel.setFinder(getFinder());\n getHub().select(sel);\n }", "public void onSearchStarted() {\n mActivity.invalidateOptionsMenu();\n }", "@Override\n public boolean onQueryTextSubmit(String query) {\n searchQueryToRestore = query;\n // update the state variable\n searchQueryIsSubmitted = true;\n // remove focus from SearchView\n rootLayout.requestFocus();\n return false;\n }", "protected void setSearch(ArrayList<Contact> search){\n this.search = search;\n }", "public void updateFilterList() {\n filteredList.clear();\n filteredList.addAll(searchList);\n filteredList.retainAll(mediaCategoryList);\n }", "public void updateSearchResults(SearchFiltersPanel filter)\n\t{\n\t\tremoveAll();\n\t\tm_PrinterList.setPrinterList(ToolBox.generatePrinterList().getPrinterList());\n\t\tm_PrinterList.clearMatches(m_PrinterList.getPrinterList());\n\t\t\n\t m_PrinterList.setMatches(\n (Double) filter.getCompression().getMin(),\n\t \t\t(Double) filter.getTension().getMin(),\n\t \t\t(Double) filter.getImpact().getMin(),\n\t \t\t(String) filter.getMaterials().getSelectedItem(),\n\t \t\t(Double) filter.getTolerance().getMax(),\n\t \t\t(double) filter.getFinish().getMax(),\n\t \t\t(String) filter.getVendor().getSelectedItem());\n\t \n\t outputList = ToolBox.outputSearchedList(m_PrinterList);\n\t updateSearchResults();\n\t}", "@Override\n public boolean onQueryTextChange(String newText) {\n currentSearchData = new ArrayList<String>();\n getCurrentSearchData(newText);\n RelativeLayout searchDataRelativeView = (RelativeLayout) findViewById(R.id.search_relative_view);\n searchDataRelativeView.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n\n }\n });\n showCurrentData();\n System.out.println(\"\");\n return false;\n }", "public void onSearchStarted();", "@Override\n public void onSearchOpened() {\n }", "@Override\n public void onSearchOpened() {\n }", "@Override\n public void onSearchOpened() {\n }", "void searchProbed (Search search);", "private void startSearch()\n {\n model.clear();\n ArrayList<String> result;\n if (orRadio.isSelected())\n {\n SearchEngine.search(highTerms.getText(), lowTerms.getText());\n result = SearchEngine.getShortForm();\n }\n else\n {\n SearchEngine.searchAnd(highTerms.getText(), lowTerms.getText());\n result = SearchEngine.getShortForm();\n }\n for (String s : result)\n {\n model.addElement(s);\n }\n int paragraphsRetrieved = result.size();\n reviewedField.setText(\" Retrieved \" + paragraphsRetrieved + \" paragraphs\");\n }", "void searchFinished (Search search);", "@Override\r\n public final void update() {\r\n\r\n logger.entering(this.getClass().getName(), \"update\");\r\n\r\n setFilterMap();\r\n\r\n logger.exiting(this.getClass().getName(), \"update\");\r\n\r\n }", "private void showSearch() {\n\t\tonSearchRequested();\n\t}", "@Override\n public void onSearchTermChanged(String term) {\n }", "public void searchSwitch() {\r\n\t\tif (searchEmails) {\r\n\t\t\tsearchEmails = false;\r\n\t\t\tlblNewLabel_1.setText(srchPatrons);\r\n\t\t} else {\r\n\t\t\tsearchEmails = true;\r\n\t\t\tlblNewLabel_1.setText(srchEmails);\r\n\t\t}\r\n\t}", "@Override\n public void updateItemSearchIndex() {\n try {\n // all item IDs that don't have a search index yet\n int[] allMissingIds = mDatabaseAccess.itemsDAO().selectMissingSearchIndexIds();\n // Selects the item to the id, extract all parts of the item name to create the\n // search index (all ItemSearchEntity's) and insert them into the database\n for (int missingId : allMissingIds) {\n try {\n ItemEntity item = mDatabaseAccess.itemsDAO().selectItem(missingId);\n List<ItemSearchEntity> searchEntities = createItemSearchIndex(item);\n mDatabaseAccess.itemsDAO().insertItemSearchParts(searchEntities);\n } catch (Exception ex) {\n Log.e(TAG, \"An error occurred trying to create the search index to the id\" +\n missingId, ex);\n }\n }\n } catch (Exception ex) {\n Log.e(TAG, \"A general failure has occurred while trying to load and process all \" +\n \"item IDs to generate a search index\", ex);\n }\n }", "private void executeSearch() {\n if (!view.getSearchContent().getText().isEmpty()) {\n SearchModuleDataHolder filter = SearchModuleDataHolder.getSearchModuleDataHolder();\n //set search content text for full text search\n filter.setSearchText(view.getSearchContent().getText());\n forwardToCurrentView(filter);\n } else {\n eventBus.showPopupNoSearchCriteria();\n }\n }", "public void actionPerformed(ActionEvent InputEvent)\r\n {\r\n performSearch();\r\n }", "private void search() {\n \t\tString searchString = m_searchEditText.getText().toString();\n \n \t\t// Remove the refresh if it's scheduled\n \t\tm_handler.removeCallbacks(m_refreshRunnable);\n \t\t\n\t\tif ((searchString != null) && (!searchString.equals(\"\"))) {\n \t\t\tLog.d(TAG, \"Searching string: \\\"\" + searchString + \"\\\"\");\n \n \t\t\t// Save the search string\n \t\t\tm_lastSearch = searchString;\n \n \t\t\t// Disable the Go button to show that the search is in progress\n \t\t\tm_goButton.setEnabled(false);\n \n \t\t\t// Remove the keyboard to better show results\n \t\t\t((InputMethodManager) this\n \t\t\t\t\t.getSystemService(Service.INPUT_METHOD_SERVICE))\n \t\t\t\t\t.hideSoftInputFromWindow(m_searchEditText.getWindowToken(),\n \t\t\t\t\t\t\t0);\n \n \t\t\t// Start the search task\n \t\t\tnew HTTPTask().execute(searchString);\n \t\t\t\n \t\t\t// Schedule the refresh\n \t\t\tm_handler.postDelayed(m_refreshRunnable, REFRESH_DELAY);\n \t\t} else {\n \t\t\tLog.d(TAG, \"Ignoring null or empty search string.\");\n \t\t}\n \t}", "private void refreshListView() {\n model.updateAllFilteredLists(history.getPrevKeywords(), history.getPrevStartDate(),\n history.getPrevEndDate(), history.getPrevState(),\n history.getPrevSearches());\n }", "public void refresh() {\r\n\r\n if (searchResultAdapter != null\r\n && preferencesManager.getProperty(\r\n PreferencesManager.IS_THEME_CHANGED, false)) {\r\n\r\n searchResultAdapter.notifyDataSetChanged();\r\n }\r\n\r\n }", "public static void update() {\n if (!isEnd()) index++;\n state++;\n return;\n }", "private void enterSearchMode(String resultContent) {\n\n\t\tthis.removeAll();\n\n\t\tJLabel welcomeLabel = new JLabel(\"Search the word you want to modify.\");\n\t\twelcomeLabel.setFont(new Font(Font.SANS_SERIF, Font.PLAIN, 17));\n\t\tGridBagConstraints welcomeC = new GridBagConstraints();\n\t\twelcomeC.anchor = GridBagConstraints.CENTER;\n\t\twelcomeC.gridwidth = 2;\n\t\twelcomeC.weighty = 5;\n\t\twelcomeC.gridy = 0;\n\t\tthis.add(welcomeLabel, welcomeC);\n\n\t\tAction submit = new AbstractAction() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tsubmitSearch(searchBox.getText());\n\t\t\t}\n\t\t};\n\n\t\tsearchBox = new JTextField();\n\t\tsearchBox.addActionListener(submit);\n\t\tGridBagConstraints sboxC = new GridBagConstraints();\n\t\tsboxC.fill = GridBagConstraints.HORIZONTAL;\n\t\tsboxC.weightx = 4;\n\t\tsboxC.weighty = 1;\n\t\tsboxC.gridx = 0;\n\t\tsboxC.gridy = 1;\n\t\tsboxC.insets = new Insets(0, 20, 0, 10);\n\t\tthis.add(searchBox, sboxC);\n\n\t\tJButton submitButton = new JButton(\"Search\");\n\t\tsubmitButton.addActionListener(submit);\n\t\tGridBagConstraints submitC = new GridBagConstraints();\n\t\tsubmitC.weightx = 0;\n\t\tsubmitC.gridx = 1;\n\t\tsubmitC.gridy = 1;\n\t\tsubmitC.anchor = GridBagConstraints.EAST;\n\t\tsubmitC.insets = new Insets(0, 0, 0, 30);\n\t\tthis.add(submitButton, submitC);\n\n\t\tresult = new JLabel(resultContent);\n\t\tresult.setFont(new Font(\"\", Font.ITALIC, 14));\n\t\tGridBagConstraints resultC = new GridBagConstraints();\n\t\tresultC.fill = GridBagConstraints.BOTH;\n\t\tresultC.weighty = 5;\n\t\tresultC.gridy = 8;\n\t\tresultC.gridwidth = 3;\n\t\tresultC.anchor = GridBagConstraints.WEST;\n\t\tresultC.insets = new Insets(0, 40, 0, 0);\n\t\tthis.add(result, resultC);\n\n\t\tthis.repaint();\n\n\t}", "public void onEditSearch(ActionEvent event) {\r\n \tgetController().onEditSearch( event ); \t\r\n }", "public void updateAllFilteredListToShowAllActiveEntries();", "void setStartSearch(int startSearch);", "public void updateState();", "@Override\n public void search(SearchQuery searchQuery) throws VanilaException {\n\n setKeepQuite(false);\n\n String query = searchQuery.query;\n SearchOptions options = searchQuery.options;\n\n if (isCacheHavingResults(query)) {\n searchComplete(query, mRecentSearchResultsMap.get(query), null);\n }\n else {\n if (mIsBusyInSearch) {\n mMostRecentAwaitingQuery = searchQuery;\n }\n else {\n\n mMostRecentAwaitingQuery = null;\n mIsBusyInSearch = true;\n\n FSRequestDTO request = mFSContext.buildVenueRequest(query, options);\n\n FSVenueSearchGateway gateway = mMobilePlatformFactory.getSyncAdapter()\n .getSyncGateway(FSVenueSearchGateway.CLASS_NAME);\n gateway.fireReadVenueListRequest(request);\n }\n }\n }", "private void search(ActionEvent x) {\n\t\tString text = this.searchText.getText();\n\t\tif (text.equals(\"\")) {\n\t\t\tupdate();\n\t\t\treturn;\n\t\t}\n\t\tboolean flag = false;\n\t\tfor (Project p : INSTANCE.getProjects()) {\n\t\t\tif (p.getName().indexOf(text) != -1) {\n\t\t\t\tif (!flag) {\n\t\t\t\t\tthis.projects.clear();\n\t\t\t\t\tflag = true;\n\t\t\t\t}\n\t\t\t\tthis.projects.addElement(p);\n\t\t\t}\n\t\t}\n\n\t\tif (!flag) {\n\t\t\tINSTANCE.getCurrentUser().sendNotification(new Notification((Object) INSTANCE, \"No results\"));\n\t\t\tthis.searchText.setText(\"\");\n\t\t}\n\t}", "public void setLSearch (boolean value) {\r\n l_search = value; }", "public void onClick(View v) {\n\t\t\t\tString searchInput = searchField.getText().toString();\n\t\t\t\tsavedString = searchInput;\n\t\t\t\tlist.setFilterText(searchInput);\n\t\t\t}", "SearchResult search(State root, List<State> expanded_list, State goal);", "public void onUpdateFilters(SearchFilter newFilter) {\n filter.setSort(newFilter.getSort());\n filter.setBegin_date(newFilter.getBegin_date());\n filter.setNewsDeskOpts(newFilter.getNewsDeskOpts());\n gvResults.clearOnScrollListeners();\n setUpRecycler();\n fetchArticles(0,true);\n }", "void statePurged (Search search);", "public void updateUI() {\n List<Animal> animals;\n\n String searchQuery = LexiconPreferences.getSearchQuery(getActivity());\n\n // Check if there's a search query present\n if (searchQuery != null) {\n ArrayList<String> whereArgs = new ArrayList<>();\n whereArgs.add(LexiconPreferences.getFilterValue(getActivity()));\n\n animals = mAnimalManager.searchAnimals(\n mAnimalManager.createWhereClauseFromFilter(LexiconPreferences.getFilterKey(getActivity())),\n whereArgs,\n searchQuery\n );\n } else {\n animals = mAnimalManager.getAnimals(\n mAnimalManager.createWhereClauseFromFilter(LexiconPreferences.getFilterKey(getActivity())),\n new String[]{LexiconPreferences.getFilterValue(getActivity())}\n );\n }\n\n if (animals.size() > 0) {\n // If the fragment is already running, update the data in case something changed (some animal)\n if (mAnimalAdapter == null) {\n mAnimalAdapter = new AnimalAdapter(animals);\n mAnimalRecyclerView.setAdapter(mAnimalAdapter);\n } else {\n mAnimalAdapter.setAnimals(animals);\n mAnimalAdapter.notifyDataSetChanged();\n }\n } else {\n RelativeLayout emptyList = (RelativeLayout) mView.findViewById(R.id.list_empty);\n emptyList.setVisibility(View.VISIBLE);\n }\n }", "void updateFilteredListToShowAll();", "void updateFilteredListToShowAll();", "public void setSearchOperation(List<Post> newList)\n {\n notifyDataSetChanged();\n }", "public void searchbarChanges() throws UnsupportedEncodingException {\n // filters the rooms on the searchbar input. It searches for matches in the building name and room name.\n String searchBarInput = searchBar.getText();\n if (searchBarInput == \"\") {\n loadCards();\n } else {\n List<Room> roomsToShow = SearchViewLogic.filterBySearch(roomList, searchBarInput, buildings);\n //Load the cards that need to be shown\n getCardsShown(roomsToShow);\n }\n }", "public void performSearch() {\n OASelect<CorpToStore> sel = getCorpToStoreSearch().getSelect();\n sel.setSearchHub(getSearchFromHub());\n sel.setFinder(getFinder());\n getHub().select(sel);\n }", "public void setStatus(SearchStatus status) {\n this.status = status;\n }", "public void firstSearch() {\n\n\t\tif ((workspaceSearchField.getText() == null) || \"\".equals(workspaceSearchField.getText())) {\n\t\t\tworkspaceSearchField.setText(mainGUI.getSearchFieldText());\n\t\t\tsearchInWorkspaceFor(workspaceSearchField.getText());\n\t\t}\n\t}", "public void setSearchQuery(String searchQuery) {\n this.searchQuery = searchQuery;\n }", "private void searchFunction() {\n\t\t\r\n\t}", "public void search() {\n String q = this.query.getText();\n String cat = this.category.getValue();\n if(cat.equals(\"Book\")) {\n searchBook(q);\n } else {\n searchCharacter(q);\n }\n }", "private void searchWeb()\n {\n searchWeb = true;\n search();\n }", "void updateFilteredFloatingTaskList(Set<String> keywords, Calendar startDate, Calendar endDate,\n Entry.State state, Search search, int level);", "public void update(){\n label = tag.getSelectedItemPosition() == 0 ? \"all\" : mLabel[tag.getSelectedItemPosition()];\n Refresh();\n }", "private void performNewQuery(){\n\n // update the label of the Activity\n setLabelForActivity();\n // reset the page number that is being used in queries\n pageNumberBeingQueried = 1;\n // clear the ArrayList of Movie objects\n cachedMovieData.clear();\n // notify our MovieAdapter about this\n movieAdapter.notifyDataSetChanged();\n // reset endless scroll listener when performing a new search\n recyclerViewScrollListener.resetState();\n\n /*\n * Loader call - case 3 of 3\n * We call loader methods as we have just performed reset of the data set\n * */\n // initiate a new query\n manageLoaders();\n\n }", "@Override\n public boolean onSearchRequested() {\n return super.onSearchRequested();\n }", "@Override\n public void onSearchConfirmed(CharSequence text) {\n startSearch(text);\n }", "@Override\n public void onSearchConfirmed(CharSequence text) {\n startSearch(text);\n\n }", "private void goSearch() {\n\t\tThread t = new Thread(this);\n\t\tt.start();\n\t}", "@Override\n public boolean onQueryTextChange(String newText) {\n // store the search query being entered in a global object that will be used to persist data\n // note: intentionally we use another string instead of @searchQueryToRestore, as SearchView\n // query is at first set to null (at the time SearchView is initialised), before setQuery()\n // method is called\n searchQueryToListen = newText;\n return false;\n }", "abstract public boolean performSearch();", "private void searchforResults() {\n\n List<String> queryList = new SavePreferences(this).getStringSetPref();\n if(queryList != null && queryList.size() > 0){\n Log.i(TAG, \"Searching for results \" + queryList.get(0));\n Intent searchIntent = new Intent(Intent.ACTION_WEB_SEARCH);\n searchIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n searchIntent.putExtra(SearchManager.QUERY, queryList.get(0));\n this.startActivity(searchIntent);\n }\n }", "@Override\n public void onSearchConfirmed(CharSequence text) {\n startSearchResults(text);\n }", "private void toggleSearchButton() {\n\t\t// Enable \"Search\" button when both input fields are filled in\n\t\tview.toggleSearch(!view.getStartStation().equals(\"\")\n\t\t\t\t&& !view.getEndStation().equals(\"\"));\n\t}", "void searchUI();", "@Override\n public void actionPerformed(ActionEvent e) {\n m_testGame.setTitle(searchGameText.getText());\n try {\n if(m_fileManager1.isGameInList(m_testGame)){ // if the game is in the file\n m_NewSearchResult = m_fileManager1.gamesSearchResult(m_testGame); //makes a new com.cs_group.objects.GameList with the search Result\n ChangeEvent event = new ChangeEvent(this);\n for (ChangeListener listener : m_addAnotherGame) {\n listener.stateChanged(event);\n }\n }else { JOptionPane.showMessageDialog(null, \"GAME NOT FOUND\", \"ERROR\", JOptionPane.ERROR_MESSAGE);}\n } catch (IOException | ParseException ioException) {\n ioException.printStackTrace();\n }\n }", "public abstract void updateFilter();", "void update( State state );", "@Override\n public void onSearchStateChanged(boolean enabled) {\n if (!enabled)\n recyclerView.setAdapter(adapter);\n }", "@Override\r\n\tpublic void updateState() {\r\n\t\tState<A> result = null;\r\n\t\tif(events.size() > 0){\r\n\t\t\tfor(Event<A> a : events){\r\n\t\t\t\tstate = (result = state.perform(this,a)) == null ? state : result;\r\n\t\t\t}\r\n\t\t\tevents.removeAllElements();\r\n\t\t}\r\n\t\tstate = (result = state.perform(this, null)) == null ? state : result;\r\n\t\trequestInput();\r\n\t\t\r\n\t}", "private void onClickSearch() {\n if (lat.isEmpty() || lon.isEmpty()) {\n Toast.makeText(\n self,\n getResources()\n .getString(R.string.wait_for_getting_location),\n Toast.LENGTH_SHORT).show();\n getLatLong();\n }\n //get current distance search :\n distance = ((double) skbDistance.getProgress() / 10) + \"\";\n\n Bundle b = new Bundle();\n b.putString(GlobalValue.KEY_SEARCH, edtSearch.getText().toString());\n b.putString(GlobalValue.KEY_CATEGORY_ID, categoryId);\n b.putString(GlobalValue.KEY_CITY_ID, cityId);\n b.putString(GlobalValue.KEY_OPEN, ALL_OR_OPEN);\n b.putString(GlobalValue.KEY_DISTANCE, distance);\n b.putString(GlobalValue.KEY_SORT_BY, SORT_BY);\n b.putString(GlobalValue.KEY_SORT_TYPE, SORT_TYPE);\n if (Constant.isFakeLocation) {\n b.putString(GlobalValue.KEY_LAT, GlobalValue.glatlng.latitude + \"\");\n b.putString(GlobalValue.KEY_LONG, GlobalValue.glatlng.longitude + \"\");\n } else {\n b.putString(GlobalValue.KEY_LAT, lat);\n b.putString(GlobalValue.KEY_LONG, lon);\n }\n\n if (isSelectShop)\n ((MainTabActivity) getParent()).gotoActivity(\n SearchShopResultActivity.class, b);\n else\n ((MainTabActivity) getParent()).gotoActivity(\n SearchProductResultActivity.class, b);\n }", "@Override public void searchStarted() {\n progressBar.setVisibility(View.VISIBLE);\n }", "abstract public void search();", "public void setSearchQuery(String searchQuery) {\n searchQuery = searchQuery.toLowerCase();\n this.searchQuery = searchQuery;\n\n List<Media> mediaList = viewModel.getMediaList();\n List<Media> newList = new ArrayList<>();\n\n for (Media media : mediaList) {\n String title = media.getTitle().toLowerCase();\n if (title.contains(searchQuery)){\n newList.add(media);\n }\n }\n searchList.clear();\n searchList.addAll(newList);\n }", "@Override\n public void onSearchConfirmed(CharSequence text) {\n startSearch(text);\n\n }", "@Override\n public void onSearchConfirmed(CharSequence text) {\n startSearch(text);\n\n }" ]
[ "0.7358287", "0.70950925", "0.7090777", "0.6755598", "0.6540821", "0.65261036", "0.6417136", "0.6395046", "0.6392258", "0.6391291", "0.6355787", "0.6348667", "0.6312953", "0.6301612", "0.62922287", "0.62735707", "0.61910236", "0.6188876", "0.6187014", "0.61704767", "0.6168571", "0.6167925", "0.61540616", "0.61424094", "0.6139012", "0.61349", "0.6109043", "0.60961634", "0.60903096", "0.6081793", "0.6063439", "0.6060865", "0.60581124", "0.604889", "0.6039615", "0.6027847", "0.6027847", "0.6027847", "0.60265243", "0.60164195", "0.6014277", "0.6010607", "0.5998632", "0.5992668", "0.59900105", "0.5984353", "0.5974162", "0.59685975", "0.59351605", "0.5895489", "0.5887849", "0.58663243", "0.5851536", "0.584759", "0.58451056", "0.5843011", "0.58368325", "0.58259135", "0.5825262", "0.5824318", "0.58176756", "0.5813916", "0.5813782", "0.5813578", "0.5808088", "0.5806664", "0.5806664", "0.5803067", "0.5801717", "0.57984394", "0.5797083", "0.5787941", "0.5787346", "0.5784029", "0.57821405", "0.57668406", "0.5758749", "0.5756445", "0.57548827", "0.5735407", "0.5731614", "0.5731325", "0.57255614", "0.57252014", "0.5690298", "0.56829923", "0.56764174", "0.5670747", "0.5665408", "0.5656124", "0.5655078", "0.56486", "0.5643222", "0.5636778", "0.5634511", "0.5633998", "0.56210387", "0.56206405", "0.56180257", "0.56180257" ]
0.6456402
6
Update the bounds managed
public final void setBoundsManager(IBoundsManager boundsManager) { Objects.requireNonNull(boundsManager); this.boundsManager = boundsManager; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void updateBounds() {\n this.setBounds(left, top, width, height);\n }", "public void updateBounds() {\n\t\tswitch (this.species){\n\t\tcase HOGCHOKER:\n\t\tcase SILVERSIDE:\n\t\tcase FLOUNDER:\n\t\t\tthis.topYBound = frameHeight / 3 * 2;\n\t\t\tthis.bottomYBound = frameHeight - imageHeight - frameBarSize;\n\t\t\tbreak;\n\t\tcase PERCH: \n\t\tcase MINNOW: \n\t\tcase WEAKFISH:\n\t\t\tthis.topYBound = frameHeight / 3;\n\t\t\tthis.bottomYBound = frameHeight / 3 * 2 - imageHeight;\n\t\t\tbreak;\n\n\t\tcase MENHADEN:\n\t\tcase MUMMICHOG:\n\t\t\tthis.topYBound = 0;\n\t\t\tthis.bottomYBound = frameHeight / 3 - imageHeight;\n\t\t\tbreak;\n\t\tcase GOLD:\n\t\tdefault:\n\t\t\ttopYBound = 0;\n\t\t\tbottomYBound = frameHeight;\n\t\t}\n\t}", "public void update(LatLngBounds bounds) {\n\t\tmHandler.removeMessages(MSG_UPDATE);\n\t\t// Prepare update message \n\t\tMessage msg = Message.obtain();\n\t\tmsg.what = MSG_UPDATE;\n\t\tBundle data = new Bundle();\n\t\tdata.putParcelable(DATA_BOUNDS, bounds);\n\t\tmsg.setData(data);\n\t\t// Send update message\n\t\tmHandler.sendMessage(msg);\n\t}", "public void computeStoredBounds()\n {\n computeSRectangleBound();\n computeCircleBound();\n }", "public void computeSRectangleBound()\n {\n this.savedSRectangleBound = getSRectangleBound();\n }", "public void updateBoundaries() {\n\t\t\n\t\tLOG.log(\"Updating boundaries.\");\n\t\t\n\t\tif (Program.WINDOW_MANAGER != null) {\n\t\t\t\n\t\t\tthis.setBounds(\n\t\t\t\tProgram.WINDOW_MANAGER.getScreenWidth() / 2 - this.getSize().width / 2,\n\t\t\t\tProgram.WINDOW_MANAGER.getScreenHeight() / 2 - this.getSize().height / 2,\n\t\t\t\tBOUNDS_LENGTH,\n\t\t\t\tBOUNDS_WIDTH\n\t\t\t);\n\t\t\tthis.setLocationRelativeTo(null);\n\t\t\t\n\t\t} else {\n\t\t\tthis.setBounds(10, 10, BOUNDS_LENGTH, BOUNDS_WIDTH);\n\t\t}\n\t}", "private void updateViewBounds() \r\n {\r\n assert !sim.getMap().isEmpty() : \"Visualiser needs simulator whose a map has at least one node\"; \r\n \r\n \r\n viewMinX = minX * zoomFactor;\r\n viewMinY = minY * zoomFactor;\r\n \r\n viewMaxX = maxX * zoomFactor;\r\n viewMaxY = maxY * zoomFactor;\r\n \r\n \r\n double marginLength = zoomFactor * maxCommRange;\r\n \r\n \r\n // Set the size of the component\r\n int prefWidth = (int)Math.ceil( (viewMaxX - viewMinX) + (marginLength * 2) );\r\n int prefHeight = (int)Math.ceil( (viewMaxY - viewMinY) + (marginLength * 2) );\r\n setPreferredSize( new Dimension( prefWidth, prefHeight ) );\r\n \r\n \r\n // Adjust for margin lengths \r\n viewMinX -= marginLength;\r\n viewMinY -= marginLength;\r\n \r\n viewMaxX += marginLength;\r\n viewMaxY += marginLength;\r\n }", "@Override\n\tpublic void update(double elapsedTime, Dimension bounds) {\n\t\tsuper.update(elapsedTime, bounds);\n\t}", "public void onBoundsResolved()\n {\n updateTransform();\n }", "public void onBoundsChange(Rect bounds) {\r\n }", "@Override\n\tpublic void update() {\n\t\tthis.setBounds(obstacle.getCoords().getX() * 64, obstacle.getCoords().getY() * 64, 64, 64);\n\t}", "public void onUpdate()\n\t{\n\t\tchunk.setModelBound(new BoundingBox());\n\t\tchunk.updateModelBound();\n\n\t}", "public abstract void recalculateSnapshotBounds();", "private void updateBounds(final float[] values) {\n if (getDrawable() != null) {\n mBounds.set(values[Matrix.MTRANS_X],\n values[Matrix.MTRANS_Y],\n getDrawable().getIntrinsicWidth() * values[Matrix.MSCALE_X] + values[Matrix.MTRANS_X],\n getDrawable().getIntrinsicHeight() * values[Matrix.MSCALE_Y] + values[Matrix.MTRANS_Y]);\n }\n }", "protected void computeBounds() {\r\n bounds = new Rectangle(layout.location.x - icon.getIconWidth() / 2,\r\n layout.location.y - icon.getIconHeight() / 2, icon.getIconWidth(), icon.getIconHeight()).union(labelBox)\r\n .union(ports[0].getBounds()).union(ports[1].getBounds()).union(ports[2].getBounds())\r\n .union(component.getType() == TemplateComponent.TYPE_CHANNEL\r\n ? ports[3].getBounds().union(supHalo.getBounds())\r\n : ports[3].getBounds());\r\n }", "void notifyVisibleBoundsChanged();", "public void onBoundsChange(Rect bounds) {\n this.boxWidth = bounds.width();\n this.boxHeight = bounds.height() - this.pointerHeight;\n super.onBoundsChange(bounds);\n }", "@Override\n public void setBounds(Rectangle bounds) {\n final Rectangle repaintBounds = new Rectangle(getBounds());\n\n final Rectangle newBounds = new Rectangle(ajustOnGrid(bounds.x),\n ajustOnGrid(bounds.y), ajustOnGrid(bounds.width), bounds.height);\n\n newBounds.width = newBounds.width < MINIMUM_SIZE.x ? MINIMUM_SIZE.x\n : newBounds.width;\n\n this.bounds = newBounds;\n\n parent.getScene().repaint(repaintBounds);\n parent.getScene().repaint(newBounds);\n\n // Move graphics elements associated with this component\n leftMovableSquare.setBounds(computeLocationResizer(0));\n rightMovableSquare.setBounds(computeLocationResizer(bounds.width));\n\n setChanged();\n notifyObservers();\n }", "private void updateBoxes(){\n if(model.getMap() != null) {\n DoubleVec position = invModelToView(new DoubleVec(canvas.getWidth()*0.5,canvas.getHeight()*0.5));\n inner = new Rectangle(position, 1.0/zoomFactor * fi * canvas.getWidth(), 1.0/zoomFactor * fi * canvas.getHeight(), 0);\n outer = new Rectangle(position, 1.0/zoomFactor * fo * canvas.getWidth(), 1.0/zoomFactor * fo * canvas.getHeight(), 0);\n }\n }", "public void setBounds(Rectangle bounds) {\r\n this.bounds = bounds;\r\n }", "public void setBounds(Rectangle2D bounds){\r\n\t\tthis.bounds = bounds;\r\n\t}", "public void updateBounds(){\r\n\t\tRectangle bounds = new Rectangle(super.getBounds());\r\n\t\tint preferredHeight = 0;\r\n\t\tfor(Object child : getChildren()){\r\n\t\t\tIFigure figure = (IFigure)child;\r\n\t\t\tpreferredHeight += figure.getPreferredSize().height;\r\n\t\t}\r\n\t\tif (preferredHeight == 0) preferredHeight = 200;\r\n\t\tbounds.setHeight(preferredHeight+20);\r\n\t\tsetBounds(bounds);\r\n\t}", "private void setBounds(RectProto.Builder builderForValue) {\n this.bounds_ = (RectProto) builderForValue.build();\n this.bitField0_ |= 8;\n }", "@Override\n public List<Bound> getBounds() {\n return Collections.unmodifiableList(bounds);\n }", "@Override\r\n\tpublic void setBounds(int x, int y, int width, int height) {\r\n\t\tsuper.setBounds(x, y, width, height);\r\n\t\tpv.update();\r\n\t}", "public void setBounds(RectF newBounds)\n {\n this.bounds = GeometryUtils.copy(newBounds);\n \n if (getShapeParent() != null)\n {\n GeometryUtils.resolveGeometry(this.bounds, this);\n }\n \n notifyParentOfPositionChange();\n conditionallyRepaint();\n }", "public void computeCircleBound()\n {\n this.savedCircleBound = getCircleBound();\n }", "public void updateDisplayBounds() {\n if (display_.getDataSource().getBounds() != null) {\n int[] newBounds = display_.getDataSource().getBounds();\n int[] oldBounds = display_.getDisplayModel().getBounds();\n double xResize = (oldBounds[2] - oldBounds[0]) / (double) (newBounds[2] - newBounds[0]);\n double yResize = (oldBounds[3] - oldBounds[1]) / (double) (newBounds[3] - newBounds[1]);\n setImageBounds(newBounds);\n if (xResize < 1 || yResize < 1) {\n zoom(1 / Math.min(xResize, yResize), null);\n }\n }\n }", "public void set(Bounds boundsObject) {\n\tbounds = boundsObject;\n }", "public void setBounds(Rect bounds) {\r\n\t\tthis.widthAndHeight = bounds;\r\n\t\tc.setBounds(bounds);\r\n\t}", "public void updateDimensions() {\n }", "public void onBoundsChange(Rect rect) {\n int i = 0;\n while (true) {\n Drawable[] drawableArr = this.mLayers;\n if (i < drawableArr.length) {\n Drawable drawable = drawableArr[i];\n if (drawable != null) {\n drawable.setBounds(rect);\n }\n i++;\n } else {\n return;\n }\n }\n }", "public void setBounds(Rectangle b);", "void setBounds(Rectangle rectangle);", "@Override\n protected void addBounds ()\n {\n ParticleSystemConfig.Layer psconfig = (ParticleSystemConfig.Layer)_config;\n GroupPriority priorityMode = psconfig.priorityMode;\n if (priorityMode == null) {\n _bounds.getCenter(_center);\n }\n super.addBounds();\n\n // add layer bounds to group bounds, if applicable\n if (priorityMode != null) {\n ((ParticleSystem)_parentScope).getGroupBounds(\n priorityMode.group).addLocal(_bounds);\n }\n }", "public Bounds getBounds () { return (bounds); }", "public void updateHitbox() {\n\t\tresistorPosEnd = new Rectangle(x - 10, y - 10, 40, 40);\n\t\tresistorNegEnd = new Rectangle(x + 30, y, 40, 40);\n\t}", "public void onBoundsChange(Rect rect) {\n Drawable drawable = this.f1995c;\n if (drawable != null) {\n drawable.setBounds(rect);\n }\n }", "public final native void setBounds(LatLngBounds bounds) /*-{\n this.setBounds(bounds); \n }-*/;", "public boolean setBounds(Rectangle bounds);", "public void onBoundsChange(Rect rect) {\n super.onBoundsChange(rect);\n this.f9050a.f9051a.setBounds(rect);\n }", "public RectF getBounds()\n {\n return bounds;\n }", "public void setBounds(Rectangle2D aRect)\n{\n setBounds(aRect.getX(), aRect.getY(), aRect.getWidth(), aRect.getHeight());\n}", "@Override\n\tpublic void CheckBounds() {\n\t\t\n\t}", "public void getBounds(Rect bounds) {\n final int outerX = (int) mOuterX;\n final int outerY = (int) mOuterY;\n final int r = (int) mOuterRadius + 1;\n bounds.set(outerX - r, outerY - r, outerX + r, outerY + r);\n }", "private void setBounds(RectProto value) {\n if (value != null) {\n this.bounds_ = value;\n this.bitField0_ |= 8;\n return;\n }\n throw new NullPointerException();\n }", "public void invalidateBounds() {\n\t\telementsBounds = null;\n\t}", "@Override\n protected void onBoundsChange(Rect bounds) {\n patternDrawable.setBounds(bounds);\n super.onBoundsChange(bounds);\n }", "public void correctPosition(Rectangle bounds) {\n\t\tif(!enabled())\n\t\t\treturn;\n\t\t\n\t\tbounds = Maths.wider(bounds, 20);\n\t\t\n\t\tif(!bounds.contains(renderX, track.getY())) {\n\t\t\trenderX = track.getX();\n\t\t}\n\t\tif(!bounds.contains(track.getX(), renderY)) {\n\t\t\trenderY = track.getY();\n\t\t}\n\t}", "private void updateBoundingBox()\n\t{\n\t\tif (this.facingDirection != null)\n\t\t{\n\t\t\tdouble d0 = (double) this.hangingPosition.getX() + 0.5D;\n\t\t\tdouble d1 = (double) this.hangingPosition.getY() + 0.5D;\n\t\t\tdouble d2 = (double) this.hangingPosition.getZ() + 0.5D;\n\t\t\tdouble d3 = 0.46875D;\n\t\t\tdouble d4 = this.someFunc(this.getWidthPixels());\n\t\t\tdouble d5 = this.someFunc(this.getHeightPixels());\n\t\t\td0 = d0 - (double) this.facingDirection.getFrontOffsetX() * 0.46875D;\n\t\t\td2 = d2 - (double) this.facingDirection.getFrontOffsetZ() * 0.46875D;\n\t\t\td1 = d1 + d5;\n\t\t\tEnumFacing enumfacing = this.facingDirection.rotateYCCW();\n\t\t\td0 = d0 + d4 * (double) enumfacing.getFrontOffsetX();\n\t\t\td2 = d2 + d4 * (double) enumfacing.getFrontOffsetZ();\n\t\t\tthis.posX = d0;\n\t\t\tthis.posY = d1;\n\t\t\tthis.posZ = d2;\n\t\t\tdouble d6 = (double) this.getWidthPixels();\n\t\t\tdouble d7 = (double) this.getHeightPixels();\n\t\t\tdouble d8 = (double) this.getWidthPixels();\n\n\t\t\tif (this.facingDirection.getAxis() == EnumFacing.Axis.Z)\n\t\t\t{\n\t\t\t\td8 = 1.0D;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\td6 = 1.0D;\n\t\t\t}\n\n\t\t\t// ???\n\n\t\t\td6 = d6 / (this.getWidthPixels() / this.blocksToTakeUp() * 2D);\n\t\t\td7 = d7 / (this.getHeightPixels() / this.blocksToTakeUp() * 2D);\n\t\t\td8 = d8 / (this.getWidthPixels() / this.blocksToTakeUp() * 2D);\n\t\t\tthis.setEntityBoundingBox(new AxisAlignedBB(d0 - d6, d1 - d7, d2 - d8, d0 + d6, d1 + d7, d2 + d8));\n\t\t}\n\t}", "public void update()\n {\n if (sashButton != null) {\n Rectangle r = sashButton.getBounds();\n\n if (topGridSash.isVisible()) {\n topGridSash.resetBounds(r);\n }\n\n if (leftGridSash.isVisible()) {\n leftGridSash.resetBounds(r);\n }\n }\n }", "public final void onBoundsChange(Rect rect) {\n if (this.f2289c != null) {\n this.f2289c.setBounds(rect);\n } else {\n this.f2274d.f2280b.setBounds(rect);\n }\n }", "public void updateOptimalCollisionArea();", "private void updatePosition() {\n position.add(deltaPosition);\n Vector2[] points = getRotatedPoints();\n\n for (Vector2 point : points) {\n if (point.getX() < bound.getX() || point.getX() > bound.getX() + bound.getWidth()) { //If the point is outside of the bounds because of X\n position.addX(-deltaPosition.getX() * 2); //Undo the move so it is back in bounds\n deltaPosition.setX(-deltaPosition.getX()); //Make the direction it is going bounce to the other direction\n break;\n }\n if (point.getY() < bound.getY() || point.getY() > bound.getY() + bound.getHeight()) { //If the point is outside of the bounds because of Y\n position.addY(-deltaPosition.getY() * 2); //Undo the move so it is back in bounds\n deltaPosition.setY(-deltaPosition.getY()); //Make the direction it is going bounce to the other direction\n break;\n }\n }\n deltaPosition.scale(.98);\n }", "void addBounds(int x, int y, int width, int height);", "public final void onHotspotBoundsChanged() {\n if (!this.mHasMaxRadius) {\n this.mTargetRadius = getTargetRadius(this.mBounds);\n onTargetRadiusChanged(this.mTargetRadius);\n }\n }", "public void update()\n\t{\n\t\tGViewMapManager gViewMapManager = this.guiController.getCurrentStyleMapManager();\n\t\tLayout layout = gViewMapManager.getLayout();\n\n\t\tswitch (layout)\n\t\t{\n\t\t\tcase LINEAR:\n\t\t\t\tthis.linear.setSelected(true);\n\t\t\t\tbreak;\n\t\t\tcase CIRCULAR:\n\t\t\t\tthis.circular.setSelected(true);\n\t\t\t\tbreak;\n default:\n break;\n\t\t}\n\t}", "@Override\n public void applySurfaceParams(SurfaceParams[] params) {\n RectF newAppBounds = new RectF(mAppBounds);\n params[0].matrix.mapRect(newAppBounds);\n Assert.assertThat(newAppBounds, new AlmostSame(mAppBounds));\n\n System.err.println(\"Bounds mapped: \" + mAppBounds + \" => \" + newAppBounds);\n }", "public void onBoundsChange(Rect bounds) {\n super.onBoundsChange(bounds);\n int radius = bounds.height() / 2;\n this.backgroundDrawable.setCornerRadius((float) radius);\n this.backgroundDrawable.setBounds(bounds);\n setDrawableByLayerId(16908334, getMaskDrawable(radius));\n }", "private void updateSize() {\n double width = pane.getWidth();\n double height = pane.getHeight();\n\n if(oldWidth == 0) {\n oldWidth = width;\n }\n if(oldHeight == 0) {\n oldHeight = height;\n }\n\n double oldHvalue = pane.getHvalue();\n double oldVvalue = pane.getVvalue();\n if(Double.isNaN(oldVvalue)) {\n oldVvalue = 0;\n }\n if(Double.isNaN(oldHvalue)) {\n oldHvalue = 0;\n }\n\n pane.setVmax(height);\n pane.setHmax(width);\n\n if(grow) {\n renderMapGrow(width, height, curZoom);\n } else {\n renderMap(width, height, curZoom);\n }\n\n pane.setVvalue((height/oldHeight)*oldVvalue);\n pane.setHvalue((width/oldWidth)*oldHvalue);\n\n oldWidth = width;\n oldHeight = height;\n }", "public Rectangle getBounds() {\r\n return bounds;\r\n }", "private void showBounds(){\n\n LatLngBounds.Builder boundBuilder = new LatLngBounds.Builder();\n\n\n for (int i = 0; i < points.size(); i++) {\n LatLng b_position = new LatLng(points.get(i).getLatitude(),points.get(i).getLongitude());\n boundBuilder.include(b_position);\n }\n\n LatLngBounds bounds = boundBuilder.build();\n\n int deviceWidth = getResources().getDisplayMetrics().widthPixels;\n int deviceHeight = getResources().getDisplayMetrics().heightPixels;\n int devicePadding = (int) (deviceHeight * 0.20); // offset from edges of the map 10% of screen\n\n CameraUpdate cu = CameraUpdateFactory.newLatLngBounds(bounds, deviceWidth, deviceHeight, devicePadding);\n mMap.animateCamera(cu);\n\n }", "private void mergeBounds(RectProto value) {\n RectProto rectProto = this.bounds_;\n if (rectProto == null || rectProto == RectProto.getDefaultInstance()) {\n this.bounds_ = value;\n } else {\n this.bounds_ = (RectProto) ((RectProto.Builder) RectProto.newBuilder(this.bounds_).mergeFrom((GeneratedMessageLite) value)).buildPartial();\n }\n this.bitField0_ |= 8;\n }", "public void colapse(){\n\t\tsetBounds(getX(), getY(), getDefaultWidth(), getHeight());\n\t\tcollisionBounds.setWidth(getDefaultWidth());\n\t}", "protected Rectangle determineBounds() {\n return getNetTransform().createTransformedShape( _bounds ).getBounds();\n }", "public void onBoundsChange(Rect rect) {\n super.onBoundsChange(rect);\n a();\n }", "public void changeBounds(Point3D minDelta, Point3D maxDelta) {\n this.minBounds = this.minBounds.add(minDelta);\n this.maxBounds = this.maxBounds.add(maxDelta);\n\n if (minBounds == NO_MIN_BOUNDS) {\n this.minBounds = minDelta;\n }\n if (maxBounds == NO_MAX_BOUNDS) {\n this.maxBounds = maxDelta;\n }\n }", "private void setAppBounds(RectProto.Builder builderForValue) {\n this.appBounds_ = (RectProto) builderForValue.build();\n this.bitField0_ |= 1;\n }", "private void updateBoundingBox(Point_dt p) {\n\t\tdouble x = p.x(), y = p.y(), z = p.z();\n\t\tif (m_boundingBoxMin == null) {\n\t\t\tm_boundingBoxMin = new Point_dt(p);\n\t\t\tm_boundingBoxMax = new Point_dt(p);\n\t\t} else {\n\t\t\tif (x < m_boundingBoxMin.x())\n\t\t\t\tm_boundingBoxMin.setX(x);\n\t\t\telse if (x > m_boundingBoxMax.x())\n\t\t\t\tm_boundingBoxMax.setX(x);\n\t\t\tif (y < m_boundingBoxMin.y())\n\t\t\t\tm_boundingBoxMin.setY(y);\n\t\t\telse if (y > m_boundingBoxMax.y())\n\t\t\t\tm_boundingBoxMax.setY(y);\n\t\t\tif (z < m_boundingBoxMin.z())\n\t\t\t\tm_boundingBoxMin.setZ(z);\n\t\t\telse if (z > m_boundingBoxMax.z())\n\t\t\t\tm_boundingBoxMax.setZ(z);\n\t\t}\n\t}", "@SuppressWarnings(\"unchecked\")\n public AnimatorType bounds(RectF bounds)\n {\n addTransformer(new BoundsTransformer(getShape(), bounds));\n return (AnimatorType) this;\n }", "@Override\n protected void onSizeChanged (int w, int h, int oldw, int oldh) {\n mXSize = w;\n mYSize = h;\n\n mZBoundOut = new RectF(w/2-w/2.5f, h/2-w/2.5f, w/2+w/2.5f, h/2+w/2.5f);\n mZBoundOut2 = new RectF(\n w/2-w/2.5f-ZRING_CURSOR_ADD, h/2-w/2.5f-ZRING_CURSOR_ADD,\n w/2+w/2.5f+ZRING_CURSOR_ADD, h/2+w/2.5f+ZRING_CURSOR_ADD);\n mZBoundIn = new RectF(\n w/2-w/2.5f+ZRING_WIDTH, h/2-w/2.5f+ZRING_WIDTH,\n w/2+w/2.5f-ZRING_WIDTH, h/2+w/2.5f-ZRING_WIDTH);\n mZBoundIn2 = new RectF(\n w/2-w/2.5f+ZRING_WIDTH+ZRING_CURSOR_ADD, h/2-w/2.5f+ZRING_WIDTH+ZRING_CURSOR_ADD,\n w/2+w/2.5f-ZRING_WIDTH-ZRING_CURSOR_ADD, h/2+w/2.5f-ZRING_WIDTH-ZRING_CURSOR_ADD);\n\n if (LOCAL_LOGV) Log.v(TAG, \"New view size = (\"+w+\", \"+h+\")\");\n }", "private void updateButtonBounds(){\n\t\tactionButton.setVisible(true);\n\t\tactionButton.setToolTipText(toolTips[boundIndex]);\n\t\tactionButton.setBounds(buttonBounds[boundIndex]);\n\t\texitButton.setBounds(exitBounds);\n\t}", "public void updateCoords() {\n line.setLine(parent.getFullBounds().getCenter2D(), child.getFullBounds().getCenter2D());\n Rectangle2D r = line.getBounds2D();\n // adding 1 to the width and height prevents the bounds from\n // being marked as empty and is much faster than createStrokedShape()\n setBounds(r.getX(), r.getY(), r.getWidth() + 1, r.getHeight() + 1);\n invalidatePaint();\n }", "private void clearBounds() {\n this.bounds_ = null;\n this.bitField0_ &= -9;\n }", "private void update() {\n if (_dirty) {\n _fmin = _clips.getClipMin();\n _fmax = _clips.getClipMax();\n _fscale = 256.0f/(_fmax-_fmin);\n _flower = _fmin;\n _fupper = _flower+255.5f/_fscale;\n _dirty = false;\n }\n }", "private void updateBoundingBox() {\n // TODO(sonpham): Optimize this. There is an amazing amount of repetition in this code.\n double downUnitX = MathUtils.quickCos((float) (anchorAngle + Math.PI));\n double downUnitY = MathUtils.quickSin((float) (anchorAngle + Math.PI));\n double sideUnitX = MathUtils.quickCos((float) (anchorAngle + Math.PI / 2));\n double sideUnitY = MathUtils.quickSin((float) (anchorAngle + Math.PI / 2));\n\n double aliveHeight = aliveTroopsMap.size() * 1.0 / width * unitStats.spacing;\n double fullToAliveRatio = 1.0 * troops.size() / aliveTroopsMap.size() ;\n\n double topLeftX = averageX - downUnitX * aliveHeight / 2 - sideUnitX * unitStats.spacing * width / 2;\n double topLeftY = averageY - downUnitY * aliveHeight / 2 - sideUnitY * unitStats.spacing * width / 2;\n\n double topRightX = averageX - downUnitX * aliveHeight / 2 + sideUnitX * unitStats.spacing * width / 2;\n double topRightY = averageY - downUnitY * aliveHeight / 2 + sideUnitY * unitStats.spacing * width / 2;\n\n double healthBotLeftX = averageX + downUnitX * aliveHeight / 2 - sideUnitX * unitStats.spacing * width / 2;\n double healthBotLeftY = averageY + downUnitY * aliveHeight / 2 - sideUnitY * unitStats.spacing * width / 2;\n\n double healthBotRightX = averageX + downUnitX * aliveHeight / 2 + sideUnitX * unitStats.spacing * width / 2;\n double healthBotRightY = averageY + downUnitY * aliveHeight / 2 + sideUnitY * unitStats.spacing * width / 2;\n\n double botLeftX = (healthBotLeftX - topLeftX) * fullToAliveRatio + topLeftX;\n double botLeftY = (healthBotLeftY - topLeftY) * fullToAliveRatio + topLeftY;\n\n double botRightX = (healthBotRightX - topRightX) * fullToAliveRatio + topRightX;\n double botRightY = (healthBotRightY - topRightY) * fullToAliveRatio + topRightY;\n\n aliveBoundingBox[0][0] = topLeftX; aliveBoundingBox[0][1] = topLeftY;\n aliveBoundingBox[1][0] = topRightX; aliveBoundingBox[1][1] = topRightY;\n aliveBoundingBox[2][0] = healthBotRightX; aliveBoundingBox[2][1] = healthBotRightY;\n aliveBoundingBox[3][0] = healthBotLeftX; aliveBoundingBox[3][1] = healthBotLeftY;\n\n boundingBox[0][0] = topLeftX; boundingBox[0][1] = topLeftY;\n boundingBox[1][0] = topRightX; boundingBox[1][1] = topRightY;\n boundingBox[2][0] = botRightX; boundingBox[2][1] = botRightY;\n boundingBox[3][0] = botLeftX; boundingBox[3][1] = botLeftY;\n }", "@Override\n public void setBounds(int x, int y, int w, int h, int op) {\n setBounds(x, y, w, h, op, true, false);\n }", "public void setBound(final Bounds bounds) {\n\t\tbound.setBound(relation, bounds);\n\t}", "public LatLngBounds setupBounds(){\n\t\t\n\t\t\n\t\tdouble deltaLat = 0.000015; // correction value\n\t\t\n\t\tLatLng northEast = new LatLng(60.1876397959336 + (2.4 * deltaLat), 24.8207008838576);\n\t\tLatLng southWest = new LatLng(60.1866756699501 + deltaLat, 24.8172971606177);\n\t\t\n\t\t\n\t\t// 60.1866756699501\n\t\treturn new LatLngBounds(southWest, northEast);\n\t}", "public void updateHeight() {\n Rectangle repaintBounds = getBounds();\n parent.getScene().paintImmediately(repaintBounds);\n\n // set new height compute while repainting.\n setBounds(new Rectangle(bounds));\n\n parent.getScene().repaint(repaintBounds);\n setChanged();\n notifyObservers();\n }", "@Override protected void updateAxisRange() {\n final Axis<X> xa = getXAxis();\n final Axis<Y> ya = getYAxis();\n List<X> xData = null;\n List<Y> yData = null;\n if(xa.isAutoRanging()) xData = new ArrayList<X>();\n if(ya.isAutoRanging()) yData = new ArrayList<Y>();\n if(xData != null || yData != null) {\n for(Series<X,Y> series : getData()) {\n for(Data<X,Y> data: series.getData()) {\n if(xData != null) {\n xData.add(data.getXValue());\n xData.add(xa.toRealValue(xa.toNumericValue(data.getXValue()) + getLength(data.getExtraValue())));\n }\n if(yData != null){\n yData.add(data.getYValue());\n }\n }\n }\n if(xData != null) xa.invalidateRange(xData);\n if(yData != null) ya.invalidateRange(yData);\n }\n }", "public void onBoundsChange(Rect rect) {\n super.onBoundsChange(rect);\n this.f413n = true;\n }", "public RMRect bounds() { return new RMRect(x(), y(), width(), height()); }", "public void setAnalysisBounds(Rectangle bounds) {\n this.bounds = bounds;\n }", "public void update() {\n\t\tgetLocation().offsetX(getDirection().getXOffset());\n\t\tgetLocation().offsetY(getDirection().getYOffset());\n\t\t\n\t\tChunk center = World.getMap().getCenterChunk();\n\t\t\n\t\tint localX = (int) (getLocation().getX() - center.getData().getRealX());\n\t\tint localY = (int) (getLocation().getY() - center.getData().getRealY());\n\t\t\n\t\tif(localX < 0 ||localY< 0\n\t\t\t|| localX > 256 || localY > 256) {\n\t\t\t\tWorld.getMap().load(getLocation());\n\t\t}\n\t}", "public boolean getBoundsVolatile() {\n\t\treturn true;\n\t}", "private void destroyBounds() {\n size -= 4;\n this.setBounds(bounds.left, bounds.top);\n if (size <= 0) models.remove(this);\n }", "public void checkBounds(Scope scope) {\n}", "protected void update(Rectangle r)\n {\n if ((r != null) &&\n (bottomRightResize != null) &&\n bottomRightResize.isVisible())\n {\n // Since the resize rects are not drawn in the zoomed area\n // calculate the positions in the unzoomed context\n double scale = frameUI.getZoom();\n\n // Center on corners. These figures are not \"scaled\" they must\n // be positioned in SCALED location, not in 1:1 location.\n double right = r.x + r.width;\n double bottom = r.y + r.height;\n\n int x = PrecisionUtilities.round(r.x * scale);\n int y = PrecisionUtilities.round(r.y * scale);\n int width = PrecisionUtilities.round(right * scale) - x;\n int height = PrecisionUtilities.round(bottom * scale) - y;\n\n // Trigger a redraw on all handles.\n if (topLeftResize.isVisible()) {\n topLeftResize.centerAt(x, y);\n topLeftResize.repaint();\n }\n\n bottomLeftResize.centerAt(x, y + height);\n bottomLeftResize.repaint();\n\n topRightResize.centerAt(x + width, y);\n topRightResize.repaint();\n\n bottomRightResize.centerAt(x + width, y + height);\n bottomRightResize.repaint();\n }\n }", "public void update()\n {\n if ((potentialFigureOwner != null) &&\n (rightPotentialFigure.isVisible() ||\n bottomPotentialFigure.isVisible()))\n {\n DoubleRectangle shapeBds =\n potentialFigureOwner.getModel().getEltBounds();\n Rectangle bds =\n PrecisionUtilities.getDraw2DRectangle(shapeBds);\n\n if (rightPotentialFigure.isVisible()) {\n // Figure should appear to the right of the existing widget\n rightPotentialFigure.resetBounds(bds.x + bds.width,\n bds.y,\n bds.width,\n bds.height);\n }\n\n if (bottomPotentialFigure.isVisible()) {\n if (potentialFigureOwner instanceof GraphicalContextMenu)\n {\n bds.x =\n PrecisionUtilities.round(shapeBds.x\n + (0.5 * shapeBds.width));\n bds.y =\n PrecisionUtilities.round(shapeBds.y\n + (0.5 * shapeBds.height));\n bds.width = FrameEditorUI.MENU_ITEM_WIDTH;\n bds.height = FrameEditorUI.MENU_ITEM_HEIGHT;\n }\n else {\n if (potentialFigureOwner instanceof GraphicalMenuHeader)\n {\n bds.width =\n (int) Math.round(bds.width * FrameEditorUI.MENU_ITEM_RATIO);\n }\n\n // Figure should appear underneath existing widget\n bds.y += bds.height;\n\n IWidget owner = potentialFigureOwner.getModel();\n Object isSep =\n owner.getAttribute(WidgetAttributes.IS_SEPARATOR_ATTR);\n\n if (NullSafe.equals(WidgetAttributes.IS_SEPARATOR,\n isSep))\n {\n // current widget is a separator and the height of\n // the potential widget needs to be increased\n bds.height =\n (int) Math.round(bds.height * FrameEditorUI.SEPARATOR_RATIO);\n }\n }\n\n bottomPotentialFigure.resetBounds(bds);\n }\n }\n }", "private void updateDimensions() {\r\n width = gui.getWidth();\r\n height = gui.getHeight();\r\n yLabelsMargin = (int) gui.getLabelWidth(Integer.toString(((int) maximumDB / 10) * 10), true) + 2;\r\n if (track != null)\r\n scaleXpx = ((float) width - yLabelsMargin) / track.getBufferCapacity();\r\n else\r\n scaleXpx = 1;\r\n scaleYpx = (float) ((height - 1) / (maximumDB - minimumDB));\r\n if (scaleYpx == 0)\r\n scaleYpx = 1;\r\n }", "private void updateBoundingBox(GM_Object geo) {\r\n double minx_ = 0; double miny_ = 0;\r\n double maxx_ = 0; double maxy_ = 0;\r\n \r\n if ( geo instanceof GM_Point ) {\r\n minx_ = ((GM_Point)geo).getX();\r\n miny_ = ((GM_Point)geo).getY();\r\n maxx_ = ((GM_Point)geo).getX();\r\n maxy_ = ((GM_Point)geo).getY();\r\n } else {\r\n GM_Envelope tmp = geo.getEnvelope();\r\n minx_ = tmp.getMin().getX();\r\n miny_ = tmp.getMin().getY();\r\n maxx_ = tmp.getMax().getX();\r\n maxy_ = tmp.getMax().getY();\r\n }\r\n \r\n if ( minx_ < minx ) minx = minx_;\r\n if ( maxx_ > maxx ) maxx = maxx_;\r\n if ( miny_ < miny ) miny = miny_;\r\n if ( maxy_ > maxy ) maxy = maxy_;\r\n }", "public void setRectangleBounds(String bounds) {\n checkAvailable();\n impl.setRectangle(bounds);\n }", "public void updateOnMaskChange() {\n if(maskList != null) {\n int[] displayMaskData = resolveMasks();\n maskRaster.setDataElements(0, 0, imgWidth, imgHeight, displayMaskData);\n maskImage.setData(maskRaster);\n }\n }", "void provideBounds(DiagramDescription diagram);", "@Override\n public void getLocalBounds(Vector3 min, Vector3 max) {\n\n // Maximum bounds\n max.setX(radius + margin);\n max.setY(halfHeight + margin);\n max.setZ(max.getX());\n\n // Minimum bounds\n min.setX(-max.getX());\n min.setY(-max.getY());\n min.setZ(min.getX());\n }", "@Override\n\tpublic void setBounds(int x, int y, int width, int height) {\n\t\t\n\t\t\n\t\tsuper.setBounds(x, y, width, height);\n\t}", "@Override\n public void fitBoundsToLayers() {\n int width = 0;\n int height = 0;\n\n Rectangle layerBounds = new Rectangle();\n\n for (int i = 0; i < this.layers.size(); i++) {\n this.getLayer(i).getBounds(layerBounds);\n\n if (width < layerBounds.width) {\n width = layerBounds.width;\n }\n\n if (height < layerBounds.height) {\n height = layerBounds.height;\n }\n }\n\n this.bounds.width = width;\n this.bounds.height = height;\n }", "public void updateUnionArea() {\n this.mBlurUnionRect.setEmpty();\n for (Map.Entry<View, HwBlurEntity> entityEntry : this.mTargetViews.entrySet()) {\n View targetView = entityEntry.getKey();\n HwBlurEntity blurEntity = entityEntry.getValue();\n if (targetView.isShown() && blurEntity.isEnabled()) {\n Rect targetViewRect = new Rect();\n targetView.getGlobalVisibleRect(targetViewRect);\n blurEntity.setTargetViewRect(targetViewRect);\n this.mBlurUnionRect.union(targetViewRect);\n }\n targetView.invalidate();\n }\n initBitmapAndCanvas();\n }", "public void setBounds(double anX, double aY, double aW, double aH) { setX(anX); setY(aY); setWidth(aW); setHeight(aH); }", "@Override\n protected void updateAxisRange(){\n Axis<X> xAxis = getXAxis();\n Axis<Y> yAxis = getYAxis();\n ArrayList<X> xList = null;\n ArrayList<Y> yList = null;\n if(xAxis.isAutoRanging()) { xList = new ArrayList<>(); }\n if(yAxis.isAutoRanging()) { yList = new ArrayList<>(); }\n\n if(xAxis != null || yAxis != null) {\n for (Series<X, Y> series : getData()) {\n for (Data<X, Y> data : series.getData()) {\n if(xList != null) {\n xList.add(data.getXValue());\n xList.add(xAxis.toRealValue(xAxis.toNumericValue(data.getXValue())\n + getLength(data.getExtraValue())));\n }\n if(yList != null) {\n yList.add(data.getYValue());\n }\n }\n }\n if(xList != null) { xAxis.invalidateRange(xList); }\n if(yList != null) { yAxis.invalidateRange(yList); }\n }\n\n }" ]
[ "0.7865881", "0.7312695", "0.7298875", "0.7229843", "0.70382565", "0.70022863", "0.69610065", "0.69493747", "0.69141257", "0.6869181", "0.6828966", "0.6828488", "0.6811284", "0.6806402", "0.678252", "0.6752359", "0.67458767", "0.66918695", "0.66810274", "0.66757125", "0.6642139", "0.6568082", "0.656327", "0.65270305", "0.6526263", "0.6475133", "0.6417439", "0.6377134", "0.63573533", "0.63454515", "0.6340098", "0.63318163", "0.6293351", "0.6290857", "0.629054", "0.62880456", "0.6275101", "0.6253634", "0.6212788", "0.6164462", "0.61526316", "0.6146746", "0.6126535", "0.6114993", "0.61039853", "0.61002344", "0.60958827", "0.6092366", "0.60921293", "0.6083716", "0.6083298", "0.60756415", "0.6061333", "0.60512906", "0.603718", "0.6033816", "0.603236", "0.6025735", "0.60137403", "0.59925085", "0.59816045", "0.59769285", "0.59617484", "0.59421146", "0.59376967", "0.5929564", "0.59243125", "0.591778", "0.59111667", "0.5902525", "0.59009314", "0.58996487", "0.5892711", "0.58808535", "0.58807087", "0.5878492", "0.58746094", "0.5870155", "0.5868954", "0.58668846", "0.5863807", "0.5854331", "0.58471656", "0.58286864", "0.58250004", "0.5817038", "0.58157486", "0.58051014", "0.5804053", "0.578831", "0.5765358", "0.57640404", "0.5761109", "0.57475793", "0.5726205", "0.5716669", "0.5704019", "0.57026863", "0.5666847", "0.5666205", "0.5662638" ]
0.0
-1
Created by linchen on 2018/5/28.
public interface ILifeCycle { <T> LifecycleTransformer<T> doBindToLifecycle(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tpublic void grabar() {\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 func_104112_b() {\n \n }", "@Override\n public void init() {\n\n }", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\n void init() {\n }", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n public void init() {\n }", "private void poetries() {\n\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public final void mo51373a() {\n }", "private void init() {\n\n\t}", "@Override\n\tpublic void anular() {\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\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\n public int describeContents() { return 0; }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n public void init() {}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "public void mo38117a() {\n }", "@Override\n protected void initialize() \n {\n \n }", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\r\n\tpublic void init() {}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n protected void init() {\n }", "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}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@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\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 ayuda() {\n\r\n\t\t\t}", "@Override\n public void memoria() {\n \n }", "public void mo4359a() {\n }", "@Override\n\tpublic void init() {\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "private void kk12() {\n\n\t}", "@Override\n\tpublic void init()\n\t{\n\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "private void m50366E() {\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 }", "private Rekenhulp()\n\t{\n\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\n public void initialize() { \n }", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n public void initialize() {}", "@Override\n public void initialize() {}", "@Override\n public void initialize() {}", "public void mo6081a() {\n }", "private void init() {\n\n\n\n }", "@Override\n\t\tpublic void init() {\n\t\t}", "protected boolean func_70814_o() { return true; }", "private MetallicityUtils() {\n\t\t\n\t}", "public void gored() {\n\t\t\n\t}", "private void init() {\n }", "@Override\n public void initialize() {\n \n }", "@Override\n public void init() {\n }", "Consumable() {\n\t}", "@Override\r\n\tpublic final void init() {\r\n\r\n\t}" ]
[ "0.5913988", "0.58691734", "0.5649032", "0.5633743", "0.5596107", "0.5596107", "0.5566582", "0.5534769", "0.5514833", "0.5503615", "0.5502001", "0.5486427", "0.5467284", "0.54659927", "0.54577184", "0.5452355", "0.54513866", "0.5435238", "0.5432725", "0.5426471", "0.5426471", "0.5426471", "0.5426471", "0.5426471", "0.54248184", "0.541526", "0.54117036", "0.54008824", "0.54008824", "0.54008824", "0.54008824", "0.54008824", "0.54008824", "0.53961337", "0.5382782", "0.5382601", "0.5379261", "0.5376918", "0.5371948", "0.5356554", "0.53551", "0.5352284", "0.5352284", "0.5352284", "0.53447825", "0.5344782", "0.5344782", "0.5326019", "0.53199196", "0.5315446", "0.5315446", "0.5315446", "0.5310747", "0.5310251", "0.53054404", "0.530414", "0.530414", "0.52945995", "0.52918637", "0.52918637", "0.52918637", "0.5290076", "0.5290076", "0.5280966", "0.52752626", "0.52572757", "0.52528983", "0.5250552", "0.5249218", "0.5249085", "0.5248036", "0.5244652", "0.52407616", "0.5234871", "0.5234871", "0.5234871", "0.5234871", "0.5234871", "0.5234871", "0.5234871", "0.52337295", "0.5233353", "0.523233", "0.5232313", "0.5228192", "0.5200371", "0.5187237", "0.5185513", "0.5185513", "0.5185513", "0.5182262", "0.51747465", "0.51730394", "0.5171444", "0.5161838", "0.5157254", "0.5154093", "0.5153545", "0.5152466", "0.5133183", "0.5124936" ]
0.0
-1
Create an instance of the Compressor $
public Compressor(int pcmId) { initCompressor(pcmId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Compressor() {\n initCompressor(getDefaultSolenoidModule());\n }", "private CompressionTools() {}", "public CompressorSubsystem() {\r\n compressor = new Compressor(RobotMap.compressorPressureSwitch, RobotMap.compressorRelay);\r\n }", "private ZipCompressor(){}", "public static void Init()\n {\n _compressor = new Compressor();\n }", "public RobotCompressor(){\n \n robotCompressor = new Compressor(RobotMap.PRESSURE_SWITCH, RobotMap.COMPRESSOR_SPIKE);\n robotCompressor.start();\n }", "private StandardDeCompressors() {}", "public ICompressor getCompressor()\n {\n return compressor;\n }", "public ParameterizedClass getCompressorClass()\n {\n return compressorClass;\n }", "@Override\n\tpublic void Compress() {\n\t\t\n\t}", "private ByteTools(){}", "public CompressibleByteArrayOutputStream() {\r\n this(DEFAULT_COMPRESSION_THRESHOLD);\r\n }", "CompiledFilter() {\n }", "private CompressionCodec getCompressionCodec() throws Exception {\n try {\n Constructor<?> constructor = Class.forName(compressionCodec).getConstructor();\n return (CompressionCodec)constructor.newInstance();\n } catch (Exception e) {\n throw new Exception(e);\n }\n }", "private ZipUtils() {\n }", "public ByteArrayCache() {\n try {\n imm = ImmortalMemory.instance();\n byteBuffers = (Queue) imm.newInstance(Queue.class);\n } catch (Exception e) {\n ZenProperties.logger.log(Logger.WARN, getClass(), \"<init>\", e);\n System.exit(-1);\n }\n }", "public BitmapEncoder() {\n this((Bitmap.CompressFormat) null, 90);\n }", "private JarUtils() {\n }", "public DisruptorBundler() {\n\n }", "public HuffmanCompressor(){\n charList = new ArrayList<HuffmanNode>();\n }", "@NotNull\n public Server.Builder build() {\n return builder.compression(compressionSetting);\n }", "private Encoder() {}", "public TransformationBuff() {}", "public ArchiveInfo() {\n\t}", "protected abstract void construct();", "public LibraryCache() {\n\t }", "ByteHandler getInstance();", "public FrostDeployer() {\n\n }", "public EWAHCompressedBitmap() {\n\t\tthis.buffer = new long[defaultbuffersize];\n\t\tthis.rlw = new RunningLengthWord(this.buffer, 0);\n\t}", "public ServicioUjaPack() {\n }", "public static ByteArrayCache instance() {\n if (_instance == null) try {\n _instance = (ByteArrayCache) ImmortalMemory.instance().newInstance( ByteArrayCache.class);\n ZenProperties.logger.log(Logger.INFO, ByteArrayCache.class, \"instance\", \"ByteArrayCache created\");\n } catch (Exception e) {\n ZenProperties.logger.log(Logger.FATAL, ByteArrayCache.class, \"instance\", e);\n System.exit(-1);\n }\n return _instance;\n }", "Reproducible newInstance();", "public Purp() {\n }", "public static JChineseConvertor getInstance() {\r\n\t\tif (instance == null) {\r\n\t\t\ttry {\r\n\t\t\t\tinstance = new JChineseConvertor(DEF_SRC_FILE);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tthrow new IllegalStateException(\"Can not create new instance of JChineseConvertor : \" + e.getMessage(), e);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn instance;\r\n\t}", "public Merchant() {\n\n\t}", "public native void constructor();", "private IndexBitmapObject() {\n\t}", "protected Compressor(int blockSize, int superblockSize, String formatString) throws IllegalArgumentException {\n\t\tif (blockSize < 1 || blockSize >= superblockSize) {\n\t\t\tthrow new IllegalArgumentException(String.format(\n\t\t\t\t\t\"Block size (%d) must be a positive integer.\", blockSize));\n\t\t}\n\t\tthis.blockSize = blockSize;\n\t\tif (superblockSize < 1 || superblockSize % blockSize != 0) {\n\t\t\tthrow new IllegalArgumentException(String.format(\n\t\t\t\t\t\"Superblock size (%d) must be a positive integer multiple of block size (%d).\",\n\t\t\t\t\tsuperblockSize, blockSize));\n\t\t}\n\t\tthis.superblockSize = superblockSize;\n\t\tif (formatString == null || formatString.length() == 0) {\n\t\t\tthrow new IllegalArgumentException(\"Format string cannot be null or empty string.\");\n\t\t}\n\t\tthis.formatString = formatString;\n\t\ttry {\n\t\t\tcompressionInterface = getCompressionInterface(formatString);\n\t\t\tSystem.out.println(String.format(\"Using compression interface \\\"%s\\\".%n\", formatString));\n\t\t} catch (ClassNotFoundException e) {\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\tString.format(\n\t\t\t\t\t\t\t\"Unable to locate Compressor for compression format \\\"%s\\\".\", formatString));\n\t\t} catch (Exception e) {\n\t\t\tthrow new IllegalArgumentException(e.getMessage());\n\t\t}\n\t\tbytesRead = 0L;\n\t\tblocksRead = 0L;\n\t\tsuperblocksRead = 0L;\n\t\tcompressedBytes = 0L;\n\t\tcompressedBlocks = 0L;\n\t\tactualBytes = 0L;\n\t\tbuffer = new byte[superblockSize];\n\t\tclearBuffer();\n\t}", "public Pack2FactoryImpl() {\n\t\tsuper();\n\t}", "Object build();", "public HotrodCacheFactory() {\n }", "public Builder compressionEnabled(boolean compressionEnabled) {\n this.compressionEnabled = compressionEnabled;\n return this;\n }", "private VerifierFactory() {\n }", "public FastBarcodeScannerPlugin() {\r\n\t}", "private Instantiation(){}", "public ClassBundle() {\n }", "public ClimberSubsystem()\n {\n climbSolenoid.set(false);\n DiskManipulatorSubsystem.compressor.enabled();\n }", "public PertFactory() {\n for (Object[] o : classTagArray) {\n addStorableClass((String) o[1], (Class) o[0]);\n }\n }", "public DemoPluginFactory() {}", "public interface JSCompressor\r\n{\r\n\r\n /**\r\n * Constants for optimization level\r\n */\r\n int NONE = 0;\r\n\r\n int MAX = 9;\r\n\r\n /**\r\n * Javascript language versions\r\n */\r\n int JAVASCRIPT_1_1 = 110;\r\n\r\n int JAVASCRIPT_1_2 = 120;\r\n\r\n int JAVASCRIPT_1_3 = 130;\r\n\r\n /**\r\n * Compress the input script file into the output file (may be same).\r\n * \r\n * @param input source to get compressed\r\n * @param output compressed script\r\n * @param level optimization level from 0 to 9. May have various\r\n * signification dependending on the compressor, from beeing ignored to some\r\n * fine tweaking the output.\r\n * @param language version of javascript to be used (\"130\" for JS 1.3), as\r\n * defined by Mozilla Rhino engine\r\n * @throws CompressionException any error during compression\r\n */\r\n void compress( File input, File output, int level, int language )\r\n throws CompressionException;\r\n}", "public static BazaarManager newInstance() throws BazaarException {\r\n\t\tfinal BazaarManager bazaarManager;\r\n\t\t// final MutableConfiguration<Long, BazaarManager> configuration = new\r\n\t\t// MutableConfiguration<Long, BazaarManager>();\r\n\t\t// configuration.setStoreByValue(false);\r\n\t\t// configuration.setTypes(Long.class, BazaarManager.class);\r\n\t\t// configuration.setExpiryPolicyFactory(AccessedExpiryPolicy.factoryOf(Duration.ONE_MINUTE));\r\n\t\t// final Cache<Long, BazaarManager> cache =\r\n\t\t// Cache.newInstance(configuration, BazaarManager.class.getName(),\r\n\t\t// Long.class, BazaarManager.class);\r\n\t\t// if (cache.containsKey(Thread.currentThread().getId())) {\r\n\t\t// bazaarManager = cache.get(Thread.currentThread().getId());\r\n\t\t// }\r\n\t\t// else {\r\n\t\ttry {\r\n\t\t\tfinal Class<?> bazaarManagerClass = Class.forName(\"org.apache.bazaar.BazaarManagerImpl\");\r\n\t\t\tfinal Method method = bazaarManagerClass.getDeclaredMethod(\"newInstance\", new Class[] {});\r\n\t\t\tmethod.setAccessible(true);\r\n\t\t\tbazaarManager = (BazaarManager)method.invoke(new Object[] {});\r\n\t\t\t// cache.put(Thread.currentThread().getId(), bazaarManager);\r\n\t\t}\r\n\t\tcatch (final NoSuchMethodException | SecurityException | IllegalAccessException | IllegalArgumentException\r\n\t\t\t\t| InvocationTargetException | ClassNotFoundException exception) {\r\n\t\t\tthrow new BazaarException(exception);\r\n\t\t}\r\n\t\t// }\r\n\t\treturn bazaarManager;\r\n\t}", "private JacobUtils() {}", "public ServerResponseCreateArchive() {\n }", "public Object build();", "public TailoredImage compress() {\n\t\t\tsetPrimaryImg(snappyCompress(getPrimaryImg()));\n\t\t\tsetBlockImg(snappyCompress(getBlockImg()));\n\t\t\treturn this;\n\t\t}", "public AssetsService() {\r\n }", "private JadTool() { }", "public abstract Object build();", "@Override\r\n public void pack() {\r\n super.pack();\r\n JkFileTree.of(this.classDir()).exclude(\"**/*.jar\").zip().to(packer().jarFile(\"lean\"));\r\n distrib();\r\n }", "Compleja createCompleja();", "public CacheManager()\n\t{\n\t}", "public JStore()\n {\n //put code in here\n }", "private static void makeInstance(){\n\n if(settingsFile==null){\n settingsFile = new MetadataFile(SETTINGS_FILE_PATH);\n }\n\n if(!settingsFile.exists()){\n settingsFile.create();\n }\n\n if(tagListeners==null){\n tagListeners= new HashMap<>();\n }\n\n }", "public static Construtor construtor() {\n return new Construtor();\n }", "public Merchant() {}", "@Override\n public PackageAnalyzer newAnalyzer() {\n if (extractBaseDir == null) {\n synchronized (this) {\n try {\n extractBaseDir = Files.createTempDirectory(\"extractorStaging\").toFile();\n } catch (final IOException e) {\n throw new RuntimeException(\"Could not create temporary extraction directory\", e);\n }\n }\n }\n return new DcsPackageAnalyzer(new OpenPackageService(),\n extractBaseDir);\n }", "private Dex2JarProxy() {\r\n\t}", "Parcelle createParcelle();", "public Filter() {\n }", "public PjxParser()\r\n {\r\n LOG.info(this + \" instantiated\");\r\n }", "private AES() {\r\n\r\n }", "@Override\n public File compress() throws Exception\n {\n File dest = File.createTempFile(\"TMP\",\".tar.gz\");\n FileOutputStream fos = new FileOutputStream( dest );\n BufferedOutputStream bos = new BufferedOutputStream(fos);\n TarOutputStream out = new TarOutputStream(bos);\n tarFolder( null, folder.getAbsolutePath(), out );\n out.close();\n return dest;\n }", "static JarCollectorConfigImpl createJarCollectorConfig(Map<String, Object> settings) {\n if (settings == null) {\n settings = Collections.emptyMap();\n }\n return new JarCollectorConfigImpl(settings);\n }", "public CompressibleByteArrayOutputStream(int pcompressionThreshold) {\r\n bop = new ReusableByteArrayOutputStream(pcompressionThreshold < 32 ? 32 : pcompressionThreshold > DEFAULT_COMPRESSION_THRESHOLD ? DEFAULT_COMPRESSION_THRESHOLD : pcompressionThreshold);\r\n compressionThreshold = pcompressionThreshold;\r\n compressionEnabled = true;\r\n abandonCompressionEnabled = true;\r\n }", "public CreateKonceptWorker() {\n\t\tsuper();\n\t\tthis.koncept = new KoncepteParaula();\n\t}", "private void createImageCache(){\n ImageCacheManager.getInstance().init(this,\n this.getPackageCodePath()\n , DISK_IMAGECACHE_SIZE\n , DISK_IMAGECACHE_COMPRESS_FORMAT\n , DISK_IMAGECACHE_QUALITY\n , ImageCacheManager.CacheType.MEMORY);\n }", "public Swift() { }", "public interface CompressionService {\n public static final String ARCHIVE_EXTENSION = \"zip\";\n /**\n * Compresses given directory into zip file\n *\n * @param directory the content to compress\n * @param size default archive size\n *\n * @return zipped archive/s\n */\n List<File> compress(File directory, int size);\n}", "public static CMFinal make() {\n return new CMFinal();\n }", "private ZipCodes() {}", "private JarFileLoader() {\n }", "public JS_IO() {\n init();\n }", "private Template() {\r\n\r\n }", "private StickFactory() {\n\t}", "Object create(Object source);", "public BlueMeshService build(){\n BlueMeshService bms = new BlueMeshService();\n \n bms.setUUID(uuid);\n bms.setDeviceId(deviceId);\n bms.enableBluetooth(bluetoothEnabled);\n bms.setup();\n \n return bms;\n }", "@SuppressWarnings(\"deprecation\")\n private static void createCompressedRegion(final String regionName) {\n final Cache cache = CacheFactory.getAnyInstance();\n\n RegionFactory<String, Integer> dataRegionFactory =\n cache.createRegionFactory(RegionShortcut.REPLICATE);\n dataRegionFactory.setCompressor(SnappyCompressor.getDefaultInstance());\n dataRegionFactory.create(regionName);\n }", "CompressingMessageWriter(MessageWriter wr) {\n this.writer = wr;\n }", "public void jsContructor() {\n }", "public MonHoc() {\n }", "public ImageConverter() {\n\t}", "private ShifuFileUtils() {\n }", "abstract Object build();", "public EnvelopedSignatureFilter(){\n\n }", "private RSSAggregator() {\n }", "private Cleaner() {\n impl = new CleanerImpl();\n }", "public CornipicklePlugin() {\n\t\tthis.m_hostInterface = new HostInterfaceImpl(null, null);\n\t\tthis.m_outputFolder = \"\";\n\t\tthis.m_corniInterpreter = new Interpreter();\n\t}", "public CMObject newInstance();", "private AES() {\n }", "public ObjectFilter()\n\t{\n\t}" ]
[ "0.7333566", "0.7134722", "0.70850956", "0.7052238", "0.6963953", "0.66428775", "0.6287318", "0.59566784", "0.57009774", "0.5618034", "0.5596793", "0.55873555", "0.5489171", "0.54784137", "0.54024106", "0.5399106", "0.5299235", "0.52781814", "0.52671504", "0.52648413", "0.52209634", "0.5219972", "0.5172466", "0.5169224", "0.5124155", "0.51229167", "0.51126456", "0.5111071", "0.51009506", "0.50767964", "0.50595254", "0.50575083", "0.5057128", "0.50568485", "0.5050387", "0.50498253", "0.5030814", "0.50222546", "0.5014349", "0.50126964", "0.50053346", "0.49825582", "0.49788228", "0.4978756", "0.49775457", "0.49743882", "0.49529293", "0.49497673", "0.49420476", "0.4939902", "0.49380744", "0.49318904", "0.4930457", "0.49289235", "0.49281445", "0.49168316", "0.49145097", "0.4898557", "0.4891748", "0.48895457", "0.48829636", "0.48716262", "0.486672", "0.48665366", "0.48661703", "0.48627678", "0.48587012", "0.48540628", "0.48511928", "0.48500445", "0.4846618", "0.48421782", "0.48239213", "0.48234653", "0.4819177", "0.48188606", "0.48188025", "0.48157725", "0.48080277", "0.48030007", "0.47981995", "0.47923627", "0.47896096", "0.47836667", "0.47822905", "0.47799113", "0.47790825", "0.47778764", "0.4775975", "0.47739026", "0.4773577", "0.47709727", "0.4765952", "0.47632635", "0.4762695", "0.47614667", "0.4758547", "0.47513026", "0.47508126", "0.47497627" ]
0.5665222
9
Create an instance of the Compressor Makes a new instance of the compressor using the default PCM ID (0). Additional modules can be supported by making a new instance and specifying the CAN ID
public Compressor() { initCompressor(getDefaultSolenoidModule()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Compressor(int pcmId) {\n initCompressor(pcmId);\n }", "public CompressorSubsystem() {\r\n compressor = new Compressor(RobotMap.compressorPressureSwitch, RobotMap.compressorRelay);\r\n }", "public RobotCompressor(){\n \n robotCompressor = new Compressor(RobotMap.PRESSURE_SWITCH, RobotMap.COMPRESSOR_SPIKE);\n robotCompressor.start();\n }", "public static void Init()\n {\n _compressor = new Compressor();\n }", "HardwarePneumaticsControlModule(Compressor pcm) {\n this.pcm = pcm;\n this.closedLoop =\n Relay.instantaneous(this.pcm::setClosedLoopControl, this.pcm::getClosedLoopControl);\n\n this.instantaneousFaults = new Faults() {\n @Override\n public Switch notConnected() {\n return pcm::getCompressorNotConnectedFault;\n }\n\n @Override\n public Switch currentTooHigh() {\n return pcm::getCompressorCurrentTooHighFault;\n }\n\n @Override\n public Switch shorted() {\n return pcm::getCompressorShortedFault;\n }\n };\n\n this.stickyFaults = new Faults() {\n @Override\n public Switch notConnected() {\n return pcm::getCompressorNotConnectedStickyFault;\n }\n\n @Override\n public Switch currentTooHigh() {\n return pcm::getCompressorCurrentTooHighStickyFault;\n }\n\n @Override\n public Switch shorted() {\n return pcm::getCompressorShortedStickyFault;\n }\n };\n }", "public SonicAudioProcessor() {\n speed = 1f;\n pitch = 1f;\n channelCount = Format.NO_VALUE;\n sampleRateHz = Format.NO_VALUE;\n buffer = EMPTY_BUFFER;\n shortBuffer = buffer.asShortBuffer();\n outputBuffer = EMPTY_BUFFER;\n }", "public Merchant() {\n\n\t}", "private ZipCompressor(){}", "private CompressionTools() {}", "private StandardDeCompressors() {}", "public XCanopusFactoryImpl()\r\n {\r\n super();\r\n }", "public ProductoCreable newInstance(int codigo, String nombre){\r\n \r\n }", "public CompressibleByteArrayOutputStream() {\r\n this(DEFAULT_COMPRESSION_THRESHOLD);\r\n }", "@Override\n public Switch compressorRunningSwitch() {\n return pcm::enabled;\n }", "public Merchant() {}", "public USBAmp() {\r\n super();\r\n }", "public ICompressor getCompressor()\n {\n return compressor;\n }", "protected Compressor(int blockSize, int superblockSize, String formatString) throws IllegalArgumentException {\n\t\tif (blockSize < 1 || blockSize >= superblockSize) {\n\t\t\tthrow new IllegalArgumentException(String.format(\n\t\t\t\t\t\"Block size (%d) must be a positive integer.\", blockSize));\n\t\t}\n\t\tthis.blockSize = blockSize;\n\t\tif (superblockSize < 1 || superblockSize % blockSize != 0) {\n\t\t\tthrow new IllegalArgumentException(String.format(\n\t\t\t\t\t\"Superblock size (%d) must be a positive integer multiple of block size (%d).\",\n\t\t\t\t\tsuperblockSize, blockSize));\n\t\t}\n\t\tthis.superblockSize = superblockSize;\n\t\tif (formatString == null || formatString.length() == 0) {\n\t\t\tthrow new IllegalArgumentException(\"Format string cannot be null or empty string.\");\n\t\t}\n\t\tthis.formatString = formatString;\n\t\ttry {\n\t\t\tcompressionInterface = getCompressionInterface(formatString);\n\t\t\tSystem.out.println(String.format(\"Using compression interface \\\"%s\\\".%n\", formatString));\n\t\t} catch (ClassNotFoundException e) {\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\tString.format(\n\t\t\t\t\t\t\t\"Unable to locate Compressor for compression format \\\"%s\\\".\", formatString));\n\t\t} catch (Exception e) {\n\t\t\tthrow new IllegalArgumentException(e.getMessage());\n\t\t}\n\t\tbytesRead = 0L;\n\t\tblocksRead = 0L;\n\t\tsuperblocksRead = 0L;\n\t\tcompressedBytes = 0L;\n\t\tcompressedBlocks = 0L;\n\t\tactualBytes = 0L;\n\t\tbuffer = new byte[superblockSize];\n\t\tclearBuffer();\n\t}", "ComplicationOverlayWireFormat() {}", "public SiloCreateMerchantGenerator()\n {\n m_pciMerchant = new SiloConfigPCIMerchant();\n }", "public Pwm(int bus){\n instanceBus = bus;\n if(bus == unusedBus){\n \n }\n else{\n pwmInstance = new Jaguar(bus);\n Debug.output(\"Pwm constructor: created PWM on bus\", new Integer(bus), ConstantManager.deviceDebug);\n }\n }", "public AudioChannel() {\r\n\t\t// Default temporary location file has to be picked.\r\n\t\tString defalultFileName = getFileName(null, \"wav\");\r\n\t\tfile = new File( defalultFileName );\r\n\t}", "public WaveSystem()\n\t{\n\t\t\n\t}", "public HuffmanCompressor(){\n charList = new ArrayList<HuffmanNode>();\n }", "public Opus (String nameOfComposer, String opus) {\n mNameOfComposer = nameOfComposer;\n mOpus = opus;\n }", "public TransformationBuff() {}", "public CMObject newInstance();", "protected Block(short id) {\n this(id, (byte) 0);\n }", "public SimplePreset(int cameraId) {\n super(cameraId);\n }", "private Audio() {}", "public Process(int ID, int MaxMemUsage) \n {\n Random NumGen = new Random();\n \n m_Pause = false;\n ControlBlock = new PCB();\n ControlBlock.ID = ID;\n ControlBlock.MemUsage = NumGen.nextInt(409600) + 1; //random mem usage in bytes\n RunTime = NumGen.nextInt(30000); //random time in ms <= 6001\n if(RunTime < 1000){RunTime = 1000;}\n ControlBlock.TotalRunTime = RunTime;\n //ControlBlock.StartTime\n }", "public CompressibleByteArrayOutputStream(int pcompressionThreshold) {\r\n bop = new ReusableByteArrayOutputStream(pcompressionThreshold < 32 ? 32 : pcompressionThreshold > DEFAULT_COMPRESSION_THRESHOLD ? DEFAULT_COMPRESSION_THRESHOLD : pcompressionThreshold);\r\n compressionThreshold = pcompressionThreshold;\r\n compressionEnabled = true;\r\n abandonCompressionEnabled = true;\r\n }", "protected MediaCodec createCodec(MediaExtractor media_extractor, int track_index, MediaFormat format) throws IOException, IllegalArgumentException {\n/* 73 */ MediaCodec codec = super.createCodec(media_extractor, track_index, format);\n/* 74 */ if (codec != null) {\n/* 75 */ ByteBuffer[] buffers = codec.getOutputBuffers();\n/* 76 */ int sz = buffers[0].capacity();\n/* 77 */ if (sz <= 0) {\n/* 78 */ sz = this.mAudioInputBufSize;\n/* */ }\n/* 80 */ this.mAudioOutTempBuf = new byte[sz];\n/* */ try {\n/* 82 */ this.mAudioTrack = new AudioTrack(3, this.mAudioSampleRate, (this.mAudioChannels == 1) ? 4 : 12, 2, this.mAudioInputBufSize, 1);\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 88 */ this.mAudioTrack.play();\n/* 89 */ } catch (Exception e) {\n/* 90 */ Log.e(this.TAG, \"failed to start audio track playing\", e);\n/* 91 */ if (this.mAudioTrack != null) {\n/* 92 */ this.mAudioTrack.release();\n/* 93 */ this.mAudioTrack = null;\n/* */ } \n/* 95 */ throw e;\n/* */ } \n/* */ } \n/* 98 */ return codec;\n/* */ }", "public Manifest() {\n// for (int i = 0; i < NUMBER_OF_BITRATES; i++) {\n// bitrateArray[i] = i * STEP_SIZE + START_BITRATE;\n// }\n\t\tbitrateArray = new int[]{100, 150, 200, 250, 300, 400, 500, 700, 900, 1200, 1500, 2000, 2500,3000};\n }", "public void createChain(){\r\n Oscillator wt = new Oscillator(this, Oscillator.SAWTOOTH_WAVE, this.sampleRate, this.channels);\r\n Filter filt = new Filter(wt, this.filterCutoff, Filter.LOW_PASS);\r\n Envelope env = new Envelope(filt, \r\n new double[] {0.0, 0.0, 0.05, 1.0, 0.3, 0.4, 1.0, 0.0});\r\n\t\tVolume vol = new Volume(env);\r\n//\t\tSampleOut sout = new SampleOut(vol);\r\n\t}", "private OFMeterMod meterBuild(OFMeterModCommand command, int meterId, long rate, long burst, boolean useKBPS,\n\t\t\t\tboolean useStats) {\n\t\t\tMeter meter = new Meter();\n\t\t\tmeter.setId(meterId);\n\t\t\tmeter.getBands().add(new Band(rate, burst));\n\t\t\tmeter.getFlags().add((useKBPS ? OFMeterFlags.KBPS : OFMeterFlags.PKTPS));\n\t\t\tif (useStats)\n\t\t\t\tmeter.getFlags().add(OFMeterFlags.STATS);\n\t\t\tif (burst != 0)\n\t\t\t\tmeter.getFlags().add(OFMeterFlags.BURST);\n\n\t\t\treturn meterBuild(command, meter);\n\t\t}", "public HALeaseManagementModule() {\n\n }", "public DcmModuleImpl() {\r\n }", "public Deck() {\n this.allocateMasterPack();\n this.init(1);\n }", "public ClimberSubsystem()\n {\n climbSolenoid.set(false);\n DiskManipulatorSubsystem.compressor.enabled();\n }", "private Encoder() {}", "public Module(TruffleFile file) {\n this.file = file;\n }", "public Dealer() {\n this(1);\n }", "private SIModule(){}", "public ModuliHandler() {\n\t}", "MeterProvider create();", "public EmoticonBO()\n {}", "public Block instance(int paramInt)\r\n/* 194: */ {\r\n/* 195:225 */ return instance().setData(a, bds.b(paramInt)).setData(b, (paramInt & 0x8) > 0 ? bdu.b : bdu.a);\r\n/* 196: */ }", "Module createModule();", "private SourceRconPacketFactory() {\n }", "public Purp() {\n }", "public Adler32() {\n }", "public Module build() {\n return new Module(moduleCode, moduleTitle, academicYear, semester,\n students, tags);\n }", "public ArchHandler(String name, ICompiler compiler, ICPU cpu,\n IMemory memory, IDevice[] devices, \n PluginConnection[] connections, Properties settings, Schema schema) \n throws IllegalArgumentException, Error {\n \n if (compiler == null) \n throw new IllegalArgumentException(\"Compiler can't be null\");\n if (cpu == null)\n throw new IllegalArgumentException(\"CPU can't be null\");\n if (memory == null)\n throw new IllegalArgumentException(\"Memory can't be null\");\n if (name == null) name = \"\";\n this.compiler = compiler;\n this.cpu = cpu;\n this.memory = memory;\n this.devices = devices;\n this.connections = connections;\n this.settings = settings;\n this.schema = schema;\n \n if (initialize() == false) \n throw new Error(\"Initialization of plugins failed\");\n }", "public GatewayInfo() {\n\n\t}", "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 Module(String code, String title)\n {\n // initialise instance variables\n this.code = code;\n this.title = title;\n credit = 0;\n }", "public Climber (int motorIDInput) {\n // speed = Robot.m_oi.getSpeed();\n speed = 0.0;\n climbState = 0;\n\n talonMotor = new WPI_TalonSRX(motorIDInput);\n talonMotor.setInverted(false);\n\n if (printDebug) {\n System.out.println(\"Climb: initialized constructor\");\n }\n }", "public PantherAnalyzer() {\n //dataSourceId = 206011L; for version 1\n //dataSourceId = 210689L; // for version 2\n dataSourceId = 191282L; // version 3.0\n }", "public MonHoc() {\n }", "public HALMapper() {\n registerModule(DEFAULT_HAL_MODULE);\n }", "public CMN() {\n\t}", "public ParameterizedClass getCompressorClass()\n {\n return compressorClass;\n }", "public PayloadGenerator() {\n initComponents();\n }", "public HwPeripheralFactoryImpl() {\r\n\t\tsuper();\r\n\t}", "public ExampleModuleClient() {\r\n }", "public Module createModule(String bundleName, String moduleTypeName) {\n Bundle bundle = getBundle(bundleName);\n if (bundle == null) {\n return null;\n }\n //System.err.println(\"creating \"+bundleName+\":\"+moduleTypeName);\n CModule newModule = createCModule(bundleName, moduleTypeName);\n //System.err.println(\"done\");\n return newModule;\n }", "public static void init(){\n\n HELMET_COPPER = new ItemModArmor(COPPERARMOR, 1, EntityEquipmentSlot.HEAD, \"helmet_copper\");\n CHESTPLATE_COPPER = new ItemModArmor(COPPERARMOR, 1, EntityEquipmentSlot.CHEST, \"chestplate_copper\");\n LEGGINGS_COPPER = new ItemModArmor(COPPERARMOR, 2, EntityEquipmentSlot.LEGS, \"leggings_copper\");\n BOOTS_COPPER = new ItemModArmor(COPPERARMOR, 1, EntityEquipmentSlot.FEET, \"boots_copper\");\n\n }", "public BlueMeshService build(){\n BlueMeshService bms = new BlueMeshService();\n \n bms.setUUID(uuid);\n bms.setDeviceId(deviceId);\n bms.enableBluetooth(bluetoothEnabled);\n bms.setup();\n \n return bms;\n }", "private CompressionCodec getCompressionCodec() throws Exception {\n try {\n Constructor<?> constructor = Class.forName(compressionCodec).getConstructor();\n return (CompressionCodec)constructor.newInstance();\n } catch (Exception e) {\n throw new Exception(e);\n }\n }", "public static Block getInstance(short id, byte data) {\n switch (id) {\n case 5:\n return new WoodenPlank(data);\n case 6:\n return new Sapling(data);\n case 8:\n case 9:\n return new Water(id, data);\n case 10:\n case 11:\n return new Lava(id, data);\n case 17:\n return new Wood(data);\n case 18:\n return new Leaves(data);\n case 23:\n return new Dispenser(null, (byte) 0);\n case 24:\n return new Sandstone(data);\n case 26:\n return new Bed(data);\n case 27:\n return new PoweredRail(data);\n case 28:\n return new DetectorRail(data);\n case 29:\n case 33:\n return new Piston(id, data);\n case 31:\n return new TallGrass(data);\n case 34:\n return new PistonExtension(data);\n case 35:\n return new Wool(data);\n case 43:\n case 44:\n return new StoneSlab(id, data);\n case 50:\n return new Torch(data);\n case 51:\n return new Fire(data);\n case 53: // oak\n case 67: // cobble\n case 108: // brick\n case 109: // stonebrick\n case 114: // netherbrick\n case 128: // sandstone\n case 134: // spruce\n case 135: // birch\n case 136: // jungle\n case 156:\n return new Stair(id, data); // quartz\n case 54: // normal chest\n case 146:\n return new Chest(id); // trapped chest\n case 55:\n return new RedstoneWire(data);\n case 59:\n return new Crop((short) 59, data); // Wheat\n case 60:\n return new Farmland(data);\n case 61:\n case 62:\n return new Furnace(id, data);\n case 63:\n case 68:\n return new Sign(null, id, data);\n case 64:\n case 71:\n return new Door(id, data);\n case 78:\n return new SnowCover(data);\n case 65:\n return new Ladder(data);\n case 66:\n return new Rail(data);\n case 69:\n return new Lever(data);\n case 70:\n case 72:\n return new PressurePlate(id, data);\n case 75:\n case 76:\n return new RedstoneTorch(id, data);\n case 77:\n return new Button(id, data);\n case 84:\n return new Jukebox(data);\n case 86:\n return new Pumpkin(data);\n case 91:\n return new JackOLantern(data);\n case 92:\n return new Cake(data);\n case 93:\n case 94:\n return new RedstoneRepeater(id, data);\n case 96:\n return new TrapDoor(data);\n case 98:\n return new StoneBrick(data);\n case 99:\n case 100:\n return new HugeMushroom(id, data);\n case 104:\n case 105:\n return new Stem(id, data);\n case 106:\n return new Vines(data);\n case 107:\n return new FenceGate(data);\n case 115:\n return new NetherWart(data);\n case 117:\n return new BrewingStand();\n case 118:\n return new Cauldron(data);\n case 120:\n return new EndPortalFrame(data);\n case 123:\n case 124:\n return new RedstoneLamp(id);\n case 125:\n case 126:\n return new WoodenSlab(id, data);\n case 127:\n return new CocoaPod(data);\n case 130:\n return new EnderChest(data);\n case 131:\n return new TripwireHook(data);\n case 132:\n return new TripWire(data);\n case 137:\n return new CommandBlock();\n case 138:\n return new Beacon();\n case 139:\n return new CobblestoneWall(data);\n case 140:\n return new FlowerPot(data);\n case 141:\n return new Crop((short) 141, data); // Carrot\n case 142:\n return new Crop((short) 142, data); // Potato\n case 143:\n return new Button(id, data);\n case 144:\n return new MobHead((byte) 3, (byte) 8, null, data); // north facing human head - most data from tile entity\n case 145:\n return new Anvil(data);\n case 147:\n case 148:\n return new WeightedPressurePlate(id, data);\n case 154:\n return new Hopper(null, (byte) 0);\n case 155:\n return new QuartzBlock(data);\n case 157:\n return new ActivatorRail(data);\n case 158:\n return new Dropper(null, (byte) 0);\n default:\n return new Block(id, data);\n }\n }", "public Material create();", "public mxCodec() {\n this(mxDomUtils.createDocument());\n }", "@Override\r\n\t\t\tpublic Object construct() {\n\t\t\t\ttextArea_1.setText(\"\\n Now Capturing on Interface \"+index+ \".... \"+\"\\n --------------------------------------------\"+\r\n\t\t\t\t\t\t\"---------------------------------------------\\n\\n \");\r\n\t\t\t\ttry {\r\n\t\t\t\t\tCAP=JpcapCaptor.openDevice(NETWORK_INTERFACES[index], 65535, true, 20);\r\n\t\t\t\t\twhile(captureState)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tCAP.processPacket(1, new PkPirate_packetContents());\r\n\t\t\t\t\t}\r\n\t\t\t\t\tCAP.close();\r\n\t\t\t\t\t\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// TODO: handle exception\r\n\t\t\t\t\tSystem.out.println(e);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\treturn 0;\r\n\t\t\t}", "public\n /* Constructor */\n AVRProgrammer(Handler _handler) {\n handler = _handler;\n }", "public AudioFragment() {\n }", "public CardGameFramework()\n {\n this(1, 0, 0, null, 4, 13);\n }", "public DemoPluginFactory() {}", "public ModuleMarshaller(File file) {\n moduleFile = file;\n }", "public static final PS3 create(int index){\n if( !libraryLoaded() ){\n System.out.println(\"PS3-ERROR: cannot create camera, dll not loaded\");\n return null;\n }\n \n PS3_Library.GUID guid = LIBRARY.CLEyeGetCameraUUID( index );\n if( guid.Data1 == 0){\n System.out.println(\"PS3-ERROR: index(\"+index+\") is not valid\");\n return null;\n }\n return new PS3(index, guid);\n }", "public AntConfiguration(){\n this.channelID1 = new ChannelID(); //initially set all parameters of Channel ID to 0\n this.channelID2 = new ChannelID(); //initially set all parameters of Channel ID to 0\n\n this.channelAssigned1 = new Channel(); //initially do not assign any cha\n this.channelAssigned2 = new Channel(); //initially do not assign any channel\n\n this.channelPeriod = 4; //set to 4Hz by default\n this.level = PowerLevel.NEGTWENTY; //set to -20dB as default\n this.state1 = ChannelState.UNASSIGNED;\n this.state2 = ChannelState.UNASSIGNED;\n\n }", "Device createDevice();", "public BitmapEncoder() {\n this((Bitmap.CompressFormat) null, 90);\n }", "public TrackClientPacketHandler() \n {\n super(Constants.DEVICE_CODE);\n }", "protected Block(short id, byte data) {\n this.id = id;\n this.data = data;\n }", "public CardGameFramework() {\n this(1, 0, 0, null, 4, 13);\n }", "public Paquet(byte []datainitiale) {\n\t\t\n\t\t\n\t\tsuper();\n\t\t\n\t\t_instance_id++;\n\t\tSystem.out.print(\"\\nmnb = \"+_instance_id);\n\n\t\tshort header = (short) ((datainitiale[0] & 255)<<8 | (datainitiale[1] & 255 )) ;\n\t\t\t\n\t\tthis.id = (short) (header >> 2);\n\t\tsizeofsize = (byte) (header & 3);\n\t\t\n\t\tswitch(sizeofsize)\n\t\t{\n\t\t\tcase 0 \t: \tsize = 0;break;\n\t\t\tcase 1 \t:\tsize = datainitiale[2] & 255;break;\n\t\t\tcase 2\t:\tsize = ((datainitiale[2] & 255)<<8 | datainitiale[3]& 255);break;\n\t\t\tdefault :\tsize = (((datainitiale[2] & 255 )<< 16 | (datainitiale[3]& 255) << 8) | datainitiale[4] & 255);\t\n\t\t}\n\t\tint t;\n\tif(size<8192)\n\t\t{this.data = new byte[size];\n\t\tt=size;\n\t\tfor(int i = 0; i < t ; i++)\n\t\t\tdata[i] = datainitiale[i+2 + sizeofsize];\n\t\tfor(int i = 0; i < datainitiale.length-(t+2+sizeofsize) ; i++)\n\t\t\tdatainitiale[i]=datainitiale[i+t+2+sizeofsize];\n\t\t}\n\telse \n\t\t{this.data=new byte[datainitiale.length-sizeofsize-2];\n\t\tt=datainitiale.length;\n\t\tfor(int i = 0; i <datainitiale.length-sizeofsize-2; i++)\n\t\t\tdata[i] = datainitiale[i+2 + sizeofsize];\n\t\t\n\t\t}\n\t\n\t\t\n\t\t\n\t}", "public Material() {}", "private AES() {\r\n\r\n }", "Parcelle createParcelle();", "protected void bInit()\n {\n \tb_expect_seqnum=1;\n //\tMessage m=new Message(String.valueOf(new char[20]));\n //\tb_sndpkt=make_pkt(0,m,0);//make a package\n }", "private BMIDeviceHelper() {\t\t\n\t}", "public static JChineseConvertor getInstance() {\r\n\t\tif (instance == null) {\r\n\t\t\ttry {\r\n\t\t\t\tinstance = new JChineseConvertor(DEF_SRC_FILE);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tthrow new IllegalStateException(\"Can not create new instance of JChineseConvertor : \" + e.getMessage(), e);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn instance;\r\n\t}", "public PacketBuilder() {\n\t\tthis(1024);\n\t}", "public MPInjectionVolume(){\n\n }", "private MApi() {}", "public static void initialize()\n\t{\n\t\t// USB\n\t\tdriveJoystick = new EJoystick(getConstantAsInt(USB_DRIVE_STICK));\n\t\tcontrolGamepad = new EGamepad(getConstantAsInt(USB_CONTROL_GAMEPAD));\n\n\t\t// Power Panel\n\t\tpowerPanel = new PowerDistributionPanel();\n\n\t\t//Compressor\n\t\tcompressor = new Compressor(Constants.getConstantAsInt(Constants.PCM_CAN));\n\t\tcompressor.start();\n\t}", "public ecDSA512() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 0073 in method: com.android.org.bouncycastle.jcajce.provider.asymmetric.ec.SignatureSpi.ecDSA512.<init>():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.android.org.bouncycastle.jcajce.provider.asymmetric.ec.SignatureSpi.ecDSA512.<init>():void\");\n }", "public Kanban() {\r\n\t}", "final int silk_init_decoder()\r\n\t{\r\n\t\t/* Clear the entire encoder state, except anything copied */\r\n\t\tclear();// silk_memset( psDec, 0, sizeof( silk_decoder_state ) );\r\n\r\n\t\t/* Used to deactivate LSF interpolation */\r\n\t\tthis.first_frame_after_reset = true;\r\n\t\tthis.prev_gain_Q16 = 65536;\r\n\t\t// this.arch = opus_select_arch();\r\n\r\n\t\t/* Reset CNG state */\r\n\t\tsilk_CNG_Reset();\r\n\r\n\t\t/* Reset PLC state */\r\n\t\tsilk_PLC_Reset();\r\n\r\n\t\treturn 0;\r\n\t}" ]
[ "0.7432922", "0.61833334", "0.5828358", "0.5600227", "0.55877185", "0.55343676", "0.534172", "0.53306025", "0.53096575", "0.52967846", "0.521635", "0.51869947", "0.51775753", "0.5173509", "0.5143683", "0.51239836", "0.5114248", "0.5096522", "0.50540423", "0.5045242", "0.50431466", "0.50362587", "0.503067", "0.5027016", "0.50066555", "0.49904224", "0.4985959", "0.4978029", "0.4971385", "0.49630278", "0.49489427", "0.49210936", "0.4908757", "0.48749435", "0.48615947", "0.485466", "0.4852497", "0.48472053", "0.48324582", "0.48314247", "0.482085", "0.4818432", "0.48135793", "0.4813549", "0.4800764", "0.47974902", "0.47940516", "0.47889364", "0.4786364", "0.47835833", "0.4766804", "0.476299", "0.4754224", "0.4747976", "0.47479323", "0.4744566", "0.4738429", "0.47356018", "0.47249657", "0.47240484", "0.4722076", "0.46958253", "0.46951437", "0.46922365", "0.46826312", "0.46798724", "0.4674235", "0.46700394", "0.46647942", "0.4659539", "0.46576983", "0.46569434", "0.46556315", "0.46521854", "0.46479324", "0.4643455", "0.46408015", "0.46379188", "0.46378684", "0.463569", "0.46345448", "0.46317607", "0.46297652", "0.4628429", "0.46266803", "0.46241218", "0.4620899", "0.46154726", "0.4612727", "0.46008372", "0.4599327", "0.45988643", "0.45927918", "0.45889476", "0.4571819", "0.45710936", "0.45704132", "0.45684606", "0.45675224", "0.45537698" ]
0.643832
1
Start the compressor running in closed loop control mode Use the method in cases where you would like to manually stop and start the compressor for applications such as conserving battery or making sure that the compressor motor doesn't start during critical operations.
public void start() { setClosedLoopControl(true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void Compressor_on(){\n\t\tC.setClosedLoopControl(true);\n\t\t\n\t}", "public void run() {\r\n\t\twhile(true) {\r\n\t\t\twhile(base.isEnabled()){\r\n\t\t\t\tif(pressureSwitch.get() == false){\r\n\t\t\t\t\tcompressor.set(Value.kOn);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcompressor.set(Value.kOff);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n public void teleopPeriodic() {\n teleop.periodic();\n toggleCompressor = toggleCompressor ^ robot.compressorToggle.get();\n robot.runCompressor.set(toggleCompressor);\n Watcher.update();\n\n }", "public void setClosedLoopControl(boolean on) {\n CompressorJNI.setClosedLoopControl(m_pcm, on);\n }", "@Override\n public Switch compressorRunningSwitch() {\n return pcm::enabled;\n }", "@Override\n public void start() {\n runtime.reset();\n leftWheel.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n rightWheel.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n }", "public RobotCompressor(){\n \n robotCompressor = new Compressor(RobotMap.PRESSURE_SWITCH, RobotMap.COMPRESSOR_SPIKE);\n robotCompressor.start();\n }", "@Override\n public void loop() {\n left.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n right.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n\n left.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n right.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n }", "public CompressorSubsystem() {\r\n compressor = new Compressor(RobotMap.compressorPressureSwitch, RobotMap.compressorRelay);\r\n }", "public ClimberSubsystem()\n {\n climbSolenoid.set(false);\n DiskManipulatorSubsystem.compressor.enabled();\n }", "protected OpenLoopSpeedController()\r\n\t{\r\n\t\t\r\n\t}", "public void enableCompressor(boolean turnOn) {\n\t\tcompressor.setClosedLoopControl(turnOn);\n\t}", "public void stop() {\n setClosedLoopControl(false);\n }", "public void start() {\n notifyStart();\n simloop();\n notifyStop();\n }", "@Override\n public Relay automaticMode() {\n return closedLoop;\n }", "public void start() {\n mStopAtLoopEnd = false;\n mStartTimeMillis = 0;\n mCurrentLoopNumber = -1;\n cancelCallback();\n postCallback();\n }", "@Override\n public void runOpMode(){\n motors[0][0] = hardwareMap.dcMotor.get(\"frontLeft\");\n motors[0][1] = hardwareMap.dcMotor.get(\"frontRight\");\n motors[1][0] = hardwareMap.dcMotor.get(\"backLeft\");\n motors[1][1] = hardwareMap.dcMotor.get(\"backRight\");\n // The motors on the left side of the robot need to be in reverse mode\n for(DcMotor[] motor : motors){\n motor[0].setDirection(DcMotor.Direction.REVERSE);\n }\n // Being explicit never hurt anyone, right?\n for(DcMotor[] motor : motors){\n motor[1].setDirection(DcMotor.Direction.FORWARD);\n }\n\n waitForStart();\n\n //Kill ten seconds\n runtime.reset();\n while(runtime.seconds()<10); runtime.reset();\n\n while(runtime.milliseconds()<700){\n // Loop through front and back motors\n for(DcMotor[] motor : motors){\n // Set left motor power\n motor[0].setPower(100);\n // Set right motor power\n motor[1].setPower(100);\n }\n }\n\n while(runtime.milliseconds()<200){\n // Loop through front and back motors\n for(DcMotor[] motor : motors){\n // Set left motor power\n motor[0].setPower(-100);\n // Set right motor power\n motor[1].setPower(-100);\n }\n }\n\n runtime.reset();\n // Loop through front and back motors\n for(DcMotor[] motor : motors){\n // Set left motor power\n motor[0].setPower(0);\n // Set right motor power\n motor[1].setPower(0);\n }\n }", "@Override\n public void runOpMode() {\n\n robot.init(hardwareMap);\n robot.MotorRightFront.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n robot.MotorLeftFront.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n robot.MotorRightFront.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n robot.MotorLeftFront.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n\n /** Wait for the game to begin */\n while (!isStarted()) {\n telemetry.addData(\"angle\", \"0\");\n telemetry.update();\n }\n\n\n }", "@Override\n public void run()\n {\n is_started = true;\n while (!isShutdown())\n {\n LogicControl.sleep( 1 * 1000 );\n\n }\n finished = true;\n }", "@Override\n public void runOpMode() {\n telemetry.addData(\"Status\", \"Resetting Encoders\"); //\n telemetry.update();\n\n leftFront = hardwareMap.get(DcMotor.class, \"left_front\");\n rightFront = hardwareMap.get(DcMotor.class, \"right_front\");\n leftBack = hardwareMap.get(DcMotor.class, \"left_back\");\n rightBack = hardwareMap.get(DcMotor.class, \"right_back\");\n\n\n leftFront.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n rightFront.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n leftBack.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n rightFront.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n\n right = hardwareMap.get(Servo.class, \"right\");\n left = hardwareMap.get(Servo.class, \"left\");\n // Most robots need the motor on one side to be reversed to drive forward\n // Reverse the motor that runs backwards when connected directly to the battery\n leftFront.setDirection(DcMotor.Direction.REVERSE);\n rightFront.setDirection(DcMotor.Direction.FORWARD);\n leftBack.setDirection(DcMotor.Direction.REVERSE);\n rightBack.setDirection(DcMotor.Direction.FORWARD);\n\n leftFront.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n leftBack.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n rightFront.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n rightBack.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n digitalTouch = hardwareMap.get(DigitalChannel.class, \"sensor_digital\");\n digitalTouch.setMode(DigitalChannel.Mode.INPUT);\n\n right.setDirection(Servo.Direction.REVERSE);\n\n right.scaleRange(0, 0.25);\n left.scaleRange(0.7, 1);\n\n\n // Wait for the game to start (driver presses PLAY)\n waitForStart();\n\n\n servo(0);\n runtime.reset();\n encoderSideways(0.25, -5, -5, 5);\n // drive until touch sensor pressed\n // activate servos to grab platform\n // drive backwards for a while\n // release servos\n // sideways part\n // remember to do red autonomous for repackage org.firstinspires.ftc.teamcode;\n }", "@Override\n public void robotPeriodic() {\n\n enabledCompr = pressBoy.enabled();\n //pressureSwitch = pressBoy.getPressureSwitchValue();\n currentCompr = pressBoy.getCompressorCurrent();\n //SmartDashboard.putBoolean(\"Pneumatics Loop Enable\", closedLoopCont);\n SmartDashboard.putBoolean(\"Compressor Status\", enabledCompr);\n //SmartDashboard.putBoolean(\"Pressure Switch\", pressureSwitch);\n SmartDashboard.putNumber(\"Compressor Current\", currentCompr);\n }", "@Override\r\n public void start() {\r\n runtime.reset();\r\n FL.setPower(1);\r\n FR.setPower(1);\r\n BR.setPower(1);\r\n BL.setPower(1);\r\n try{\r\n Thread.sleep(850);\r\n }\r\n catch (Exception e) {\r\n \r\n }\r\n FL.setPower(0);\r\n FR.setPower(0);\r\n BL.setPower(0);\r\n BR.setPower(0); \r\n }", "@Override\n public void runOpMode() {\n try {\n leftfrontDrive = hardwareMap.get(DcMotor.class, \"frontLeft\");\n leftfrontDrive.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n rightfrontDrive = hardwareMap.get(DcMotor.class, \"frontRight\");\n rightfrontDrive.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n leftbackDrive = hardwareMap.get(DcMotor.class, \"backLeft\");\n leftbackDrive.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n leftbackDrive.setDirection(DcMotor.Direction.REVERSE);\n\n rightbackDrive = hardwareMap.get(DcMotor.class, \"backRight\");\n rightbackDrive.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n lift = hardwareMap.get(DcMotor.class, \"Lift\");\n lift.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n lift.setDirection(DcMotor.Direction.REVERSE);\n\n markerArm = hardwareMap.get(Servo.class, \"markerArm\");\n\n armActivator = hardwareMap.get(DcMotor.class, \"armActivator\");\n armActivator.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n } catch (IllegalArgumentException iax) {\n bDebug = true;\n }\n\n BNO055IMU.Parameters parameters = new BNO055IMU.Parameters();\n parameters.angleUnit = BNO055IMU.AngleUnit.DEGREES;\n parameters.accelUnit = BNO055IMU.AccelUnit.METERS_PERSEC_PERSEC;\n parameters.calibrationDataFile = \"BNO055IMUCalibration.json\";\n parameters.loggingEnabled = true;\n parameters.loggingTag = \"IMU\";\n parameters.accelerationIntegrationAlgorithm = new JustLoggingAccelerationIntegrator();\n\n imu = hardwareMap.get(BNO055IMU.class, \"imu\");\n imu.initialize(parameters);\n\n waitForStart(); //the rest of the code begins after the play button is pressed\n\n sleep(3000);\n\n drive(0.35, 0.5);\n\n turn(90.0f);\n\n drive(1.8, 0.5);\n\n turn(45.0f);\n\n drive(2.5, -0.5);\n\n sleep(1000);\n\n markerArm.setPosition(1);\n\n sleep(1000);\n\n markerArm.setPosition(0);\n\n sleep(1000);\n\n drive(2.5,.75);\n\n turn(179.0f);\n\n drive(1.5, 1.0);\n\n requestOpModeStop(); //end of autonomous\n }", "public boolean getClosedLoopControl() {\n return CompressorJNI.getClosedLoopControl(m_pcm);\n }", "public void run(){\n\t\t\tLog.w(\"Control\",\"Thread Start\");\n\t\t\twhile(true){\n\t\t\t\tif((sdata = queue.Qout())!=null){\n\t\t\t\t\ttry{\n\t\t\t\t\t\tCompressBuffer(encoder, -1, sdata, sdata.length,h264Buff);\n\t\t\t\t\t\tcb.OnEncodeCompleted(++CodedCounter);\n\n\n\t\t\t\t\t}catch(Exception e){\n\t\t\t\t\t\tLog.w(\"Error\",e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep(10);\n\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t} \n\t\t\t\t}\n\t\t\t\tif(!isRecording&&queue.Qempry()){\n\t\t\t\t\tLog.w(\"Encoder\",\"Thread end\");\n\t\t\t\t\tCompressEnd(encoder);\n\t\t\t\t\tLog.w(\"Control\",\"ended\");\n\t\t\t\t\tflagDone = true;\n\t\t\t\t\tcb.OnFinished();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif(isDestroy){\n\t\t\t\t\tflagDone = true;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}", "@Override\n public void runOpMode() {\n servo0 = hardwareMap.servo.get(\"servo0\");\n servo1 = hardwareMap.servo.get(\"servo1\");\n digital0 = hardwareMap.digitalChannel.get(\"digital0\");\n motor0 = hardwareMap.dcMotor.get(\"motor0\");\n motor1 = hardwareMap.dcMotor.get(\"motor1\");\n motor0B = hardwareMap.dcMotor.get(\"motor0B\");\n motor2 = hardwareMap.dcMotor.get(\"motor2\");\n blinkin = hardwareMap.get(RevBlinkinLedDriver.class, \"blinkin\");\n motor3 = hardwareMap.dcMotor.get(\"motor3\");\n park_assist = hardwareMap.dcMotor.get(\"motor3B\");\n\n if (digital0.getState()) {\n int_done = true;\n } else {\n int_done = false;\n }\n motor_stuff();\n waitForStart();\n if (opModeIsActive()) {\n while (opModeIsActive()) {\n lancher_position();\n slow_mode();\n drive_robot();\n foundation_grabber(1);\n launcher_drive();\n data_out();\n Pickingupblockled();\n lettingoutblockled();\n Forwardled();\n backwardled();\n Turnleftled();\n Turnrightled();\n Stationaryled();\n }\n }\n }", "public static void signalStart() {\n\t\tif (!instrumenting) return;\n\t\t\n\t\trunning = true;\n\t}", "@Override\n public void runOpMode() throws InterruptedException{\n\n LeftWheel = hardwareMap.dcMotor.get(\"LeftWheel\");\n RightWheel = hardwareMap.dcMotor.get(\"RightWheel\");\n LLAMA = hardwareMap.dcMotor.get(\"LLAMA\");\n RightWheel.setDirection(DcMotor.Direction.REVERSE);\n beaconFlagSensor = hardwareMap.i2cDevice.get(\"color sensor\");\n LeftWheel.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n RightWheel.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n buttonPusher = hardwareMap.servo.get(\"Button Pusher\");\n buttonPusher.setDirection(Servo.Direction.REVERSE);\n\n LeftWheel.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n RightWheel.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n LLAMA.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n\n beaconFlagReader= new I2cDeviceSynchImpl(beaconFlagSensor, I2cAddr.create8bit(0x3c), false);\n beaconFlagReader.engage();\n\n double PUSHER_MIN = 0;\n double PUSHER_MAX = 1;\n buttonPusher.scaleRange(PUSHER_MIN,PUSHER_MAX);\n\n if(beaconFlagLEDState){\n beaconFlagReader.write8(3, 0); //Set the mode of the color sensor using LEDState\n }\n else{\n beaconFlagReader.write8(3, 1); //Set the mode of the color sensor using LEDState\n }\n\n\n waitForStart();\n //Go forward to position to shoot\n long iniForward = 0;\n //Shoot LLAMA\n long shootLLAMA=0 ;\n //Turn towards Wall\n long turnToWall= 0;\n //Approach Wall\n long wallApproach= 0;\n //Correct to prepare for button\n long correctForButton= 0;\n long correctForButton2=0 ;\n //Use sensors to press button\n /** This is sensor*/\n //Go forward\n long toSecondButton= 0;\n //Use Sensors to press button\n /** This is sensor*/\n //turn to center\n\n //charge\n long chargeTime= 0;\n\n //Go forward to position to shoot\n LeftWheel.setPower(1);\n RightWheel.setPower(1);\n\n sleep(iniForward);\n\n STOP();\n\n //Shoot LLAMA\n LLAMA.setPower(1);\n\n sleep(shootLLAMA);\nSTOP();\n //Turn towards Wall\n LeftWheel.setPower(-1);\n RightWheel.setPower(1);\n\n sleep(turnToWall);\n\n STOP();\n //Approach Wall\n LeftWheel.setPower(1);\n RightWheel.setPower(1);\n\n sleep(wallApproach);\n\n STOP();\n //Correct to prepare for button\n\n LeftWheel.setPower(1);\n RightWheel.setPower(-1);\n\n sleep(correctForButton);\n\n STOP();\n\n LeftWheel.setPower(1);\n RightWheel.setPower(1);\n\n sleep(correctForButton2);\n\n STOP();\n topCache = beaconFlagReader.read(0x04, 1);\n //Use sensors to press button\n if ((topCache[0] & 0xFF) <=4 && (topCache[0] & 0xFF) > 0 &&(topCache[0] & 0xFF) <16) {\n while (((topCache[0] & 0xFF) <=4 && (topCache[0] & 0xFF) > 0 &&\n (topCache[0] & 0xFF) <16) && opModeIsActive()) {\n\n\n LeftWheel.setPower(1);\n RightWheel.setPower(1);\n sleep(100);\n LeftWheel.setPower(0);\n RightWheel.setPower(0);\n topCache = beaconFlagReader.read(0x04, 1);\n\n if ((topCache[0] & 0xFF) >=7 && (topCache[0] & 0xFF) >= 0){\n telemetry.addLine(\"Color Detected, Pressing Button...\");\n telemetry.update();\n buttonPusher.setPosition(PUSHER_MAX);\n\n LeftWheel.setPower(1);\n RightWheel.setPower(1);\n\n sleep(100);\n\n STOP();\n break;\n }\n }\n\n }\n\n else if ((topCache[0] & 0xFF) >=7 && (topCache[0] & 0xFF) >= 0) {\n telemetry.addLine(\"Color Detected, Pressing Button...\");\n telemetry.update();\n buttonPusher.setPosition(PUSHER_MAX);\n\n LeftWheel.setPower(1);\n RightWheel.setPower(1);\n\n sleep(100);\n\n STOP();\n }\n\n //Go forward\n LeftWheel.setPower(1);\n RightWheel.setPower(1);\n\n sleep(toSecondButton);\n\n STOP();\n //Use Sensors to press button\n topCache = beaconFlagReader.read(0x04, 1);\n //Use sensors to press button\n if ((topCache[0] & 0xFF) <=4 && (topCache[0] & 0xFF) > 0 &&(topCache[0] & 0xFF) <16) {\n while (((topCache[0] & 0xFF) <=4 && (topCache[0] & 0xFF) > 0 &&\n (topCache[0] & 0xFF) <16) && opModeIsActive()) {\n\n\n LeftWheel.setPower(1);\n RightWheel.setPower(1);\n sleep(100);\n LeftWheel.setPower(0);\n RightWheel.setPower(0);\n topCache = beaconFlagReader.read(0x04, 1);\n\n if ((topCache[0] & 0xFF) >=7 && (topCache[0] & 0xFF) >= 0){\n telemetry.addLine(\"Color Detected, Pressing Button...\");\n telemetry.update();\n buttonPusher.setPosition(PUSHER_MAX);\n\n LeftWheel.setPower(1);\n RightWheel.setPower(1);\n\n sleep(100);\n\n STOP();\n break;\n }\n }\n\n }\n\n else if ((topCache[0] & 0xFF) >=7 && (topCache[0] & 0xFF) >= 0) {\n telemetry.addLine(\"Color Detected, Pressing Button...\");\n telemetry.update();\n buttonPusher.setPosition(PUSHER_MAX);\n\n LeftWheel.setPower(1);\n RightWheel.setPower(1);\n\n sleep(100);\n\n STOP();\n }\n\n //turn to center\n\n\n //charge\n }", "@Override\n public void runOpMode() {\n leftDrive = hardwareMap.get(DcMotor.class, \"left_drive\");\n rightDrive = hardwareMap.get(DcMotor.class, \"right_drive\");\n intake = hardwareMap.get (DcMotor.class, \"intake\");\n dropServo = hardwareMap.get(Servo.class, \"drop_Servo\");\n leftDrive.setDirection(DcMotor.Direction.REVERSE);\n rightDrive.setDirection(DcMotor.Direction.FORWARD);\n\n dropServo.setPosition(1.0);\n waitForStart();\n dropServo.setPosition(0.6);\n sleep(500);\n VuforiaOrientator();\n encoderSequence(\"dumbDrive\");\n\n\n }", "@Override\n public void runOpMode() {\n motorFL = hardwareMap.get(DcMotor.class, \"motorFL\");\n motorBL = hardwareMap.get(DcMotor.class, \"motorBL\");\n motorFR = hardwareMap.get(DcMotor.class, \"motorFR\");\n motorBR = hardwareMap.get(DcMotor.class, \"motorBR\");\n landerRiser = hardwareMap.get(DcMotor.class, \"lander riser\");\n landerRiser = hardwareMap.get(DcMotor.class, \"lander riser\");\n landerRiser.setDirection(DcMotor.Direction.FORWARD);\n landerRiser.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n markerDrop = hardwareMap.get(Servo.class, \"marker\");\n markerDrop.setDirection(Servo.Direction.FORWARD);\n telemetry.addData(\"Status\", \"Initialized\");\n telemetry.update();\n\n // Wait for the game to start (driver presses PLAY)\n waitForStart();\n runtime.reset();\n\n //Landing & unlatching\n landerRiser.setPower(-1);\n telemetry.addData(\"Status\", \"Descending\");\n telemetry.update();\n sleep(5550);\n landerRiser.setPower(0);\n telemetry.addData(\"Status\",\"Unhooking\");\n telemetry.update();\n move(-0.5, 600, true);\n strafe(-0.4,0.6, 3600, true);\n move(0.5,600,true);\n markerDrop.setPosition(0);\n sleep(1000);\n markerDrop.setPosition(0.5);\n sleep(700);\n markerDrop.setPosition(0);\n strafe(0, -0.5,500,true);\n strafe(0.5, -0.25, 8500, true);\n\n }", "public void runOpMode() throws InterruptedException {\n leftWheel = hardwareMap.dcMotor.get(\"leftWheel\");\n rightWheel = hardwareMap.dcMotor.get(\"rightWheel\");\n leftArm = hardwareMap.dcMotor.get(\"leftArm\");\n rightArm = hardwareMap.dcMotor.get(\"rightArm\");\n rightDistance = hardwareMap.get(DistanceSensor.class, \"rightDistance\");\n leftColor = hardwareMap.colorSensor.get(\"leftColor\");\n rightWheel.setDirection(DcMotorSimple.Direction.REVERSE);\n count = 21;\n step = 3;\n subStep = 0;\n\n sample_ready = false;\n lander_unlatched = false;\n\n //prepares and resets robot by resetting encoders\n resetDriveEncoders();\n\n //prepares robot for arm movement by setting arm motors to go to a certain position-modifiable by user input (the d-pad)\n// leftArm.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n// rightArm.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n\n //HSV value array\n\n //Sends color sensor input values to the phone\n waitForStart();\n\n while (opModeIsActive()) {\n telemetry.update();\n\n\n telemetry.addLine()\n .addData(\"step\", step)\n .addData(\"subStep\", subStep)\n .addData(\"count\", count);\n telemetry.addLine()\n .addData(\"RightWheel: \", rightWheel.getCurrentPosition())\n .addData(\"LeftWheel: \", leftWheel.getCurrentPosition())\n .addData(\"TICKS_PER_WHEEL_ROTATION: \", TICKS_PER_WHEEL_ROTATION);\n\n\n//sets the step of where we are in the process to one\n // step = 1;\n//enables the if statement for lander_unlatched\n lander_unlatched = true;\n//moves the robot from the lander to where the samples are\n if (step == 1) {\n// leftWheel.setPower(0.7);\n// rightWheel.setPower(0.5);\n// leftWheel.setTargetPosition(1621);\n// rightWheel.setTargetPosition(820);\n step = 2;\n }\n if (step == 2) {\n// if (hsvValues[0] > 50) {\n// leftWheel.setPower(-0.7);\n// rightWheel.setPower(-0.5);\n// leftWheel.setTargetPosition(1221);\n step = 3;\n }\n// if step 2 is finished, makes the robot turn toward the wall, then drives against the wall.\n if (step == 3) {\n moveToDepot();\n }\n //1150 Target Units == about 1 foot, 96 Units/inch\n//sets the wheel power to 0 to limit movement\n// if (rightWheel.getCurrentPosition() == -rotation) {\n // rightWheel.setPower(0);\n //leftWheel.setPower(0);\n// }\n// if (leftWheel.getCurrentPosition() == 100) {\n// leftWheel.setPower(0);\n// rightWheel.setPower(0);\n// }\n\n sample_ready = true;\n\n// if (sample_ready) {\n//\n }\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\twhile (true) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tpc.product();\n\t\t\t\t\t\tThread.sleep(100);\n\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\twhile (true) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tpc.product();\n\t\t\t\t\t\tThread.sleep(100);\n\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "@Override\n public void runOpMode() {\n float strafeRight;\n float strafeLeft;\n\n frontRight = hardwareMap.dcMotor.get(\"frontRight\");\n backRight = hardwareMap.dcMotor.get(\"backRight\");\n frontLeft = hardwareMap.dcMotor.get(\"frontLeft\");\n backLeft = hardwareMap.dcMotor.get(\"backLeft\");\n flipper = hardwareMap.crservo.get(\"flipper\");\n\n // Put initialization blocks here.\n frontRight.setDirection(DcMotorSimple.Direction.REVERSE);\n backRight.setDirection(DcMotorSimple.Direction.REVERSE);\n waitForStart();\n while (opModeIsActive()) {\n // Power to drive\n frontRight.setPower(gamepad1.right_stick_y * 0.5);\n frontRight.setPower(gamepad1.right_stick_y * 0.75);\n backRight.setPower(gamepad1.right_stick_y * 0.75);\n frontLeft.setPower(gamepad1.left_stick_y * 0.75);\n backLeft.setPower(gamepad1.left_stick_y * 0.75);\n flipper.setPower(gamepad2.left_stick_y);\n // Strafing code\n strafeRight = gamepad1.right_trigger;\n strafeLeft = gamepad1.left_trigger;\n if (strafeRight != 0) {\n frontLeft.setPower(-(strafeRight * 0.8));\n frontRight.setPower(strafeRight * 0.8);\n backLeft.setPower(strafeRight * 0.8);\n backRight.setPower(-(strafeRight * 0.8));\n } else if (strafeLeft != 0) {\n frontLeft.setPower(strafeLeft * 0.8);\n frontRight.setPower(-(strafeLeft * 0.8));\n backLeft.setPower(-(strafeLeft * 0.8));\n backRight.setPower(strafeLeft * 0.8);\n }\n // Creep\n if (gamepad1.dpad_up) {\n frontRight.setPower(-0.4);\n backRight.setPower(-0.4);\n frontLeft.setPower(-0.4);\n backLeft.setPower(-0.4);\n } else if (gamepad1.dpad_down) {\n frontRight.setPower(0.4);\n backRight.setPower(0.4);\n frontLeft.setPower(0.4);\n backLeft.setPower(0.4);\n } else if (gamepad1.dpad_right) {\n frontRight.setPower(-0.4);\n backRight.setPower(-0.4);\n } else if (gamepad1.dpad_left) {\n frontLeft.setPower(-0.4);\n backLeft.setPower(-0.4);\n }\n if (gamepad1.x) {\n frontLeft.setPower(1);\n backLeft.setPower(1);\n frontRight.setPower(1);\n backRight.setPower(1);\n sleep(200);\n frontRight.setPower(1);\n backRight.setPower(1);\n frontLeft.setPower(-1);\n backLeft.setPower(-1);\n sleep(700);\n }\n telemetry.update();\n }\n }", "@Override\n public void runOpMode() {\n RobotMain main = new RobotMain(this,hardwareMap,telemetry);\n\n //initialize controls\n imuTeleOpDualGamepad control = new imuTeleOpDualGamepad(main,gamepad1,gamepad2);\n\n waitForStart();\n\n //Pull the tail back from autonomous\n main.JewelArm.setServo(.65);\n\n //Continually run the control program in the algorithm\n while (opModeIsActive()) control.run();\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 }", "void start() \r\n {\r\n while (controller.clock <= controller.totalBurstTime) {\r\n this.clock();\r\n }\r\n }", "void startShutdown() {\n closed.set(true);\n regionManager.stopScanners();\n synchronized(toDoQueue) {\n toDoQueue.clear(); // Empty the queue\n delayedToDoQueue.clear(); // Empty shut down queue\n toDoQueue.notifyAll(); // Wake main thread\n }\n serverManager.notifyServers();\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\twhile (true) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tpc.cusumoer();\n\t\t\t\t\t\tThread.sleep(100);\n\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\twhile (true) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tpc.cusumoer();\n\t\t\t\t\t\tThread.sleep(100);\n\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "@Override\r\n public void teleopPeriodic() {\n if (m_stick.getRawButton(12)){\r\n TestCompressor.setClosedLoopControl(true);\r\n System.out.println(\"??\");\r\n } \r\n if (m_stick.getRawButton(11)) {\r\n TestCompressor.setClosedLoopControl(false);\r\n }\r\n //// fireCannon(Solenoid_1, m_stick, 8);\r\n //// fireCannon(Solenoid_2, m_stick, 10);\r\n //// fireCannon(Solenoid_3, m_stick, 12);\r\n //// fireCannon(Solenoid_4, m_stick, 7);\r\n //// fireCannon(Solenoid_5, m_stick, 9);\r\n //// fireCannon(Solenoid_6, m_stick, 11);\r\n\r\n // Logic to control trigering is inside\r\n // DO: Move the logic out here, makes more sense. \r\n fireTrio(topSolonoids, m_stick, 5);\r\n fireTrio(bottomSolonoids, m_stick, 6);\r\n\r\n // Make robit go\r\n double[] movementList = adjustJoystickInput(-m_stick.getY(), m_stick.getX(), m_stick.getThrottle());\r\n m_myRobot.arcadeDrive(movementList[0], movementList[1]);\r\n //System.out.println(m_gyro.getAngle());\r\n }", "@Override\n\tpublic void teleopPeriodic() {\n\n\t\tif (Joy.getRawButtonPressed(1)) {\n\t\t\ttriggerValue = !triggerValue;\n\n\t\t\tif (triggerValue) {\n\t\t\t\tairCompressor.start();\n\t\t\t\tSystem.out.println(\"Compressor ON\");\n\n\t\t\t} else if (!triggerValue) {\n\t\t\t\tairCompressor.stop();\n\t\t\t\tSystem.out.println(\"Compressor OFF\");\n\t\t\t}\n\t\t}\n\n\t\tif (Joy.getRawButtonPressed(2)) {\n\t\t\ttriggerValue = !triggerValue;\n\n\t\t\tif (triggerValue) {\n\t\t\t\ts1.set(DoubleSolenoid.Value.kForward);\n\t\t\t\tTimer.delay(1);\n\t\t\t\ts2.set(DoubleSolenoid.Value.kForward);\n\t\t\t\tSystem.out.println(\"Solenoid Forward\");\n\n\t\t\t} else if (!triggerValue) {\n\t\t\t\ts1.set(DoubleSolenoid.Value.kReverse);\n\t\t\t\tTimer.delay(1);\n\t\t\t\ts2.set(DoubleSolenoid.Value.kReverse);\n\t\t\t\tSystem.out.println(\"Solenoid Reversed\");\n\n\t\t\t}\n\t\t}\n\t}", "@Override\n\t\tpublic void loop() throws ConnectionLostException, InterruptedException {\n\t\t\ttry {\n\t\t\t\tif (ExitApp == true) {\n\t\t\t\t\tPStatus.write(false);\n\t\t\t\t\tEN_LE.write(false);\n\t\t\t\t\tExitApp = false;\n\t\t\t\t\tDisplayLabel(\"LATCH ON\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tPStatus.write(true);\n\n\t\t\t\t// Set device enable\n\t\t\t\tEN_Device1.write(cmdDevice1.isChecked());\n\t\t\t\tEN_Device2.write(cmdDevice2.isChecked());\n\t\t\t\tEN_Device3.write(cmdDevice3.isChecked());\n\t\t\t\tEN_Device4.write(cmdDevice4.isChecked());\n\t\t\t\tEN_Device5.write(cmdDevice5.isChecked());\n\n\t\t\t\tif (cmdDevice1.isChecked())\n\t\t\t\t\tDisplayLabel(\"Btn1_Click\");\n\t\t\t\t// Get Amp\n\n\t\t\t\t// Get Watt\n\n\t\t\t\tThread.sleep(10);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\t// PStatus.write(false);\n\t\t\t\t// EN_LE.write(false);\n\t\t\t\tioio_.disconnect();\n\t\t\t} catch (ConnectionLostException ex) {\n\t\t\t\t// PStatus.write(false);\n\t\t\t\t// EN_LE.write(false);\n\t\t\t\tioio_.disconnect();\n\t\t\t}\n\t\t}", "@Override\n public void start() {\n runtime.reset();\n arm.setPower(0);\n }", "public void start() {\n rfMotor.setPower(1);\n rrMotor.setPower(1);\n lfMotor.setPower(1);\n lrMotor.setPower(1);\n }", "public void runOpMode(){\n JAWLDrive3796 drive = new JAWLDrive3796(hardwareMap.dcMotor.get(\"left_drive\"), hardwareMap.dcMotor.get(\"right_drive\"));\n //Set the drive motors to run without encoders\n drive.setEncoders(false);\n //Create Grabber object\n JAWLGrabber3796 grabber = new JAWLGrabber3796(hardwareMap.servo.get(\"left_arm\"), hardwareMap.servo.get(\"right_arm\"));\n //Create Lift object\n JAWLLift3796 lift = new JAWLLift3796(hardwareMap.dcMotor.get(\"lift_motor\"));\n //Create color arm object\n JAWLColorArm3796 colorArm = new JAWLColorArm3796(hardwareMap.servo.get(\"color_arm\"));\n //Creates color sensor name\n ColorSensor colorSensorTemp = hardwareMap.get(ColorSensor.class, \"color_distance\");\n //Creates distance sensor name\n DistanceSensor distanceSensorTemp = hardwareMap.get(DistanceSensor.class, \"color_distance\");\n //Creates the color-distance sensor object\n JAWLColorSensor3796 colorDistanceSensor = new JAWLColorSensor3796(colorSensorTemp, distanceSensorTemp);\n //Creates the variable that will hold the color of the jewel\n String colorOfBall;\n //Creates relic arm objects\n //TTTTRelicArm3796 relicArm = new TTTTRelicArm3796(hardwareMap.dcMotor.get(\"relic_up_down\"), hardwareMap.dcMotor.get(\"relic_out_in\"), hardwareMap.dcMotor.get(\"relic_grab\"));\n //We never ended up having a relic arm!\n //The lift helper will set the idle power of the motor to a small double, keeping the lift from idly falling down\n boolean liftHelper = false;\n int i = 0;\n\n waitForStart();\n\n colorArm.armUp();\n\n while (opModeIsActive()) {\n //Here is where we define how the controllers should work\n //In theory, no logic retaining to controlling the components should be in here\n\n /*\n * Drive\n */\n\n //The left drive wheel is controlled by the opposite value of the left stick's y value on the first gamepad\n //The right drive is the same way except with the right drive wheel\n drive.leftDrive(-gamepad1.left_stick_y);\n drive.rightDrive(-gamepad1.right_stick_y);\n\n /*\n * Lift\n */\n telemetry.addData(\"Gamepad2 Right Stick Y\", -gamepad2.right_stick_y);\n\n if (-gamepad2.right_stick_y > 0) {\n //First checks to see if the right stick's negative y value is greater then zero.\n lift.moveMotor(-gamepad2.right_stick_y);\n //If it is, it sets the power for the motor to 1, and adds telemetry\n telemetry.addData(\"Lift Power\", 1);\n } else if (-gamepad2.right_stick_y < 0) {\n //Checks if the negative value of the right right stick's y position is less than zero\n lift.moveMotor(-0.1);\n //Sets the power for the motor to -0.1, and adds telemetry\n telemetry.addData(\"Lift Power\", -0.1);\n } else {\n //We check to see if the liftHelper is enabled\n if(liftHelper) {\n lift.moveMotor(0.1466 );\n } else {\n lift.moveMotor(0);\n }\n }\n\n\n\n /*\n * Lift helper control\n */\n\n if(gamepad2.a) {\n if(i == 0) {\n liftHelper = !liftHelper;\n }\n i = 5;\n }\n\n if(i != 0) {\n i--;\n }\n\n telemetry.addData(\"Lift Helper Enabled\", liftHelper);\n\n\n\n /*\n * Grabbers\n */\n if (gamepad2.left_trigger > 0) {\n //Closes the left arm, then displays the position in telemetry\n grabber.leftArmClose();\n double a = grabber.leftPosition();\n //Adds telemetry to display positions of grabbers, mostly for testing, but can be useful later on\n telemetry.addData(\"Left\", a);\n }\n\n if (gamepad2.left_bumper) {\n //Opens the left arm, then displays the position in telemetry\n grabber.leftArmOpen();\n double b = grabber.leftPosition();\n //We made the variables different as to avoid any and all possible errors\n telemetry.addData(\"Left\", b);\n }\n\n if (gamepad2.right_trigger > 0) {\n //Opens the right arm, then displays the position in telemetry\n grabber.rightArmClose();\n double c = grabber.rightPosition();\n telemetry.addData(\"Right\", c);\n }\n\n if (gamepad2.right_bumper) {\n //Closes the right arm, then displays the position in telemetry\n grabber.rightArmOpen();\n double d = grabber.rightPosition();\n telemetry.addData(\"Right\", d);\n }\n\n if (gamepad2.dpad_left){\n //Closes the left arm to a shorter distance\n grabber.leftArmShort();\n }\n\n if(gamepad2.dpad_right){\n //Closes the right arm to a shorter distance\n grabber.rightArmShort();\n\n }\n\n //Update all of our telemetries at once so we can see all of it at the same time\n telemetry.update();\n }\n }", "public Runner(boolean isDriver, CountDownLatch startSignal, CountDownLatch stopSignal)\t\n\t{\n\t\tthis.startSignal = startSignal;\n\t\tthis.stopSignal = stopSignal;\t\t\n\t\tif(isDriver)\tSystem.out.println(\"Driver starting\");\n\t\tthis.isDriver = isDriver;\n\t\tstartSignal.countDown();\n\t\tSystem.out.println(\"Driver Counting down\");\n\t}", "public void start() {\n m_enabled = true;\n }", "public void start()\n\t{\n\t\tloopy();\n\t}", "public LoopController()\r\n\t{\r\n\t\tregulate = true;\r\n\t\tsmooth = true;\r\n\t\tresolution = 10000;\r\n\t\tfps = 60;\r\n\t\tlastCall = Sys.getTime();\r\n\t\tduration = 0;\r\n\t}", "public void toggleStartStop() {\r\n IOEQ.add(new Runnable() {\r\n public void run() {\r\n if (stateMachine.isStartState() || stateMachine.isFinal()) {\r\n /* download is in idle or stopped state */\r\n DownloadWatchDog.this.startDownloads();\r\n } else {\r\n /* download can be stopped */\r\n DownloadWatchDog.this.stopDownloads();\r\n }\r\n }\r\n }, true);\r\n }", "@Override\n public void runOpMode() throws InterruptedException\n {\n leftDrive = hardwareMap.dcMotor.get(\"left_drive\");\n rightDrive = hardwareMap.dcMotor.get(\"right_drive\");\n\n leftDrive.setDirection(DcMotor.Direction.REVERSE);\n\n telemetry.addData(\"Mode\", \"waiting\");\n telemetry.update();\n\n // wait for start button.\n\n waitForStart();\n\n telemetry.addData(\"Mode\", \"running\");\n telemetry.update();\n\n // set both motors to 25% power.\n\n leftDrive.setPower(0.25);\n rightDrive.setPower(0.25);\n\n sleep(2000); // wait for 2 seconds.\n\n // set motor power to zero to stop motors.\n\n leftDrive.setPower(0.0);\n rightDrive.setPower(0.0);\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 start() {\n \t\tgui.initialize();\n \t\t// DEBUG mode\n\t\tbman.get(0).boostSpeed(2);\n \n \t\tloop();\n \t}", "public static void CheckPressure()\n {\n //Only start the compressor if we neeed air\n if(_isRuning && _compressor.getPressureSwitchValue())\n {\n _compressor.stop();\n _isRuning = false;\n }\n else if (!_isRuning && !_compressor.getPressureSwitchValue())\n {\n _compressor.start();\n _isRuning = true;\n }\n }", "@Override\n public void runOpMode() throws InterruptedException {\n leftfMotor = hardwareMap.dcMotor.get(\"m0\");\n rightfMotor = hardwareMap.dcMotor.get(\"m1\");\n leftbMotor = hardwareMap.dcMotor.get(\"m2\");\n rightbMotor = hardwareMap.dcMotor.get(\"m3\");\n rPMotor = hardwareMap.dcMotor.get(\"rPMotor\");\n leftClamp = hardwareMap.servo.get(\"left_servo\");\n rightClamp = hardwareMap.servo.get(\"right_servo\");\n rightfMotor.setDirection(DcMotor.Direction.REVERSE);\n rightbMotor.setDirection(DcMotor.Direction.REVERSE);\n\n telemetry.addData(\"Mode\", \"waiting\");\n telemetry.update();\n\n // wait for start button.\n\n\n waitForStart();\n\n leftY = 0;\n rightY = 0;\n leftZ = 0;\n rightZ = 0;\n bumperL = false;\n bumperR = false;\n\n while (opModeIsActive()) {\n\n telemetry.addData(\"left stick y \", gamepad1.left_stick_y);\n telemetry.update();\n leftY = -gamepad1.left_stick_y;\n\n rightY = -gamepad1.right_stick_y;\n\n leftZ = gamepad1.left_trigger;\n rightZ = gamepad1.right_trigger;\n\n bumperL = gamepad1.left_bumper;\n bumperR = gamepad1.right_bumper;\n\n\n leftfMotor.setPower(leftY);\n leftbMotor.setPower(leftY);\n rightfMotor.setPower(rightY);\n rightbMotor.setPower(rightY);\n\n\n if (leftZ > 0) {\n rPMotor.setPower(leftZ/10);\n\n } else if (rightZ > 0) {\n rPMotor.setPower(-rightZ/10);\n\n }\n\n\n telemetry.addData(\"Mode\", \"running\");\n telemetry.addData(\"sticks\", \" left=\" + leftY + \" right=\" + rightY);\n telemetry.addData(\"trig\", \" left=\" + leftZ + \" right=\" + rightZ);\n telemetry.update();\n\n\n if (bumperL) {\n\n clampMove += .01;\n leftClamp.setPosition(-clampMove);\n rightClamp.setPosition(clampMove);\n\n } else if (bumperR) {\n\n clampMove -= .01;\n leftClamp.setPosition(-clampMove);\n rightClamp.setPosition(clampMove);\n\n }\n\n idle();\n\n\n }\n }", "@Override\n public void runOpMode() throws InterruptedException {\n float hsvValues[] = {0F, 0F, 0F};\n\n // values is a reference to the hsvValues array.\n final float values[] = hsvValues;\n\n\n double LPower = 0.2;\n double RPower = 0.2;\n\n // Send telemetry message to signify robot waiting;\n cdim = hardwareMap.deviceInterfaceModule.get(\"dim\");\n\n\n // get a reference to our ColorSensor object.\n //sensorRGB1 = hardwareMap.colorSensor.get(\"beaconColor\");\n\n //Resetting encoders\n LFMotor = hardwareMap.dcMotor.get(\"FR\");\n LBMotor = hardwareMap.dcMotor.get(\"BR\");\n RFMotor = hardwareMap.dcMotor.get(\"FL\");\n RBMotor = hardwareMap.dcMotor.get(\"BL\");\n NOM = hardwareMap.dcMotor.get(\"NOM\");\n door = hardwareMap.servo.get(\"door\");\n Elevator = hardwareMap.dcMotor.get(\"Elevator\");\n // Conveyor = hardwareMap.dcMotor.get(\"Conveyor\");\n Launch = hardwareMap.dcMotor.get(\"Launch\");\n\n\n NOM.setDirection(DcMotor.Direction.REVERSE);\n //Conveyor.setDirection(DcMotor.Direction.REVERSE);\n\n telemetry.addData(\"Status\", \"Resetting Encoders\");\n telemetry.update();\n\n //servo = hardwareMap.servo.get(\"buttonPusher\");\n\n LFMotor.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n RFMotor.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n LBMotor.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n RBMotor.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n idle();\n\n LFMotor.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n RFMotor.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n LBMotor.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n RBMotor.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n\n // Send telemetry message to indicate successful Encoder reset\n telemetry.addData(\"Path0\", \"Starting at %7d :%7d\",\n RFMotor.getCurrentPosition(),\n RBMotor.getCurrentPosition(),\n RBMotor.getCurrentPosition(),\n LFMotor.getCurrentPosition());\n telemetry.update();\n //servo.setPosition(.67);\n\n\n // Wait for the game to start (driver presses PLAY)\n waitForStart();\n\n // Step through each leg of the path,verse movement is obtained by s\n // Note: Reetting a negative distance (not speed)\n\n //sleep(14000);\n\n sleep(5000);\n encoderDrive(DRIVE_SPEED_FAST, 10.0, -10.0, 10.0, -10.0, 5.0); //drive forward\n door.setPosition(.3 );\n\n LBMotor.setPower(0);\n RFMotor.setPower(0);\n RBMotor.setPower(0);\n sleep(1500);\n\n double start = getRuntime();\n\n\n // servo.setPosition(.28);\n while ((getRuntime() - start) < 2) {\n Launch.setPower(.6);\n }\n Launch.setPower(0);\n start = getRuntime();\n while ((getRuntime() - start) < 2) {\n door.setPosition(.85);\n Elevator.setPower(-1);\n }\n\n start = getRuntime();\n while ((getRuntime() - start) < 2.05) {\n Launch.setPower(.6);\n }\n Elevator.setPower(0);\n Launch.setPower(0);\n //servo.setPosition(.67);\n\n encoderDrive(TURN_SPEED, .65, .65, .65, .65 , 4.0);\n encoderDrive(DRIVE_SPEED_FAST, 3, -3, 3, -3, 5.0); //drive forward\n LFMotor.setPower(0);\n LBMotor.setPower(0);\n RFMotor.setPower(0);\n RBMotor.setPower(0);\n sleep(1500);\n\n\n }", "public void stopIt() {\n UIMAFramework.getLogger(this.getClass()).logrb(Level.FINEST, this.getClass().getName(),\n \"process\", CPMUtils.CPM_LOG_RESOURCE_BUNDLE, \"UIMA_CPM_stop_cpm__FINEST\",\n new Object[] { Thread.currentThread().getName(), String.valueOf(killed) });\n\n dumpState();\n\n stopped = true;\n killed = true;\n if (!isRunning) {\n UIMAFramework.getLogger(this.getClass()).logrb(Level.FINEST, this.getClass().getName(),\n \"process\", CPMUtils.CPM_LOG_RESOURCE_BUNDLE, \"UIMA_CPM_already_stopped__FINEST\",\n new Object[] { Thread.currentThread().getName() });\n // Already stopped\n return;\n }\n // try {\n // Change global status\n isRunning = false;\n // terminate this thread if the thread has been previously suspended\n synchronized (lockForPause) {\n if (pause) {\n pause = false;\n lockForPause.notifyAll();\n }\n }\n // Let processing threads finish their work by emptying all queues. Even during a hard\n // stop we should try to clean things up as best as we can. First empty process queue or work\n // queue, dump result of analysis into output queue and let the consumers process that.\n // When all queues are empty we are done.\n\n // The logic below (now commented out) has a race condition -\n // The workQueue / outputQueue can become (temporarily) empty, but then\n // can be filled with the eof token\n // But this code proceeds to stop all the CAS processors,\n // which results in a hang because the pool isn't empty and the process thread waits for\n // an available cas processor forever.\n\n // Fix is to not kill the cas processors. Just let them finish normally. The artifact producer\n // will stop sending new CASes and send through an eof token, which causes normal shutdown to\n // occur for all the threads.\n\n /*\n * if (workQueue != null) { if (UIMAFramework.getLogger().isLoggable(Level.FINEST)) {\n * UIMAFramework.getLogger(this.getClass()).logrb( Level.FINEST, this.getClass().getName(),\n * \"process\", CPMUtils.CPM_LOG_RESOURCE_BUNDLE, \"UIMA_CPM_consuming_queue__FINEST\", new Object[]\n * { Thread.currentThread().getName(), workQueue.getName(),\n * String.valueOf(workQueue.getCurrentSize()) });\n * \n * } int cc = workQueue.getCurrentSize(); while (workQueue.getCurrentSize() > 0) {\n * sleep(MAX_WAIT_ON_QUEUE); if (System.getProperty(\"DEBUG\") != null) { if (cc <\n * workQueue.getCurrentSize()) { if (UIMAFramework.getLogger().isLoggable(Level.FINEST)) {\n * UIMAFramework.getLogger(this.getClass()).logrb( Level.FINEST, this.getClass().getName(),\n * \"process\", CPMUtils.CPM_LOG_RESOURCE_BUNDLE, \"UIMA_CPM_wait_consuming_queue__FINEST\", new\n * Object[] { Thread.currentThread().getName(), workQueue.getName(),\n * String.valueOf(workQueue.getCurrentSize()) });\n * \n * } cc = workQueue.getCurrentSize(); } } } } if (outputQueue != null) { while\n * (outputQueue.getCurrentSize() > 0) { sleep(MAX_WAIT_ON_QUEUE); if\n * (UIMAFramework.getLogger().isLoggable(Level.FINEST)) {\n * UIMAFramework.getLogger(this.getClass()).logrb( Level.FINEST, this.getClass().getName(),\n * \"process\", CPMUtils.CPM_LOG_RESOURCE_BUNDLE, \"UIMA_CPM_wait_consuming_queue__FINEST\", new\n * Object[] { Thread.currentThread().getName(), outputQueue.getName(),\n * String.valueOf(outputQueue.getCurrentSize()) }); } } if\n * (UIMAFramework.getLogger().isLoggable(Level.FINEST)) {\n * UIMAFramework.getLogger(this.getClass()).logrb(Level.FINEST, this.getClass().getName(),\n * \"process\", CPMUtils.CPM_LOG_RESOURCE_BUNDLE, \"UIMA_CPM_done_consuming_queue__FINEST\", new\n * Object[] { Thread.currentThread().getName() }); } }\n * \n * for (int i = 0; processingUnits != null && i < processingUnits.length && processingUnits[i]\n * != null; i++) { if (UIMAFramework.getLogger().isLoggable(Level.FINEST)) {\n * UIMAFramework.getLogger(this.getClass()).logrb(Level.FINEST, this.getClass().getName(),\n * \"process\", CPMUtils.CPM_LOG_RESOURCE_BUNDLE, \"UIMA_CPM_stop_processors__FINEST\", new Object[]\n * { Thread.currentThread().getName(), String.valueOf(i) }); }\n * processingUnits[i].stopCasProcessors(false); }\n * \n * } catch (Exception e) { if (UIMAFramework.getLogger().isLoggable(Level.FINER)) {\n * e.printStackTrace(); } UIMAFramework.getLogger(this.getClass()).logrb(Level.FINER,\n * this.getClass().getName(), \"process\", CPMUtils.CPM_LOG_RESOURCE_BUNDLE,\n * \"UIMA_CPM_exception__FINER\", new Object[] { Thread.currentThread().getName(), e.getMessage()\n * }); }\n */\n }", "public void zero()\n {\n Runnable zeroRunnable = new Runnable() {\n @Override\n public void run()\n {\n {\n boolean liftLimit;\n boolean extendLimit;\n\n\n\n do\n {\n liftLimit = liftLimitSwitch.getState();\n extendLimit = extendLimitSwitch.getState();\n\n if (!liftLimit)\n {\n lift.setPower(-0.5);\n }\n else\n {\n lift.setPower(0);\n }\n\n if (extendLimit)\n {\n extend.setPower(-0.5);\n }\n else\n {\n extend.setPower(0);\n }\n\n if (cancel)\n {\n break;\n }\n } while (!liftLimit || !extendLimit);\n\n if (!cancel)\n {\n lift.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n lift.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n\n extend.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n extend.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n\n isZeroed = true;\n }\n }\n }\n };\n\n zeroThread = new Thread(zeroRunnable);\n zeroThread.start();\n }", "public void run() {\n this.comp.setPause();\n }", "@Override\n public void init_loop() {\n smDrive.init_loop();\n smArm.init_loop();\n }", "private void startStop()\n\t\t{\n\t\tif(currentAlgo!=null)\n\t\t\t{\n\t\t\tif(isRunning())\n\t\t\t\t{\n\t\t\t\tbStartStop.setText(\"Stopping\");\n\t\t\t\tthread.toStop=true;\n\t\t\t\tcurrentAlgo.setStopping(true);\n\t\t\t\t}\n\t\t\telse\n\t\t\t\t{\n\t\t\t\tthread=new SteppingThread();\n\t\t\t\tbStartStop.setText(\"Stop\");\n\t\t\t\tthread.toStop=false;\n\t\t\t\tcurrentAlgo.setStopping(false);\n\t\t\t\tthread.start();\n\t\t\t\t}\n\t\t\t}\n\t\t}", "@Override\n public void loop() {\n telemetry.addLine(\"DogeCV 2019.1 - Cropping Example\");\n telemetry.update();\n }", "void openSuperMarketSimulation()\r\n\t{\n\t\t\r\n\t\tqueueManager = new QueueManager(shoppingQueue);\r\n\t\tdataManager = new DataCollector();\r\n\t\ttimerLoop.start();\r\n\t\tsuperMarketTime.timerStart();\r\n//\t\twhile(timerLoop.isRunning())\r\n//\t\t{\r\n//\t\t\t\r\n//\t\t}\r\n\t\t\r\n\t\t\r\n\t\t//CLOSE THE MARKET :(((\r\n\t}", "public void Loop() {\n //if the drive mode is encoders then mirror the rear motors so that we just use the encoders of the front motors\n if(driveMode == DriveMode.Run_With_Encoders){\n rearLeftDrive.setVelocity(frontLeftDrive.getVelocity());\n rearRightDrive.setVelocity(frontRightDrive.getVelocity());\n }\n }", "public void stop(){\n started = false;\n for (DcMotor motor :this.motors) {\n motor.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n motor.setPower(0);\n }\n this.reset();\n }", "public void action() {\r\n\t\tsuppressed = false;\r\n\t\tMotor.B.stop();\r\n\t\tMotor.C.stop();\r\n\t\tDelay.msDelay(1000);\r\n\t\tMotor.B.setSpeed(180);\r\n\t\tMotor.C.setSpeed(180);\r\n\t\tMotor.B.forward();\r\n\t\tMotor.C.forward();\r\n\t\tif((light.getLightValue()>46 && light.getLightValue()<49) || (light.getLightValue()>27 && light.getLightValue()<31)){\r\n\t\t\tMotor.B.stop();\r\n\t\t\tMotor.C.stop();\r\n\t\t\tDelay.msDelay(500);\r\n\t\t\tMotor.B.forward();\r\n\t\t\tMotor.C.forward();\r\n\t\t\tif(light.getLightValue()>44 && light.getLightValue()<45){//home base\r\n\t\t\t\tMotor.B.stop();\r\n\t\t\t\tMotor.C.stop();\r\n\t\t\t}\r\n\t\t}\r\n\t\twhile(!suppressed){\r\n\t\t\tThread.yield();\r\n\t\t}\r\n\t}", "@Override\n public void start() {\n runtime.reset();\n\n while (mrGyro.isCalibrating()) { //Ensure calibration is complete (usually 2 seconds)\n }\n\n if(LEDState){\n BallSensorreader.write8(3, 0); //Set the mode of the color sensor using LEDState\n }\n else{\n BallSensorreader.write8(3, 1); //Set the mode of the color sensor using LEDState\n }\n //Active - For measuring reflected light. Cancels out ambient light\n //Passive - For measuring ambient light, eg. the FTC Color Beacon\n }", "@Override\n public void loop() {\n switch (auto) {\n case 0:\n // robot.runToTarget(Movement.BACKWARD, 10);\n break;\n\n case 1:\n robot.changeRunMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n break;\n }\n telemetry.addData(\"Case:\", auto);\n telemetry.update();\n }", "@Override\n\tpublic void start() {\n\t\t\n\t\t_mode.init();\n\t\t\n\t\t_mode.start();\n\t}", "@Override\n protected void initialize() {\n arm.getElbow().enableCoastMode();\n arm.getElbow().stop();\n arm.getWrist().enableCoastMode();\n arm.getWrist().stop();\n arm.getExtension().enableCoastMode();\n arm.getExtension().stop();\n }", "@Override\n\tpublic void teleopPeriodic() {\n\t\tScheduler.getInstance().run();\n\t\n\t\tif (oi.getRightTrig()) {\n\t\t\tshifter.set(Value.kForward);\n\t\t} else if (oi.getLeftTrig()) {\n\t\t\tshifter.set(Value.kReverse);\n\t\t}\n\t\tSystem.out.println(shifter.get());\n\t\t\t\n\t\tif(oi.getClimber()){\n\t\t\tclimber.set(1.0);\n\t\t\tSystem.out.println(\"climber running\");\n\t\t}else {\n\t\t\tclimber.set(0);\n\t\t\tSystem.out.println(\"climber not running\");\n\t\t}\n\t}", "@Override\n public void start() {\n synth.start();\n // Start the LineOut. It will pull data from the oscillator.\n lineOut.start();\n\n // Queue attack portion of sample.\n samplePlayer.dataQueue.queue(sample, 0, loopStartFrame);\n queueNewLoop();\n }", "@Override\n public void runOpMode() throws InterruptedException {\n SampleMecanumDriveCancelable drive = new SampleMecanumDriveCancelable(hardwareMap);\n\n // Set the pose estimate to where you know the bot will start in autonomous\n // Refer to https://www.learnroadrunner.com/trajectories.html#coordinate-system for a map\n // of the field\n // This example sets the bot at x: -20, y: -35, and facing 90 degrees (turned counter-clockwise)\n Pose2d startPose = new Pose2d(-20, -35, Math.toRadians(90));\n drive.setPoseEstimate(startPose);\n\n waitForStart();\n\n if (isStopRequested()) return;\n\n // Example spline path from SplineTest.java\n Trajectory traj = drive.trajectoryBuilder(startPose)\n .splineTo(new Vector2d(60, 60), 0)\n .build();\n\n // We follow the trajectory asynchronously so we can run our own logic\n drive.followTrajectoryAsync(traj);\n\n // Start the timer so we know when to cancel the following\n ElapsedTime stopTimer = new ElapsedTime();\n\n while (opModeIsActive() && !isStopRequested()) {\n // 3 seconds into the opmode, we cancel the following\n if (stopTimer.seconds() >= 3) {\n // Cancel following\n drive.cancelFollowing();\n\n // Stop the motors\n drive.setDrivePower(new Pose2d());\n }\n\n // Update drive\n drive.update();\n }\n }", "protected void initialize() {\r\n motorWithEncoder.encoder.reset();\r\n motorWithEncoder.encoder.start();\r\n motorWithEncoder.enable();\r\n MessageLogger.LogMessage(\"PID Loop Enabled\");\r\n }", "public void shutdown() {\n this.dontStop = false;\n }", "private void cancelHeavyLifting()\n {\n }", "@Override\n\tpublic void drive() {\n\t\tif (gasoline > 0) {\n\t\t\tsetAccelerate(true);\n\t\t}\n\t}", "@Override\n public void runOpMode() {\n RobotOmniWheels5 myRobot = new RobotOmniWheels5(hardwareMap);\n\n // Put initialization blocks here.\n waitForStart();\n\n //code will continue to run until you hit stop in the app\n while(opModeIsActive()) {\n\n double leftStickYValue = gamepad1.left_stick_y;\n if (leftStickYValue < -.1) {\n //Set the robotspeed to the stick value\n //As Stick Y value is negative when pressed up, use negative in front\n myRobot.setRobotSpeed(-leftStickYValue);\n myRobot.move();\n } else {\n if (leftStickYValue > .1){\n //Set the robotspeed to the stick value\n //As Stick Y value is positive when pressed down, use negative in front to move back\n myRobot.setRobotSpeed(-leftStickYValue);\n myRobot.move();\n }\n else {\n myRobot.stopMoving();\n }\n }\n }\n }", "public void run() {\n while (!stoppen) {\n serveer(balie.pakMaaltijd());\n }\n }", "@Override\n public void runOpMode() {\n hw = new RobotHardware(robotName, hardwareMap);\n rd = new RobotDrive(hw);\n rs=new RobotSense(hw, telemetry);\n /*rd.moveDist(RobotDrive.Direction.FORWARD, .5, .3);\n rd.moveDist(RobotDrive.Direction.REVERSE, .5, .3);\n rd.moveDist(RobotDrive.Direction.FORWARD, .5, 1);\n rd.moveDist(RobotDrive.Direction.REVERSE, .5, 1);*/\n telemetry.addData(\"Ready! \", \"Go Flamangos!\"); \n telemetry.update();\n\n //Starting the servos in the correct starting position\n /*hw.armRight.setPosition(1-.3);\n hw.armLeft.setPosition(.3);\n hw.level.setPosition(.3+.05);*/\n hw.f_servoLeft.setPosition(1);\n hw.f_servoRight.setPosition(0.5);\n \n rd.moveArm(hw.startPos());\n waitForStart();\n while (opModeIsActive()) {\n \n /*Starting close to the bridge on the building side\n Move under the bridge and push into the wall*/\n rd.moveDist(RobotDrive.Direction.LEFT,2,.5);\n rd.moveDist(RobotDrive.Direction.FORWARD, 10, .5);\n break;\n }\n }", "public void turnOnCooler() {\n oilPompController.turnPompsOn();\n breakController.turnOff();\n mainPowerController.turnOn();\n supportPowerController.turnOn();\n try {\n Thread.sleep(1000);\n } catch (InterruptedException e) {\n System.out.println(\"Waiting to stand up was interrupted.\");\n }\n supportPowerController.turnOff();\n System.out.println(\"System is running.\");\n }", "DeltaWorker() {\n this.shouldStop = new AtomicBoolean(false);\n }", "public void teleopPeriodic() {\n \t\n \twhile (isOperatorControl() && isEnabled()) {\n \t\tdebug();\n \t\tsmartDashboardVariables();\n \t\t//driver control functions\n \t\tdriverControl();\n \t//state machine\n \tterrainStates();\n \t//this function always comes last\n \t//armSlack();\n Timer.delay(0.005);\t\t// wait for a motor update time\n }\n \tTimer.delay(0.005);\n }", "public boolean isLoopMode();", "@Override\r\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tmVideoContrl.start();\r\n\t\t\t\t\t\tisBreakDialogDissmiss = true;\r\n\t\t\t\t\t\tsendFirstShowContrlBtn();\r\n\t\t\t\t\t\tisChangeNotStart = true;\r\n\t\t\t\t\t\tmVideoPlayerHander.sendEmptyMessage(REFRESH_PAUSEBUTON);\r\n\t\t\t\t\t\t// start_3Dmode();\r\n\t\t\t\t\t}", "public final synchronized void cIY() {\n int i = 0;\n synchronized (this) {\n AppMethodBeat.m2504i(4443);\n C4990ab.m7417i(\"MicroMsg.Voip.VoipDeviceHandler\", \"stopDev, recorder: %s\", this.kzb);\n int i2;\n if (this.kzf == kze) {\n C46317a.Loge(\"MicroMsg.Voip.VoipDeviceHandler\", \"devcie stoped already.\");\n i2 = this.kzi;\n synchronized (i2) {\n if (this.kzb != null) {\n C4990ab.m7412e(\"MicroMsg.Voip.VoipDeviceHandler\", \"status DEV_STOP, but recorder still not null!!\");\n this.kzb.mo4590EB();\n }\n }\n } else {\n C46317a.Logi(\"MicroMsg.Voip.VoipDeviceHandler\", \"stop device..\");\n this.kzf = kze;\n if (this.sQa != null) {\n C46317a.Logd(\"MicroMsg.Voip.VoipDeviceHandler\", \"stop videodecode thread..\");\n this.sQa.sQd = true;\n C7305d.xDG.remove(this.sQa);\n this.sQa = null;\n }\n this.kzh = 1;\n this.sPR = 0;\n this.kzk = 1;\n this.sPW = 1;\n this.kzl = 0;\n this.sPX = 0;\n this.kzg = 92;\n this.sPM = 0;\n this.sPN = 0;\n this.sPO = 1;\n this.sPP = 0;\n this.kzj = 0;\n this.sNl.sPp.sUo = cIX();\n this.sNl.sPp.sUp = cIs();\n v2protocal v2protocal = this.sNl.sPp;\n if (this.kzb == null || this.sNl.sPp.sVH.sQo != (byte) 1) {\n i2 = -2;\n } else {\n i2 = this.kzb.mo4594EO();\n }\n v2protocal.sUs = i2;\n v2protocal v2protocal2 = this.sNl.sPp;\n if (this.sPL != null && this.sNl.sPp.sVH.sQo == (byte) 1) {\n i = this.sPL.cIt();\n }\n v2protocal2.sUz = (int) ((((float) C1407g.m2946KK().getStreamVolume(i)) / ((float) C1407g.m2946KK().getStreamMaxVolume(i))) * 100.0f);\n Object obj = this.kzi;\n synchronized (obj) {\n if (!(this.sPL == null || this.kzb == null)) {\n C7305d.m12298f(new C35354a(this.sPL, this.kzb), \"VoipDeviceHandler_stopDev\");\n C4990ab.m7416i(\"MicroMsg.Voip.VoipDeviceHandler\", \"do stop record\");\n }\n AppMethodBeat.m2505o(4443);\n }\n }\n AppMethodBeat.m2505o(4443);\n }\n }", "@Override\n public void main() throws InterruptedException {\n this.motorLeft = this.hardwareMap.dcMotor.get(\"motorLeft\");\n this.motorRight = this.hardwareMap.dcMotor.get(\"motorRight\");\n\n motorLeft.setMode(DcMotorController.RunMode.RUN_WITHOUT_ENCODERS);\n motorRight.setMode(DcMotorController.RunMode.RUN_WITHOUT_ENCODERS);\n\n motorRight.setDirection(DcMotor.Direction.REVERSE);\n\n// boolean test = true;\n// while (test) {\n// motorLeft.setPower(1.0);\n// motorRight.setPower(1.0);\n//\n// if (updateGamepads())\n// {\n// if (gamepad1.b)\n// {\n// test = false;\n// }\n// }\n// }\n\n // while (opModeIsActive())\n // gamepad1.a\n while (true)\n {\n if (updateGamepads())\n {\n motorLeft.setPower(gamepad1.left_stick_y);\n motorRight.setPower(gamepad1.right_stick_y);\n\n // move the arm with controller bumpers\n if (gamepad1.right_bumper)\n {\n motorArm.setPower(0.5);\n Thread.sleep(100);\n }\n else if (gamepad1.left_bumper)\n {\n motorArm.setPower(-0.5);\n Thread.sleep(100);\n }\n else\n {\n motorArm.setPower(0);\n }\n }\n\n telemetry.update();\n idle();\n }\n }", "public void teleopContinuous() {\n //feed the watchdog\n myDog.feed();\n\n //check safestop button\n /*safestop commented out\n if (joysticks.getRightButton(10))//Buttons on top of right stick stops robot\n {\n safeStop();\n //delay to allow driver to release button\n Timer.delay(.1);\n myDog.feed();\n //at this point driver should have released the butto\n while (!joysticks.getRightTop()) {\n myDog.feed();\n }\n //now the button is pressed again, indicating a restart- the program can continue\n\n //slight delay to allow driver to release the button before the next loop\n Timer.delay(.1);\n }\n */\n\n //if arm is in teleop mode, handles input accordingly\n if (armState == TELEOP) {\n handleArmInput();\n }\n\n //if arm is in auto mode, checks whether user is pressing button 1 to regain\n //control and stops the auto task if so\n\n /*\n arm never goes to auto mode, so this is commented out\n\n (armState == AUTO) {\n //if the driver is attempting to cancel the task OR the task is done, return control\n //to the driver\n if (armJoystick.getRawButton(7) || !armTask.isRunning()) {\n armTask.interrupt();\n armTask.stop();\n armState = TELEOP;\n }\n }\n */\n\n //if drive is in teleop mode, handles input accordingly\n if (driveState == TELEOP) {\n try {\n handleDriveInput();\n } catch (EnhancedIOException e) {\n }\n\n }\n\n //if drive is in auto mode, checks whether user is trying to regain control\n /*not used\n if (driveState == AUTO) {\n //if the driver is attempting to cancel the task OR the task is done, return control\n //to the driver\n if (joysticks.getLeftButton(1) || !driveTask.isRunning()) {\n driveTask.interrupt();\n driveTask.stop();\n driveState = TELEOP;\n }\n }\n */\n\n\n printToScreen(\"Gyro Angle: \" + arm.gyro.getAngle());\n printToScreen(\"Arm Angle: \" + arm.getArmAngle());\n }", "@Override\n\tpublic void run() {\n\t\twhile(true) {\n\t\tsale();\n\t\t}\n\t\t\n\t}", "public void runOpMode() {\n robot.init(hardwareMap);\n\n // Send telemetry message to signify robot waiting;\n telemetry.addData(\"Status\", \"Resetting Encoders\"); //\n telemetry.update();\n\n robot.leftMotor.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n robot.rightMotor.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n idle();\n\n robot.leftMotor.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n robot.rightMotor.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n\n // Send telemetry message to indicate successful Encoder reset\n telemetry.addData(\"Path0\", \"Starting at %7d :%7d\",\n robot.leftMotor.getCurrentPosition(),\n robot.rightMotor.getCurrentPosition());\n telemetry.addData(\"Gyro Heading:\", \"%.4f\", getHeading());\n telemetry.update();\n\n int cameraMonitorViewId = hardwareMap.appContext.getResources().getIdentifier(\"cameraMonitorViewId\", \"id\", hardwareMap.appContext.getPackageName());\n\n VuforiaLocalizer.Parameters parameters = new VuforiaLocalizer.Parameters(cameraMonitorViewId);\n\n parameters.vuforiaLicenseKey = \"Adiq0Gb/////AAAAme76+E2WhUFamptVVqcYOs8rfAWw8b48caeMVM89dEw04s+/mRV9TqcNvLkSArWax6t5dAy9ISStJNcnGfxwxfoHQIRwFTqw9i8eNoRrlu+8X2oPIAh5RKOZZnGNM6zNOveXjb2bu8yJTQ1cMCdiydnQ/Vh1mSlku+cAsNlmfcL0b69Mt2K4AsBiBppIesOQ3JDcS3g60JeaW9p+VepTG1pLPazmeBTBBGVx471G7sYfkTO0c/W6hyw61qmR+y7GJwn/ECMmXZhhHkNJCmJQy3tgAeJMdKHp62RJqYg5ZLW0FsIh7cOPRkNjpC0GmMCMn8AbtfadVZDwn+MPiF02ZbthQN1N+NEUtURP0BWB1CmA\";\n\n\n parameters.cameraDirection = VuforiaLocalizer.CameraDirection.FRONT;\n this.vuforia = ClassFactory.createVuforiaLocalizer(parameters);\n\n VuforiaTrackables relicTrackables = this.vuforia.loadTrackablesFromAsset(\"RelicVuMark\");\n VuforiaTrackable relicTemplate = relicTrackables.get(0);\n relicTemplate.setName(\"relicVuMarkTemplate\"); // can help in debugging; otherwise not necessary\n\n telemetry.addData(\">\", \"Press Play to start\");\n telemetry.update();\n\n\n\n // Wait for the game to start (driver presses PLAY)\n waitForStart();\n relicTrackables.activate();\n\n //while (opModeIsActive()) {\n\n /**\n * See if any of the instances of {@link relicTemplate} are currently visible.\n * {@link RelicRecoveryVuMark} is an enum which can have the following values:\n * UNKNOWN, LEFT, CENTER, and RIGHT. When a VuMark is visible, something other than\n * UNKNOWN will be returned by {@link RelicRecoveryVuMark#from(VuforiaTrackable)}.\n */\n RelicRecoveryVuMark vuMark = RelicRecoveryVuMark.from(relicTemplate);\n while (vuMark == RelicRecoveryVuMark.UNKNOWN) {\n vuMark = RelicRecoveryVuMark.from(relicTemplate);\n /* Found an instance of the template. In the actual game, you will probably\n * loop until this condition occurs, then move on to act accordingly depending\n * on which VuMark was visible. */\n }\n telemetry.addData(\"VuMark\", \"%s visible\", vuMark);\n telemetry.update();\n sleep(550);\n\n //switch (vuMark) {\n // case LEFT: //RelicRecoveryVuMark vuMark = RelicRecoveryVuMark.LEFT;\n // coLumn = 2;\n // case CENTER:// RelicRecoveryVuMark vuMark = RelicRecoveryVuMark.CENTER;\n // coLumn = 1;\n // case RIGHT:// RelicRecoveryVuMark vuMark = RelicRecoveryVuMark.RIGHT;\n // coLumn = 0;\n //}\n if ( vuMark == RelicRecoveryVuMark.LEFT) {\n coLumn = 2;\n }\n else if(vuMark == RelicRecoveryVuMark.RIGHT){\n coLumn = 0;\n }\n else if(vuMark == RelicRecoveryVuMark.CENTER){\n coLumn = 1;\n }\n\n\n telemetry.addData(\"coLumn\", \"%s visible\", coLumn);\n telemetry.update();\n sleep(550);\n\n\n\n//if jewej is red 1 if jewel is blue 2\n\n // if(jewel == 1) {\n // gyroturn(-10, TURN_SPEED, -TURN_SPEED); //encoderDrive(TURN_SPEED, TURN_SPEED, turndistance[1], -turndistance[1], 5.0);\n //gyroturn(-2, -TURN_SPEED, TURN_SPEED); //encoderDrive(TURN_SPEED, TURN_SPEED, turndistance[1], -turndistance[1], 5.0);\n //}\n //else if(jewel == 2){\n // gyroturn(10, -TURN_SPEED, TURN_SPEED); //encoderDrive(TURN_SPEED, TURN_SPEED, turndistance[1], -turndistance[1], 5.0);\n // gyroturn(-2, TURN_SPEED, -TURN_SPEED); //encoderDrive(TURN_SPEED, TURN_SPEED, turndistance[1], -turndistance[1], 5.0);\n //}\n encoderDrive(DRIVE_SPEED, DRIVE_SPEED, disandTurn[0][coLumn], disandTurn[0][coLumn], 5.0); // S1: Forward 24 Inches with 5 Sec timeout shoot ball\n\n gyroturn(disandTurn[1][coLumn], TURN_SPEED, -TURN_SPEED); //encoderDrive(TURN_SPEED, TURN_SPEED, turndistance[0], -turndistance[0], 5.0);\n\n encoderDrive(DRIVE_SPEED, DRIVE_SPEED, disandTurn[2][coLumn], disandTurn[2][coLumn], 5.0); // S3: Forward 43.3 iNCHES\n\n gyroturn(disandTurn[3][coLumn], TURN_SPEED, -TURN_SPEED); //encoderDrive(TURN_SPEED, TURN_SPEED, turndistance[1], -turndistance[1], 5.0);\n\n encoderDrive(DRIVE_SPEED, DRIVE_SPEED, disandTurn[4][coLumn], disandTurn[4][coLumn], 5.0);// S5: Forward 12 Inches with 4 Sec timeout\n\n gyroturn(disandTurn[5][coLumn], TURN_SPEED, -TURN_SPEED); //encoderDrive(TURN_SPEED, TURN_SPEED, turndistance[1], -turndistance[1], 5.0);\n\n encoderDrive(DRIVE_SPEED, DRIVE_SPEED, disandTurn[6][coLumn], disandTurn[6][coLumn], 5.0);// S5: Forward 12 Inches with 4 Sec timeout\n\n\n Outake();\n encoderDrive(DRIVE_SPEED, DRIVE_SPEED, disandTurn[7][coLumn], disandTurn[7][coLumn], 5.0);// S6: Forward 48 inches with 4 Sec timeout\n }", "@Override\n public void runOpMode() throws InterruptedException {\n CommonAutonomous commonAutonomous = new CommonAutonomous(AllianceColor.BLUE, hardwareMap, this);\n\n waitForStart();\n\n commonAutonomous.wallPos1ToBeacon1();\n commonAutonomous.pressBeacon();\n }", "@Override\n\t\tpublic void run() {\n\t\t\ttry {\n\t\t\t\tbilliardDOS.writeBoolean(start);\n\t\t\t\tbilliardDOS.writeBoolean(end);\n\t\t\t\tbilliardDOS.writeBoolean(reset);\n\t\t\t\tbilliardDOS.flush();\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t}", "@Override\n public void loop() {\n smDrive.loop();\n smArm.loop();\n telemetry.update();\n }", "public synchronized void start() {\n\t\tif(isStarted) {\n\t\t\treturn;\n\t\t}\n\t\tif(isStopped) {\n\t\t\tthrow new IllegalStateException(\"Cannot restart a TorClient instance. Create a new instance instead.\");\n\t\t}\n\t\tlogger.info(\"Starting Orchid (version: \"+ Tor.getFullVersion() +\")\");\n\t\tverifyUnlimitedStrengthPolicyInstalled();\n\t\tdirectoryDownloader.start(directory);\n\t\tcircuitManager.startBuildingCircuits();\n\t\tif(dashboard.isEnabledByProperty()) {\n\t\t\tdashboard.startListening();\n\t\t}\n\t\tisStarted = true;\n\t}", "@Override\n\tpublic void run() {\n\t\twhile(true) {//模拟某人不停取钱\n\t\t\tboolean flag = bC.withdrowMoney(1);\n\t\t\t//停止条件\n\t\t\tif(flag==false) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "public static void main(String[] args) {\n StopGate2 gate = new StopGate2();\n gate.setSize(500, 500);\n gate.setVisible(true);\n }", "public void run() {\n \tthis.ctr.setOperationalTime(0.0);\n\t\tthis.isRunning = true;\n\t\tthis.ctr.getMemory().set_PROGRAMMCOUNTER(0);\n \t\n\t\twhile (!exit) { \n \t\ttry {\n\n \t\t\t// Write Programmcounter in PCL\n \t\t\tctr.getMemory().set_SRAMDIRECT(0x02, ctr.getMemory().programmcounter & 0xFF);\n \t\t\t// Set the marker in the gui to the active code line\n \t\t\tctr.setCodeViewCounter(ctr.getProgramCounterList()[ctr.getMemory().programmcounter]);\n \t\t\t// Update the special registers\n \t\t\tctr.updateSpecialRegTable(Integer.toHexString(ctr.getMemory().programmcounter), 4, 1);\n \t\t\tctr.updateSpecialRegTable(Integer.toBinaryString(ctr.getMemory().programmcounter), 4, 2);\n \t\t\t\n \t\t\t// get the command of the current line as an int\n \t\t\tint codeLine = ctr.getMemory().getProgramMemory()[ctr.getMemory().programmcounter];\n\n \t\t\t// checking if this pc has a breakpoint and activating the debugger\n \t\t\tif(ctr.getBreakPointList()[ctr.getMemory().programmcounter]) \n \t\t\t{\n \t\t\t\tthis.debugging = true;\n \t\t\t\tthis.continueDebug = false;\n \t\t\t}\n \t\t\t\n \t\t\t// If the last command was 2 cycle long then execute a NOP first.\n \t\t\tctr.clearHighlights();\n \t\t\tif(ctr.isNopCycle()) {\n \t\t\tctr.getCommands().executeCommand(NOP);\t\t// NOP\n \t\t\tctr.setNopCycle(false);\n \t\t\tctr.getMemory().set_PROGRAMMCOUNTER(ctr.getMemory().get_PROGRAMMCOUNTER() - 1);\n \t\t\t}else {\t\n \t\t\tctr.getCommands().executeCommand(codeLine);\t// Normal Execute\n \t\t\t}\n \t\t\t// check eeprom state machine\n \t\t\ttry {\n\t\t\t\t\tctr.getEeprom().checkStates(ctr.getMemory().get_MemoryDIRECT(0x89));\n\t\t\t\t} catch (UnsupportedEncodingException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n \t\t\t\n \t\t\t// Before the command execute, the watchdog is updated\n \t\t\tctr.getWatchdog().update(ctr.getOperationalTime());\n\n \t\t\t// update all analog IO \n \t\t\tctr.refreshIO();\n \t\t\t// update 7 segment display \n \t\t\tctr.update7Segment();\n \t\t\t\n \t\t\t// add the cycle time to operationalTime and update the panel\n \t\t\tctr.countCycleTime(ctr.getFrequency());\n \t\t\tctr.updateOperationalTime();\n \t\t\t\n \t\t\t// set the cycle clock output for timer source\n \t\t\tclkout = true;\n \t\t\t\n \t\t\t// Update timer\n \t\t\tctr.getTimer().updateSources(ctr.getMemory().get_MemoryDIRECT(0x05, 4), clkout);\n \t\t\tctr.getTimer().checkTMRIncrement();\n \t\t\t// Update interrupt\n \t\t\t\n \t\t\tctr.getInterrupt().updateSources(ctr.getMemory().get_MemoryDIRECT(0x06));\n \t\t\tctr.getInterrupt().checkRBISR();\n \t\t\t\n \t\t\t// check all interrupt flags\n \t\t\tctr.getInterrupt().checkInterrupt();\n \t\t\t\n \t\t\tclkout = false;\n \t\t\t\n \t\t\twhile(this.isInSleep) {\n \t\t\t\t\n \t\t\t\tctr.countCycleTime(ctr.getFrequency());\n\n \t\t\t\tctr.getWatchdog().update(ctr.getOperationalTime());\n \t\t\t\t\n \t\t\tctr.updateOperationalTime();\n \t\t\t// Wake up if interrupt\n \t\t\tctr.getInterrupt().updateSources(ctr.getMemory().get_Memory(0x06));\n \t\t\tctr.getInterrupt().checkRBISR();\n \t\t\t\tif(ctr.getInterrupt().checkInterruptFlags()) {\n \t\t\t\t\tctr.wakeUpSleep();\n \t\t\t\t}\n \t\t\t\t//TODO: Wake up when EEPROM write complete\n \t\t\t\tif(exit) {\n \t\t\t\tbreak;\n \t\t\t}\n \t\t\t\t// Update run time\n \t\t\t\tsleep((long) ctr.getSimulationSpeed());\n \t\t\t}\n \t\t\t\n \t\t\t// check if eeprom write is active\n \t\t\tif(ctr.getWriteActive()) \n \t\t\t{\n \t\t\t\tif( (ctr.getOperationalTime() - ctr.getEeprom().getWriteStartTime()) >= 1.0 ) \n \t\t\t\t{\n \t\t\t\t\t// reset eecon bits\n \t\t\t\tctr.getMemory().set_SRAMDIRECT(0x88, 1, 0);\n \t\t\t\tctr.getMemory().set_SRAMDIRECT(0x88, 4, 1);\n \t\t\t\t// deactivate write\n \t\t\t\tctr.setWriteActive(false);\n \t\t\t\t\n \t\t\t\t}\n\n \t\t\t}\n \t\t\tif(exit) {\n \t\t\t\tbreak;\n \t\t\t}\n \t\t\tif (this.debugging) {\n \t\t\t\twhile(!continueDebug) {\n \t\t\t\t\tsleep(100);\n \t\t\t\t}\n \t\t\t\tcontinueDebug = false;\n \t\t\t}else {\n \t\t\t\tsleep((long) ctr.getSimulationSpeed());\n \t\t\t}\n\t\n \t\t}\n \t\t\n \t\tcatch(InterruptedException e) {\n \t\t}\n \t}\n \tthis.isRunning = false;\n \tSystem.out.println(\"Thread stopped\");\n }", "public void start() {\r\n\t\trunning = true;\r\n\t\trun();\r\n\t}", "public void enable() {\n operating = true;\n }" ]
[ "0.68762064", "0.65492314", "0.620234", "0.61191136", "0.5877958", "0.58463377", "0.5751342", "0.5595296", "0.55283034", "0.55122536", "0.53703", "0.53480124", "0.5327063", "0.5325559", "0.5305734", "0.5242346", "0.5233142", "0.5231488", "0.5225606", "0.52184474", "0.5216", "0.52157354", "0.52153873", "0.5188251", "0.5180046", "0.5173667", "0.5172785", "0.5161124", "0.516034", "0.51540285", "0.51269907", "0.51234823", "0.51234823", "0.51219326", "0.51217455", "0.508504", "0.50546765", "0.5035481", "0.50283104", "0.50283104", "0.50172776", "0.5000815", "0.4987305", "0.4982881", "0.49760604", "0.49278817", "0.49175185", "0.49034476", "0.49012035", "0.48985893", "0.4896881", "0.48903126", "0.48791128", "0.48775256", "0.4877102", "0.48505986", "0.48476902", "0.48433152", "0.48428753", "0.48421982", "0.48293608", "0.48216003", "0.48210043", "0.48181337", "0.48118085", "0.48112947", "0.4810388", "0.4805047", "0.47974354", "0.47913647", "0.47832707", "0.47715166", "0.47629333", "0.47604117", "0.4756574", "0.47545576", "0.47381002", "0.47354245", "0.47297692", "0.47238487", "0.47215167", "0.4715662", "0.47135866", "0.47066742", "0.47054026", "0.47030848", "0.47029346", "0.46971485", "0.46925464", "0.46924776", "0.46921116", "0.46900138", "0.4685615", "0.46840194", "0.46722916", "0.46697792", "0.46691045", "0.46677515", "0.46649453", "0.4664876" ]
0.6707797
1
Stop the compressor from running in closed loop control mode. Use the method in cases where you would like to manually stop and start the compressor for applications such as conserving battery or making sure that the compressor motor doesn't start during critical operations.
public void stop() { setClosedLoopControl(false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setClosedLoopControl(boolean on) {\n CompressorJNI.setClosedLoopControl(m_pcm, on);\n }", "public void stop() {\n\t\tmotor1.set( Constants.CLAW_MOTOR_STOPPED );\n\t\t}", "public void stop() {\n\t\tsetPower(Motor.STOP);\r\n\t}", "public void stop() {\n climberMotors.stopMotor();\n }", "@Override\n public void stop() {\n\n leftDrive.setPower(0);\n rightDrive.setPower(0);\n armMotor.setPower(0);\n // extendingArm.setPower(0);\n\n telemetry.addData(\"Status\", \"Terminated Interative TeleOp Mode\");\n telemetry.update();\n\n\n }", "public void stopIt() {\n UIMAFramework.getLogger(this.getClass()).logrb(Level.FINEST, this.getClass().getName(),\n \"process\", CPMUtils.CPM_LOG_RESOURCE_BUNDLE, \"UIMA_CPM_stop_cpm__FINEST\",\n new Object[] { Thread.currentThread().getName(), String.valueOf(killed) });\n\n dumpState();\n\n stopped = true;\n killed = true;\n if (!isRunning) {\n UIMAFramework.getLogger(this.getClass()).logrb(Level.FINEST, this.getClass().getName(),\n \"process\", CPMUtils.CPM_LOG_RESOURCE_BUNDLE, \"UIMA_CPM_already_stopped__FINEST\",\n new Object[] { Thread.currentThread().getName() });\n // Already stopped\n return;\n }\n // try {\n // Change global status\n isRunning = false;\n // terminate this thread if the thread has been previously suspended\n synchronized (lockForPause) {\n if (pause) {\n pause = false;\n lockForPause.notifyAll();\n }\n }\n // Let processing threads finish their work by emptying all queues. Even during a hard\n // stop we should try to clean things up as best as we can. First empty process queue or work\n // queue, dump result of analysis into output queue and let the consumers process that.\n // When all queues are empty we are done.\n\n // The logic below (now commented out) has a race condition -\n // The workQueue / outputQueue can become (temporarily) empty, but then\n // can be filled with the eof token\n // But this code proceeds to stop all the CAS processors,\n // which results in a hang because the pool isn't empty and the process thread waits for\n // an available cas processor forever.\n\n // Fix is to not kill the cas processors. Just let them finish normally. The artifact producer\n // will stop sending new CASes and send through an eof token, which causes normal shutdown to\n // occur for all the threads.\n\n /*\n * if (workQueue != null) { if (UIMAFramework.getLogger().isLoggable(Level.FINEST)) {\n * UIMAFramework.getLogger(this.getClass()).logrb( Level.FINEST, this.getClass().getName(),\n * \"process\", CPMUtils.CPM_LOG_RESOURCE_BUNDLE, \"UIMA_CPM_consuming_queue__FINEST\", new Object[]\n * { Thread.currentThread().getName(), workQueue.getName(),\n * String.valueOf(workQueue.getCurrentSize()) });\n * \n * } int cc = workQueue.getCurrentSize(); while (workQueue.getCurrentSize() > 0) {\n * sleep(MAX_WAIT_ON_QUEUE); if (System.getProperty(\"DEBUG\") != null) { if (cc <\n * workQueue.getCurrentSize()) { if (UIMAFramework.getLogger().isLoggable(Level.FINEST)) {\n * UIMAFramework.getLogger(this.getClass()).logrb( Level.FINEST, this.getClass().getName(),\n * \"process\", CPMUtils.CPM_LOG_RESOURCE_BUNDLE, \"UIMA_CPM_wait_consuming_queue__FINEST\", new\n * Object[] { Thread.currentThread().getName(), workQueue.getName(),\n * String.valueOf(workQueue.getCurrentSize()) });\n * \n * } cc = workQueue.getCurrentSize(); } } } } if (outputQueue != null) { while\n * (outputQueue.getCurrentSize() > 0) { sleep(MAX_WAIT_ON_QUEUE); if\n * (UIMAFramework.getLogger().isLoggable(Level.FINEST)) {\n * UIMAFramework.getLogger(this.getClass()).logrb( Level.FINEST, this.getClass().getName(),\n * \"process\", CPMUtils.CPM_LOG_RESOURCE_BUNDLE, \"UIMA_CPM_wait_consuming_queue__FINEST\", new\n * Object[] { Thread.currentThread().getName(), outputQueue.getName(),\n * String.valueOf(outputQueue.getCurrentSize()) }); } } if\n * (UIMAFramework.getLogger().isLoggable(Level.FINEST)) {\n * UIMAFramework.getLogger(this.getClass()).logrb(Level.FINEST, this.getClass().getName(),\n * \"process\", CPMUtils.CPM_LOG_RESOURCE_BUNDLE, \"UIMA_CPM_done_consuming_queue__FINEST\", new\n * Object[] { Thread.currentThread().getName() }); } }\n * \n * for (int i = 0; processingUnits != null && i < processingUnits.length && processingUnits[i]\n * != null; i++) { if (UIMAFramework.getLogger().isLoggable(Level.FINEST)) {\n * UIMAFramework.getLogger(this.getClass()).logrb(Level.FINEST, this.getClass().getName(),\n * \"process\", CPMUtils.CPM_LOG_RESOURCE_BUNDLE, \"UIMA_CPM_stop_processors__FINEST\", new Object[]\n * { Thread.currentThread().getName(), String.valueOf(i) }); }\n * processingUnits[i].stopCasProcessors(false); }\n * \n * } catch (Exception e) { if (UIMAFramework.getLogger().isLoggable(Level.FINER)) {\n * e.printStackTrace(); } UIMAFramework.getLogger(this.getClass()).logrb(Level.FINER,\n * this.getClass().getName(), \"process\", CPMUtils.CPM_LOG_RESOURCE_BUNDLE,\n * \"UIMA_CPM_exception__FINER\", new Object[] { Thread.currentThread().getName(), e.getMessage()\n * }); }\n */\n }", "public void stop() {\n\t\tthis.stopper = true;\n\t}", "public void stop() {}", "public void shutdown() {\n this.dontStop = false;\n }", "public void stop() {\n stop = true;\n }", "public void stop() {\n enable = false;\n }", "public synchronized void stop(){\n\t\tif (tickHandle != null){\n\t\t\ttickHandle.cancel(false);\n\t\t\ttickHandle = null;\n\t\t}\n\t}", "@Override\n public void stop() {\n Thread t = new Thread(server::stopOrderProcess);\n t.setName(\"Server close task\");\n t.start();\n serverFrame.enableControls(false, false);\n enableControls(false, false);\n }", "public void stop() {\n\t\tthis.close(this.btcomm);\n\t}", "public void stop() {\n\t\tif (getMainMotor() != null) {\n\t\t\tgetMainMotor().stop(0);\n\t\t}\n\t}", "public void stop(){\n started = false;\n for (DcMotor motor :this.motors) {\n motor.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n motor.setPower(0);\n }\n this.reset();\n }", "private void stop() {\n\t\tif (null == this.sourceRunner || null == this.channel) {\n\t\t\treturn;\n\t\t}\n\t\tthis.sourceRunner.stop();\n\t\tthis.channel.stop();\n\t\tthis.sinkCounter.stop();\n\t}", "@Override\n public void stop()\n {\n final String funcName = \"stop\";\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API);\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API);\n }\n\n if (playing)\n {\n analogOut.setAnalogOutputMode((byte) 0);\n analogOut.setAnalogOutputFrequency(0);\n analogOut.setAnalogOutputVoltage(0);\n playing = false;\n expiredTime = 0.0;\n setTaskEnabled(false);\n }\n }", "public void stop()\r\n\t{\r\n\t\tdoStop = true;\r\n\t}", "public void stop() {\n m_enabled = false;\n }", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "@Override\n public final void stopMotor() {\n stop();\n }", "public void stop () {\n driveRaw (0);\n }", "public synchronized void stop() {\n stopping = true;\n }", "public void stop()\n\t{\n\t\tupdateState( MotorPort.STOP);\n\t}", "public void stop() {\n m_servo.setSpeed(0.0);\n }", "public void stop() {\n log.info(\"Stopped\");\n execFactory.shutdown();\n cg.close();\n }", "public void cancel() {\r\n\t\tbStop = true;\r\n\t}", "public void stop() throws OperationUnsupportedException;", "@SimpleFunction(description = \"Stop the drive motors of the robot.\")\n public void Stop() {\n String functionName = \"Stop\";\n if (!checkBluetooth(functionName)) {\n return;\n }\n\n for (NxtMotorPort port : driveMotorPorts) {\n setOutputState(functionName, port, 0,\n NxtMotorMode.Brake, NxtRegulationMode.Disabled, 0, NxtRunState.Disabled, 0);\n }\n }", "public void stop(){\n stop = true;\n }", "public void stop() {\n intake(0.0);\n }", "public void stop()\n {\n mLeftMaster.stopMotor();\n mRightMaster.stopMotor();\n }", "public void Compressor_on(){\n\t\tC.setClosedLoopControl(true);\n\t\t\n\t}", "public static synchronized void stop() {\n if (rateHandle != null) {\n rateHandle.cancel(true);\n }\n }", "public synchronized void stop()\r\n\t\t{\r\n\t\tstate = CLOSING_DOWN;\r\n\t\t}", "public boolean stop();", "public void stop() throws CoreHunterException;", "void driveStop() {\n flMotor.setPower(0);\n frMotor.setPower(0);\n blMotor.setPower(0);\n brMotor.setPower(0);\n }", "public void stop() {\n\t\tthis.flag = false;\n\t\t\n\t\t\n\t}", "public void stop() {\n SystemClock.sleep(500);\n\n releaseAudioTrack();\n }", "public abstract void stop();", "public abstract void stop();", "public abstract void stop();", "public abstract void stop();", "public abstract void stop();", "public synchronized void stop() {\n this.running = false;\n }", "@Override\n public void stop() {}", "abstract public void stop();", "public synchronized void stop()\r\n/* 78: */ {\r\n/* 79:203 */ if (!this.monitorActive) {\r\n/* 80:204 */ return;\r\n/* 81: */ }\r\n/* 82:206 */ this.monitorActive = false;\r\n/* 83:207 */ resetAccounting(milliSecondFromNano());\r\n/* 84:208 */ if (this.trafficShapingHandler != null) {\r\n/* 85:209 */ this.trafficShapingHandler.doAccounting(this);\r\n/* 86: */ }\r\n/* 87:211 */ if (this.scheduledFuture != null) {\r\n/* 88:212 */ this.scheduledFuture.cancel(true);\r\n/* 89: */ }\r\n/* 90: */ }", "public void stop() {\n }", "public void stop() {\n }", "@Override\n public void stop() {\n leftFrontDrive.setPower(0.0);\n rightFrontDrive.setPower(0.0);\n leftRearDrive.setPower(0.0);\n rightRearDrive.setPower(0.0);\n\n // Disable Tracking when we are done;\n targetsUltimateGoal.deactivate();\n\n //closes object detection to save system resouces\n if (tfod != null) {\n tfod.shutdown();\n }\n }", "@Override\n\tpublic void stop() {\n\t\tsetAccelerate(false);\n\t}", "public void stop() {\n _running = false;\n }", "public void stopWork() {\n stopWork = true;\n }", "public void stop(CoprocessorEnvironment env) throws IOException {\n\n\t}", "public void stop() {\r\n _keepGoing = false;\r\n }", "@Override\n public void stop() {\n smDrive.stop();\n smArm.stop();\n }", "public void stop()\n {\n }", "@Override\n public void stop() {\n setDebrisPusher(DebrisPusherDirection.Down);\n }", "public void stop() {\n awaitStop();\n }", "public void stop()\n\t{\n\t\trunning = false;\n\t}", "private void stop() {\r\n\t\t\tstopped = true;\r\n\t\t}", "protected void stop() {\r\n\t\tif (active) {\r\n\t\t\tsource.stop();\r\n\t\t}\r\n\t}", "public void stop() {\r\n running = false;\r\n }", "public void stop() {\n\t\texec.stop();\n\t}", "public void stop() {\n\t}", "public void stop() {\n\t\tSystem.out.println(\"结束系统1\");\r\n\t}", "public void stop() {\n\t\t\n\t}", "public void stop() {\n cancelCallback();\n mStartTimeMillis = 0;\n mCurrentLoopNumber = -1;\n mListener.get().onStop();\n }", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();", "void stop();" ]
[ "0.64918715", "0.6389063", "0.6386534", "0.6351975", "0.6334977", "0.632835", "0.63151735", "0.6281271", "0.62584376", "0.62569726", "0.62160647", "0.6207863", "0.62067264", "0.62053984", "0.6191854", "0.6190788", "0.61902094", "0.6185486", "0.61673135", "0.60901034", "0.60749906", "0.60749906", "0.60749906", "0.60749906", "0.60749906", "0.60749906", "0.60749906", "0.60749906", "0.60749906", "0.60749906", "0.60749906", "0.60749906", "0.60749906", "0.60749906", "0.60749906", "0.6068938", "0.6060375", "0.60539967", "0.6043354", "0.60401046", "0.60366946", "0.6034171", "0.60327464", "0.60297406", "0.6026869", "0.60018355", "0.5992051", "0.5990544", "0.5986839", "0.59851754", "0.5980499", "0.5975521", "0.5971151", "0.5970851", "0.5965958", "0.59624296", "0.59624296", "0.59624296", "0.59624296", "0.59624296", "0.5960362", "0.59592783", "0.5955459", "0.5952576", "0.5946779", "0.5946779", "0.5943803", "0.59382343", "0.5937287", "0.5935149", "0.59282833", "0.5908668", "0.58985937", "0.58972865", "0.5889857", "0.5887326", "0.5886616", "0.58839643", "0.58812404", "0.58794373", "0.5878053", "0.5870962", "0.58709157", "0.58664304", "0.58633196", "0.5852224", "0.5852224", "0.5852224", "0.5852224", "0.5852224", "0.5852224", "0.5852224", "0.5852224", "0.5852224", "0.5852224", "0.5852224", "0.5852224", "0.5852224", "0.5852224", "0.5852224" ]
0.72974604
0
Get the enabled status of the compressor $
public boolean enabled() { return CompressorJNI.getCompressor(m_pcm); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean CompressorFlag(){\n\t\treturn (this.GetAverageTotalCurrent() < this.compressorCurrentLimit);\n\t}", "@Override\n public Switch compressorRunningSwitch() {\n return pcm::enabled;\n }", "public boolean isCompressionEnabled() {\r\n return compressionEnabled;\r\n }", "public boolean getCompress() {\n\t\treturn this.compress;\n\t}", "com.google.protobuf.ByteString\n getEnabledBytes();", "public ICompressor getCompressor()\n {\n return compressor;\n }", "java.lang.String getEnabled();", "public boolean getEnabled() {\r\n \t\tif (status == AlternativeStatus.ADOPTED) {\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 java.lang.String getEnabled() {\n java.lang.Object ref = enabled_;\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 enabled_ = s;\n }\n return s;\n }\n }", "public String getEnabled() {\r\n\t\treturn enabled;\r\n\t}", "public boolean enabled()\n {\n return binLog != null;\n }", "boolean getIsSupportComp();", "public String getEnable() {\r\n return enable;\r\n }", "public java.lang.String getEnabled() {\n java.lang.Object ref = enabled_;\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 enabled_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public com.google.protobuf.ByteString\n getEnabledBytes() {\n java.lang.Object ref = enabled_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n enabled_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public Boolean enabled() {\n return this.enabled;\n }", "public boolean enabled(){\n return enabled;\n }", "public com.google.protobuf.ByteString\n getEnabledBytes() {\n java.lang.Object ref = enabled_;\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 enabled_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public String isEnabled() {\n return this.isEnabled;\n }", "public Boolean getEnable() {\n\t\treturn enable;\n\t}", "public boolean getEnabled(){\r\n\t\treturn enabled;\r\n\t}", "public Boolean getEnabled() {\r\n return enabled;\r\n }", "boolean getEnabled();", "boolean getEnabled();", "boolean getEnabled();", "public java.lang.Boolean getEnabled() {\n return enabled;\n }", "public boolean enabled() {\n return m_enabled;\n }", "public Boolean getEnable() {\n return this.enable;\n }", "public int getCBRStatus();", "public Boolean getEnabled() {\n return this.enabled;\n }", "public Boolean getEnabled() {\n return this.enabled;\n }", "public Boolean getEnabled() {\n return enabled;\n }", "public boolean getEnabled() {\n return enabled;\n }", "public Boolean getEnable() {\n return enable;\n }", "public static boolean doCompress() {\n return Boolean.parseBoolean(properties.getProperty(\"compress\"));\n }", "public Boolean enable() {\n return this.enable;\n }", "public Boolean getEnable() {\n return enable;\n }", "public ParameterizedClass getCompressorClass()\n {\n return compressorClass;\n }", "public Boolean getbEnable() {\n return bEnable;\n }", "public String getEnableFlag() {\n\t\treturn enableFlag;\n\t}", "public boolean isEnabled() { return _enabled; }", "public boolean isEnable() {\n return _enabled;\n }", "public boolean useCompression()\n {\n return compressor != null;\n }", "public boolean getCompressed() {\n return compressed_;\n }", "final public int getEnabled() {\n return enabledType;\n }", "public Boolean isEnable() {\n return this.enable;\n }", "public boolean isEnable() {\n return enable;\n }", "public boolean getStatus(){\r\n\t\treturn status;\r\n\t}", "public float getCompressorCurrent() {\n return CompressorJNI.getCompressorCurrent(m_pcm);\n }", "public Boolean isEnable() {\n\t\treturn enable;\n\t}", "@NoProxy\n @NoDump\n public boolean getSuppressed() {\n final String s = getStatus();\n\n if (s == null) {\n return false;\n }\n\n return s.equals(statusMasterSuppressed);\n }", "@Override\n\tpublic boolean isEnabled() {\n\t\treturn status;\n\t}", "public String getIsEnable() {\n return isEnable;\n }", "String getSwstatus();", "public boolean isEnabled() {\n return mBundle.getBoolean(KEY_ENABLED, true);\n }", "public boolean getStatus() {\n\treturn status;\n }", "public boolean getCompressed() {\n return compressed_;\n }", "@Override\n public boolean getIsSupportComp() {\n return isSupportComp_;\n }", "public Boolean isEnabled() {\n return this.enabled;\n }", "public Boolean isEnabled() {\n return this.enabled;\n }", "public Boolean isEnabled() {\n return this.enabled;\n }", "public boolean getStatus() {\n\t\treturn status;\n\t}", "public boolean getVisualizerOn()\n {\n DsLog.log1(LOG_TAG, \"getVisualizerOn\");\n boolean enabled = false;\n int count = 0;\n\n //\n // Send EFFECT_CMD_GET_PARAM\n // EFFECT_PARAM_VISUALIZER_ENABLE\n //\n byte[] baValue = new byte[4];\n count = getParameter(EFFECT_PARAM_VISUALIZER_ENABLE, baValue);\n if (count != 4)\n {\n Log.e(LOG_TAG, \"getVisualizerOn: Error in getting the visualizer on/off state!\");\n }\n else\n {\n int on = byteArrayToInt32(baValue);\n enabled = (on == DsAkSettings.AK_DS1_FEATURE_ON) ? true : false;\n }\n\n return enabled;\n }", "final public boolean isEnabled() {\n return enabledType!=ENABLED_NONE;\n }", "boolean getStatus();", "boolean getStatus();", "boolean getStatus();", "public byte[] getStatus() {\r\n return status;\r\n }", "public int getEnabledLevel()\r\n {\r\n return this.enabled;\r\n }", "public boolean isEnabled()\r\n\t{\r\n\t\treturn enabled;\r\n\t}", "@Override\n public boolean getIsSupportComp() {\n return isSupportComp_;\n }", "public String getHarvesterStatus() {\n\n\t\tif (harvesterStatus == null) {\n\n\t\t\tharvesterStatus = \"ENABLED\";\n\n\t\t}\n\n\t\treturn harvesterStatus;\n\n\t}", "public boolean isEnabled() {\n\t\treturn enabled;\n\t}", "public boolean isSetEnable_cstr() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ENABLE_CSTR_ISSET_ID);\n }", "public boolean isAbandonCompressionEnabled() {\r\n return abandonCompressionEnabled;\r\n }", "public boolean isEnabled ( ) {\r\n\t\treturn enabled;\r\n\t}", "boolean hasEnabled();", "public boolean getStatus() {\n return status_;\n }", "public boolean getStatus() {\n return status_;\n }", "public boolean getStatus() {\n return status_;\n }", "public boolean isEnabled() {\r\n return enabled;\r\n }", "public boolean isEnabled() {\r\n return enabled;\r\n }", "public boolean getStatus() {\n return status_;\n }", "public boolean getStatus() {\n return status_;\n }", "public boolean getStatus() {\n return status_;\n }", "public Boolean isEnabled() {\n return this.isEnabled;\n }", "public boolean isEnabled(){\n return enabled;\n }", "public Boolean isEnabled() {\r\r\n\t\treturn _isEnabled;\r\r\n\t}", "public boolean isEnabled() {\n return myEnabled;\n }", "public boolean isEnabled() {\r\n\t\treturn enabled;\r\n\t}", "public boolean isEnabled() {\r\n\t\treturn enabled;\r\n\t}", "public String getCompressorName()\n {\n return useCompression() ? compressor.getClass().getSimpleName() : \"none\";\n }", "public boolean enabled() {\r\n\t\treturn engaged;\r\n\t}", "@Generated\n @Selector(\"isBatteryMonitoringEnabled\")\n public native boolean isBatteryMonitoringEnabled();", "@KSOAP @Cacheable public Boolean getCPUHotPlugEnabled();", "@DISPID(79)\r\n\t// = 0x4f. The runtime will prefer the VTID if present\r\n\t@VTID(77)\r\n\tboolean enabled();", "public boolean isEnabled() {\r\n\t\treturn sensor.isEnabled();\r\n\t}", "public Boolean getIsEnable() {\n\t\treturn isEnable;\n\t}", "public boolean isEnabled() {\n return enabled;\n }", "public boolean isEnabled() {\n return enabled;\n }" ]
[ "0.6615243", "0.6574359", "0.63191134", "0.6192489", "0.61421394", "0.61314774", "0.6129826", "0.6038159", "0.6002501", "0.60010034", "0.59675765", "0.5941851", "0.5928591", "0.59265494", "0.5926169", "0.58664787", "0.5862387", "0.5860109", "0.58564925", "0.5853725", "0.58309215", "0.58074856", "0.57932836", "0.57932836", "0.57932836", "0.5787969", "0.57844096", "0.5773909", "0.576748", "0.57604975", "0.57604975", "0.5760481", "0.5745156", "0.57433546", "0.57410645", "0.57334214", "0.57258415", "0.5723887", "0.5703148", "0.56889004", "0.5665334", "0.5662834", "0.5659088", "0.56517065", "0.56498826", "0.56341326", "0.5627133", "0.5624951", "0.5606602", "0.5604603", "0.559554", "0.5590645", "0.55824965", "0.5577765", "0.55699533", "0.5567398", "0.55608666", "0.55405104", "0.5536014", "0.5536014", "0.5536014", "0.5533622", "0.55298024", "0.55252504", "0.55238986", "0.55238986", "0.55238986", "0.55156004", "0.5504082", "0.549795", "0.5496924", "0.5494962", "0.54839313", "0.54832274", "0.5479144", "0.5465362", "0.54646486", "0.54634434", "0.54634434", "0.54634434", "0.5461875", "0.5461875", "0.54533815", "0.54533815", "0.54533815", "0.5451296", "0.54474115", "0.5446365", "0.54429984", "0.54402536", "0.54402536", "0.5434794", "0.54295444", "0.5422478", "0.54220915", "0.5420706", "0.54153734", "0.54147977", "0.54077214", "0.54077214" ]
0.7514181
0
Get the current pressure switch value $
public boolean getPressureSwitchValue() { return CompressorJNI.getPressureSwitch(m_pcm); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "double getPressure();", "@Override\r\n\tpublic double pidGet() {\r\n\t\t/*switch (m_pidSource.value) {\r\n\t\tcase 1://PIDSourceParameter.kRate_val:\r\n\t\t\treturn getRate();\r\n\t\tcase 2:// PIDSourceParameter.kAngle_val:\r\n\t\t\treturn getAngle();\r\n\t\tdefault:\r\n\t\t\treturn 0.0;\r\n\t\t}*/\r\n\t\treturn getAngle();\r\n\t}", "double getPValue();", "public double getCurrentValue()\r\n\t{\r\n\t\tcurrentValue=(2*border+24)/2;\r\n\t\treturn currentValue;\r\n\t}", "public float getPressure() {\n return pm.pen.getLevelValue(PLevel.Type.PRESSURE);\n }", "public float getPressure() {\n pressure = calculatePressure();\n return pressure;\n }", "@Override\n public Switch lowPressureSwitch() {\n return pcm::getPressureSwitchValue;\n }", "public float getPressure() {\n\t\treturn (float) getRawPressure() / 100f;\n\t}", "public double getValue() {\n\t\treturn sensorval;\n\t}", "@Override \n public double getTemperature() { \n return pin.getValue();\n }", "@Override\n public double getValue(Pin pin) {\n super.getValue(pin);\n return isInitiated() ? readAnalog(toCommand((short) pin.getAddress())) : INVALID_VALUE;\n }", "public String getPressure() {\n\t\treturn pressure;\n\t}", "public String getPressure() {\n\t\treturn pressure;\n\t}", "public float getSavedPressure() {\n return savedPen.getLevelValue(PLevel.Type.PRESSURE);\n }", "public int getLatestPressure() {\n int pressure = 0;\n if (readings.size() > 0) {\n pressure = readings.get(readings.size() - 1).pressure;\n }\n return pressure;\n }", "public double getCurrentTemperature() {\n return this.currentTemperature;\n }", "private double readPressureSample() {\n return 6 * randomPressureSampleSimulator.nextDouble() * randomPressureSampleSimulator.nextDouble();\n }", "public double getValue(){\n\t\treturn slider.getValue() ;\n\t}", "public double getReadPressure(){\n return this.mFarm.getReadPressure();\n }", "public double getTemp(){\n return currentTemp;\n }", "public int mo5971h() {\n return getSharedPreferences(\"setNightModeChangeVolumeValue\", 0).getInt(\"vol\", 0);\n }", "private String tempConversion() {\n int reading = ((record[17] & 255) + ((record[21] & 0x30) << 4));\n\n double voltage = (reading * 3.3) / 1024;\n return formatter.format((voltage - .6) / .01);\n\n }", "public float getCurrentTemp(){\n return currentTemp;\n }", "public double getNewPVal() { return this.pValAfter; }", "public double getPressure() {\n\t\treturn 1000+(int)(Math.random()*1001);//模拟一个随机气压数\n\t}", "public double getTemp() {\n\t\treturn currentTemp;\n\t}", "public double getCurrent() {\n return elevatorSpark.getOutputCurrent();\n }", "int getMPValue();", "int getInverterCurrentRaw();", "public float getSavedSidePressure() {\n return pm.pen.getLevelValue(PLevel.Type.SIDE_PRESSURE);\n }", "public int getTemperature() {\n return VirtualHardwareManager.getInstance().getTemperature();\n }", "public float getSidePressure() {\n return pm.pen.getLevelValue(PLevel.Type.SIDE_PRESSURE);\n }", "public String getCurrentPrice() {\n\t\treturn currPrice;\n\t}", "@Override\n public double getPower()\n {\n final String funcName = \"getPower\";\n double power = motor.get();\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API);\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API, \"=%f\", power);\n }\n\n return power;\n }", "public int getVoltage ()\n {\n return _voltage;\n }", "@java.lang.Override\n public double getPValue() {\n return pValue_;\n }", "String getCurrentValue();", "public double getValue()\n\t{\n\t\treturn ifD1.getValue();// X100 lux\n\t}", "int getInverterCurrent();", "public double getPDPTotalCurrent() { return totalCurrent; }", "synchronized byte getCurrentValueLo()\n {\n return (byte)getCurrentValue();\n }", "@java.lang.Override\n public double getPValue() {\n return pValue_;\n }", "private String getQuantityFromWeighScale() {\r\n // Read data from weigh scale through serial port\r\n\r\n // Convert data to string and return the value to calling function\r\n\r\n return \"1\";\r\n }", "private double getValue() {\n return value;\n }", "public byte getSensor() {\r\n\t\tbyte sensor;\r\n\t\tsensor=this.sensor;\r\n\t\treturn sensor;\r\n\t}", "float getTemperature();", "int getOutputVoltage();", "protected double returnPIDInput() {\n\t\t\n ScraperBike.debugToTable(\"PIDInput\", RobotMap.shootEncoder.getRate()*60);\n \n return RobotMap.shootEncoder.getRate()*60;\n }", "double get();", "public double value() {\r\n return value;\r\n }", "public double getValue() {\n\t\t// TODO Auto-generated method stub\n\t\treturn 1.00;\n\t}", "public CP getTPValuePP() { \r\n\t\tCP retVal = this.getTypedField(35, 0);\r\n\t\treturn retVal;\r\n }", "public DoubleProperty getControlPhase() {\n return this.inputAdjuster.getCurrentPhase();\n }", "public double getCurrentPay() {\n return currentPay;\n }", "double getPWMRate();", "public void setAirPressure(double airpress){airpressval.setText(Double.toString(airpress));}", "public double getValue() {\n return value_;\n }", "public double getValue(){\n return value;\n }", "public double getCurrent( )\n {\n // Implemented by student.\n }", "public float getCurrentValue() {\n return currentValue;\n }", "public double getCurrentPot(){\n\t\treturn currentPot;\n\t}", "java.lang.String getTxpower();", "public double getValue() {\n\t\treturn(value);\n\t}", "public float getPollData() {\r\n // FIXME getDeadZone ??\r\n if (jinputComponent != null) {\r\n // value = jinputComponent.getPollData(); <- heh - this borked everything\r\n // ! :) cuz abs(value - component.value) :P\r\n return jinputComponent.getPollData();\r\n } // else\r\n // FIXME - handle virtual input\r\n return virtualValue;\r\n }", "@Override\n public double getValue() {\n return currentLoad;\n }", "public static String getCurrentSpeed() {\r\n\t\treturn currentSpeed;\r\n\t}", "public String getDollarString()\n\t{\n\t\treturn String.format(\"%01.2f\", (float)CurrentValue/100.0f);\n\t}", "public int getHumidity(){\n return VirtualHardwareManager.getInstance().getHumidity();\n }", "int getOutputVoltageRaw();", "double getTempo();", "public double getValue() {\r\n\t\treturn value;\r\n\t}", "public int getPower() {\n return PA_POW_reg.getPower();\n }", "public double getValue() {\n\t\treturn value;\n\t}", "public double getValue() {\n\t\treturn value;\n\t}", "public double getValue() {\n\t\treturn value;\n\t}", "public double getValue() {\n return value;\n }", "public double getValue() {\n return value;\n }", "public double getValue() {\n return value;\n }", "public double getValue() {\n return value_;\n }", "public double get_thermal_reading() {\n\t\t\n\t\treturn 0;\n\t}", "@Override\r\n public int getTemperature(){\r\n return 10;\r\n }", "int getBuyCurrentRaw();", "double getValue();", "double getValue();", "double getValue();", "String getPvalue(String num) {\n\t\tif (Double.parseDouble(num) >= 30) return \"0.000000\";\n\t\telse \n\t\t\treturn pvalues.get(num);\n\t}", "public double fpp() {\n return config().getP();\n }", "protected abstract void getPotentiometerValue(int value, int channelNo);", "public double getCurrentFuel();", "@Override\n public double getVelocity()\n {\n final String funcName = \"getVelocity\";\n double velocity = encoder.getVelocity() * encoderSign / 60.0;\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API);\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API, \"=%f\", velocity);\n }\n\n return velocity;\n }", "int getSellCurrentRaw();", "public double getHumidityValue() {\r\n return humidityValue;\r\n }", "public double getValue() {\n return 0.05;\n }", "public double getValue()\n {\n return this.value;\n }", "public double getControlPanelMotor() {\n return controlPanelMotor.getSelectedSensorVelocity();\n }", "@Override\r\n public double doubleValue() {\r\n return this.m_current;\r\n }", "Integer getCurrentWhint();", "public int getCurrentHP() {\n return currentHP;\n }", "public double getCurrentInput()\n {\n return pidInput.get();\n }", "public Number getValue() {\n return currentVal;\n }" ]
[ "0.67877346", "0.6579711", "0.6536204", "0.6532267", "0.6491825", "0.6432208", "0.64154536", "0.6394859", "0.6390639", "0.63673955", "0.6317899", "0.6188068", "0.6188068", "0.618451", "0.6155081", "0.6129559", "0.6106289", "0.60843146", "0.6049402", "0.6040123", "0.5957799", "0.59522367", "0.5947382", "0.5936153", "0.5935454", "0.58829796", "0.5874342", "0.58581954", "0.58496475", "0.5830647", "0.58219683", "0.5813768", "0.5803298", "0.5797237", "0.5797011", "0.57781047", "0.57655185", "0.5757019", "0.5755274", "0.5749431", "0.5727443", "0.57170457", "0.5696401", "0.5685818", "0.5680149", "0.56693137", "0.5664873", "0.56584674", "0.5656654", "0.5654564", "0.56487656", "0.5648762", "0.56481934", "0.5648185", "0.56427675", "0.56379896", "0.5633705", "0.5627881", "0.56268084", "0.5626588", "0.5612598", "0.5605681", "0.5604338", "0.5603013", "0.5597895", "0.55922633", "0.5588801", "0.5572908", "0.55671203", "0.55617696", "0.5560165", "0.55591065", "0.5551818", "0.5551818", "0.5551818", "0.5551269", "0.5551269", "0.5551269", "0.5549134", "0.554582", "0.55451417", "0.55376744", "0.5537174", "0.5537174", "0.5537174", "0.5531662", "0.55306494", "0.5528412", "0.5526394", "0.55217475", "0.5521025", "0.5520262", "0.55160004", "0.5515112", "0.5513031", "0.55106854", "0.55031925", "0.5502933", "0.5500996", "0.5496168" ]
0.6517222
4
Get the current being used by the compressor $
public float getCompressorCurrent() { return CompressorJNI.getCompressorCurrent(m_pcm); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public long getCurrent() {\n return current;\n }", "public long getLastUse() {\n\t\treturn _lastused;\n\t}", "@Override\r\n\tpublic long getCurrent() {\n\t\treturn 0;\r\n\t}", "public static final native int getCurrent();", "public long getCurrent() {\n m_Runtime = Runtime.getRuntime();\n m_Total = m_Runtime.totalMemory();\n\n return m_Total;\n }", "public int getCurrentCounter() {\n return currentCounter;\n }", "public Tool getCurrentTool() {\n return fCurrTool;\n }", "public long getLastUsed() {\n \t\treturn this.lastUsed;\n \t}", "public double getCurrent() {\n return elevatorSpark.getOutputCurrent();\n }", "public String getCurrent()\n {\n return current.toString();\n }", "public boolean CompressorFlag(){\n\t\treturn (this.GetAverageTotalCurrent() < this.compressorCurrentLimit);\n\t}", "public Long getUsed() {\r\n return used;\r\n }", "public int getCurrentNumber()\r\n\t{\r\n\t\treturn currentNumber;\r\n\t}", "public static Version current() {\r\n\t\treturn current;\r\n\t}", "public int getCurrentBinNum() {\n return currentBinNum;\n }", "public Integer getCurrent() {\n return this.current;\n }", "public double getCurrentPipeline() {\n return getDouble(\"getpipe\");\n }", "public Long used() {\n return this.used;\n }", "public BigInteger getCurrentValue()\r\n { \t\r\n \tlog.debug(\"counter: \" + currentValue.intValue() );\r\n return this.currentValue;\r\n }", "public BufferedImage getCurrentImage(){\n\t\treturn getCurrentImage(System.currentTimeMillis()-lastUpdate);\n\t}", "public int getCurrentIdx() {\n\t\treturn currentIdx;\n\t}", "public int getCurrentIdx() {\n\t\treturn this.currentIdx;\n\t}", "@Override\n\tpublic long getCurrentCtc() {\n\t\treturn _candidate.getCurrentCtc();\n\t}", "public static String getCurrentSpeed() {\r\n\t\treturn currentSpeed;\r\n\t}", "public final Object getCurrent()\n\t{\n\t\treturn getCapture();\n\t}", "public int getCurrentCoolDown()\n\t{\n\t\treturn CurrentCoolDown;\n\t}", "public int getCurrentValue() {\n\t\treturn this.currentValue;\n\t}", "public int getCurrentGenerationNumber()\n {\n return ssProxy.getCurrentGenerationNumber();\n }", "public long getCurrentCompactedKvs() {\n return currentCompactedKVs;\n }", "public double getCurrent( )\n {\n // Implemented by student.\n }", "public String getCurrentContent() {\n return this.currentUnit.chStored;\n }", "public int currentChunkNum() {\n\t\treturn cp.chunk().getChunkNum();\n\t}", "public java.lang.Integer getUsedCounter() {\n\t\treturn this.usedCounter;\n\t}", "public int getCurrentVersion() {\n return currentVersion_;\n }", "int getCurrentIdx() {\n return currentIdx;\n }", "public ICompressor getCompressor()\n {\n return compressor;\n }", "public String getCurrentComboName() {\r\n\t\treturn this.currentCombo;\r\n\t}", "public int getCurrentVersion() {\n return currentVersion_;\n }", "public String getCurrent() {\n\t\t\tString result=\"\";\n\t\t\treturn result ;\n\t\t}", "public String getCompressorName()\n {\n return useCompression() ? compressor.getClass().getSimpleName() : \"none\";\n }", "public long getSource()\r\n { return src; }", "String getHookCurrent()\n {\n return hookCurrent;\n }", "protected boolean getUsed(){\n\t\treturn alreadyUsed;\n\t}", "public char getCurrent(){\n return current_c;\n }", "@Basic\n\tpublic Weight getCurrentWeight() {\n\t\treturn this.currentWeight;\n\t}", "public Character getCurrentFlag() {\n return currentFlag;\n }", "public Integer getCurrentValue() {\n return currentValue;\n }", "public Integer getCurrentValue() {\n return currentValue;\n }", "int getBuyCurrent();", "public Object getCurrentObject()\r\n\t{\r\n\t\tif (newState != null)\r\n\t\t{\r\n\t\t\t// Not applied yet\r\n\t\t\treturn newState.unmodifiedObject;\r\n\t\t}\r\n\r\n\t\treturn propertyBrowser.getObject();\r\n\t}", "public Date getLastUsed() {\r\n\t\treturn lastUsed;\r\n\t}", "public long getCurrentOffset() {\n return (long)current_chunk * (long)chunksize;\n }", "protected String getCurrentCode() {\n IDocument doc = EditorUtilities.getDocument(editor);\n if (doc != null) {\n return doc.get();\n }\n return null;\n }", "synchronized byte getCurrentValueLo()\n {\n return (byte)getCurrentValue();\n }", "public String getCurrentcss() {\n return clean(currentcss);\n }", "public double getCurrentAmount() {\n return this.currentAmount;\n }", "synchronized byte getCurrentValueHi()\n {\n int cv = getCurrentValue();\n cv >>= 8;\n return (byte)cv;\n }", "public long getCurrentCarbs() {\n return currentCarbs;\n }", "public Integer getIscurrent() {\n return iscurrent;\n }", "public String getBufferStartCounter() {\r\n\t\treturn bufferStartCounter;\r\n\t}", "public int getStat() {\n return statUse.getNumerator();\n }", "public String getCurrentVersion() {\n return this.currentVersion;\n }", "static public RenderingContext getCurrentInstance()\r\n {\r\n return _CURRENT_CONTEXT.get();\r\n }", "public String getCurrentWaveID() {\n\t\treturn null;\r\n\t}", "public static int getCurrentId() {\n return currentId;\n }", "long getCurrentContext();", "private int getCurrentValue()\n {\n return\n // Overall wait time...\n _countdownValue -\n // ...minus the time we waited so far.\n (int)(_clock.currentTime() - _startWait);\n }", "private String getCurrentSpectrumId()\r\n\t{\r\n\t\treturn this.currentSpectrumId;\r\n\t}", "public static int current() {\n\t\tString[] parts = MenuPath.path.split(\"_\");\n\t\tint len = parts.length;\n\t\t\n\t\treturn Integer.parseInt(parts[len-1]);\n\t}", "public float getCurrentTemp(){\n return currentTemp;\n }", "public String getCurrentPrice() {\n\t\treturn currPrice;\n\t}", "public long getSyncSource() {\n return ((long)(buffer.get(8) & 0xff) << 24) |\n ((long)(buffer.get(9) & 0xff) << 16) |\n ((long)(buffer.get(10) & 0xff) << 8) |\n ((long)(buffer.get(11) & 0xff));\n }", "public String getCurrentTarget() {\r\n\t\treturn dbVersion.getTarget();\r\n\t}", "private int currentChar()\n {\n if (m_bufferOffset_ < 0) {\n m_source_.previousCodePoint();\n return m_source_.nextCodePoint();\n }\n\n // m_bufferOffset_ is never 0 in normal circumstances except after a\n // discontiguous contraction since it is always returned and moved\n // by 1 when we do nextChar()\n return UTF16.charAt(m_buffer_, m_bufferOffset_ - 1);\n }", "public String getLastUsedDevice() {\n return lastUsedDevice;\n }", "public long getUsedStorage() {\n return usedStorage;\n }", "public abstract BigInteger getUseed();", "public Texture getCurrentFrame(){\n\t\treturn images[currentFrame];\n\t}", "int getBuyCurrentRaw();", "private static long getCurrentTime() {\n return (new Date()).getTime();\n }", "public String getCurrent_word(){\n\t\treturn current_word;\n\t}", "public Object currentEvent() {\n\t\treturn processingState.currentEvent();\n\t}", "public Integer getCurrentTarget()\n\t{\n\t\treturn _currentTarget;\n\t}", "public long currentReadBytes()\r\n/* 209: */ {\r\n/* 210:398 */ return this.currentReadBytes.get();\r\n/* 211: */ }", "public ColorImage getCurrentImage() {\n try {\n return currentImage.peek();\n } catch (EmptyStackException e) {\n return null;\n }\n }", "public ImageIcon getCurrentImage() {\n\t\t\treturn this.currentImage;\n\t}", "public Pair<Byte,Short> getCurrentWeapon(){\n return this.currentWeapon;\n }", "String getCurrentState() {\n return context.getString(allStates[currentIdx]);\n }", "public int currentCount () {\n return count;\n }", "public boolean isUsed() {\n return used;\n }", "public int getCurrentEPC(ItemStack stack);", "public Long getBufferStock()\r\n\t{\r\n\t\treturn getBufferStock( getSession().getSessionContext() );\r\n\t}", "public double getcurrentWeight() {\n\t return this.currentWeight;\n\t}", "int getCurMP();", "int getCurMP();", "int getCurMP();", "int getCurMP();", "int getCurMP();", "int getCurMP();", "private int getCurrentOffset(){\n\t\treturn this.OFFSET;\n\t}" ]
[ "0.64664173", "0.62755024", "0.6269102", "0.61610985", "0.6029992", "0.60237914", "0.6022704", "0.6014284", "0.5913336", "0.58656204", "0.5853205", "0.58514684", "0.58422834", "0.58084214", "0.57902366", "0.57892317", "0.5781209", "0.5736475", "0.5726277", "0.5719803", "0.5708021", "0.5690385", "0.5679313", "0.56791776", "0.56609815", "0.56156987", "0.5614143", "0.5612903", "0.55917484", "0.55855775", "0.5574942", "0.55680686", "0.5563423", "0.5556215", "0.5533919", "0.5525587", "0.55176795", "0.5517567", "0.5494388", "0.5489347", "0.5483767", "0.5482761", "0.5476452", "0.5475813", "0.54715097", "0.54607296", "0.54379463", "0.54379463", "0.5422013", "0.5421597", "0.53780884", "0.5371527", "0.53669447", "0.5355317", "0.5355295", "0.53545725", "0.53491706", "0.53489405", "0.53423136", "0.53415203", "0.53397614", "0.53227055", "0.531992", "0.53127444", "0.5309968", "0.53058493", "0.5292047", "0.5287417", "0.5286578", "0.52835333", "0.527852", "0.5275843", "0.52711964", "0.52671945", "0.5261014", "0.5260419", "0.52589464", "0.52535987", "0.52432835", "0.5241698", "0.5240618", "0.52372414", "0.52306134", "0.5229856", "0.5229114", "0.5226562", "0.5222695", "0.5211985", "0.52071446", "0.5204982", "0.5194665", "0.5192876", "0.51849604", "0.51833475", "0.51833475", "0.51833475", "0.51833475", "0.51833475", "0.51833475", "0.51804507" ]
0.70722383
0
Set the PCM in closed loop control mode $
public void setClosedLoopControl(boolean on) { CompressorJNI.setClosedLoopControl(m_pcm, on); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void loop() {\n left.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n right.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n\n left.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n right.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n }", "@Override\n\t\tpublic void run() {\n\t\t\tshort samples[] = new short[Player.BUFFER_SIZE];\n\t\t\tshort silenceSamples[] = new short[Player.BUFFER_SIZE];\n\t\t\t\n\t\t\twhile (!this.stopped) {\n\t\t\t\t\t\t\n\t\t\t\tif (this.paused == false) {\n\t\t\t\t\t\n\t\t\t\t\tthis.currentModule.advanceByOneTick();\n\t\t\t\t\tswitch(this.interpolationMode) {\n\t\t\t\t\tcase Player.INTERPOLATION_MODE_LINEAR:\n\t\t\t\t\t\tthis.tickSamples = this.tickMixer.renderTickLinearInterpolation(this.currentModule);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Player.INTERPOLATION_MODE_CUBIC:\n\t\t\t\t\t\tthis.tickSamples = this.tickMixer.renderTickCubicInterpolation(this.currentModule);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tthis.tickSamples = this.tickMixer.renderTickNoInterpolation(this.currentModule);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tthis.bufferPosition = 0;\n\t\t\t\t\t\n\t\t\t\t\tif (this.fading == false) { \n\t\t\t\t\t\tfor (int s=0;s<this.tickSamples;s++) {\n\t\t\t\t\t\t\t//floating point version\n\t\t\t\t\t\t\t//samples[this.samplesPosition++] = FixedPoint.FP_TO_FLOAT(this.tickMixer.leftSamples[this.bufferPosition]);\n\t\t\t\t\t\t\t//samples[this.samplesPosition++] = FixedPoint.FP_TO_FLOAT(this.tickMixer.rightSamples[this.bufferPosition]);\n\t\t\t\t\t\t\tsamples[this.samplesPosition++] = (short)(this.tickMixer.leftSamples[this.bufferPosition] << 1);\n\t\t\t\t\t\t\tsamples[this.samplesPosition++] = (short)(this.tickMixer.rightSamples[this.bufferPosition] << 1);\n\t\t\t\t\t\t\tthis.bufferPosition++;\n\t\t\t\t\t\t\tif (this.samplesPosition >= Player.BUFFER_SIZE) {\n\t\t\t\t\t\t\t\t// write to device\n\t\t\t\t\t\t\t\tdevice.writeSamples(samples, 0, samples.length);\n\t\t\t\t\t\t\t\tthis.samplesPosition = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\t\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (int s=0;s<this.tickSamples;s++) {\n\t\t\t\t\t\t\tif (this.fadeSamples <= 0) {\n\t\t\t\t\t\t\t\tif (this.fadeStatus == ModulePlayer.FADE_STATUS_FADE_OUT) {\n\t\t\t\t\t\t\t\t\t// start fade in\n\t\t\t\t\t\t\t\t\tthis.currentModule = this.nextModule;\n\t\t\t\t\t\t\t\t\tthis.fadeStatus = ModulePlayer.FADE_STATUS_FADE_IN;\n\t\t\t\t\t\t\t\t\tthis.fadeSamples = this.fadeInSamples;\n\t\t\t\t\t\t\t\t\tthis.fadeFactorDelta = (1.0f - this.fadeFactor) / (float)this.fadeSamples;\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}\n\t\t\t\t\t\t\t\tif (this.fadeStatus == ModulePlayer.FADE_STATUS_FADE_IN) {\n\t\t\t\t\t\t\t\t\t// stop fading\n\t\t\t\t\t\t\t\t\tthis.fading = false;\n\t\t\t\t\t\t\t\t\tthis.fadeStatus = ModulePlayer.FADE_STATUS_FADE_DONE;\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\t//floating point version\n\t\t\t\t\t\t\t//samples[this.samplesPosition++] = FixedPoint.FP_TO_FLOAT(this.tickMixer.leftSamples[this.bufferPosition]) * this.fadeFactor;\n\t\t\t\t\t\t\t//samples[this.samplesPosition++] = FixedPoint.FP_TO_FLOAT(this.tickMixer.rightSamples[this.bufferPosition]) * this.fadeFactor;\n\t\t\t\t\t\t\tsamples[this.samplesPosition++] = (short)(((this.tickMixer.leftSamples[this.bufferPosition] * this.fadeFactorFP) >> FixedPoint.FP_SHIFT) << 1);\n\t\t\t\t\t\t\tsamples[this.samplesPosition++] = (short)(((this.tickMixer.rightSamples[this.bufferPosition] * this.fadeFactorFP) >> FixedPoint.FP_SHIFT) << 1);\n\t\t\t\t\t\t\tthis.fadeFactor += this.fadeFactorDelta;\n\t\t\t\t\t\t\tthis.fadeFactorFP = FixedPoint.FLOAT_TO_FP(this.fadeFactor);\n\t\t\t\t\t\t\tthis.fadeSamples--;\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tthis.bufferPosition++;\n\t\t\t\t\t\t\tif (this.samplesPosition >= Player.BUFFER_SIZE) {\n\t\t\t\t\t\t\t\t// write to device\n\t\t\t\t\t\t\t\tdevice.writeSamples(samples, 0, samples.length);\n\t\t\t\t\t\t\t\tthis.samplesPosition = 0;\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\t\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// write silence to device\n\t\t\t\t\tdevice.writeSamples(silenceSamples, 0, samples.length);\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tdevice.dispose();\n\t\t}", "public void setLoopMode(boolean loopMode);", "@Override\n public Switch compressorRunningSwitch() {\n return pcm::enabled;\n }", "public void play() {\n Runtime.getRuntime().gc();\n stop = false;\n if (CodecHandler.getIndex() == -1) {\n index = 0;\n } else {\n index = CodecHandler.getIndex();\n }\n //paused = false;\n\n\n System.out.println(index);\n while (!stop) {\n init(CodecHandler.getPlayList().getFileList().get(index));\n\n try {\n if (line != null) {\n // open the output line and send 4K of data as a buffer\n line.open(decodedFormat);\n // specify buffer size\n byte[] data = new byte[8192];\n // start playing\n //line.start();\n System.out.println(getVolumeControl().getMaximum());\n System.out.println(getVolumeControl().getMinimum());\n int numBytesRead;\n// while ((numBytesRead = decodedInput.read(data, 0, data.length)) != -1) {\n// line.write(data, 0, numBytesRead);\n// }\n synchronized (lock) {\n while ((numBytesRead = decodedInput.read(data, 0, data.length)) != -1) {\n while (paused) {\n if (line.isRunning()) {\n line.drain();\n line.stop();\n }\n try {\n lock.wait();\n } catch (InterruptedException e) {\n }\n }\n\n if (!line.isRunning()) {\n line.start();\n }\n line.write(data, 0, numBytesRead);\n }\n }\n if (!stop) {\n index++;\n }\n\n // stop track\n line.drain();\n line.stop();\n line.close();\n decodedInput.close();\n\n if (index >= CodecHandler.getPlayList().getFileList().size()) {\n index = 0;\n }\n CodecHandler.setIndex(index);\n\n }\n } catch (IOException ioe) {\n ioe.printStackTrace();\n } catch (LineUnavailableException lue) {\n lue.printStackTrace();\n }\n }\n System.out.println(index);\n Runtime.getRuntime().gc();\n }", "void setValueMixerSound(int value);", "public void setAudioPort(int port);", "void setSingleVideoLoopPlayback(boolean looping);", "public static void enableSound() {\n\t\tvelocity = 127;\n\t}", "public void playLooped()\n {\n audioClip.loop(Clip.LOOP_CONTINUOUSLY);\n play();\n }", "void toggleLoop();", "public LoopController()\r\n\t{\r\n\t\tregulate = true;\r\n\t\tsmooth = true;\r\n\t\tresolution = 10000;\r\n\t\tfps = 60;\r\n\t\tlastCall = Sys.getTime();\r\n\t\tduration = 0;\r\n\t}", "public void run()\r\n\t{\r\n\t\t// Audio Loop\r\n\t\ttry \r\n\t\t{\r\n\t\t\tp.realize();\r\n\t \r\n\t \t// Create record control for player\r\n\t \tRecordControl rc = (RecordControl)p.getControl(\"RecordControl\");\r\n\t \t\r\n\t \t// Create file to write to\r\n\t \tByteArrayOutputStream output = new ByteArrayOutputStream();\r\n\r\n\t \t// Configure record stream destination\r\n\t \trc.setRecordStream(output);\r\n\t \tp.start();\r\n\t \t\r\n\t \twhile(!doStop)\r\n\t \t{\r\n\t\t \trc.setRecordStream(output);\r\n\t\t \trc.startRecord();\r\n\t\t \t\r\n\t\t \t// sleep 1 milisecond\r\n\t \t\tThread.sleep(1);\r\n\t \t\t\r\n\t \t\t// commit file\r\n\t\t \t\trc.commit();\r\n\t\t \t \trc.stopRecord();\r\n\t\t \t \t\r\n\t\t \t \t\r\n\t\t \t \t\r\n\t\t \t \t\r\n\t\t \t\tbyte[] recordedSoundArray = output.toByteArray();\r\n\t\t \t\tif(recordedSoundArray.length>44){\r\n\t\t\t \t\r\n\t\t\t\t // temporary array for stripped sound bytes\r\n\t\t\t\t byte soundonly[] = new byte[recordedSoundArray.length-44];\r\n\t\t\t\t \r\n\t\t\t\t // strip file header\r\n\t\t\t\t for(int i =0; i<soundonly.length; i++){\r\n\t\t\t\t \tsoundonly[i]=(byte)(recordedSoundArray[i+44]-floor.getLevel());\r\n\t\t\t\t }\r\n \r\n\t\t\t\t // update stream array in graph\r\n\t\t\t \tg.updateStreamData(soundonly);\r\n\t\t\t \t\r\n\t\t\t \t// set current display on graph\r\n\t\t\t \t//display.setCurrent(this);\r\n\t\t\t \t\r\n\t\t\t \t// update graph plot\r\n\t\t\t\t g.update();\r\n\t\t\t\t \r\n\t\t\t\t \r\n\t\t\t\t \r\n\t\t\t\t // warn if threshold reached\r\n\t\t\t \tif(AAnalyzer.samplesAboveThreshold(soundonly, m_alertThreshold)>(soundonly.length-50)/2*1/10){\r\n\t\t\t \t\t\r\n\t\t\t \t\tdouble loudestFrequency = g.getLoudestFrequency();\r\n\t\t\t \t\r\n\t\t\t \t\t// Scan through the match candidates and alert on a match\r\n\t\t\t \t\tboolean foundSpecificMatch = false;\r\n\t\t\t \t\tfor(int j = 0; j < m_sounds.length; j++)\r\n\t\t\t \t\t{\r\n\t\t\t \t\t\tif(m_sounds[j].checkMatch(loudestFrequency))\r\n\t\t\t \t\t\t{\r\n\t\t\t \t\t\t\tfoundSpecificMatch = true;\r\n\t\t\t \t\t\t}\r\n\t\t\t \t\t}\r\n\t\t\t \t\t\r\n\t\t\t \t\tif(!foundSpecificMatch && loudestFrequency>100){\r\n\t\t\t \t\t\t\r\n\t\t\t \t\t\td.vibrate(2000);\r\n\t\t\t \t\t\t\r\n\t\t\t \t\t\t// Do a popup\r\n\t\t\t \t\t\tAlert curAlert = new Alert(\"Sound detected\", \"Unknown sound - \" + Double.toString(loudestFrequency), null, AlertType.ALARM);\r\n\t\t\t \t\t\tcurAlert.setTimeout(3000);\r\n\t\t\t \t\t\td.setCurrent(curAlert, d.getCurrent());\r\n\t\t\t \t\t\t\r\n\t\t\t \t\t\tThread.sleep(curAlert.getTimeout()+200);\r\n\t\t\t \t\t\tSystem.out.println(\"frequency hit: \"+ loudestFrequency);\r\n\t\t\t \t\t}\r\n\t\t\t \t}\r\n\t\t\t }\r\n\t\t \t\telse{\r\n\t\t \t\t}\r\n\t\t \toutput.reset();\r\n\t \t}\r\n\t \t\r\n\t \t// close streams\r\n\t \trc.stopRecord();\r\n\t \t\tp.stop();\r\n\t \t\tp.close();\r\n\t\t}\r\n\t\tcatch(Exception e)\r\n\t\t{\r\n\t\t\tSystem.out.println(e.toString());\r\n\t\t}\r\n\t}", "public void setMicGainDb(float level);", "public void updateVolume(){\r\n if(currentLoop0) backgroundMusicLoop0.gainControl.setValue(Window.musicVolume);\r\n else backgroundMusicLoop1.gainControl.setValue(Window.musicVolume);\r\n }", "@Override\n public void loop() {\n\n\n if (gamepad1.right_bumper) {\n leftDrive.setDirection(DcMotor.Direction.FORWARD);\n leftDrive.setPower(3);\n } else if (gamepad1.left_bumper) {\n leftDrive.setDirection(DcMotor.Direction.REVERSE);\n leftDrive.setPower(3);\n\n }\n\n }", "public boolean getClosedLoopControl() {\n return CompressorJNI.getClosedLoopControl(m_pcm);\n }", "public void loopSound(boolean commence) {\n if ( commence ) {\n clip.setFramePosition(0);\n clip.loop( Clip.LOOP_CONTINUOUSLY );\n } else {\n clip.stop();\n }\n }", "public void play() \n{\n s = !s; \n if (s == false)\n {\n //pausets = millis()/4;\n controlP5.getController(\"play\").setLabel(\"Play\");\n } else if (s == true)\n {\n //origint = origint + millis()/4 - pausets;\n controlP5.getController(\"play\").setLabel(\"Pause\");\n }\n}", "public boolean setLooping(Boolean looping)\n {\n if(AudioDetector.getInstance().isNoAudio())\n {\n return toggleLooping;\n }\n\n boolean previous = toggleLooping;\n toggleLooping = looping;\n Log.add(\"[MUSIC]\\tLooping set to: \" + looping);\n\n return previous;\n }", "public void ChangeMusic(int musicnum, boolean looping);", "private void connectWithMainloopLock() throws java.io.IOException {\n /*\n r28 = this;\n r0 = r28;\n r0 = r0.stream;\n r24 = r0;\n r26 = 0;\n r6 = (r24 > r26 ? 1 : (r24 == r26 ? 0 : -1));\n if (r6 == 0) goto L_0x000d;\n L_0x000c:\n return;\n L_0x000d:\n r13 = r28.getFormat();\n r13 = (javax.media.format.AudioFormat) r13;\n r24 = r13.getSampleRate();\n r0 = r24;\n r0 = (int) r0;\n r19 = r0;\n r11 = r13.getChannels();\n r20 = r13.getSampleSizeInBits();\n r6 = -1;\n r0 = r19;\n if (r0 != r6) goto L_0x0038;\n L_0x0029:\n r24 = org.jitsi.impl.neomedia.MediaUtils.MAX_AUDIO_SAMPLE_RATE;\n r26 = -4616189618054758400; // 0xbff0000000000000 float:0.0 double:-1.0;\n r6 = (r24 > r26 ? 1 : (r24 == r26 ? 0 : -1));\n if (r6 == 0) goto L_0x0038;\n L_0x0031:\n r24 = org.jitsi.impl.neomedia.MediaUtils.MAX_AUDIO_SAMPLE_RATE;\n r0 = r24;\n r0 = (int) r0;\n r19 = r0;\n L_0x0038:\n r6 = -1;\n if (r11 != r6) goto L_0x003c;\n L_0x003b:\n r11 = 1;\n L_0x003c:\n r6 = -1;\n r0 = r20;\n if (r0 != r6) goto L_0x0043;\n L_0x0041:\n r20 = 16;\n L_0x0043:\n r4 = 0;\n r12 = 0;\n r0 = r28;\n r6 = r0.pulseAudioSystem;\t Catch:{ IllegalStateException -> 0x006d, RuntimeException -> 0x0071 }\n r9 = r28.getClass();\t Catch:{ IllegalStateException -> 0x006d, RuntimeException -> 0x0071 }\n r9 = r9.getName();\t Catch:{ IllegalStateException -> 0x006d, RuntimeException -> 0x0071 }\n r23 = \"phone\";\n r0 = r19;\n r1 = r23;\n r4 = r6.createStream(r0, r11, r9, r1);\t Catch:{ IllegalStateException -> 0x006d, RuntimeException -> 0x0071 }\n r0 = r28;\n r0.channels = r11;\t Catch:{ IllegalStateException -> 0x006d, RuntimeException -> 0x0071 }\n L_0x0060:\n if (r12 == 0) goto L_0x0075;\n L_0x0062:\n r16 = new java.io.IOException;\n r16.<init>();\n r0 = r16;\n r0.initCause(r12);\n throw r16;\n L_0x006d:\n r17 = move-exception;\n r12 = r17;\n goto L_0x0060;\n L_0x0071:\n r18 = move-exception;\n r12 = r18;\n goto L_0x0060;\n L_0x0075:\n r24 = 0;\n r6 = (r4 > r24 ? 1 : (r4 == r24 ? 0 : -1));\n if (r6 != 0) goto L_0x0083;\n L_0x007b:\n r6 = new java.io.IOException;\n r9 = \"stream\";\n r6.<init>(r9);\n throw r6;\n L_0x0083:\n r6 = r19 / 100;\n r6 = r6 * r11;\n r9 = r20 / 8;\n r10 = r6 * r9;\n r6 = r10 * 2;\n r0 = r28;\n r0.fragsize = r6;\t Catch:{ all -> 0x00bc }\n r6 = r10 * 10;\n r6 = new byte[r6];\t Catch:{ all -> 0x00bc }\n r0 = r28;\n r0.buffer = r6;\t Catch:{ all -> 0x00bc }\n r6 = -1;\n r9 = -1;\n r23 = -1;\n r24 = -1;\n r0 = r28;\n r0 = r0.fragsize;\t Catch:{ all -> 0x00bc }\n r25 = r0;\n r0 = r23;\n r1 = r24;\n r2 = r25;\n r7 = org.jitsi.impl.neomedia.pulseaudio.PA.buffer_attr_new(r6, r9, r0, r1, r2);\t Catch:{ all -> 0x00bc }\n r24 = 0;\n r6 = (r7 > r24 ? 1 : (r7 == r24 ? 0 : -1));\n if (r6 != 0) goto L_0x00cd;\n L_0x00b4:\n r6 = new java.io.IOException;\t Catch:{ all -> 0x00bc }\n r9 = \"pa_buffer_attr_new\";\n r6.<init>(r9);\t Catch:{ all -> 0x00bc }\n throw r6;\t Catch:{ all -> 0x00bc }\n L_0x00bc:\n r6 = move-exception;\n r0 = r28;\n r0 = r0.stream;\n r24 = r0;\n r26 = 0;\n r9 = (r24 > r26 ? 1 : (r24 == r26 ? 0 : -1));\n if (r9 != 0) goto L_0x00cc;\n L_0x00c9:\n org.jitsi.impl.neomedia.pulseaudio.PA.stream_unref(r4);\n L_0x00cc:\n throw r6;\n L_0x00cd:\n r22 = new org.jitsi.impl.neomedia.jmfext.media.protocol.pulseaudio.DataSource$PulseAudioStream$2;\t Catch:{ all -> 0x011a }\n r0 = r22;\n r1 = r28;\n r0.m2469init();\t Catch:{ all -> 0x011a }\n r0 = r22;\n org.jitsi.impl.neomedia.pulseaudio.PA.stream_set_state_callback(r4, r0);\t Catch:{ all -> 0x011a }\n r0 = r28;\n r6 = org.jitsi.impl.neomedia.jmfext.media.protocol.pulseaudio.DataSource.this;\t Catch:{ all -> 0x011a }\n r6 = r6.getLocatorDev();\t Catch:{ all -> 0x011a }\n r9 = 8193; // 0x2001 float:1.1481E-41 double:4.048E-320;\n org.jitsi.impl.neomedia.pulseaudio.PA.stream_connect_record(r4, r6, r7, r9);\t Catch:{ all -> 0x011a }\n r24 = 0;\n r6 = (r7 > r24 ? 1 : (r7 == r24 ? 0 : -1));\n if (r6 == 0) goto L_0x00f3;\n L_0x00ee:\n org.jitsi.impl.neomedia.pulseaudio.PA.buffer_attr_free(r7);\t Catch:{ all -> 0x0109 }\n r7 = 0;\n L_0x00f3:\n r0 = r28;\n r6 = r0.pulseAudioSystem;\t Catch:{ all -> 0x0109 }\n r9 = 2;\n r21 = r6.waitForStreamState(r4, r9);\t Catch:{ all -> 0x0109 }\n r6 = 2;\n r0 = r21;\n if (r0 == r6) goto L_0x0125;\n L_0x0101:\n r6 = new java.io.IOException;\t Catch:{ all -> 0x0109 }\n r9 = \"stream.state\";\n r6.<init>(r9);\t Catch:{ all -> 0x0109 }\n throw r6;\t Catch:{ all -> 0x0109 }\n L_0x0109:\n r6 = move-exception;\n r0 = r28;\n r0 = r0.stream;\t Catch:{ all -> 0x011a }\n r24 = r0;\n r26 = 0;\n r9 = (r24 > r26 ? 1 : (r24 == r26 ? 0 : -1));\n if (r9 != 0) goto L_0x0119;\n L_0x0116:\n org.jitsi.impl.neomedia.pulseaudio.PA.stream_disconnect(r4);\t Catch:{ all -> 0x011a }\n L_0x0119:\n throw r6;\t Catch:{ all -> 0x011a }\n L_0x011a:\n r6 = move-exception;\n r24 = 0;\n r9 = (r7 > r24 ? 1 : (r7 == r24 ? 0 : -1));\n if (r9 == 0) goto L_0x0124;\n L_0x0121:\n org.jitsi.impl.neomedia.pulseaudio.PA.buffer_attr_free(r7);\t Catch:{ all -> 0x00bc }\n L_0x0124:\n throw r6;\t Catch:{ all -> 0x00bc }\n L_0x0125:\n r0 = r28;\n r6 = r0.readCallback;\t Catch:{ all -> 0x0109 }\n org.jitsi.impl.neomedia.pulseaudio.PA.stream_set_read_callback(r4, r6);\t Catch:{ all -> 0x0109 }\n r6 = org.jitsi.impl.neomedia.jmfext.media.protocol.pulseaudio.DataSource.SOFTWARE_GAIN;\t Catch:{ all -> 0x0109 }\n if (r6 != 0) goto L_0x0168;\n L_0x0132:\n r0 = r28;\n r6 = r0.gainControl;\t Catch:{ all -> 0x0109 }\n if (r6 == 0) goto L_0x0168;\n L_0x0138:\n r24 = org.jitsi.impl.neomedia.pulseaudio.PA.cvolume_new();\t Catch:{ all -> 0x0109 }\n r0 = r24;\n r2 = r28;\n r2.cvolume = r0;\t Catch:{ all -> 0x0109 }\n r14 = 1;\n r0 = r28;\n r6 = r0.gainControl;\t Catch:{ all -> 0x0195 }\n r15 = r6.getLevel();\t Catch:{ all -> 0x0195 }\n r0 = r28;\n r0.setStreamVolume(r4, r15);\t Catch:{ all -> 0x0195 }\n r0 = r28;\n r0.gainControlLevel = r15;\t Catch:{ all -> 0x0195 }\n r14 = 0;\n if (r14 == 0) goto L_0x0168;\n L_0x0157:\n r0 = r28;\n r0 = r0.cvolume;\t Catch:{ all -> 0x0109 }\n r24 = r0;\n org.jitsi.impl.neomedia.pulseaudio.PA.cvolume_free(r24);\t Catch:{ all -> 0x0109 }\n r24 = 0;\n r0 = r24;\n r2 = r28;\n r2.cvolume = r0;\t Catch:{ all -> 0x0109 }\n L_0x0168:\n r0 = r28;\n r0.stream = r4;\t Catch:{ all -> 0x0109 }\n r0 = r28;\n r0 = r0.stream;\t Catch:{ all -> 0x011a }\n r24 = r0;\n r26 = 0;\n r6 = (r24 > r26 ? 1 : (r24 == r26 ? 0 : -1));\n if (r6 != 0) goto L_0x017b;\n L_0x0178:\n org.jitsi.impl.neomedia.pulseaudio.PA.stream_disconnect(r4);\t Catch:{ all -> 0x011a }\n L_0x017b:\n r24 = 0;\n r6 = (r7 > r24 ? 1 : (r7 == r24 ? 0 : -1));\n if (r6 == 0) goto L_0x0184;\n L_0x0181:\n org.jitsi.impl.neomedia.pulseaudio.PA.buffer_attr_free(r7);\t Catch:{ all -> 0x00bc }\n L_0x0184:\n r0 = r28;\n r0 = r0.stream;\n r24 = r0;\n r26 = 0;\n r6 = (r24 > r26 ? 1 : (r24 == r26 ? 0 : -1));\n if (r6 != 0) goto L_0x000c;\n L_0x0190:\n org.jitsi.impl.neomedia.pulseaudio.PA.stream_unref(r4);\n goto L_0x000c;\n L_0x0195:\n r6 = move-exception;\n if (r14 == 0) goto L_0x01a9;\n L_0x0198:\n r0 = r28;\n r0 = r0.cvolume;\t Catch:{ all -> 0x0109 }\n r24 = r0;\n org.jitsi.impl.neomedia.pulseaudio.PA.cvolume_free(r24);\t Catch:{ all -> 0x0109 }\n r24 = 0;\n r0 = r24;\n r2 = r28;\n r2.cvolume = r0;\t Catch:{ all -> 0x0109 }\n L_0x01a9:\n throw r6;\t Catch:{ all -> 0x0109 }\n */\n throw new UnsupportedOperationException(\"Method not decompiled: org.jitsi.impl.neomedia.jmfext.media.protocol.pulseaudio.DataSource$PulseAudioStream.connectWithMainloopLock():void\");\n }", "HardwarePneumaticsControlModule(Compressor pcm) {\n this.pcm = pcm;\n this.closedLoop =\n Relay.instantaneous(this.pcm::setClosedLoopControl, this.pcm::getClosedLoopControl);\n\n this.instantaneousFaults = new Faults() {\n @Override\n public Switch notConnected() {\n return pcm::getCompressorNotConnectedFault;\n }\n\n @Override\n public Switch currentTooHigh() {\n return pcm::getCompressorCurrentTooHighFault;\n }\n\n @Override\n public Switch shorted() {\n return pcm::getCompressorShortedFault;\n }\n };\n\n this.stickyFaults = new Faults() {\n @Override\n public Switch notConnected() {\n return pcm::getCompressorNotConnectedStickyFault;\n }\n\n @Override\n public Switch currentTooHigh() {\n return pcm::getCompressorCurrentTooHighStickyFault;\n }\n\n @Override\n public Switch shorted() {\n return pcm::getCompressorShortedStickyFault;\n }\n };\n }", "public void enableMic(boolean enable);", "@Override\n public void run() \n {\n while (!Thread.interrupted()) {\n \n //Read from microphone\n if(line==null)break;\n //return;\n if(Thread.interrupted())break;\n int ready = line.available();\n while (ready <320) \n {\n if(Thread.interrupted()){\n // logger.warn(\"input audio device thread is closed\");\n return;}\n try {\n Thread.sleep(1);\n ready = line.available();\n } catch (InterruptedException e) {\n // logger.warn(\"input audio device thread is closed\");\n return;\n }\n \n }\n if(ready>1024)ready=(1024/audioFormat.getFrameSize())*audioFormat.getFrameSize();\n \n byte[] buffer = new byte[320];\n numBytesRead= line.read(buffer, 0, buffer.length);\n if(speakerLine!=null)speakerLine.write(buffer, 0, buffer.length); \n byte[] b= PcmuEncoder.process(buffer);\n if(microphoneLine!=null)session.Send(b); \n }\n //logger.info(\"input audio device thread is closed\");\n \n}", "public void setVibrationOn() {\n\n }", "protected OpenLoopSpeedController()\r\n\t{\r\n\t\t\r\n\t}", "@Override\n\tpublic void playerPCMFeedBuffer(boolean b, int i, int i2) {}", "public void loop() {\n\n double driveMult = gamepad1.left_bumper ? 0.5 : (gamepad1.right_bumper ? 0.2 : 1.0);\n\n double x = gamepad1.left_stick_x;\n double y = gamepad1.left_stick_y;\n\n switch (state) {\n case DRIVE:\n left.setPower(driveMult * (y - x));\n right.setPower(driveMult * (y + x));\n break;\n case REVERSE:\n left.setPower(driveMult * -(y + x));\n right.setPower(driveMult * -(y - x));\n break;\n case TANK:\n left.setPower(driveMult * gamepad1.left_stick_y);\n right.setPower(driveMult * gamepad1.right_stick_y);\n break;\n }\n\n if (gamepad1.dpad_up) {\n state = State.DRIVE;\n } else if (gamepad1.dpad_down) {\n state = State.REVERSE;\n } else if (gamepad1.dpad_left) {\n state = State.TANK;\n }\n\n // AUX CONTROLS\n\n double auxMult = gamepad2.left_bumper ? 0.5 : (gamepad2.right_bumper ? 0.2 : 1.0);\n\n rack.setPower(auxMult * ((gamepad2.dpad_up ? 1 : 0) + (gamepad2.dpad_down ? -1 : 0)));\n\n // extend.setPower(auxMult * gamepad2.left_stick_y);\n slurp.setPower(auxMult * gamepad2.right_stick_y);\n\n\n// if (gamepad2.a) {\n// rack.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n// rack.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n// }\n\n // TELEMETRY\n\n telemetry.addData(\"Drive Mode: \", state);\n telemetry.addData(\"Rack Encoder: \", rack.getCurrentPosition());\n telemetry.addData(\"G2 RS Y: \", gamepad2.right_stick_y);\n }", "public void loop(){\n\t\t\n\t\tclip.loop(Clip.LOOP_CONTINUOUSLY);\n\t\tplay();\n\t}", "@Override\n public void valueChanged(double control_val) {\n float current_audio_position = (float)samplePlayer.getPosition();\n\n if (current_audio_position < control_val){\n samplePlayer.setPosition(control_val);\n }\n loop_start.setValue((float)control_val);\n // Write your DynamicControl code above this line \n }", "public void setAudioDscp(int dscp);", "int unpauseSamples() {\n return 0;\n }", "public void setLooping(StarObjectClass self,boolean looping){ \r\n \t\tStarCLEMediaPlayer mediaplayer = (StarCLEMediaPlayer)WrapAndroidClass.GetAndroidObject(self,\"AndroidObject\");\r\n \t\tif( mediaplayer == null )\r\n \t\t\treturn;\r\n \t\tmediaplayer.setLooping(looping);\r\n \t}", "@Override\n public void loop() {\n switch (auto) {\n case 0:\n // robot.runToTarget(Movement.BACKWARD, 10);\n break;\n\n case 1:\n robot.changeRunMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n break;\n }\n telemetry.addData(\"Case:\", auto);\n telemetry.update();\n }", "@Test\n public void testSetLooping()\n {\n MusicPlayer.getInstance().selectSong(Songs.CREDITS);\n assertEquals(MusicPlayer.getInstance().setLooping(true), false);\n }", "public void play() {\n\t\tline.start();\n\t\tloop = false;\n\t\tnumLoops = 0;\n\t\tplay = true;\n\t\t// will wake up our data processing thread.\n\t\t// iothread.interrupt();\n\t}", "@Override\n public Relay automaticMode() {\n return closedLoop;\n }", "void doRun() {\n\n\t Object line;\n\t Method wrmeth = null;\n\t try {\n\t\tClass afclass = Class.forName(\"javax.sound.sampled.AudioFormat\");\n\t\tConstructor cstr = afclass.getConstructor(\n\t\t new Class[] { float.class, int.class, int.class,\n\t\t\t\t boolean.class, boolean.class });\n\t\tObject format = cstr.newInstance(new Object[]\n\t\t { new Float(rate), new Integer(16), new Integer(1),\n\t\t new Boolean(true), new Boolean(true) });\n\t\tClass ifclass = Class.forName(\"javax.sound.sampled.DataLine$Info\");\n\t\tClass sdlclass =\n\t\t Class.forName(\"javax.sound.sampled.SourceDataLine\");\n\t\tcstr = ifclass.getConstructor(\n\t\t new Class[] { Class.class, afclass });\n\t\tObject info = cstr.newInstance(new Object[]\n\t\t { sdlclass, format });\n\t\tClass asclass = Class.forName(\"javax.sound.sampled.AudioSystem\");\n\t\tClass liclass = Class.forName(\"javax.sound.sampled.Line$Info\");\n\t\tMethod glmeth = asclass.getMethod(\"getLine\",\n\t\t\t\t\t\t new Class[] { liclass });\n\t\tline = glmeth.invoke(null, new Object[] {info} );\n\t\tMethod opmeth = sdlclass.getMethod(\"open\",\n\t\t\t new Class[] { afclass, int.class });\n\t\topmeth.invoke(line, new Object[] { format,\n\t\t\t new Integer(4096) });\n\t\tMethod stmeth = sdlclass.getMethod(\"start\", null);\n\t\tstmeth.invoke(line, null);\n\t\tbyte b[] = new byte[1];\n\t\twrmeth = sdlclass.getMethod(\"write\",\n\t\t\t new Class[] { b.getClass(), int.class, int.class });\n\t } catch (Exception e) {\n\t\te.printStackTrace();\n\t\treturn;\n\t }\n\n\t int playSampleCount = 16384;\n\t FFT playFFT = new FFT(playSampleCount);\n\t double playfunc[] = null;\n\t byte b[] = new byte[4096];\n\t int offset = 0;\n\t int dampCount = 0;\n\t double mx = .2;\n\t\t \n\t while (soundCheck.getState() && applet.ogf != null) {\n\t\tdouble damper = dampcoef*1e-2;\n\t\t\n\t\tif (playfunc == null || changed) {\n\t\t playfunc = new double[playSampleCount*2];\n\t\t int i;\n\t\t //double bstep = 2*pi*440./rate;\n\t\t //int dfreq0 = 440; // XXX\n\t\t double n = 2*pi*20.0*\n\t\t\tjava.lang.Math.sqrt((double)tensionBarValue);\n\t\t n /= omega[1];\n\t\t changed = false;\n\t\t mx = .2;\n\t\t for (i = 1; i != maxTerms; i++) {\n\t\t\tint dfreq = (int) (n*omega[i]);\n\t\t\tif (dfreq >= playSampleCount)\n\t\t\t break;\n\t\t\tplayfunc[dfreq] = magcoef[i];\n\t\t }\n\t\t playFFT.transform(playfunc, true);\n\t\t for (i = 0; i != playSampleCount; i++) {\n\t\t\tdouble dy = playfunc[i*2]*Math.exp(damper*i);\n\t\t\tif (dy > mx) mx = dy;\n\t\t\tif (dy < -mx) mx = -dy;\n\t\t }\n\t\t dampCount = offset = 0;\n\t\t}\n\t\t\n\t\tdouble mult = 32767/mx;\n\t\tint bl = b.length/2;\n\t\tint i;\n\t\tfor (i = 0; i != bl; i++) {\n\t\t short x = (short) (playfunc[(i+offset)*2]*mult*\n\t\t\t\t Math.exp(damper*dampCount++));\n\t\t b[i*2] = (byte) (x/256);\n\t\t b[i*2+1] = (byte) (x & 255);\n\t\t}\n\t\toffset += bl;\n\t\tif (offset == playfunc.length/2)\n\t\t offset = 0;\n\n\t\ttry {\n\t\t wrmeth.invoke(line, new Object[] { b, new Integer(0),\n\t\t\t\t\t\t new Integer(b.length) });\n\t\t} catch (Exception e) {\n\t\t e.printStackTrace();\n\t\t break;\n\t\t}\n\t }\n\t}", "public void setLoop(boolean loop) {\n this.loop = loop;\n }", "public void setClosedLoopSpeed(double RPM) {\n double targetVelocity_UnitsPer100ms = RPM * Constants.kickerEncoderCount / 600;\n m_kicker.set(ControlMode.Velocity, targetVelocity_UnitsPer100ms);\n }", "@Override\n public void teleopPeriodic() {\n teleop.periodic();\n toggleCompressor = toggleCompressor ^ robot.compressorToggle.get();\n robot.runCompressor.set(toggleCompressor);\n Watcher.update();\n\n }", "void enablePWM(double initialDutyCycle);", "public void setVibrationOff() {\n\n }", "void setSound(boolean b){\r\n\t\tgc.setSound(b);\r\n\t}", "int pauseSamples() {\n return 0;\n }", "public void setLoop(boolean loop) {\n\t\tthis.loop = loop;\n\t}", "@Override\r\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tmVideoContrl.maltiSpeedPlayNext();\r\n\r\n\t\t\t\t\t}", "public void enableSound() {\n soundToggle = true;\n }", "public void run() {\r\n\t\twhile(true) {\r\n\t\t\twhile(base.isEnabled()){\r\n\t\t\t\tif(pressureSwitch.get() == false){\r\n\t\t\t\t\tcompressor.set(Value.kOn);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcompressor.set(Value.kOff);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n public void runOpMode() {\n\n robot.init(hardwareMap);\n robot.MotorRightFront.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n robot.MotorLeftFront.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n robot.MotorRightFront.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n robot.MotorLeftFront.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n\n /** Wait for the game to begin */\n while (!isStarted()) {\n telemetry.addData(\"angle\", \"0\");\n telemetry.update();\n }\n\n\n }", "public void wave() {\n leanRight = !leanRight;\n }", "@Override\n public void runOpMode() {\n float strafeRight;\n float strafeLeft;\n\n frontRight = hardwareMap.dcMotor.get(\"frontRight\");\n backRight = hardwareMap.dcMotor.get(\"backRight\");\n frontLeft = hardwareMap.dcMotor.get(\"frontLeft\");\n backLeft = hardwareMap.dcMotor.get(\"backLeft\");\n flipper = hardwareMap.crservo.get(\"flipper\");\n\n // Put initialization blocks here.\n frontRight.setDirection(DcMotorSimple.Direction.REVERSE);\n backRight.setDirection(DcMotorSimple.Direction.REVERSE);\n waitForStart();\n while (opModeIsActive()) {\n // Power to drive\n frontRight.setPower(gamepad1.right_stick_y * 0.5);\n frontRight.setPower(gamepad1.right_stick_y * 0.75);\n backRight.setPower(gamepad1.right_stick_y * 0.75);\n frontLeft.setPower(gamepad1.left_stick_y * 0.75);\n backLeft.setPower(gamepad1.left_stick_y * 0.75);\n flipper.setPower(gamepad2.left_stick_y);\n // Strafing code\n strafeRight = gamepad1.right_trigger;\n strafeLeft = gamepad1.left_trigger;\n if (strafeRight != 0) {\n frontLeft.setPower(-(strafeRight * 0.8));\n frontRight.setPower(strafeRight * 0.8);\n backLeft.setPower(strafeRight * 0.8);\n backRight.setPower(-(strafeRight * 0.8));\n } else if (strafeLeft != 0) {\n frontLeft.setPower(strafeLeft * 0.8);\n frontRight.setPower(-(strafeLeft * 0.8));\n backLeft.setPower(-(strafeLeft * 0.8));\n backRight.setPower(strafeLeft * 0.8);\n }\n // Creep\n if (gamepad1.dpad_up) {\n frontRight.setPower(-0.4);\n backRight.setPower(-0.4);\n frontLeft.setPower(-0.4);\n backLeft.setPower(-0.4);\n } else if (gamepad1.dpad_down) {\n frontRight.setPower(0.4);\n backRight.setPower(0.4);\n frontLeft.setPower(0.4);\n backLeft.setPower(0.4);\n } else if (gamepad1.dpad_right) {\n frontRight.setPower(-0.4);\n backRight.setPower(-0.4);\n } else if (gamepad1.dpad_left) {\n frontLeft.setPower(-0.4);\n backLeft.setPower(-0.4);\n }\n if (gamepad1.x) {\n frontLeft.setPower(1);\n backLeft.setPower(1);\n frontRight.setPower(1);\n backRight.setPower(1);\n sleep(200);\n frontRight.setPower(1);\n backRight.setPower(1);\n frontLeft.setPower(-1);\n backLeft.setPower(-1);\n sleep(700);\n }\n telemetry.update();\n }\n }", "void driveStop() {\n flMotor.setPower(0);\n frMotor.setPower(0);\n blMotor.setPower(0);\n brMotor.setPower(0);\n }", "public boolean isLoopMode();", "public synchronized void setOpenLoop(DriveSignal signal) {\n RobotState.mDriveControlState = DriveControlState.OPEN_LOOP;\n SmartDashboard.putNumber(\"Left Drive Sig\", signal.getLeft());\n leftDrive.set(ControlMode.PercentOutput, signal.getLeft(), signal.getBrakeMode());\n rightDrive.set(ControlMode.PercentOutput, signal.getRight(), signal.getBrakeMode());\n currentSetpoint = signal;\n }", "@Override\r\n public void teleopPeriodic() {\n if (m_stick.getRawButton(12)){\r\n TestCompressor.setClosedLoopControl(true);\r\n System.out.println(\"??\");\r\n } \r\n if (m_stick.getRawButton(11)) {\r\n TestCompressor.setClosedLoopControl(false);\r\n }\r\n //// fireCannon(Solenoid_1, m_stick, 8);\r\n //// fireCannon(Solenoid_2, m_stick, 10);\r\n //// fireCannon(Solenoid_3, m_stick, 12);\r\n //// fireCannon(Solenoid_4, m_stick, 7);\r\n //// fireCannon(Solenoid_5, m_stick, 9);\r\n //// fireCannon(Solenoid_6, m_stick, 11);\r\n\r\n // Logic to control trigering is inside\r\n // DO: Move the logic out here, makes more sense. \r\n fireTrio(topSolonoids, m_stick, 5);\r\n fireTrio(bottomSolonoids, m_stick, 6);\r\n\r\n // Make robit go\r\n double[] movementList = adjustJoystickInput(-m_stick.getY(), m_stick.getX(), m_stick.getThrottle());\r\n m_myRobot.arcadeDrive(movementList[0], movementList[1]);\r\n //System.out.println(m_gyro.getAngle());\r\n }", "void setPWMRate(double rate);", "@Override\n public void runOpMode() {\n telemetry.addData(\"Status\", \"Resetting Encoders\"); //\n telemetry.update();\n\n leftFront = hardwareMap.get(DcMotor.class, \"left_front\");\n rightFront = hardwareMap.get(DcMotor.class, \"right_front\");\n leftBack = hardwareMap.get(DcMotor.class, \"left_back\");\n rightBack = hardwareMap.get(DcMotor.class, \"right_back\");\n\n\n leftFront.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n rightFront.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n leftBack.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n rightFront.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n\n right = hardwareMap.get(Servo.class, \"right\");\n left = hardwareMap.get(Servo.class, \"left\");\n // Most robots need the motor on one side to be reversed to drive forward\n // Reverse the motor that runs backwards when connected directly to the battery\n leftFront.setDirection(DcMotor.Direction.REVERSE);\n rightFront.setDirection(DcMotor.Direction.FORWARD);\n leftBack.setDirection(DcMotor.Direction.REVERSE);\n rightBack.setDirection(DcMotor.Direction.FORWARD);\n\n leftFront.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n leftBack.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n rightFront.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n rightBack.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n digitalTouch = hardwareMap.get(DigitalChannel.class, \"sensor_digital\");\n digitalTouch.setMode(DigitalChannel.Mode.INPUT);\n\n right.setDirection(Servo.Direction.REVERSE);\n\n right.scaleRange(0, 0.25);\n left.scaleRange(0.7, 1);\n\n\n // Wait for the game to start (driver presses PLAY)\n waitForStart();\n\n\n servo(0);\n runtime.reset();\n encoderSideways(0.25, -5, -5, 5);\n // drive until touch sensor pressed\n // activate servos to grab platform\n // drive backwards for a while\n // release servos\n // sideways part\n // remember to do red autonomous for repackage org.firstinspires.ftc.teamcode;\n }", "public void pauseSong()\n {\n if(!mute)\n {\n try{ \n //bclip.stop();\n \n URL url = this.getClass().getClassLoader().getResource(\"Refreshing Elevator Music.wav\");\n \n AudioInputStream audioIn = AudioSystem.getAudioInputStream(url);\n // Get a sound clip resource.\n pclip = AudioSystem.getClip();\n \n // Open audio clip and load samples from the audio input stream.\n pclip.open(audioIn); \n pclip.start();\n pclip.loop(Clip.LOOP_CONTINUOUSLY);\n }catch(Exception e){}\n }\n }", "public void stop() {\n m_servo.setSpeed(0.0);\n }", "public void keepLooping() {\n\t\tif(!clip.isActive()) {\n\t\t\tstartSound();\n\t\t}\n\t}", "private static native void triggerRepeatedHapticPulse(long pointer,\n long controllerHandle,\n int targetPad,\n int durationMicroSec,\n int offMicroSec,\n int repeat,\n int flags);", "public void ResetClimbEncoders() {\n leftClamFoot.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n rightClamFoot.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n }", "public int /* sound_sample */output() {\n\t\treturn Vo;\n\t}", "public void Compressor_on(){\n\t\tC.setClosedLoopControl(true);\n\t\t\n\t}", "public int getAudioPort();", "public void setPCA0MD_CPS_Bits(PCA_ClockSource source){\r\n checkServoCommandThread();\r\n ServoCommand cmd=new ServoCommand();\r\n cmd.bytes=new byte[2];\r\n cmd.bytes[0]=CMD_SET_PCA0MD_CPS;\r\n cmd.bytes[1]=(byte)(0x07&source.code());\r\n submitCommand(cmd);\r\n }", "int unpauseSample() {\n return 0;\n }", "@Override\n\t\t\tpublic void actionPerformed(final ActionEvent evt) {\n\t\t\t\tdoSendOn(440, 1001);\n\t\t\t\tsecondSynthButtonOn.setEnabled(false);\n\t\t\t\tsecondSynthButtonOff.setEnabled(true);\n\t\t\t\tslider2.setEnabled(true);\n\t\t\t\tslider2.setValue(2050);\n\t\t\t\ttextBox2.setEnabled(true);\n\t\t\t\ttextBox2.setText(\"440.0\");\n\t\t\t}", "@Override\n public void stop()\n {\n final String funcName = \"stop\";\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API);\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API);\n }\n\n if (playing)\n {\n analogOut.setAnalogOutputMode((byte) 0);\n analogOut.setAnalogOutputFrequency(0);\n analogOut.setAnalogOutputVoltage(0);\n playing = false;\n expiredTime = 0.0;\n setTaskEnabled(false);\n }\n }", "@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}", "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 loop(){\n\n test1.setPower(1);\n test1.setTargetPosition(150);\n\n\n }", "public void testMixer_MuteMany() throws InterruptedException { \n \tdouble tolerance = 0.01;\n Integer NbPortTested = 3;\n Mixer mixer = new Mixer(NbPortTested);\n synthesisEngine.add(mixer);\n \n // replicator VCO to mixer\n mixer.getInput(0).set(1);\n mixer.getInput(1).set(1);\n mixer.getInput(2).set(1);\n \n mixer.setMute(0, false);\n mixer.setMute(1, true);\n mixer.setMute(2, true);\n \n synthesisEngine.start();\n mixer.start();\n\t\t\n synthesisEngine.sleepUntil( synthesisEngine.getCurrentTime() + 0.1 );\n \n\t\t// is the sum correct ?\n\t\tassertEquals(\"mixer out value\", 1.0, mixer.getOutput().get(), tolerance);\n\n mixer.getInput(0).set(0.2);\n mixer.getInput(1).set(0.7);\n mixer.getInput(2).set(0.9);\n\n mixer.setMute(0, true);\n mixer.setMute(1, false);\n mixer.setMute(2, true);\n \n synthesisEngine.sleepUntil( synthesisEngine.getCurrentTime() + 0.1 );\n \n\t\t// is the sum correct ?\n\t\tassertEquals(\"mixer out value\", 0.7, mixer.getOutput().get(), tolerance);\n }", "@Override\n\t\tpublic void run() {\n\t\t\tgenTone();\n\t\t\tplaySound();\n\t\t}", "@Override\r\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tmVideoContrl.maltiSpeedPlayPrevious();\r\n\r\n\t\t\t\t\t}", "@Override\n public void valueChanged(double control_val) {\n playbackRate.setValue((float)control_val);\n // Write your DynamicControl code above this line\n }", "void onNewPulse(int pulse, int spo2 );", "int pauseSample() {\n return 0;\n }", "@Override\n\t\t\tpublic void actionPerformed(final ActionEvent evt) {\n\t\t\t\tdoSendOn(440, 1000);\n\t\t\t\tfirstSynthButtonOn.setEnabled(false);\n\t\t\t\tfirstSynthButtonOff.setEnabled(true);\n\t\t\t\ttextBox.setText(\"440.0\");\n\t\t\t\ttextBox.setEnabled(true);\n\t\t\t\tslider.setValue(2050);\n\t\t\t\tslider.setEnabled(true);\n\t\t\t}", "boolean startSample(int loopCount, float gain, int delay) {\n if (debugFlag)\n debugPrint(\"JSChannel: startSample must be overridden\");\n return false;\n }", "public void stop() {\n SystemClock.sleep(500);\n\n releaseAudioTrack();\n }", "public void generateTone()\n throws LineUnavailableException {\n if ( clip!=null ) {\n clip.stop();\n clip.close();\n } else {\n clip = AudioSystem.getClip();\n }\n boolean addHarmonic = harmonic.isSelected();\n\n int intSR = ((Integer)sampleRate.getSelectedItem()).intValue();\n int intFPW = framesPerWavelength.getValue();\n\n float sampleRate = (float)intSR;\n\n // oddly, the sound does not loop well for less than\n // around 5 or so, wavelengths\n int wavelengths = 20;\n byte[] buf = new byte[2*intFPW*wavelengths];\n AudioFormat af = new AudioFormat(\n sampleRate,\n 8, // sample size in bits\n 2, // channels\n true, // signed\n false // bigendian\n );\n\n int maxVol = 127;\n for(int i=0; i<intFPW*wavelengths; i++){\n double angle = ((float)(i*2)/((float)intFPW))*(Math.PI);\n buf[i*2]=getByteValue(angle);\n if(addHarmonic) {\n buf[(i*2)+1]=getByteValue(2*angle);\n } else {\n buf[(i*2)+1] = buf[i*2];\n }\n }\n\n try {\n byte[] b = buf;\n AudioInputStream ais = new AudioInputStream(\n new ByteArrayInputStream(b),\n af,\n buf.length/2 );\n\n clip.open( ais );\n } catch(Exception e) {\n e.printStackTrace();\n }\n }", "private void onMidi0(ShortMidiMessage midiMessage)\n {\n int midiChannel = midiMessage.getChannel();\n int cc = midiMessage.getData1();\n int value = midiMessage.getData2();\n\n if(cc == this.shiftCC) {\n this.shift = value == 127;\n }\n\n if(shift) {\n midiChannel += 1;\n }\n\n boolean acked;\n for(MappableDevice mappedDevice : mappedDevices) {\n acked = mappedDevice.setParameter(midiChannel, cc, value);\n\n if(acked) {\n return;\n }\n }\n }", "public static void loop(String filename) {\r\n\r\n InputStream path=load(filename);\r\n\r\n \r\n try\r\n {\r\n stop();\r\n soundLoop=AudioSystem.getClip();\r\n soundLoop.open(AudioSystem.getAudioInputStream(new BufferedInputStream(path)));\r\n soundLoop.loop(javax.sound.sampled.Clip.LOOP_CONTINUOUSLY);\r\n\r\n }catch(Exception fallo)\r\n {\r\n \r\n\r\n }\r\n \r\n }", "public void playOnce() {\n mStopAtLoopEnd = true;\n mStartTimeMillis = 0;\n mCurrentLoopNumber = 0;\n cancelCallback();\n postCallback();\n }", "protected abstract void nextWave();", "@Override\n public void action(HB hb) {\n hb.reset();\n hb.setStatus(this.getClass().getSimpleName() + \" Loaded\");\n\n final float MAX_PLAYBACK_RATE = 2;\n final float START_PLAY_RATE = 1;\n\n\n // define the duration of our sample. We will set this when the sample is loaded\n float sampleDuration = 0;\n /**************************************************************\n * Load a sample and play it\n *\n * simply type samplePLayer-basic to generate this code and press <ENTER> for each parameter\n **************************************************************/\n\n final float INITIAL_VOLUME = 1; // define how loud we want the sound\n Glide audioVolume = new Glide(INITIAL_VOLUME);\n\n // Define our sample name\n final String SAMPLE_NAME = \"data/audio/long/1979.wav\";\n\n // create our actual sample\n Sample sample = SampleManager.sample(SAMPLE_NAME);\n\n // test if we opened the sample successfully\n if (sample != null) {\n // Create our sample player\n SamplePlayer samplePlayer = new SamplePlayer(sample);\n // Samples are killed by default at end. We will stop this default actions so our sample will stay alive\n samplePlayer.setKillOnEnd(false);\n\n // Connect our sample player to audio\n Gain gainAmplifier = new Gain(HB.getNumOutChannels(), audioVolume);\n gainAmplifier.addInput(samplePlayer);\n HB.getAudioOutput().addInput(gainAmplifier);\n\n /******** Write your code below this line ********/\n\n // we need to assign this new samplePlayer to our class samplePlayer\n this.samplePlayer = samplePlayer;\n\n // Create an on Off Control\n\n // type booleanControl to generate this code \n BooleanControl stopPlayControl = new BooleanControl(this, \"Play\", true) {\n @Override\n public void valueChanged(Boolean control_val) {// Write your DynamicControl code below this line \n // if true, we will play\n samplePlayer.pause(!control_val);\n\n // if we are going to play, we will create the updateThread, otherwise we will kill it\n\n if (control_val){\n // create a new thread if one does not exists\n if (updateThread == null) {\n updateThread = createUpdateThread();\n }\n }\n else\n {\n // if we have a thread, kill it\n if (updateThread != null)\n {\n updateThread.interrupt();\n updateThread = null;\n }\n }\n\n // Write your DynamicControl code above this line \n }\n };// End DynamicControl stopPlayControl code \n\n\n // get our sample duration\n sampleDuration = (float)sample.getLength();\n\n // make our sampleplay a looping type\n samplePlayer.setLoopType(SamplePlayer.LoopType.LOOP_FORWARDS);\n\n // Define what our directions are\n final int PLAY_FORWARD = 1;\n final int PLAY_REVERSE = -1;\n\n // define our playbackRate control\n Glide playbackRate = new Glide(START_PLAY_RATE);\n // define our sample rate\n Glide playbackDirection = new Glide(PLAY_FORWARD); // We will control this with yaw\n\n // This function will be used to set the playback rate of the samplePlayer\n // The playbackDirection will have a value of -1 when it is in reverse, and 1 in forward\n // This is multiplied by the playbackRate to get an absolute value\n Function calculatedRate = new Function(playbackRate, playbackDirection) {\n @Override\n public float calculate() {\n return x[0] * x[1];\n }\n };\n\n // now set the rate to the samplePlayer\n samplePlayer.setRate(calculatedRate);\n\n // Use a Buddy control to change the PlaybackRate\n // Simply type floatBuddyControl to generate this code\n FloatControl playbackRateControl = new FloatControl(this, \"Playback Rate\", START_PLAY_RATE) {\n @Override\n public void valueChanged(double control_val) {// Write your DynamicControl code below this line\n playbackRate.setValue((float)control_val);\n // Write your DynamicControl code above this line\n }\n }.setDisplayRange(0, MAX_PLAYBACK_RATE, DynamicControl.DISPLAY_TYPE.DISPLAY_ENABLED_BUDDY);// End DynamicControl playbackRateControl code\n\n\n // create a checkbox to make it play forward or reverse\n // type booleanControl to generate this code\n BooleanControl directionControl = new BooleanControl(this, \"Reverse\", false) {\n @Override\n public void valueChanged(Boolean control_val) {// Write your DynamicControl code below this line\n if (!control_val){\n playbackDirection.setValue(PLAY_FORWARD);\n }\n else{\n playbackDirection.setValue(PLAY_REVERSE);\n }\n // Write your DynamicControl code above this line\n }\n };// End DynamicControl directionControl code\n\n\n\n // display a slider for position\n // Type floatSliderControl to generate this code \n FloatControl audioPosition = new FloatControl(this, \"Audio Position\", 0) {\n @Override\n public void valueChanged(double control_val) {// Write your DynamicControl code below this line \n samplePlayer.setPosition(control_val);\n setAudioTextPosition(control_val);\n // Write your DynamicControl code above this line \n }\n }.setDisplayRange(0, sampleDuration, DynamicControl.DISPLAY_TYPE.DISPLAY_DEFAULT);// End DynamicControl audioPosition code\n\n\n // set our newly created control to the class reference\n audioSliderPosition = audioPosition;\n\n // Type textControl to generate this code \n TextControl audioPositionText = new TextControl(this, \"Audio Position\", \"\") {\n @Override\n public void valueChanged(String control_val) {// Write your DynamicControl code below this line \n // we will decode our string value to audio position\n\n // we only want to do this if we are stopped\n if (samplePlayer.isPaused()) {\n // our string will be hh:mm:ss.m\n try {\n String[] units = control_val.split(\":\"); //will break the string up into an array\n int hours = Integer.parseInt(units[0]); //first element\n int minutes = Integer.parseInt(units[1]); //second element\n float seconds = Float.parseFloat(units[2]); // thirsd element\n float audio_seconds = 360 * hours + 60 * minutes + seconds; //add up our values\n\n float audio_position = audio_seconds * 1000;\n setAudioSliderPosition(audio_position);\n } catch (Exception ex) {\n }\n }\n // Write your DynamicControl code above this line \n }\n };// End DynamicControl audioPositionText code \n\n\n\n // set newly create DynamicControl to our class variable\n\n audioTextPosition = audioPositionText;\n // create a thread to update our position while we are playing\n // This is done in a function\n updateThread = createUpdateThread();\n\n // We will set sample Start and End points\n // define our start and end points\n Glide loop_start = new Glide(0);\n Glide loop_end = new Glide(sampleDuration);\n\n samplePlayer.setLoopStart(loop_start);\n samplePlayer.setLoopEnd(loop_end);\n\n // Simply type floatBuddyControl to generate this code \n FloatControl loopStartControl = new FloatControl(this, \"Loop start\", 0) {\n @Override\n public void valueChanged(double control_val) {// Write your DynamicControl code below this line \n float current_audio_position = (float)samplePlayer.getPosition();\n\n if (current_audio_position < control_val){\n samplePlayer.setPosition(control_val);\n }\n loop_start.setValue((float)control_val);\n // Write your DynamicControl code above this line \n }\n }.setDisplayRange(0, sampleDuration, DynamicControl.DISPLAY_TYPE.DISPLAY_ENABLED_BUDDY);// End DynamicControl loopStartControl code\n\n\n\n // Simply type floatBuddyControl to generate this code \n FloatControl loopEndControl = new FloatControl(this, \"Loop End\", sampleDuration) {\n @Override\n public void valueChanged(double control_val) {// Write your DynamicControl code below this line \n loop_end.setValue((float)control_val);\n // Write your DynamicControl code above this line \n }\n }.setDisplayRange(0, sampleDuration, DynamicControl.DISPLAY_TYPE.DISPLAY_ENABLED_BUDDY);// End DynamicControl loopEndControl code\n\n\n // Add a control to make sample player start at loop start position\n\n // Type triggerControl to generate this code \n TriggerControl startLoop = new TriggerControl(this, \"Start Loop\") {\n @Override\n public void triggerEvent() {// Write your DynamicControl code below this line \n samplePlayer.setPosition(loop_start.getCurrentValue());\n // Write your DynamicControl code above this line \n }\n };// End DynamicControl startLoop code \n\n\n /******** Write your code above this line ********/\n } else {\n HB.HBInstance.setStatus(\"Failed sample \" + SAMPLE_NAME);\n }\n /*** End samplePlayer code ***/\n\n }", "public static native void echoCancellation(short[] rec, short[] play,\n\t\t\tshort[] out);", "private void setAudioProfilModem() {\n int ringerMode = mAudioManager.getRingerModeInternal();\n ContentResolver mResolver = mContext.getContentResolver();\n Vibrator vibrator = (Vibrator) mContext\n .getSystemService(Context.VIBRATOR_SERVICE);\n boolean hasVibrator = vibrator == null ? false : vibrator.hasVibrator();\n if (AudioManager.RINGER_MODE_SILENT == ringerMode) {\n if (hasVibrator) {\n Settings.System.putInt(mResolver,\n Settings.System.SOUND_EFFECTS_ENABLED, 0);\n /* SPRD: fixbug454214 The status bar scene mode button is not synchronized with the button set up the scene mode. @{ */\n //mAudioManager.setRingerMode(AudioManager.RINGER_MODE_VIBRATE);\n mAudioManager.setRingerModeInternal(AudioManager.RINGER_MODE_VIBRATE);\n /* @} */\n mAudioManager.setVibrateSetting(\n AudioManager.VIBRATE_TYPE_RINGER,\n AudioManager.VIBRATE_SETTING_ON);\n mAudioManager.setVibrateSetting(\n AudioManager.VIBRATE_TYPE_NOTIFICATION,\n AudioManager.VIBRATE_SETTING_ON);\n } else {\n Settings.System.putInt(mResolver,\n Settings.System.SOUND_EFFECTS_ENABLED, 1);\n /* SPRD: fixbug454214 The status bar scene mode button is not synchronized with the button set up the scene mode. @{ */\n //mAudioManager.setRingerMode(AudioManager.RINGER_MODE_NORMAL);\n mAudioManager.setRingerModeInternal(AudioManager.RINGER_MODE_NORMAL);\n /* @} */\n }\n } else if (AudioManager.RINGER_MODE_VIBRATE == ringerMode) {\n Settings.System.putInt(mResolver,\n Settings.System.SOUND_EFFECTS_ENABLED, 1);\n /* SPRD: fixbug454214 The status bar scene mode button is not synchronized with the button set up the scene mode. @{ */\n //mAudioManager.setRingerMode(AudioManager.RINGER_MODE_NORMAL);\n mAudioManager.setRingerModeInternal(AudioManager.RINGER_MODE_OUTDOOR);\n /* @} */\n }else if (AudioManager.RINGER_MODE_OUTDOOR == ringerMode) {//add by wanglei for outdoor mode\n Settings.System.putInt(mResolver,Settings.System.SOUND_EFFECTS_ENABLED, 1);\n mAudioManager.setRingerModeInternal(AudioManager.RINGER_MODE_NORMAL);\n }else {\n Settings.System.putInt(mResolver,\n Settings.System.SOUND_EFFECTS_ENABLED, 0);\n /* SPRD: fixbug454214 The status bar scene mode button is not synchronized with the button set up the scene mode. @{ */\n //mAudioManager.setRingerMode(AudioManager.RINGER_MODE_SILENT);\n mAudioManager.setRingerModeInternal(AudioManager.RINGER_MODE_SILENT);\n /* @} */\n if (hasVibrator) {\n mAudioManager.setVibrateSetting(\n AudioManager.VIBRATE_TYPE_RINGER,\n AudioManager.VIBRATE_SETTING_OFF);\n mAudioManager.setVibrateSetting(\n AudioManager.VIBRATE_TYPE_NOTIFICATION,\n AudioManager.VIBRATE_SETTING_OFF);\n }\n }\n }", "public synchronized void stopSound() {\r\n running = false;\r\n }", "public void turnOff() {\n\t\tOn = false;\n\t\tVolume = 1;\n\t\tChannel = 1;\n\t}", "public void cycleOutput(long tick)\n {\n }", "public void testMixer_MuteAll() throws InterruptedException {\n \tdouble tolerance = 0.01;\n Integer NbPortTested = 3;\n Mixer mixer = new Mixer(NbPortTested);\n synthesisEngine.add(mixer);\n \n // replicator VCO to mixer\n mixer.getInput(0).set(1);\n mixer.getInput(1).set(1);\n mixer.getInput(2).set(1);\n \n mixer.setMute(0, true);\n mixer.setMute(1, true);\n mixer.setMute(2, true);\n \n synthesisEngine.start();\n mixer.start();\n\t\t\n synthesisEngine.sleepUntil( synthesisEngine.getCurrentTime() + 0.1 );\n \n\t\t// is the sum correct ?\n\t\tassertEquals(\"mixer out value\", 0.0, mixer.getOutput().get(), tolerance);\n\t\t\n mixer.getInput(0).set(0.2);\n mixer.getInput(1).set(0.7);\n mixer.getInput(2).set(0.9);\n\n synthesisEngine.sleepUntil( synthesisEngine.getCurrentTime() + 0.1 );\n \n\t\t// is the sum correct ?\n\t\tassertEquals(\"mixer out value\", 0.0, mixer.getOutput().get(), tolerance);\n\t\t\n }", "@Override\r\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\tmVideoContrl.playNext();\r\n\r\n\t\t\t\t\t\t\t}", "public void resetShoulderEncoder() {\r\n motorShoulder.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\r\n motorShoulder.setMode(DcMotor.RunMode.RUN_TO_POSITION);\r\n }", "@Override\n\t\tpublic void loop() throws ConnectionLostException, InterruptedException {\n\t\t\ttry {\n\t\t\t\tif (ExitApp == true) {\n\t\t\t\t\tPStatus.write(false);\n\t\t\t\t\tEN_LE.write(false);\n\t\t\t\t\tExitApp = false;\n\t\t\t\t\tDisplayLabel(\"LATCH ON\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tPStatus.write(true);\n\n\t\t\t\t// Set device enable\n\t\t\t\tEN_Device1.write(cmdDevice1.isChecked());\n\t\t\t\tEN_Device2.write(cmdDevice2.isChecked());\n\t\t\t\tEN_Device3.write(cmdDevice3.isChecked());\n\t\t\t\tEN_Device4.write(cmdDevice4.isChecked());\n\t\t\t\tEN_Device5.write(cmdDevice5.isChecked());\n\n\t\t\t\tif (cmdDevice1.isChecked())\n\t\t\t\t\tDisplayLabel(\"Btn1_Click\");\n\t\t\t\t// Get Amp\n\n\t\t\t\t// Get Watt\n\n\t\t\t\tThread.sleep(10);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\t// PStatus.write(false);\n\t\t\t\t// EN_LE.write(false);\n\t\t\t\tioio_.disconnect();\n\t\t\t} catch (ConnectionLostException ex) {\n\t\t\t\t// PStatus.write(false);\n\t\t\t\t// EN_LE.write(false);\n\t\t\t\tioio_.disconnect();\n\t\t\t}\n\t\t}", "public void setPlaybackGainDb(float level);", "public void play(String loopOption) {\n\t\ttry {\n\t\t\tthis.audioInput = AudioSystem.getAudioInputStream(this.music);\n\t\t\tclip.open(audioInput);\n\t\t\tclip.start();\n\t\t\tif (loopOption.equals(\"infinite\")) {\n\t\t\t\tthis.clip.loop(Clip.LOOP_CONTINUOUSLY);\n\t\t\t}\n\t\t} catch (UnsupportedAudioFileException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (LineUnavailableException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}" ]
[ "0.62887824", "0.5978402", "0.59493065", "0.5932306", "0.59262997", "0.5899128", "0.58938766", "0.5870235", "0.5804432", "0.57985073", "0.5781264", "0.57787097", "0.57536376", "0.57345974", "0.5658862", "0.56585747", "0.56581885", "0.56075025", "0.56018543", "0.5592246", "0.5570577", "0.5565319", "0.555697", "0.554422", "0.549683", "0.5494012", "0.548256", "0.54765564", "0.5472053", "0.5466283", "0.5464413", "0.54308945", "0.54231316", "0.54171497", "0.5413782", "0.54068434", "0.5399248", "0.53938633", "0.5393138", "0.53824174", "0.5370575", "0.5366036", "0.5366019", "0.5357945", "0.5336544", "0.5335196", "0.53276056", "0.53254384", "0.5314646", "0.5309726", "0.53014", "0.5301049", "0.5288635", "0.5272778", "0.52706057", "0.5263667", "0.5250351", "0.5249796", "0.5238942", "0.5231127", "0.5226287", "0.52247757", "0.5223956", "0.52184045", "0.52134025", "0.5206685", "0.52045935", "0.5183589", "0.5176269", "0.51750535", "0.5173051", "0.5169121", "0.5165398", "0.5165393", "0.51515275", "0.5151099", "0.51485604", "0.5143565", "0.5140709", "0.51367027", "0.51307416", "0.5130028", "0.51294726", "0.512669", "0.5109317", "0.5108401", "0.5108018", "0.51070976", "0.5106713", "0.5105633", "0.5105062", "0.5104948", "0.5102988", "0.5099157", "0.50984854", "0.509775", "0.50967664", "0.5095253", "0.5095065", "0.50928605" ]
0.71751976
0
Gets the current operating mode of the PCM $
public boolean getClosedLoopControl() { return CompressorJNI.getClosedLoopControl(m_pcm); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getOperatingMode();", "public String getMode()\n {\n return mode.toString();\n }", "public IoMode getMode() {\r\n\t\treturn this.mode;\r\n\t}", "public short getMode() {\n\t\treturn mMode;\n\t}", "public int getAudioMode() {\n AudioManager audio = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE);\n return audio.getMode(); //MODE_NORMAL, MODE_RINGTONE, MODE_IN_CALL, MODE_IN_COMMUNICATION\n }", "public int getMode() {\n\t\treturn currentMode;\n\t}", "java.lang.String getMode();", "public int getMode() {\n\t\treturn this.mode;\n\t}", "public String getMode() {\n if (_avTable.get(ATTR_MODE) == null\n || _avTable.get(ATTR_MODE).equals(\"\")) {\n _avTable.noNotifySet(ATTR_MODE, \"ssb\", 0);\n }\n\n return _avTable.get(ATTR_MODE);\n }", "public int getMode() {\n return this.mode;\n }", "public String getMode() {\n return mode;\n }", "public String getMode() {\n return mode;\n }", "public String getMode()\n {\n return mode;\n }", "int getACMode();", "public final Modes getMode() {\n return mode;\n }", "public String getMode() {\n\t\treturn (String) getStateHelper().eval(OutputSourceCodePropertyKeys.mode, null);\n\t}", "public int getMode() {\n return mode;\n }", "public String getMode() {\n\n return mode;\n\n }", "public String getMode(){\r\n\t\treturn mode;\r\n\t}", "public Mode getMode();", "public final EnumModesBase getMode() {\r\n\t\treturn this.mode;\r\n\t}", "public Mode getMode() {\n return mode;\n }", "@Override\n\tpublic String getMode() {\n\t\treturn this.mode;\n\t}", "public abstract int getMode();", "String getOperatingModeName();", "public String getWmode() {\n\t\tif (null != this.wmode) {\n\t\t\treturn this.wmode;\n\t\t}\n\t\tValueExpression _ve = getValueExpression(\"wmode\");\n\t\tif (_ve != null) {\n\t\t\treturn (String) _ve.getValue(getFacesContext().getELContext());\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "public int value() { return mode; }", "public static String getMode() {\n\t\treturn \"rs232 mode get\" + delimiter + \"rs232 mode get \";\n\t}", "public boolean getMode() {\n\t\t\treturn this.mode;\n\t\t}", "public int getMode()\r\n {\r\n Bundle b = getArguments();\r\n return b.getInt(PARAM_MODE);\r\n }", "public OutputMode getOutputMode() {\n\t\treturn this.recordingProperties.outputMode();\n\t}", "public Mode getMode() {\n\t\tPointer mode_ptr = binding_tv.get_type_mode(ptr);\n\t\tif (mode_ptr == null)\n\t\t\treturn null;\n\t\treturn new Mode(mode_ptr);\n\t}", "public char getGameMode() {\n return gameMode;\n }", "public int getModeValue(){\r\n\t\treturn modeValue;\r\n\t}", "private static String mode() {\n return System.getProperty(SYSTEM_PROPERTY_NAME, System.getenv(ENV_VARIABLE_NAME));\n }", "public int getScreenModeValue() {\n return screenMode_;\n }", "public int getScreenModeValue() {\n return screenMode_;\n }", "public Integer getSpeechmode() {\n return speechmode;\n }", "public String getProgramModeAsString() {\n return getProgramMode().name();\n }", "public java.lang.String getMode() {\n java.lang.Object ref = mode_;\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 mode_ = s;\n }\n return s;\n }\n }", "public int getMode()\r\n { \r\n return this.mode; // used at the beginning to check if the game has started yet\r\n }", "public String getModeName() {\n return modeName;\n }", "public String getCompMode ()\n {\n return compMode;\n }", "public ProgramMode getProgramMode() {\n return _programMode;\n }", "public InteractMode getCurrentMode() {\r\n\t\treturn currentMode;\r\n\t}", "public UI_MODE mode() { \n if (filter_rbmi.isSelected()) return UI_MODE.FILTER;\n else if (edgelens_rbmi.isSelected()) return UI_MODE.EDGELENS;\n else if (timeline_rbmi.isSelected()) return UI_MODE.TIMELINE;\n else return UI_MODE.EDIT;\n }", "public int getResourceMode()\r\n {\r\n return getSemanticObject().getIntProperty(swb_resourceMode);\r\n }", "public com.google.protobuf.ByteString\n getModeBytes() {\n java.lang.Object ref = mode_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n mode_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getModeBytes() {\n java.lang.Object ref = mode_;\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 mode_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public java.lang.String getMode() {\n java.lang.Object ref = mode_;\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 mode_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "com.google.protobuf.ByteString\n getModeBytes();", "public CamMode getCamMode() {\n NetworkTableEntry camMode = m_table.getEntry(\"camMode\");\n double cam = camMode.getDouble(0.0);\n CamMode mode = CamMode.getByValue(cam);\n return mode;\n }", "public final long get_mode_timestamp () {\n\t\treturn mode_timestamp;\n\t}", "public boolean isMode() {\n return mode;\n }", "String getMiscModesString();", "public String getGameMode() {\n return gameMode;\n }", "public DistributionModeInternal getMode() {\n return this.mode;\n }", "@Override\n public int getMC() {\n return this.modeCount;\n }", "public int getMotionMode() {\n\t\treturn m_motionMode;\n\t}", "public byte GetInputPolarity () throws IOException {\n return mDevice.readRegByte(IPOL);\n }", "public String getBitstreamMode() {\n return this.bitstreamMode;\n }", "public int evalMode() {\n return this.uidState.evalMode(this.op, this.mode);\n }", "public abstract int getBufferMode();", "private String getMode(Resource renderletDef) {\n\t\tIterator<Triple> renderletModeIter = configGraph.filter(\n\t\t\t\t(NonLiteral) renderletDef, TYPERENDERING.renderingMode, null);\n\t\tif (renderletModeIter.hasNext()) {\n\t\t\tTypedLiteral renderletMode = (TypedLiteral) renderletModeIter.next().getObject();\n\t\t\treturn LiteralFactory.getInstance().createObject(String.class,\n\t\t\t\t\trenderletMode);\n\t\t}\n\t\treturn null;\n\t}", "public int switch_modes() {\r\n //when angle modes is selected power field is disabled\r\n if(angle_radio.isArmed()){\r\n power_combo.setDisable(true);\r\n power_combo.setOpacity(.5);\r\n }\r\n //Power Field is necessary for Powers mode\r\n else if(power_radio.isArmed()){\r\n power_combo.setDisable(false);\r\n power_combo.setOpacity(1);\r\n }\r\n //when Angle sum mode is selected power field is disabled\r\n else if(sum_radio.isArmed()){\r\n power_combo.setDisable(true);\r\n power_combo.setOpacity(.5);\r\n }\r\n //Returning values to switch whole Program's mode based on Radio buttons\r\n if(angle_radio.isSelected()) return -1;\r\n else if(power_radio.isSelected()) return -2;\r\n else if(sum_radio.isSelected()) return -3;\r\n return 0;\r\n }", "String operatingSystem();", "public Map<String, ArrayList<Integer>> modes() {\n return this.modes;\n }", "int getChargerCurrentRaw();", "@Override\r\n\tpublic String getModeName()\r\n\t{\r\n\t\treturn MODE_NAME;\r\n\t}", "public Integer getModeId() {\n return modeId;\n }", "public int getFlightMode();", "public String getPlayMode()\n {\n return playMode;\n }", "public static int mode()\r\n\t{\r\n\t\tint mode;\r\n\t\tdo {\r\n\t\t\tSystem.out.println(\"Veuillez entrer 1 pour allez en mode Joueur1 contre Joueur2\");\r\n\t\t\tSystem.out.println(\"Veuillez entrer 2 pour aller en mode Joueur1 contre IA\");\r\n\t\t\tSystem.out.println(\"Veuillez entrer 3 pour allez en mode spectateur d'une partie IA contre IA\");\r\n\t\t\tmode = Saisie.litentier();\r\n\t\t} while (mode > 4);\r\n\t\treturn mode;\r\n\t}", "public String getBandMode() {\n return _avTable.get(ATTR_BAND_MODE);\n }", "public DisplayMode[] getCompatibleDisplayModes(){\n return vc.getDisplayModes();\n }", "public abstract OpenMode getMode() throws MessagingException;", "public T mode();", "public int getSourceMode() {\n return _mode;\n }", "public LedMode getLEDMode() {\n NetworkTableEntry ledMode = m_table.getEntry(\"ledMode\");\n double led = ledMode.getDouble(0.0);\n LedMode mode = LedMode.getByValue(led);\n return mode;\n }", "String getACModeName();", "String getSwstatus();", "private VideoMode getVideoMode( ){\n\t\t \n\n\t\t\n\t\tif (!this.device.isFile() )\n//\t\t\treturn stream.getSensorInfo().getSupportedVideoModes().get(0);\n//\t\telse\n\t\t\treturn stream.getSensorInfo().getSupportedVideoModes().get(5);\n\t\treturn null;\n\t}", "public short getDeviceType() {\r\n return deviceType;\r\n }", "ITargetMode getCurrentTargetMode();", "public String getPollMode() {\n return getXproperty(BwXproperty.pollMode);\n }", "public static native int legacy2aidl_audio_encapsulation_mode_t_AudioEncapsulationMode(\n int /*audio_encapsulation_mode_t*/ legacy);", "public int mo5971h() {\n return getSharedPreferences(\"setNightModeChangeVolumeValue\", 0).getInt(\"vol\", 0);\n }", "public PropertyMode getMode() {\n\t\treturn mode;\n\t}", "public SampleMode getSampleMode();", "public int getAudioPort();", "public int getRingtoneMode() {\n return mAudioManager.getRingerMode();\n }", "public static final native int getChargingCurrent();", "public OS os () {\n return _os;\n }", "public java.lang.String getModeOfConveyance () {\n\t\treturn modeOfConveyance;\n\t}", "public java.lang.String getModele() {\n return modele;\n }", "public TriggerType getMode() {\n return mode;\n }", "public static String getDeviceType(Context c) {\r\n\t\tUiModeManager uiModeManager = (UiModeManager) c.getSystemService(Context.UI_MODE_SERVICE);\r\n\t\tint modeType = uiModeManager.getCurrentModeType();\r\n\t\tswitch (modeType){\r\n\t\t\tcase Configuration.UI_MODE_TYPE_TELEVISION:\r\n\t\t\t\treturn \"TELEVISION\";\r\n\t\t\tcase Configuration.UI_MODE_TYPE_WATCH:\r\n\t\t\t\treturn \"WATCH\";\r\n\t\t\tcase Configuration.UI_MODE_TYPE_NORMAL:\r\n\t\t\t\tString type = isTablet(c) ? \"TABLET\" : \"PHONE\";\r\n\t\t\t\treturn type;\r\n\t\t\tcase Configuration.UI_MODE_TYPE_UNDEFINED:\r\n\t\t\t\treturn \"UNKOWN\";\r\n\t\t\tdefault:\r\n\t\t\t\treturn \"\";\r\n\t\t}\r\n\t}", "private SpeechRecognitionMode getMode() {\n\n return SpeechRecognitionMode.LongDictation;\n }", "public java.lang.Integer getOS() {\n\t\t return OS;\n\t }", "public int getOSFlags() {\n return osFlags;\n }", "@JsonProperty(\"mode\")\n public String getMode() {\n return mode;\n }" ]
[ "0.78431934", "0.7202916", "0.71847385", "0.7181503", "0.71189755", "0.71087176", "0.71008885", "0.70405763", "0.6999831", "0.6965857", "0.69567025", "0.69567025", "0.6942223", "0.68931526", "0.68929994", "0.689029", "0.6873074", "0.6831941", "0.679963", "0.67854583", "0.67774165", "0.6747241", "0.6743379", "0.66917986", "0.6678242", "0.6644582", "0.66297424", "0.6594922", "0.65900433", "0.65797335", "0.6574354", "0.6524405", "0.6484321", "0.64542276", "0.64223176", "0.6414577", "0.63742834", "0.63435227", "0.6333616", "0.63069797", "0.62745243", "0.62640935", "0.62325084", "0.62319845", "0.62307185", "0.6189858", "0.61889595", "0.6173446", "0.6171526", "0.61705786", "0.61622655", "0.6143853", "0.60927063", "0.6085904", "0.6082367", "0.60642004", "0.60623264", "0.60554457", "0.6030143", "0.6023606", "0.60193074", "0.60122347", "0.5993181", "0.5992196", "0.5984447", "0.59793764", "0.59780276", "0.5964739", "0.5958209", "0.59408563", "0.5920345", "0.589956", "0.58735687", "0.5860862", "0.585746", "0.5854421", "0.58525", "0.58303106", "0.5823894", "0.5806904", "0.5799238", "0.57847965", "0.57815945", "0.5775219", "0.57712895", "0.57483643", "0.5742832", "0.57427365", "0.5739156", "0.57304424", "0.5724487", "0.57197106", "0.57124007", "0.5707153", "0.57030904", "0.56879556", "0.56858367", "0.5682963", "0.5657004", "0.5644705", "0.5634024" ]
0.0
-1
Clear ALL sticky faults inside PCM that Compressor is wired to. If a sticky fault is set, then it will be persistently cleared. Compressor drive maybe momentarily disable while flags are being cleared. Care should be taken to not call this too frequently, otherwise normal compressor functionality may be prevented. If no sticky faults are set then this call will have no effect.
public void clearAllPCMStickyFaults() { CompressorJNI.clearAllPCMStickyFaults(m_pcm); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public HardwarePneumaticsControlModule clearStickyFaults() {\n pcm.clearAllPCMStickyFaults();\n return this;\n }", "public void clearForces() {\n rBody.clearForces();\n }", "public native void clear();", "private void clearResetCache() {\n for(IoBuffer buf : resetCache) {\n buf.free();\n }\n resetCache = null;\n }", "public void clean() {\n\t\tbufferSize = 0;\n\t\tbuffer = new Object[Consts.N_ELEMENTS_FACTORY];\n\t}", "public final void resetAll() {\r\n this._queue = null;\r\n this._delayed = null;\r\n }", "private void resetFlags(){\n\t\tint count = 0;\n\t\tif (partOfAPairedAlignment) count += Math.pow(2, 0);\n\t\tif (aProperPairedAlignment) count += Math.pow(2, 1);\n\t\tif (unmapped) count += Math.pow(2, 2);\n\t\tif (mateUnMapped) count += Math.pow(2, 3);\n\t\tif (reverseStrand) count += Math.pow(2, 4);\n\t\tif (mateReverseStrand) count += Math.pow(2, 5);\n\t\tif (firstPair) count += Math.pow(2, 6);\n\t\tif (secondPair) count += Math.pow(2, 7);\n\t\tif (notAPrimaryAlignment) count += Math.pow(2, 8);\n\t\tif (failedQC) count += Math.pow(2, 9);\n\t\tif (aDuplicate) count += Math.pow(2, 10);\n\t\tflags = (short) count;\n\t\tflagResetNeeded = false;\n\t\t\n\t}", "public void clearAll(boolean clearContext, TaskMonitor monitor);", "public void clearAll();", "public void clearAll();", "public void clearInterrupt() {\n Object object = this.msgSync;\n synchronized (object) {\n this.msg = 0;\n }\n }", "private void clearBuffer() {\n\t\tfor (int i = 0; i < buffer.length; i++) {\n\t\t\tbuffer[i] = 0x0;\n\t\t}\n\t}", "public void clear() {\n payload = null;\n // Leave termBuffer to allow re-use\n termLength = 0;\n termText = null;\n positionIncrement = 1;\n flags = 0;\n // startOffset = endOffset = 0;\n // type = DEFAULT_TYPE;\n }", "protected void reset()\n {\n this.shapeDataCache.removeAllEntries();\n this.sector = null;\n }", "private void resetMarked() {\n if(!data.isEmpty()) {\n data.getFirst().reset();\n }\n for(IoBuffer buf : resetCache) {\n buf.reset();\n data.addFirst(buf);\n }\n resetCache.clear();\n }", "public void clear() throws DeviceException;", "public void clear() {\n\t\tthis.sizeinbits = 0;\n\t\tthis.actualsizeinwords = 1;\n\t\tthis.rlw.position = 0;\n\t\t// buffer is not fully cleared but any new set operations should\n\t\t// overwrite stale data\n\t\tthis.buffer[0] = 0;\n\t}", "public void reset()\n {\n a = 0x0123456789ABCDEFL;\n b = 0xFEDCBA9876543210L;\n c = 0xF096A5B4C3B2E187L;\n\n xOff = 0;\n for (int i = 0; i != x.length; i++)\n {\n x[i] = 0;\n }\n\n bOff = 0;\n for (int i = 0; i != buf.length; i++)\n {\n buf[i] = 0;\n }\n\n byteCount = 0;\n }", "public void clear() throws RemoteException, Error;", "public void invalidateAll() {\n synchronized (this) {\n long l10;\n this.H = l10 = 512L;\n }\n this.requestRebind();\n }", "protected void cleanup() {\n this.dead = true;\n this.overflow = null;\n this.headerBuffer = null;\n this.expectBuffer = null;\n this.expectHandler = null;\n this.unfragmentedBufferPool = null;\n this.fragmentedBufferPool = null;\n this.state = null;\n this.currentMessage = null;\n \n /*\n this.onerror = null;\n this.ontext = null;\n this.onbinary = null;\n this.onclose = null;\n this.onping = null;\n this.onpong = null;*/\n}", "public void reset(){\n this.context.msr.setReadyForInput(false);\n emptyAllInputBuffers();\n emptyAllOutputBuffers();\n emptyEngineersConsoleBuffer();\n }", "private void clearAll(byte value) {\n for (int i = 0; i < size; i++) {\n data[i] = (byte) (value & 0xff);\n }\n }", "public void reset()\n {\n \tthis.heapFiles.clear();\n }", "public void reset () {\n\t\topen();\n\t\ttry {\n\t\t\tcontainer.setLength(0);\n\t\t\treservedBitMap.setLength(0);\n\t\t\tupdatedBitMap.setLength(0);\n\t\t\tfreeList.setLength(0);\n\t\t\tsize = 0;\n\t\t}\n\t\tcatch (IOException ie) {\n\t\t\tthrow new WrappingRuntimeException(ie);\n\t\t}\n\t}", "public void clearOverflow() {\n\t\toverflow = false;\n\t\t\n\t}", "public synchronized void reset() {\n java.util.Arrays.fill(buffer, (byte) 0);\n writeHead = 0;\n cumulativeWritten = 0;\n synchronized (allReaders) {\n for (Reader reader : allReaders) {\n reader.reset();\n }\n }\n }", "void clearAll();", "void clearAll();", "public void reset()\n {\n current = 0;\n highWaterMark = 0;\n lowWaterMark = 0;\n super.reset();\n }", "public void clearFlag( KerberosFlag flag )\n {\n value &= ~( 1 << ( MAX_SIZE - 1 - flag.getOrdinal() ) );\n }", "private void doClear( )\n {\n occupied = 0;\n for( int i = 0; i < array.length; i++ )\n array[ i ] = null;\n }", "public void clear() throws Exception;", "public void clear() {\n\t\tbufferLast = 0;\n\t\tbufferIndex = 0;\n\t}", "public synchronized void clear()\n {\n clear(false);\n }", "public void clear() {\n\t\tfor (int x = 0; x < counters.length; x++) {\n\t\t\tcounters[x] = 0;\n\t\t\tArrays.fill(counters, (byte)0);\n\t\t}\n\t}", "protected void reset()\n {\n if (_resetTimedEvent != null && !_resetTimedEvent.hasAborted()\n && !_resetTimedEvent.hasFired()) _resetTimedEvent.abort();\n\n clearFlag();\n }", "public final synchronized void mo27313a() {\n this.f10289c.clear();\n this.f10287a.edit().clear().commit();\n }", "public final void clear()\n {\n\t\tcmr_queue_.removeAllElements();\n buffer_size_ = 0;\n }", "void fullReset();", "public void clearBytes() {\n this.f12193a = 0;\n this.f12194b = 0;\n this.f12195c = 0;\n this.f12196d.clear();\n this.f12197e.mo42967b();\n this.f12198f.clear();\n mo42980c();\n }", "public synchronized void reset() {\n\t\tlisteners.clear();\n\t\tbuffer.clear();\n\t\ttrash.clear();\n\n\t\ttickCount = 1;\n\n\t\tif (log.isInfoEnabled()) {\n\t\t\tlog.info(\"Clock reset\");\n\t\t}\n\t}", "public void clear()\n\t{\n\t\t_totalMsgsPerSec = 0;\n\t\t_latencyMsgsPerSec = 0;\n\t\t_ticksPerSec = 0;\n\t\t_arrayCount = 0;\n\t}", "private void reset()\r\n {\r\n log.info(\"{0}: Resetting cache\", logCacheName);\r\n\r\n try\r\n {\r\n storageLock.writeLock().lock();\r\n\r\n if (dataFile != null)\r\n {\r\n dataFile.close();\r\n }\r\n\r\n final File dataFileTemp = new File(rafDir, fileName + \".data\");\r\n Files.delete(dataFileTemp.toPath());\r\n\r\n if (keyFile != null)\r\n {\r\n keyFile.close();\r\n }\r\n final File keyFileTemp = new File(rafDir, fileName + \".key\");\r\n Files.delete(keyFileTemp.toPath());\r\n\r\n dataFile = new IndexedDisk(dataFileTemp, getElementSerializer());\r\n keyFile = new IndexedDisk(keyFileTemp, getElementSerializer());\r\n\r\n this.recycle.clear();\r\n this.keyHash.clear();\r\n }\r\n catch (final IOException e)\r\n {\r\n log.error(\"{0}: Failure resetting state\", logCacheName, e);\r\n }\r\n finally\r\n {\r\n storageLock.writeLock().unlock();\r\n }\r\n }", "public void mo37873b() {\n C13262e.this.f34200n.onReset(this.f34229f, this.f34230g);\n synchronized (C13262e.this) {\n C13262e.this.f34210x.remove(Integer.valueOf(this.f34229f));\n }\n }", "public void clear() {\n synchronized (unchecked) {\n unchecked.clear();\n }\n }", "public void reset() {\n this.inhibited = false;\n this.forced = false;\n }", "public void reset() {\r\n bop.reset();\r\n gzipOp = null;\r\n }", "public Builder clearFenced() {\n bitField0_ = (bitField0_ & ~0x00000002);\n fenced_ = false;\n onChanged();\n return this;\n }", "private void resetArraysAndHeader()\r\n\t{\r\n\t\tmainHeader = \"\";\r\n\t\tenergyVals = \"\";\r\n\t\ttoBeOutputBranches.clear();\r\n\t\tassociatedR.clear();\r\n\t\tassociatedP.clear();\r\n\t\tassociatedQ.clear();\r\n\t\ttriangularP.clear();\r\n\t\ttriangularQ.clear();\r\n\t\ttriangularR.clear();\r\n\t\tinputBranchWithJ.clear();\r\n\t\tupperEnergyValuesWithJ.clear();\r\n\r\n\t\tif (energiesForCurrentKOppParity != null)\r\n\t\t\tenergiesForCurrentKOppParity.clear();\r\n\t}", "private void reset() {\n\t\tmVelocityTracker.clear();\n\t\tmSwiping = false;\n\t\tmAbleToSwipe = false;\n\t}", "protected abstract void clearAll();", "@Override\n public void reset() {\n cancelAll();\n }", "@Override\r\n\tpublic void clearAll() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void clearAll() {\n\t\t\r\n\t}", "@Override\n\tpublic void clearAll() {\n\t\t\n\t}", "public final void clear() {\n clear(true);\n }", "public void clearBuffer(){\n System.out.println(\"Clearning beffer\");\n //Deletes the buffer file\n File bufferFile = new File(\"data/buffer.ser\");\n bufferFile.delete();\n }", "public void resetAll() {\n triggered = false;\n classBlacklist.clear();\n policies.clear();\n protectedFiles.clear();\n System.setSecurityManager(defaultSecurityManager);\n }", "public void cleanup() {\n sendBuffer(baos);\n shutdown();\n }", "private void resetBuffer() {\n baos.reset();\n }", "public void reset() {\n bb.clear();\n cb.clear();\n found = false;\n }", "public native void clearReferent();", "protected void reset() {\r\n super.reset();\r\n this.ring = null;\r\n }", "@SuppressWarnings( \"unused\" )\n private void clear() {\n frameOpenDetected = false;\n frameLength = 0;\n buffer.limit( 0 ); // this marks our buffer as empty...\n }", "public void reset() {\n counters = null;\n counterMap = null;\n counterValueMap = null;\n }", "void smem_clear_result(IdentifierImpl state)\n {\n final SemanticMemoryStateInfo smem_info = smem_info(state);\n while(!smem_info.smem_wmes.isEmpty())\n {\n final Preference pref = smem_info.smem_wmes.remove(); // top()/pop()\n \n if(pref.isInTempMemory())\n {\n recMem.remove_preference_from_tm(pref);\n }\n }\n }", "public void reset()\r\n {\n if_list.removeAllElements();\r\n ls_db.reset();\r\n spf_root = null;\r\n vertex_list.removeAllElements();\r\n router_lsa_self = null;\r\n floodLastTime = Double.NaN;\r\n delayFlood = false;\r\n spf_calculation = 0;\r\n lsa_refresh_timer = null;\r\n }", "public void clear(){\n this.clearing = true;\n }", "public void clear()\r\n/* 416: */ {\r\n/* 417:580 */ this.headers.clear();\r\n/* 418: */ }", "private void reset() {\n if (this.dead) return;\n /*this.state = {\n activeFragmentedOperation: null,\n lastFragment: false,\n masked: false,\n opcode: 0,\n fragmentedOperation: false\n };*/\n this.state = new State(-1, false, false, 0, false);\n this.fragmentedBufferPool.reset(true);\n this.unfragmentedBufferPool.reset(true);\n this.expectOffset = 0;\n this.expectBuffer = null;\n this.expectHandler = null;\n this.overflow = new LinkedList<ByteBuffer>();///[];\n this.currentMessage = new LinkedList<Object>();///[];\n}", "@Override\n public void clear() {\n lock.lock();\n try {\n runtime.clear();\n } finally {\n lock.unlock();\n }\n }", "public static native void Reset(long lpjFbxStatistics);", "public baconhep.TTau.Builder clearRawMuonRejection() {\n fieldSetFlags()[11] = false;\n return this;\n }", "public void resetDiagnostics() {\n this.diagnostics.clear();\n this.hasErrors = false;\n }", "public final void reset() {\n\n // Reset the output buffer\n out.reset();\n\n a=0x8000;\n c=0;\n b=0;\n if(b==0xFF)\n cT=13;\n else\n cT=12;\n resetCtxts();\n nrOfWrittenBytes = -1;\n delFF = false;\n\n nSaved = 0;\n }", "int clear();", "public final synchronized void reset() {\r\n\t\tunblocked = false;\r\n\t\tcancelled = null;\r\n\t\terror = null;\r\n\t\tlistenersInline = null;\r\n\t}", "private void clearRefuse() {\n \n refuse_ = false;\n }", "public void clear(){\n\t\tclear(0);\n\t}", "public void clear() {\r\n // synchronization is not a problem here\r\n // if this code were to be called while someone was getting or setting data\r\n // in the buckets, it would still work\r\n // in the case of someone setting a value in the buckets, then this coming along\r\n // and resetting the buckets-entry to null is fine, because the client still has the data reference\r\n // in the case of someone getting a value from the buckets while this is being reset\r\n // is fine as well because, if they get the data before it's set, they got it\r\n // if they as for it after it gets set to null, that's fine as well it's null and\r\n // that's a normal expected condition\r\n for (int i = 0, tot = buckets.length; i < tot; i++) {\r\n buckets[i] = new AtomicReference<CacheData<K, V>>(null);\r\n }\r\n }", "public void resetCounters()\n {\n cacheHits = 0;\n cacheMisses = 0;\n }", "public void resetCarry() {\n\t\tset((byte) (get() & ~(1 << 4)));\n\t}", "private void resetFlanker() {\n\n for (int i = 0; i < width; i++) {\n frontLinePatientCounters[i] = 0;\n flankersCount[i] = 0;\n flankerOffsets[i].clear();\n }\n leftFlankerIndices = MathUtils.getHexagonalIndicesRingAtOffset(0);\n rightFlankerIndices = MathUtils.getHexagonalIndicesRingAtOffset(0);\n }", "public void reset() {\n setPrimaryDirection(-1);\n setSecondaryDirection(-1);\n flags.reset();\n setResetMovementQueue(false);\n setNeedsPlacement(false);\n }", "void clearHandlers();", "public void clear() {\n this.atoms.clear();\n this.bonds.clear();\n this.finished = false;\n }", "public void clearFlag( KerberosFlag flag )\n {\n value &= ~( 1 << flag.getOrdinal() );\n clearBit( flag.getOrdinal() );\n }", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();", "public void clear();" ]
[ "0.7145654", "0.5484944", "0.5422286", "0.5421864", "0.5373896", "0.53620833", "0.5351066", "0.5350885", "0.5344269", "0.5344269", "0.53347087", "0.5317269", "0.53132766", "0.5313188", "0.53128326", "0.53048724", "0.5302681", "0.528996", "0.5287852", "0.5257865", "0.52473336", "0.52434635", "0.52378786", "0.5237603", "0.5237308", "0.52262664", "0.5218162", "0.52148426", "0.52148426", "0.5212431", "0.5202292", "0.52010876", "0.520093", "0.5189855", "0.5188452", "0.5187545", "0.5149299", "0.51371", "0.5133078", "0.51249313", "0.51249015", "0.5122388", "0.51081336", "0.5105314", "0.5103188", "0.50984615", "0.5097425", "0.5097153", "0.5080093", "0.50774574", "0.5060967", "0.50571895", "0.5050239", "0.50450855", "0.50450855", "0.50434035", "0.5033926", "0.503256", "0.5025289", "0.5021084", "0.50151265", "0.5014366", "0.5013294", "0.5012862", "0.50042313", "0.4999914", "0.49982065", "0.49831527", "0.49716085", "0.49691394", "0.49686956", "0.49645734", "0.4961981", "0.4955634", "0.4954597", "0.49537483", "0.49535578", "0.49509218", "0.49506617", "0.49490306", "0.49447855", "0.49416775", "0.49399063", "0.4935272", "0.49335137", "0.49331638", "0.49276024", "0.49231315", "0.4921608", "0.4921608", "0.4921608", "0.4921608", "0.4921608", "0.4921608", "0.4921608", "0.4921608", "0.4921608", "0.4921608", "0.4921608", "0.4921608" ]
0.7880682
0
/ compiled from: set_notify_me_
public interface FeedDbRequest { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void onHisNotify();", "@Override\r\n public void notify(Object arg) {\n }", "protected void notifyUser()\n {\n }", "void notify(Message m);", "private void notifyStakeholder(){\n }", "private void notifyAutomatically(){\n System.out.println(\"Notificando automaticamente...\");\n }", "public void notify1();", "void notifyUnexpected();", "public abstract Object notify(NotifyDescriptor descriptor);", "private void sendNotification() {\n }", "public void setNotify(long notify) {\n\t\tthis.notify = notify;\n\t}", "@Override\n public void notify(Object event){\n }", "protected void notify(Employee e) {\n\t}", "void notify(IUISemanticEvent event);", "public void notifyKi(){\n this.kiPlugin.gamerFoundASet();\n }", "public void notifyChangementJoueurs();", "void simpleNotify(SimpleAlarmMessage message);", "public void notifyObservers() {}", "private void showNotification() {\n\n }", "private void showNotification() {\n }", "void notifyAllAboutChange();", "public void doNotify(){\n\t\tsynchronized(m){\n\t\t\tm.notifyAll();\n\t\t}\n\t}", "@Override\r\n\tpublic void notifyObservers() {\n\t\t\r\n\t}", "public interface Notify\n\t{\n\t\t/**\n\t\t * Notifies of mailbox status change.\n\t\t * @param mb the mailbox whose status has changed.\n\t\t * @param state the state object passed in the register\n\t\t * method.\n\t\t * @param closed true if the mailbox timeout has expired and\n\t\t * the mailbox is now closed to delivery, false if a message\n\t\t * has arrived.\n\t\t */\n\t\tpublic void mailboxStatus( Mailbox mb, Object state, boolean closed );\n\t}", "void notify(PushMessage m);", "private void setNotification() {\n mBuilder.setProgress(updateMax, ++updateProgress, false)\n .setContentTitle(getResources().getString(R.string.notification_message));\n // Issues the notification\n nm.notify(0, mBuilder.build());\n }", "public void notifyNew(String publicID) {\n }", "public void setAlwaysNotify( boolean onoff )\n {\n this.always_notify = onoff;\n }", "public void notifyUpdate(String publicID) {\n }", "@Override\n\tpublic void NotifyObserver() {\n\n\t}", "void notifyObserver();", "public void notifyJoueurActif();", "void notifyObservers();", "void notifyObservers();", "public void notify(Node node);", "public void notifyObservers();", "public void notifyObservers();", "public void notifyObservers();", "public void test_setNotifying() throws Exception {\n\t\tinit(null) ;\n\t\trepo = factory.getRepository(factory.getConfig()) ;\n\t\t((RepositoryWrapper) repo).setDelegate(notifier) ;\n\t\trepo.initialize() ;\n\t\tfunctionalTest() ;\n\t}", "@Override\n\tpublic void notifyUser(List<PlaceIt> clean, String string) {\n\t\t\n\t}", "private static void notify(String fully_qualified_classname) {\n // notify the observers\n Iterator i = observers.iterator();\n while (i.hasNext()) {\n VerifierFactoryObserver vfo = (VerifierFactoryObserver) i.next();\n vfo.update(fully_qualified_classname);\n }\n }", "protected void notifyObservers() {\n os.notify(this, null);\n }", "boolean notify(int event, Point point, Object value);", "@Override\r\n\tpublic void sendGeneralNotification() {\n\t\t\r\n\t}", "static final void notify(Object obj, boolean all)\n {\n if (notify0(obj, all ? 1 : 0) < 0)\n throw new IllegalMonitorStateException();\n }", "static void NotifyCorrespondingObservers() {}", "public interface Notifier {\n\tpublic void notify(String message);\n}", "void notify(HorseFeverEvent e);", "@Override\r\n\tpublic void sendNotifications() {\n\r\n\t}", "boolean notifyBegin();", "public void notifyStartup();", "void enableNotifications();", "void notifyStart();", "public void notifyConfigChange() {\n }", "void notifyMessage(Task task);", "public void signalTheWaiter();", "public synchronized void tellAt(){\n\t\tnotifyAll();\n\t}", "public void notifyUserInfo(String userInfo);", "void notifyPending(MessageSnapshot snapshot);", "private void note(Notification n){\r\n\t\tusers.get(n.userID).addNotification(n);\r\n\t\tif (loggedInUsers.contains(n.userID))\r\n\t\t\tcomms.sendMessage(n);\r\n\t}", "@Override\n public void setNotification() {\n if (getTense() == Tense.FUTURE) {\n //Context ctx = SHiTApplication.getContext();\n //SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(ctx);\n\n int leadTimeEventMinutes = SHiTApplication.getPreferenceInt(Constants.Setting.ALERT_LEAD_TIME_EVENT, LEAD_TIME_MISSING);\n\n if (leadTimeEventMinutes != LEAD_TIME_MISSING) {\n if (travelTime > 0) {\n leadTimeEventMinutes += travelTime;\n }\n\n setNotification(Constants.Setting.ALERT_LEAD_TIME_EVENT\n , leadTimeEventMinutes\n , R.string.alert_msg_event\n , getNotificationClickAction()\n , null);\n }\n }\n }", "public void notify(T message, V v){\n for(BiObserver<T,V> biObserver : biObserverList){\n biObserver.update(message, v);\n }\n }", "void notifyStatus(String strStatus)\n \t{\n \tSharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);\n \tboolean bNotify = prefs.getBoolean(\"notify_status\", true);\n \t\n \tif (bNotify)\n \t{\n \t \tNotification notification = new Notification(\n \t \t\t\tR.drawable.icon, strStatus, System.currentTimeMillis());\n \t \tPendingIntent contentIntent = PendingIntent.getActivity(\n \t \t\t\tthis, 0, new Intent(this, MainActivity.class), 0);\n \t \tnotification.setLatestEventInfo(\n \t \t\t\tthis, getText(R.string.app_name), strStatus, contentIntent);\n \t \tmNM.notify(R.string.app_name, notification);\n \t}\n \n \t}", "public static void enableRegNotifications() {\n\t\t\n\t}", "private void _notifyAction() {\n for (int i = 0; i < _watchers.size(); ++i) {\n OptionWidgetWatcher ow = (OptionWidgetWatcher) _watchers.elementAt(i);\n ow.optionAction(this);\n }\n }", "void templateNotify(TeampleAlarmMessage message);", "public void registerNotify( Notify notify, Object state, int maxDelay );", "private void m145784n() {\n nativeSetUpdateNotification(this.f119482o, this.f119477j.f119584j, this.f119477j.f119585k);\n }", "@Override\n\tpublic void notify(int seg, int start) {\n\n\t}", "private void sendNotifications() {\n this.sendNotifications(null);\n }", "void mo54412a(int i, Notification notification);", "void notify(String data, PushType type);", "@Test\n public void testNotifyObservers() {\n System.out.println(\"notifyObservers\");\n final Information i = null;\n final Notifier instance = new Notifier();\n final ObservingView o = new ObservingViewImpl();\n instance.addObservingView(o);\n instance.notifyObservers(i);\n }", "public void notifyAdapters();", "public void notifyChange(Object obj) {\n\t\t\ttry\n\t\t\t{\n\t\t\t\tsetChanged();\n\t\t\t\tnotifyObservers(obj);\n\t\t\t}\n\t\t\tcatch(Exception e)\n\t\t\t{\n\t\t\t}\n\t\t\t\n\t\t}", "public abstract void notify(JSONObject message);", "public interface Notification {\n /**\n * Method to generate and draw notification message\n * @param task it's task for notification message\n */\n void notifyMessage(Task task);\n}", "public void notifyChanged(final Notification msg) {\r\n\t super.notifyChanged(msg);\r\n\t \r\n\t if(msg.getFeature() == PropertiesPackage.Literals.PROPERTY__VALUE) {\r\n\t \tsetGUIAttributes();\r\n\t }\r\n\t }", "static void sendNotifications() {\n\t\testablishConnection();\n\t\tSystem.out.println(\"sending multiple notificatiosn\");\n\t}", "@Override\n\tpublic void notifySettingChanged() {\n\t}", "public void notifyChangementCroyants();", "public void\t\tnotifyUCallbackListeners();", "public int notify(Mobile m, int eventtype, int ext, Object o) {\n return 0;\n }", "public long getNotify() {\n\t\treturn notify;\n\t}", "private static void setNotification(Context context, String message) {\n NotificationManager nm = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);\n Notification notification = new Notification(R.drawable.icon, message, System.currentTimeMillis());\n\n Intent currentEvent = new Intent(context, CurrentEvent.class);\n PendingIntent target = PendingIntent.getActivity(context, 0, currentEvent, 0);\n String title = context.getString(R.string.reminder_title);\n notification.setLatestEventInfo(context, title, message, target);\n\n // We never want more than one notification, so always use the same ID\n nm.notify(NOTIFICATION_ID, notification);\n }", "void notifyRestart();", "public void notifyEnd() {\n\n\t}", "void OnSignalLost();", "protected void showNotify() {\n try {\n myJump.systemStartThreads();\n } catch (Exception oe) {\n myJump.errorMsg(oe);\n }\n }", "public void notifyChangementTour();", "public void notifyChanged(Notification n){\n\t \n\t super.notifyChanged(n); // the superclass handles adding/removing this Adapter to new Books\n\t \n\t // find out the type of the notifier which could be either 'LanguageDefinition' or 'Library'\n\t Object notifier = n.getNotifier();\n\t if (notifier instanceof ConcurrentLanguageDefinition) {\n\t handleLanguageDefinitionNotification(n);\n\t } else if (notifier instanceof DomainModelProject) {\n\t handleDomainModelProjectNotification(n);\n\t } else if (notifier instanceof XTextEditorProject) {\n\t \thandleXTextProjectNotification(n);\n\t } else if (notifier instanceof SiriusEditorProject) {\n\t \thandleSiriusEditorProjectNotification(n);\n\t } else if (notifier instanceof SiriusAnimatorProject) {\n\t \thandleSiriusAnimatorProjectNotification(n);\n\t } else if (notifier instanceof MoCCProject) {\n\t handleMoCProjectNotification(n);\n\t } else if (notifier instanceof DSAProject) {\n\t handleDSAProjectNotification(n);\n\t } else if (notifier instanceof DSEProject) {\n\t handleDSEProjectNotification(n);\n\t }\n\t \n\t \n\t }", "@Override\r\n\tpublic void Update() {\n\t\tSystem.out.println(name+\",¹Ø±ÕNBA£¬¼ÌÐø¹¤×÷£¡\"+abstractNotify.getAction());\r\n\t}", "public void setNotification(String notif) {\n frame.setNotification(notif);\n }", "private NotifySuspendedCommandControllerPowerState() {\n\n\t}", "void notifyWrite();", "public void notify(String userId);", "public void notifyNotifyPresenceReceived(Friend lf);", "private void notifyUser(Context context, String message) {\n\n Uri soundUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);\n\n Intent intent = new Intent(context, MovieActivity.class);\n PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, intent,\n PendingIntent.FLAG_UPDATE_CURRENT);\n\n NotificationManager manager = (NotificationManager)\n context.getSystemService(Context.NOTIFICATION_SERVICE);\n\n android.support.v4.app.NotificationCompat.Builder builder = new NotificationCompat.Builder(context)\n .setContentTitle(\"device is now \" + message + \".\")\n .setOngoing(true)\n .setVibrate(new long[]{0, 500, 500, 500, 500, 500, 500})\n .setSound(soundUri)\n .setContentIntent(pendingIntent)\n .setSmallIcon(android.R.drawable.sym_def_app_icon)\n .setAutoCancel(true);\n\n manager.notify(1001, builder.build());\n\n }", "public void notifyTopic(String name) throws RemoteException;", "public void ifNotificationOnChecked() {\n\t\tif (notificationOnChecked && bNotification) {\n\t\t\tnotifyMain(\"Autostop:\\n\" + upTime + \" s\", \"Recording...\");\n\t\t} else {\n\t\t\tif (notificationManager != null) {\n\t\t\t\tnotificationManager.cancelAll();\n\t\t\t}\n\t\t}\n\t}", "void notificationReceived(Notification notification);" ]
[ "0.731297", "0.71244586", "0.6950753", "0.6949004", "0.68988895", "0.68934965", "0.6887212", "0.685578", "0.68324", "0.67119557", "0.6662894", "0.6636267", "0.6628722", "0.6611136", "0.6542909", "0.6482596", "0.64540064", "0.6435201", "0.6430523", "0.6420065", "0.641738", "0.64172554", "0.64161694", "0.6413755", "0.6413044", "0.6363007", "0.6324762", "0.63185805", "0.6297977", "0.62720835", "0.62659454", "0.62657046", "0.6249573", "0.6249573", "0.6237556", "0.6230249", "0.6230249", "0.6230249", "0.621464", "0.6196039", "0.6192703", "0.6150771", "0.6137147", "0.6135986", "0.61232585", "0.6110173", "0.61095774", "0.610016", "0.60939544", "0.60672593", "0.6066477", "0.6064823", "0.6064144", "0.60496646", "0.60226035", "0.60187835", "0.6006695", "0.60065854", "0.6001443", "0.59952295", "0.5994119", "0.59912115", "0.5986376", "0.59732974", "0.5963223", "0.5961907", "0.59582925", "0.5951172", "0.5938544", "0.5936527", "0.59323287", "0.5930632", "0.5922017", "0.59098613", "0.5887295", "0.5874802", "0.5857911", "0.58287853", "0.5825726", "0.58254075", "0.582419", "0.5818374", "0.58153313", "0.5814055", "0.5811543", "0.5805276", "0.580515", "0.58029956", "0.5800866", "0.5787257", "0.57869536", "0.5775755", "0.57752657", "0.57700187", "0.57640016", "0.5754901", "0.5736208", "0.57353604", "0.57343626", "0.5733352", "0.5731974" ]
0.0
-1
/ JADX WARNING: inconsistent code. / Code decompiled incorrectly, please refer to instructions dump.
public static void m9105b(com.facebook.api.feedcache.db.FeedDbMutationService r5) { /* L_0x0000: r1 = r5.f5242q; monitor-enter(r1); r0 = r5.f5242q; Catch:{ all -> 0x004d } r0 = r0.isEmpty(); Catch:{ all -> 0x004d } if (r0 == 0) goto L_0x0010; L_0x000b: r0 = 0; r5.f5240o = r0; Catch:{ all -> 0x004d } monitor-exit(r1); Catch:{ all -> 0x004d } return; L_0x0010: r0 = r5.f5242q; Catch:{ all -> 0x004d } r0 = r0.removeFirst(); Catch:{ all -> 0x004d } r0 = (com.facebook.api.feedcache.db.FeedDbMutationService.FeedDbRequest) r0; Catch:{ all -> 0x004d } monitor-exit(r1); Catch:{ all -> 0x004d } r1 = "FeedDbMutationService(%s)"; r2 = r0.getClass(); r2 = r2.getSimpleName(); r3 = -341619410; // 0xffffffffeba34d2e float:-3.9483876E26 double:NaN; com.facebook.tools.dextr.runtime.detour.TracerDetour.a(r1, r2, r3); r1 = -243934633; // 0xfffffffff175da57 float:-1.21740455E30 double:NaN; r1 = com.facebook.tools.dextr.runtime.detour.LoomLoggerDetour.a(r1); r2 = "FeedDbMutationService"; r3 = r0.getClass(); r3 = r3.getSimpleName(); com.facebook.loom.logger.api.LoomLogger.a(r1, r2, r3); r1 = r0 instanceof com.facebook.api.feedcache.db.FeedDbMutationService.FeedDbInsertionRequest; Catch:{ all -> 0x0134 } if (r1 == 0) goto L_0x0050; L_0x0041: r0 = (com.facebook.api.feedcache.db.FeedDbMutationService.FeedDbInsertionRequest) r0; Catch:{ all -> 0x0134 } r5.m9111a(r0); Catch:{ all -> 0x0134 } r0 = 1514815075; // 0x5a4a3e63 float:1.42316351E16 double:7.484180884E-315; com.facebook.tools.dextr.runtime.detour.TracerDetour.a(r0); goto L_0x0000; L_0x004d: r0 = move-exception; monitor-exit(r1); Catch:{ } throw r0; L_0x0050: r1 = r0 instanceof com.facebook.api.feedcache.db.FeedDbMutationService.FeedDbMutationRequest; Catch:{ } if (r1 == 0) goto L_0x0060; L_0x0054: r0 = (com.facebook.api.feedcache.db.FeedDbMutationService.FeedDbMutationRequest) r0; Catch:{ } r5.m9100a(r0); Catch:{ } r0 = 32841027; // 0x1f51d43 float:9.0040775E-38 double:1.6225623E-316; com.facebook.tools.dextr.runtime.detour.TracerDetour.a(r0); goto L_0x0000; L_0x0060: r1 = r0 instanceof com.facebook.api.feedcache.db.FeedDbMutationService.FeedDbStorySeenRequest; Catch:{ } if (r1 == 0) goto L_0x0070; L_0x0064: r0 = (com.facebook.api.feedcache.db.FeedDbMutationService.FeedDbStorySeenRequest) r0; Catch:{ } r5.m9103a(r0); Catch:{ } r0 = -150761083; // 0xfffffffff7039185 float:-2.668525E33 double:NaN; com.facebook.tools.dextr.runtime.detour.TracerDetour.a(r0); goto L_0x0000; L_0x0070: r1 = r0 instanceof com.facebook.api.feedcache.db.FeedDbMutationService.FeedDbImageCacheStateUpdateRequest; Catch:{ } if (r1 == 0) goto L_0x0080; L_0x0074: r0 = (com.facebook.api.feedcache.db.FeedDbMutationService.FeedDbImageCacheStateUpdateRequest) r0; Catch:{ } r5.m9097a(r0); Catch:{ } r0 = -1582673432; // 0xffffffffa1aa51e8 float:-1.1541328E-18 double:NaN; com.facebook.tools.dextr.runtime.detour.TracerDetour.a(r0); goto L_0x0000; L_0x0080: r1 = r0 instanceof com.facebook.api.feedcache.db.FeedDbMutationService.FeedDbSeeFirstClearRequest; Catch:{ } if (r1 == 0) goto L_0x0091; L_0x0084: r0 = (com.facebook.api.feedcache.db.FeedDbMutationService.FeedDbSeeFirstClearRequest) r0; Catch:{ } r5.m9101a(r0); Catch:{ } r0 = -1051379810; // 0xffffffffc155379e float:-13.326078 double:NaN; com.facebook.tools.dextr.runtime.detour.TracerDetour.a(r0); goto L_0x0000; L_0x0091: r1 = r0 instanceof com.facebook.api.feedcache.db.FeedDbMutationService.FeedDbCacheResultRerankRequest; Catch:{ } if (r1 == 0) goto L_0x00a2; L_0x0095: r0 = (com.facebook.api.feedcache.db.FeedDbMutationService.FeedDbCacheResultRerankRequest) r0; Catch:{ } r5.m9094a(r0); Catch:{ } r0 = -521547659; // 0xffffffffe0e9d075 float:-1.3478476E20 double:NaN; com.facebook.tools.dextr.runtime.detour.TracerDetour.a(r0); goto L_0x0000; L_0x00a2: r1 = r0 instanceof com.facebook.api.feedcache.db.FeedDbMutationService.FeedDbCacheRerankRequest; Catch:{ } if (r1 == 0) goto L_0x00b3; L_0x00a6: r0 = (com.facebook.api.feedcache.db.FeedDbMutationService.FeedDbCacheRerankRequest) r0; Catch:{ } r5.m9093a(r0); Catch:{ } r0 = -495910365; // 0xffffffffe2710223 float:-1.1114548E21 double:NaN; com.facebook.tools.dextr.runtime.detour.TracerDetour.a(r0); goto L_0x0000; L_0x00b3: r1 = r0 instanceof com.facebook.api.feedcache.db.FeedDbMutationService.FeedDbStoryImageUrlAddRequest; Catch:{ } if (r1 == 0) goto L_0x00c4; L_0x00b7: r0 = (com.facebook.api.feedcache.db.FeedDbMutationService.FeedDbStoryImageUrlAddRequest) r0; Catch:{ } r5.m9102a(r0); Catch:{ } r0 = 1956524893; // 0x749e335d float:1.0027157E32 double:9.66651735E-315; com.facebook.tools.dextr.runtime.detour.TracerDetour.a(r0); goto L_0x0000; L_0x00c4: r1 = r0 instanceof com.facebook.api.feedcache.db.FeedDbMutationService.FeedDbDeleteStoriesRequest; Catch:{ } if (r1 == 0) goto L_0x00d5; L_0x00c8: r0 = (com.facebook.api.feedcache.db.FeedDbMutationService.FeedDbDeleteStoriesRequest) r0; Catch:{ } r5.m9095a(r0); Catch:{ } r0 = 1671584920; // 0x63a25c98 float:5.990089E21 double:8.25872683E-315; com.facebook.tools.dextr.runtime.detour.TracerDetour.a(r0); goto L_0x0000; L_0x00d5: r1 = r0 instanceof com.facebook.api.feedcache.db.FeedDbMutationService.FeedDbDeleteStoryRequest; Catch:{ } if (r1 == 0) goto L_0x00e6; L_0x00d9: r0 = (com.facebook.api.feedcache.db.FeedDbMutationService.FeedDbDeleteStoryRequest) r0; Catch:{ } r5.m9096a(r0); Catch:{ } r0 = -696100424; // 0xffffffffd68259b8 float:-7.1660925E13 double:NaN; com.facebook.tools.dextr.runtime.detour.TracerDetour.a(r0); goto L_0x0000; L_0x00e6: r1 = r0 instanceof com.facebook.api.feedcache.db.FeedDbMutationService.FeedDbVpvOmnistoreSyncRequest; Catch:{ } if (r1 == 0) goto L_0x00f5; L_0x00ea: r5.m9106c(); Catch:{ } r0 = -1045059660; // 0xffffffffc1b5a7b4 float:-22.706886 double:NaN; com.facebook.tools.dextr.runtime.detour.TracerDetour.a(r0); goto L_0x0000; L_0x00f5: r1 = r0 instanceof com.facebook.api.feedcache.db.FeedDbMutationService.FeedDbLikeAndCommentCountUpdateRequest; Catch:{ } if (r1 == 0) goto L_0x0106; L_0x00f9: r0 = (com.facebook.api.feedcache.db.FeedDbMutationService.FeedDbLikeAndCommentCountUpdateRequest) r0; Catch:{ } r5.m9098a(r0); Catch:{ } r0 = 759596755; // 0x2d4686d3 float:1.1284934E-11 double:3.752906613E-315; com.facebook.tools.dextr.runtime.detour.TracerDetour.a(r0); goto L_0x0000; L_0x0106: r1 = r0 instanceof com.facebook.api.feedcache.db.FeedDbMutationService.FeedDbLiveVideoStatusUpdateRequest; Catch:{ } if (r1 == 0) goto L_0x0117; L_0x010a: r0 = (com.facebook.api.feedcache.db.FeedDbMutationService.FeedDbLiveVideoStatusUpdateRequest) r0; Catch:{ } r5.m9099a(r0); Catch:{ } r0 = -1270711073; // 0xffffffffb4427cdf float:-1.8113086E-7 double:NaN; com.facebook.tools.dextr.runtime.detour.TracerDetour.a(r0); goto L_0x0000; L_0x0117: r1 = "FeedDbMutationService"; r2 = "Mutation request is not supported: %s"; r3 = 1; r3 = new java.lang.Object[r3]; Catch:{ } r4 = 0; r0 = r0.getClass(); Catch:{ } r0 = r0.getSimpleName(); Catch:{ } r3[r4] = r0; Catch:{ } com.facebook.debug.log.BLog.c(r1, r2, r3); Catch:{ } r0 = 492192568; // 0x1d564338 float:2.8357415E-21 double:2.43175439E-315; com.facebook.tools.dextr.runtime.detour.TracerDetour.a(r0); goto L_0x0000; L_0x0134: r0 = move-exception; r1 = -693974918; // 0xffffffffd6a2c87a float:-8.9490962E13 double:NaN; com.facebook.tools.dextr.runtime.detour.TracerDetour.a(r1); throw r0; */ throw new UnsupportedOperationException("Method not decompiled: com.facebook.api.feedcache.db.FeedDbMutationService.b(com.facebook.api.feedcache.db.FeedDbMutationService):void"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void method_2241() {\r\n // $FF: Couldn't be decompiled\r\n }", "private void method_7083() {\r\n // $FF: Couldn't be decompiled\r\n }", "protected void method_2145() {\r\n // $FF: Couldn't be decompiled\r\n }", "protected void method_2247() {\r\n // $FF: Couldn't be decompiled\r\n }", "static void method_1148() {\r\n // $FF: Couldn't be decompiled\r\n }", "protected void method_2141() {\r\n // $FF: Couldn't be decompiled\r\n }", "static void method_2537() {\r\n // $FF: Couldn't be decompiled\r\n }", "static void method_2537() {\r\n // $FF: Couldn't be decompiled\r\n }", "public void method_7081() {\r\n // $FF: Couldn't be decompiled\r\n }", "public void method_2113() {\r\n // $FF: Couldn't be decompiled\r\n }", "public void method_2139() {\r\n // $FF: Couldn't be decompiled\r\n }", "static void method_6338() {\r\n // $FF: Couldn't be decompiled\r\n }", "static void m13383b() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/79094208.run(Unknown Source)\n*/\n /*\n r0 = com.foursquare.internal.data.db.C1916a.getDatabase();\t Catch:{ Exception -> 0x000a }\n r1 = \"battery_watcher\";\t Catch:{ Exception -> 0x000a }\n r2 = 0;\t Catch:{ Exception -> 0x000a }\n r0.delete(r1, r2, r2);\t Catch:{ Exception -> 0x000a }\n L_0x000a:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.foursquare.pilgrim.e.b():void\");\n }", "static void method_2226() {\r\n // $FF: Couldn't be decompiled\r\n }", "private void m14210a(java.io.IOException r4, java.io.IOException r5) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r3 = this;\n r0 = f12370a;\n if (r0 == 0) goto L_0x000f;\n L_0x0004:\n r0 = f12370a;\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n r1 = 1;\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n r1 = new java.lang.Object[r1];\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n r2 = 0;\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n r1[r2] = r5;\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n r0.invoke(r4, r1);\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n L_0x000f:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: okhttp3.internal.connection.RouteException.a(java.io.IOException, java.io.IOException):void\");\n }", "public void method_2046() {\r\n // $FF: Couldn't be decompiled\r\n }", "public void method_2197() {\r\n // $FF: Couldn't be decompiled\r\n }", "static void method_7086() {\r\n // $FF: Couldn't be decompiled\r\n }", "public void method_2250() {\r\n // $FF: Couldn't be decompiled\r\n }", "static void method_28() {\r\n // $FF: Couldn't be decompiled\r\n }", "private boolean method_2253(class_1033 param1) {\r\n // $FF: Couldn't be decompiled\r\n }", "public long mo915b() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:14)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r4 = this;\n r0 = -1;\n r2 = r4.f18088d;\t Catch:{ NumberFormatException -> 0x000e }\n if (r2 == 0) goto L_0x000d;\t Catch:{ NumberFormatException -> 0x000e }\n L_0x0006:\n r2 = r4.f18088d;\t Catch:{ NumberFormatException -> 0x000e }\n r2 = java.lang.Long.parseLong(r2);\t Catch:{ NumberFormatException -> 0x000e }\n r0 = r2;\n L_0x000d:\n return r0;\n L_0x000e:\n return r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: okhttp3.c.b.b():long\");\n }", "private void m25427g() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n*/\n /*\n r2 = this;\n r0 = r2.f19111m;\n if (r0 == 0) goto L_0x000f;\n L_0x0004:\n r0 = r2.f19104f;\t Catch:{ Exception -> 0x000f }\n r0 = android.support.v4.content.C0396d.m1465a(r0);\t Catch:{ Exception -> 0x000f }\n r1 = r2.f19111m;\t Catch:{ Exception -> 0x000f }\n r0.m1468a(r1);\t Catch:{ Exception -> 0x000f }\n L_0x000f:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.facebook.ads.internal.adapters.w.g():void\");\n }", "public void mo2485a() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/79094208.run(Unknown Source)\n*/\n /*\n r2 = this;\n r0 = r2.f11863a;\n monitor-enter(r0);\n r1 = r2.f11873l;\t Catch:{ all -> 0x002a }\n if (r1 != 0) goto L_0x0028;\t Catch:{ all -> 0x002a }\n L_0x0007:\n r1 = r2.f11872k;\t Catch:{ all -> 0x002a }\n if (r1 == 0) goto L_0x000c;\t Catch:{ all -> 0x002a }\n L_0x000b:\n goto L_0x0028;\t Catch:{ all -> 0x002a }\n L_0x000c:\n r1 = r2.f11875n;\t Catch:{ all -> 0x002a }\n if (r1 == 0) goto L_0x0015;\n L_0x0010:\n r1 = r2.f11875n;\t Catch:{ RemoteException -> 0x0015 }\n r1.cancel();\t Catch:{ RemoteException -> 0x0015 }\n L_0x0015:\n r1 = r2.f11870i;\t Catch:{ all -> 0x002a }\n m14216b(r1);\t Catch:{ all -> 0x002a }\n r1 = 1;\t Catch:{ all -> 0x002a }\n r2.f11873l = r1;\t Catch:{ all -> 0x002a }\n r1 = com.google.android.gms.common.api.Status.zzfnm;\t Catch:{ all -> 0x002a }\n r1 = r2.mo3568a(r1);\t Catch:{ all -> 0x002a }\n r2.m14217c(r1);\t Catch:{ all -> 0x002a }\n monitor-exit(r0);\t Catch:{ all -> 0x002a }\n return;\t Catch:{ all -> 0x002a }\n L_0x0028:\n monitor-exit(r0);\t Catch:{ all -> 0x002a }\n return;\t Catch:{ all -> 0x002a }\n L_0x002a:\n r1 = move-exception;\t Catch:{ all -> 0x002a }\n monitor-exit(r0);\t Catch:{ all -> 0x002a }\n throw r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.common.api.internal.BasePendingResult.a():void\");\n }", "private void method_7082(class_1293 param1) {\r\n // $FF: Couldn't be decompiled\r\n }", "public void mo3613a() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:14)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r4 = this;\n r0 = r4.f18081b;\n monitor-enter(r0);\n r1 = r4.f18080a;\t Catch:{ all -> 0x001f }\n if (r1 == 0) goto L_0x0009;\t Catch:{ all -> 0x001f }\n L_0x0007:\n monitor-exit(r0);\t Catch:{ all -> 0x001f }\n return;\t Catch:{ all -> 0x001f }\n L_0x0009:\n r1 = 1;\t Catch:{ all -> 0x001f }\n r4.f18080a = r1;\t Catch:{ all -> 0x001f }\n r2 = r4.f18081b;\t Catch:{ all -> 0x001f }\n r3 = r2.f12200d;\t Catch:{ all -> 0x001f }\n r3 = r3 + r1;\t Catch:{ all -> 0x001f }\n r2.f12200d = r3;\t Catch:{ all -> 0x001f }\n monitor-exit(r0);\t Catch:{ all -> 0x001f }\n r0 = r4.f18083d;\n okhttp3.internal.C2933c.m14194a(r0);\n r0 = r4.f18082c;\t Catch:{ IOException -> 0x001e }\n r0.m14100c();\t Catch:{ IOException -> 0x001e }\n L_0x001e:\n return;\n L_0x001f:\n r1 = move-exception;\n monitor-exit(r0);\t Catch:{ all -> 0x001f }\n throw r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: okhttp3.c.a.a():void\");\n }", "private static void m13385d() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/79094208.run(Unknown Source)\n*/\n /*\n r0 = java.lang.System.currentTimeMillis();\t Catch:{ Exception -> 0x0024 }\n r2 = java.util.concurrent.TimeUnit.DAYS;\t Catch:{ Exception -> 0x0024 }\n r3 = 1;\t Catch:{ Exception -> 0x0024 }\n r2 = r2.toMillis(r3);\t Catch:{ Exception -> 0x0024 }\n r4 = 0;\t Catch:{ Exception -> 0x0024 }\n r4 = r0 - r2;\t Catch:{ Exception -> 0x0024 }\n r0 = com.foursquare.internal.data.db.C1916a.getDatabase();\t Catch:{ Exception -> 0x0024 }\n r1 = \"battery_watcher\";\t Catch:{ Exception -> 0x0024 }\n r2 = \"timestamp < ?\";\t Catch:{ Exception -> 0x0024 }\n r3 = 1;\t Catch:{ Exception -> 0x0024 }\n r3 = new java.lang.String[r3];\t Catch:{ Exception -> 0x0024 }\n r6 = 0;\t Catch:{ Exception -> 0x0024 }\n r4 = java.lang.String.valueOf(r4);\t Catch:{ Exception -> 0x0024 }\n r3[r6] = r4;\t Catch:{ Exception -> 0x0024 }\n r0.delete(r1, r2, r3);\t Catch:{ Exception -> 0x0024 }\n L_0x0024:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.foursquare.pilgrim.e.d():void\");\n }", "private boolean m2248a(java.lang.String r3, com.onesignal.La.C0596a r4) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/318857719.run(Unknown Source)\n*/\n /*\n r2 = this;\n r0 = 0;\n r1 = 1;\n java.lang.Float.parseFloat(r3);\t Catch:{ Throwable -> 0x0007 }\n r3 = 1;\n goto L_0x0008;\n L_0x0007:\n r3 = 0;\n L_0x0008:\n if (r3 != 0) goto L_0x0017;\n L_0x000a:\n r3 = com.onesignal.sa.C0650i.ERROR;\n r1 = \"Missing Google Project number!\\nPlease enter a Google Project number / Sender ID on under App Settings > Android > Configuration on the OneSignal dashboard.\";\n com.onesignal.sa.m1656a(r3, r1);\n r3 = 0;\n r1 = -6;\n r4.mo1392a(r3, r1);\n return r0;\n L_0x0017:\n return r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.onesignal.Pa.a(java.lang.String, com.onesignal.La$a):boolean\");\n }", "public static boolean m19464a(java.lang.String r3, int[] r4) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/79094208.run(Unknown Source)\n*/\n /*\n r0 = android.text.TextUtils.isEmpty(r3);\n r1 = 0;\n if (r0 == 0) goto L_0x0008;\n L_0x0007:\n return r1;\n L_0x0008:\n r0 = r4.length;\n r2 = 2;\n if (r0 == r2) goto L_0x000d;\n L_0x000c:\n return r1;\n L_0x000d:\n r0 = \"x\";\n r3 = r3.split(r0);\n r0 = r3.length;\n if (r0 == r2) goto L_0x0017;\n L_0x0016:\n return r1;\n L_0x0017:\n r0 = r3[r1];\t Catch:{ NumberFormatException -> 0x0029 }\n r0 = java.lang.Integer.parseInt(r0);\t Catch:{ NumberFormatException -> 0x0029 }\n r4[r1] = r0;\t Catch:{ NumberFormatException -> 0x0029 }\n r0 = 1;\t Catch:{ NumberFormatException -> 0x0029 }\n r3 = r3[r0];\t Catch:{ NumberFormatException -> 0x0029 }\n r3 = java.lang.Integer.parseInt(r3);\t Catch:{ NumberFormatException -> 0x0029 }\n r4[r0] = r3;\t Catch:{ NumberFormatException -> 0x0029 }\n return r0;\n L_0x0029:\n return r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.arp.a(java.lang.String, int[]):boolean\");\n }", "public boolean mo3969a() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r4 = this;\n r0 = r4.f19005h;\n if (r0 != 0) goto L_0x0011;\n L_0x0004:\n r0 = r4.f19004g;\n if (r0 == 0) goto L_0x000f;\n L_0x0008:\n r0 = r4.f19004g;\n r1 = com.facebook.ads.C1700b.f5123e;\n r0.mo1313a(r4, r1);\n L_0x000f:\n r0 = 0;\n return r0;\n L_0x0011:\n r0 = new android.content.Intent;\n r1 = r4.f19002e;\n r2 = com.facebook.ads.AudienceNetworkActivity.class;\n r0.<init>(r1, r2);\n r1 = \"predefinedOrientationKey\";\n r2 = r4.m25306b();\n r0.putExtra(r1, r2);\n r1 = \"uniqueId\";\n r2 = r4.f18999b;\n r0.putExtra(r1, r2);\n r1 = \"placementId\";\n r2 = r4.f19000c;\n r0.putExtra(r1, r2);\n r1 = \"requestTime\";\n r2 = r4.f19001d;\n r0.putExtra(r1, r2);\n r1 = \"viewType\";\n r2 = r4.f19009l;\n r0.putExtra(r1, r2);\n r1 = \"useCache\";\n r2 = r4.f19010m;\n r0.putExtra(r1, r2);\n r1 = r4.f19008k;\n if (r1 == 0) goto L_0x0052;\n L_0x004a:\n r1 = \"ad_data_bundle\";\n r2 = r4.f19008k;\n r0.putExtra(r1, r2);\n goto L_0x005b;\n L_0x0052:\n r1 = r4.f19006i;\n if (r1 == 0) goto L_0x005b;\n L_0x0056:\n r1 = r4.f19006i;\n r1.m18953a(r0);\n L_0x005b:\n r1 = 268435456; // 0x10000000 float:2.5243549E-29 double:1.32624737E-315;\n r0.addFlags(r1);\n r1 = r4.f19002e;\t Catch:{ ActivityNotFoundException -> 0x0066 }\n r1.startActivity(r0);\t Catch:{ ActivityNotFoundException -> 0x0066 }\n goto L_0x0072;\n L_0x0066:\n r1 = r4.f19002e;\n r2 = com.facebook.ads.InterstitialAdActivity.class;\n r0.setClass(r1, r2);\n r1 = r4.f19002e;\n r1.startActivity(r0);\n L_0x0072:\n r0 = 1;\n return r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.facebook.ads.internal.adapters.k.a():boolean\");\n }", "protected void method_2045(class_1045 param1) {\r\n // $FF: Couldn't be decompiled\r\n }", "protected void method_2246(class_1045 param1) {\r\n // $FF: Couldn't be decompiled\r\n }", "private final java.util.Map<java.lang.String, java.lang.String> m11967c() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r7 = this;\n r0 = new java.util.HashMap;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r0.<init>();\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r1 = r7.f10169c;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r2 = r7.f10170d;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r3 = f10168i;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r4 = 0;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r5 = 0;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r6 = 0;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r1 = r1.query(r2, r3, r4, r5, r6);\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n if (r1 == 0) goto L_0x0031;\n L_0x0014:\n r2 = r1.moveToNext();\t Catch:{ all -> 0x002c }\n if (r2 == 0) goto L_0x0028;\t Catch:{ all -> 0x002c }\n L_0x001a:\n r2 = 0;\t Catch:{ all -> 0x002c }\n r2 = r1.getString(r2);\t Catch:{ all -> 0x002c }\n r3 = 1;\t Catch:{ all -> 0x002c }\n r3 = r1.getString(r3);\t Catch:{ all -> 0x002c }\n r0.put(r2, r3);\t Catch:{ all -> 0x002c }\n goto L_0x0014;\n L_0x0028:\n r1.close();\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n goto L_0x0031;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n L_0x002c:\n r0 = move-exception;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r1.close();\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n throw r0;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n L_0x0031:\n return r0;\n L_0x0032:\n r0 = \"ConfigurationContentLoader\";\n r1 = \"PhenotypeFlag unable to load ContentProvider, using default values\";\n android.util.Log.e(r0, r1);\n r0 = 0;\n return r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.measurement.zzsi.c():java.util.Map<java.lang.String, java.lang.String>\");\n }", "private void m50366E() {\n }", "public int method_7084(String param1) {\r\n // $FF: Couldn't be decompiled\r\n }", "private p000a.p001a.p002a.p003a.C0916s m1655b(p000a.p001a.p002a.p003a.p022i.p024b.C0112x r7, p000a.p001a.p002a.p003a.p034n.C0157e r8) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/293907205.run(Unknown Source)\n*/\n /*\n r6 = this;\n r0 = r7.m321a();\n r7 = r7.m322b();\n r1 = 0;\n r2 = r1;\n L_0x000a:\n r3 = r6.f1533u;\n r3 = r3 + 1;\n r6.f1533u = r3;\n r0.m2803e();\n r3 = r0.mo2010a();\n if (r3 != 0) goto L_0x0032;\n L_0x0019:\n r7 = r6.f1513a;\n r8 = \"Cannot retry non-repeatable request\";\n r7.m260a(r8);\n if (r2 == 0) goto L_0x002a;\n L_0x0022:\n r7 = new a.a.a.a.b.m;\n r8 = \"Cannot retry request with a non-repeatable request entity. The cause lists the reason the original request failed.\";\n r7.<init>(r8, r2);\n throw r7;\n L_0x002a:\n r7 = new a.a.a.a.b.m;\n r8 = \"Cannot retry request with a non-repeatable request entity.\";\n r7.<init>(r8);\n throw r7;\n L_0x0032:\n r2 = r6.f1529q;\t Catch:{ IOException -> 0x0086 }\n r2 = r2.mo1932c();\t Catch:{ IOException -> 0x0086 }\n if (r2 != 0) goto L_0x0057;\t Catch:{ IOException -> 0x0086 }\n L_0x003a:\n r2 = r7.mo15e();\t Catch:{ IOException -> 0x0086 }\n if (r2 != 0) goto L_0x004f;\t Catch:{ IOException -> 0x0086 }\n L_0x0040:\n r2 = r6.f1513a;\t Catch:{ IOException -> 0x0086 }\n r3 = \"Reopening the direct connection.\";\t Catch:{ IOException -> 0x0086 }\n r2.m260a(r3);\t Catch:{ IOException -> 0x0086 }\n r2 = r6.f1529q;\t Catch:{ IOException -> 0x0086 }\n r3 = r6.f1528p;\t Catch:{ IOException -> 0x0086 }\n r2.mo2023a(r7, r8, r3);\t Catch:{ IOException -> 0x0086 }\n goto L_0x0057;\t Catch:{ IOException -> 0x0086 }\n L_0x004f:\n r2 = r6.f1513a;\t Catch:{ IOException -> 0x0086 }\n r3 = \"Proxied connection. Need to start over.\";\t Catch:{ IOException -> 0x0086 }\n r2.m260a(r3);\t Catch:{ IOException -> 0x0086 }\n goto L_0x0085;\t Catch:{ IOException -> 0x0086 }\n L_0x0057:\n r2 = r6.f1513a;\t Catch:{ IOException -> 0x0086 }\n r2 = r2.m262a();\t Catch:{ IOException -> 0x0086 }\n if (r2 == 0) goto L_0x007c;\t Catch:{ IOException -> 0x0086 }\n L_0x005f:\n r2 = r6.f1513a;\t Catch:{ IOException -> 0x0086 }\n r3 = new java.lang.StringBuilder;\t Catch:{ IOException -> 0x0086 }\n r3.<init>();\t Catch:{ IOException -> 0x0086 }\n r4 = \"Attempt \";\t Catch:{ IOException -> 0x0086 }\n r3.append(r4);\t Catch:{ IOException -> 0x0086 }\n r4 = r6.f1533u;\t Catch:{ IOException -> 0x0086 }\n r3.append(r4);\t Catch:{ IOException -> 0x0086 }\n r4 = \" to execute request\";\t Catch:{ IOException -> 0x0086 }\n r3.append(r4);\t Catch:{ IOException -> 0x0086 }\n r3 = r3.toString();\t Catch:{ IOException -> 0x0086 }\n r2.m260a(r3);\t Catch:{ IOException -> 0x0086 }\n L_0x007c:\n r2 = r6.f1518f;\t Catch:{ IOException -> 0x0086 }\n r3 = r6.f1529q;\t Catch:{ IOException -> 0x0086 }\n r2 = r2.m464a(r0, r3, r8);\t Catch:{ IOException -> 0x0086 }\n r1 = r2;\n L_0x0085:\n return r1;\n L_0x0086:\n r2 = move-exception;\n r3 = r6.f1513a;\n r4 = \"Closing the connection.\";\n r3.m260a(r4);\n r3 = r6.f1529q;\t Catch:{ IOException -> 0x0093 }\n r3.close();\t Catch:{ IOException -> 0x0093 }\n L_0x0093:\n r3 = r6.f1520h;\n r4 = r0.m2802d();\n r3 = r3.retryRequest(r2, r4, r8);\n if (r3 == 0) goto L_0x010a;\n L_0x009f:\n r3 = r6.f1513a;\n r3 = r3.m270d();\n if (r3 == 0) goto L_0x00d9;\n L_0x00a7:\n r3 = r6.f1513a;\n r4 = new java.lang.StringBuilder;\n r4.<init>();\n r5 = \"I/O exception (\";\n r4.append(r5);\n r5 = r2.getClass();\n r5 = r5.getName();\n r4.append(r5);\n r5 = \") caught when processing request to \";\n r4.append(r5);\n r4.append(r7);\n r5 = \": \";\n r4.append(r5);\n r5 = r2.getMessage();\n r4.append(r5);\n r4 = r4.toString();\n r3.m269d(r4);\n L_0x00d9:\n r3 = r6.f1513a;\n r3 = r3.m262a();\n if (r3 == 0) goto L_0x00ea;\n L_0x00e1:\n r3 = r6.f1513a;\n r4 = r2.getMessage();\n r3.m261a(r4, r2);\n L_0x00ea:\n r3 = r6.f1513a;\n r3 = r3.m270d();\n if (r3 == 0) goto L_0x000a;\n L_0x00f2:\n r3 = r6.f1513a;\n r4 = new java.lang.StringBuilder;\n r4.<init>();\n r5 = \"Retrying request to \";\n r4.append(r5);\n r4.append(r7);\n r4 = r4.toString();\n r3.m269d(r4);\n goto L_0x000a;\n L_0x010a:\n r8 = r2 instanceof p000a.p001a.p002a.p003a.C0176z;\n if (r8 == 0) goto L_0x0134;\n L_0x010e:\n r8 = new a.a.a.a.z;\n r0 = new java.lang.StringBuilder;\n r0.<init>();\n r7 = r7.mo10a();\n r7 = r7.m474e();\n r0.append(r7);\n r7 = \" failed to respond\";\n r0.append(r7);\n r7 = r0.toString();\n r8.<init>(r7);\n r7 = r2.getStackTrace();\n r8.setStackTrace(r7);\n throw r8;\n L_0x0134:\n throw r2;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: a.a.a.a.i.b.p.b(a.a.a.a.i.b.x, a.a.a.a.n.e):a.a.a.a.s\");\n }", "void m5768b() throws C0841b;", "void m1864a() {\r\n }", "public boolean method_2088(class_689 param1) {\r\n // $FF: Couldn't be decompiled\r\n }", "void m5770d() throws C0841b;", "public static void m5820b(java.lang.String r3, java.lang.String r4, java.lang.String r5) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r0 = new com.crashlytics.android.answers.StartCheckoutEvent;\n r0.<init>();\n r1 = java.util.Locale.getDefault();\n r1 = java.util.Currency.getInstance(r1);\n r0.putCurrency(r1);\n r1 = 1;\n r0.putItemCount(r1);\n r1 = java.lang.Long.parseLong(r3);\t Catch:{ Exception -> 0x001f }\n r3 = java.math.BigDecimal.valueOf(r1);\t Catch:{ Exception -> 0x001f }\n r0.putTotalPrice(r3);\t Catch:{ Exception -> 0x001f }\n L_0x001f:\n r3 = \"type\";\n r0.putCustomAttribute(r3, r4);\n r3 = \"cta\";\n r0.putCustomAttribute(r3, r5);\n r3 = com.crashlytics.android.answers.Answers.getInstance();\n r3.logStartCheckout(r0);\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.cuvora.carinfo.helpers.d.b(java.lang.String, java.lang.String, java.lang.String):void\");\n }", "public final void mo91715d() {\n }", "public void method_4270() {}", "public static void m5812a(java.lang.String r0, java.lang.String r1, java.lang.String r2) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r2 = new com.crashlytics.android.answers.AddToCartEvent;\n r2.<init>();\n r2.putItemType(r0);\n r0 = java.lang.Long.parseLong(r1);\t Catch:{ Exception -> 0x0013 }\n r0 = java.math.BigDecimal.valueOf(r0);\t Catch:{ Exception -> 0x0013 }\n r2.putItemPrice(r0);\t Catch:{ Exception -> 0x0013 }\n L_0x0013:\n r0 = java.util.Locale.getDefault();\n r0 = java.util.Currency.getInstance(r0);\n r2.putCurrency(r0);\n r0 = com.crashlytics.android.answers.Answers.getInstance();\n r0.logAddToCart(r2);\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.cuvora.carinfo.helpers.d.a(java.lang.String, java.lang.String, java.lang.String):void\");\n }", "private static void m13381a(long r3, float r5) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/79094208.run(Unknown Source)\n*/\n /*\n r0 = com.foursquare.internal.data.db.C1916a.getDatabase();\n r0.beginTransaction();\t Catch:{ Exception -> 0x001f }\n r1 = \"INSERT INTO battery_watcher (timestamp, level) VALUES (?, ?)\";\t Catch:{ Exception -> 0x001f }\n r1 = r0.compileStatement(r1);\t Catch:{ Exception -> 0x001f }\n r2 = 1;\t Catch:{ Exception -> 0x001f }\n r1.bindLong(r2, r3);\t Catch:{ Exception -> 0x001f }\n r3 = 2;\t Catch:{ Exception -> 0x001f }\n r4 = (double) r5;\t Catch:{ Exception -> 0x001f }\n r1.bindDouble(r3, r4);\t Catch:{ Exception -> 0x001f }\n r1.execute();\t Catch:{ Exception -> 0x001f }\n r0.setTransactionSuccessful();\t Catch:{ Exception -> 0x001f }\n goto L_0x0026;\n L_0x001d:\n r3 = move-exception;\n goto L_0x002a;\n L_0x001f:\n r3 = f10646a;\t Catch:{ all -> 0x001d }\n r4 = \"Issue adding location to battery history\";\t Catch:{ all -> 0x001d }\n com.foursquare.internal.util.FsLog.m6807d(r3, r4);\t Catch:{ all -> 0x001d }\n L_0x0026:\n r0.endTransaction();\n return;\n L_0x002a:\n r0.endTransaction();\n throw r3;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.foursquare.pilgrim.e.a(long, float):void\");\n }", "static void method_461() {\r\n // $FF: Couldn't be decompiled\r\n }", "private static class_1205 method_6442(String param0, int param1) {\r\n // $FF: Couldn't be decompiled\r\n }", "void m5769c() throws C0841b;", "public void method_2112(int param1, int param2, int param3, aji param4, int param5, int param6) {\r\n // $FF: Couldn't be decompiled\r\n }", "void m5771e() throws C0841b;", "@Override // X.AnonymousClass0PN\n /* Code decompiled incorrectly, please refer to instructions dump. */\n public void A0D() {\n /*\n r5 = this;\n super.A0D()\n X.08d r0 = r5.A05\n X.0OQ r4 = r0.A04()\n X.0Rk r3 = r4.A00() // Catch:{ all -> 0x003d }\n X.0BK r2 = r4.A04 // Catch:{ all -> 0x0036 }\n java.lang.String r1 = \"DELETE FROM receipt_device\"\n java.lang.String r0 = \"CLEAR_TABLE_RECEIPT_DEVICE\"\n r2.A0C(r1, r0) // Catch:{ all -> 0x0036 }\n X.08m r1 = r5.A03 // Catch:{ all -> 0x0036 }\n java.lang.String r0 = \"receipt_device_migration_complete\"\n r1.A02(r0) // Catch:{ all -> 0x0036 }\n java.lang.String r0 = \"migration_receipt_device_index\"\n r1.A02(r0) // Catch:{ all -> 0x0036 }\n java.lang.String r0 = \"migration_receipt_device_retry\"\n r1.A02(r0) // Catch:{ all -> 0x0036 }\n r3.A00() // Catch:{ all -> 0x0036 }\n r3.close()\n r4.close()\n java.lang.String r0 = \"ReceiptDeviceStore/ReceiptDeviceDatabaseMigration/resetMigration/done\"\n com.whatsapp.util.Log.i(r0)\n return\n L_0x0036:\n r0 = move-exception\n throw r0 // Catch:{ all -> 0x0038 }\n L_0x0038:\n r0 = move-exception\n r3.close() // Catch:{ all -> 0x003c }\n L_0x003c:\n throw r0\n L_0x003d:\n r0 = move-exception\n throw r0 // Catch:{ all -> 0x003f }\n L_0x003f:\n r0 = move-exception\n r4.close() // Catch:{ all -> 0x0043 }\n L_0x0043:\n throw r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: X.C43661yk.A0D():void\");\n }", "public static void m5813a(java.lang.String r2, java.lang.String r3, java.lang.String r4, boolean r5) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r0 = new com.crashlytics.android.answers.PurchaseEvent;\n r0.<init>();\n r1 = java.util.Locale.getDefault();\n r1 = java.util.Currency.getInstance(r1);\n r0.putCurrency(r1);\n r0.putItemId(r2);\n r0.putItemType(r3);\n r2 = java.lang.Long.parseLong(r4);\t Catch:{ Exception -> 0x0021 }\n r2 = java.math.BigDecimal.valueOf(r2);\t Catch:{ Exception -> 0x0021 }\n r0.putItemPrice(r2);\t Catch:{ Exception -> 0x0021 }\n L_0x0021:\n r0.putSuccess(r5);\n r2 = com.crashlytics.android.answers.Answers.getInstance();\n r2.logPurchase(r0);\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.cuvora.carinfo.helpers.d.a(java.lang.String, java.lang.String, java.lang.String, boolean):void\");\n }", "public void method_2111(int param1, int param2, int param3, aji param4, int param5, int param6) {\r\n // $FF: Couldn't be decompiled\r\n }", "@androidx.annotation.Nullable\n /* renamed from: j */\n /* Code decompiled incorrectly, please refer to instructions dump. */\n public final p005b.p096l.p097a.p151d.p152a.p154b.C3474b mo14822j(java.lang.String r9) {\n /*\n r8 = this;\n java.io.File r0 = new java.io.File\n java.io.File r1 = r8.mo14820g()\n r0.<init>(r1, r9)\n boolean r1 = r0.exists()\n r2 = 3\n r3 = 6\n r4 = 1\n r5 = 0\n r6 = 0\n if (r1 != 0) goto L_0x0022\n b.l.a.d.a.e.f r0 = f6563c\n java.lang.Object[] r1 = new java.lang.Object[r4]\n r1[r5] = r9\n java.lang.String r9 = \"Pack not found with pack name: %s\"\n r0.mo14884b(r2, r9, r1)\n L_0x001f:\n r9 = r6\n goto L_0x0093\n L_0x0022:\n java.io.File r1 = new java.io.File\n b.l.a.d.a.b.o1 r7 = r8.f6567b\n int r7 = r7.mo14797a()\n java.lang.String r7 = java.lang.String.valueOf(r7)\n r1.<init>(r0, r7)\n boolean r0 = r1.exists()\n r7 = 2\n if (r0 != 0) goto L_0x0050\n b.l.a.d.a.e.f r0 = f6563c\n java.lang.Object[] r1 = new java.lang.Object[r7]\n r1[r5] = r9\n b.l.a.d.a.b.o1 r9 = r8.f6567b\n int r9 = r9.mo14797a()\n java.lang.Integer r9 = java.lang.Integer.valueOf(r9)\n r1[r4] = r9\n java.lang.String r9 = \"Pack not found with pack name: %s app version: %s\"\n r0.mo14884b(r2, r9, r1)\n goto L_0x001f\n L_0x0050:\n java.io.File[] r0 = r1.listFiles()\n if (r0 == 0) goto L_0x007b\n int r1 = r0.length\n if (r1 != 0) goto L_0x005a\n goto L_0x007b\n L_0x005a:\n if (r1 <= r4) goto L_0x0074\n b.l.a.d.a.e.f r0 = f6563c\n java.lang.Object[] r1 = new java.lang.Object[r7]\n r1[r5] = r9\n b.l.a.d.a.b.o1 r9 = r8.f6567b\n int r9 = r9.mo14797a()\n java.lang.Integer r9 = java.lang.Integer.valueOf(r9)\n r1[r4] = r9\n java.lang.String r9 = \"Multiple pack versions found for pack name: %s app version: %s\"\n r0.mo14884b(r3, r9, r1)\n goto L_0x001f\n L_0x0074:\n r9 = r0[r5]\n java.lang.String r9 = r9.getCanonicalPath()\n goto L_0x0093\n L_0x007b:\n b.l.a.d.a.e.f r0 = f6563c\n java.lang.Object[] r1 = new java.lang.Object[r7]\n r1[r5] = r9\n b.l.a.d.a.b.o1 r9 = r8.f6567b\n int r9 = r9.mo14797a()\n java.lang.Integer r9 = java.lang.Integer.valueOf(r9)\n r1[r4] = r9\n java.lang.String r9 = \"No pack version found for pack name: %s app version: %s\"\n r0.mo14884b(r2, r9, r1)\n goto L_0x001f\n L_0x0093:\n if (r9 != 0) goto L_0x0096\n return r6\n L_0x0096:\n java.io.File r0 = new java.io.File\n java.lang.String r1 = \"assets\"\n r0.<init>(r9, r1)\n boolean r1 = r0.isDirectory()\n if (r1 != 0) goto L_0x00af\n b.l.a.d.a.e.f r9 = f6563c\n java.lang.Object[] r1 = new java.lang.Object[r4]\n r1[r5] = r0\n java.lang.String r0 = \"Failed to find assets directory: %s\"\n r9.mo14884b(r3, r0, r1)\n return r6\n L_0x00af:\n java.lang.String r0 = r0.getCanonicalPath()\n b.l.a.d.a.b.w r1 = new b.l.a.d.a.b.w\n r1.<init>(r5, r9, r0)\n return r1\n */\n throw new UnsupportedOperationException(\"Method not decompiled: p005b.p096l.p097a.p151d.p152a.p154b.C3544t.mo14822j(java.lang.String):b.l.a.d.a.b.b\");\n }", "public boolean method_2243() {\r\n // $FF: Couldn't be decompiled\r\n }", "private final void asx() {\n /*\n r12 = this;\n r0 = r12.cFE;\n if (r0 == 0) goto L_0x0073;\n L_0x0004:\n r1 = r12.cxs;\n if (r1 == 0) goto L_0x0073;\n L_0x0008:\n r1 = r12.ayL;\n if (r1 != 0) goto L_0x000d;\n L_0x000c:\n goto L_0x0073;\n L_0x000d:\n r2 = 0;\n if (r1 == 0) goto L_0x0027;\n L_0x0010:\n r1 = r1.Km();\n if (r1 == 0) goto L_0x0027;\n L_0x0016:\n r1 = r1.aar();\n if (r1 == 0) goto L_0x0027;\n L_0x001c:\n r3 = r0.getName();\n r1 = r1.get(r3);\n r1 = (java.util.ArrayList) r1;\n goto L_0x0028;\n L_0x0027:\n r1 = r2;\n L_0x0028:\n if (r1 == 0) goto L_0x0051;\n L_0x002a:\n r1 = (java.lang.Iterable) r1;\n r1 = kotlin.collections.u.Z(r1);\n if (r1 == 0) goto L_0x0051;\n L_0x0032:\n r3 = new com.iqoption.deposit.light.perform.DepositPerformLightFragment$setPresets$items$1;\n r3.<init>(r12);\n r3 = (kotlin.jvm.a.b) r3;\n r1 = kotlin.sequences.n.b(r1, r3);\n if (r1 == 0) goto L_0x0051;\n L_0x003f:\n r3 = new com.iqoption.deposit.light.perform.DepositPerformLightFragment$setPresets$items$2;\n r3.<init>(r0);\n r3 = (kotlin.jvm.a.b) r3;\n r1 = kotlin.sequences.n.f(r1, r3);\n if (r1 == 0) goto L_0x0051;\n L_0x004c:\n r1 = kotlin.sequences.n.f(r1);\n goto L_0x0052;\n L_0x0051:\n r1 = r2;\n L_0x0052:\n r3 = r12.asr();\n if (r1 == 0) goto L_0x0059;\n L_0x0058:\n goto L_0x005d;\n L_0x0059:\n r1 = kotlin.collections.m.emptyList();\n L_0x005d:\n r4 = r12.bub;\n if (r4 == 0) goto L_0x006d;\n L_0x0061:\n r5 = 0;\n r6 = 0;\n r7 = 1;\n r8 = 0;\n r9 = 0;\n r10 = 19;\n r11 = 0;\n r2 = com.iqoption.core.util.e.a(r4, r5, r6, r7, r8, r9, r10, r11);\n L_0x006d:\n r3.c(r1, r2);\n r12.d(r0);\n L_0x0073:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.iqoption.deposit.light.perform.c.asx():void\");\n }", "private void m1654a(p000a.p001a.p002a.p003a.p022i.p024b.C0112x r7, p000a.p001a.p002a.p003a.p034n.C0157e r8) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/293907205.run(Unknown Source)\n*/\n /*\n r6 = this;\n r0 = r7.m322b();\n r7 = r7.m321a();\n r1 = 0;\n L_0x0009:\n r2 = \"http.request\";\n r8.mo160a(r2, r7);\n r1 = r1 + 1;\n r2 = r6.f1529q;\t Catch:{ IOException -> 0x002f }\n r2 = r2.mo1932c();\t Catch:{ IOException -> 0x002f }\n if (r2 != 0) goto L_0x0020;\t Catch:{ IOException -> 0x002f }\n L_0x0018:\n r2 = r6.f1529q;\t Catch:{ IOException -> 0x002f }\n r3 = r6.f1528p;\t Catch:{ IOException -> 0x002f }\n r2.mo2023a(r0, r8, r3);\t Catch:{ IOException -> 0x002f }\n goto L_0x002b;\t Catch:{ IOException -> 0x002f }\n L_0x0020:\n r2 = r6.f1529q;\t Catch:{ IOException -> 0x002f }\n r3 = r6.f1528p;\t Catch:{ IOException -> 0x002f }\n r3 = p000a.p001a.p002a.p003a.p032l.C0150c.m428a(r3);\t Catch:{ IOException -> 0x002f }\n r2.mo1931b(r3);\t Catch:{ IOException -> 0x002f }\n L_0x002b:\n r6.m1660a(r0, r8);\t Catch:{ IOException -> 0x002f }\n return;\n L_0x002f:\n r2 = move-exception;\n r3 = r6.f1529q;\t Catch:{ IOException -> 0x0035 }\n r3.close();\t Catch:{ IOException -> 0x0035 }\n L_0x0035:\n r3 = r6.f1520h;\n r3 = r3.retryRequest(r2, r1, r8);\n if (r3 == 0) goto L_0x00a0;\n L_0x003d:\n r3 = r6.f1513a;\n r3 = r3.m270d();\n if (r3 == 0) goto L_0x0009;\n L_0x0045:\n r3 = r6.f1513a;\n r4 = new java.lang.StringBuilder;\n r4.<init>();\n r5 = \"I/O exception (\";\n r4.append(r5);\n r5 = r2.getClass();\n r5 = r5.getName();\n r4.append(r5);\n r5 = \") caught when connecting to \";\n r4.append(r5);\n r4.append(r0);\n r5 = \": \";\n r4.append(r5);\n r5 = r2.getMessage();\n r4.append(r5);\n r4 = r4.toString();\n r3.m269d(r4);\n r3 = r6.f1513a;\n r3 = r3.m262a();\n if (r3 == 0) goto L_0x0088;\n L_0x007f:\n r3 = r6.f1513a;\n r4 = r2.getMessage();\n r3.m261a(r4, r2);\n L_0x0088:\n r2 = r6.f1513a;\n r3 = new java.lang.StringBuilder;\n r3.<init>();\n r4 = \"Retrying connect to \";\n r3.append(r4);\n r3.append(r0);\n r3 = r3.toString();\n r2.m269d(r3);\n goto L_0x0009;\n L_0x00a0:\n throw r2;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: a.a.a.a.i.b.p.a(a.a.a.a.i.b.x, a.a.a.a.n.e):void\");\n }", "public void method_2116(class_689 param1, boolean param2) {\r\n // $FF: Couldn't be decompiled\r\n }", "private static int m69982c() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n*/\n /*\n r0 = \"android.os.Build$VERSION\";\t Catch:{ Exception -> 0x0018 }\n r0 = java.lang.Class.forName(r0);\t Catch:{ Exception -> 0x0018 }\n r1 = \"SDK_INT\";\t Catch:{ Exception -> 0x0018 }\n r0 = r0.getField(r1);\t Catch:{ Exception -> 0x0018 }\n r1 = 0;\t Catch:{ Exception -> 0x0018 }\n r0 = r0.get(r1);\t Catch:{ Exception -> 0x0018 }\n r0 = (java.lang.Integer) r0;\t Catch:{ Exception -> 0x0018 }\n r0 = r0.intValue();\t Catch:{ Exception -> 0x0018 }\n return r0;\n L_0x0018:\n r0 = 0;\n return r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: rx.internal.util.f.c():int\");\n }", "static void m7753b() {\n f8029a = false;\n }", "public final synchronized com.google.android.m4b.maps.bu.C4910a m21843a(java.lang.String r10) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/79094208.run(Unknown Source)\n*/\n /*\n r9 = this;\n monitor-enter(r9);\n r0 = r9.f17909e;\t Catch:{ all -> 0x0056 }\n r1 = 0;\n if (r0 != 0) goto L_0x0008;\n L_0x0006:\n monitor-exit(r9);\n return r1;\n L_0x0008:\n r0 = r9.f17907c;\t Catch:{ all -> 0x0056 }\n r2 = com.google.android.m4b.maps.az.C4733b.m21060a(r10);\t Catch:{ all -> 0x0056 }\n r0 = r0.m21933a(r2, r1);\t Catch:{ all -> 0x0056 }\n if (r0 == 0) goto L_0x0054;\t Catch:{ all -> 0x0056 }\n L_0x0014:\n r2 = r0.length;\t Catch:{ all -> 0x0056 }\n r3 = 9;\t Catch:{ all -> 0x0056 }\n if (r2 <= r3) goto L_0x0054;\t Catch:{ all -> 0x0056 }\n L_0x0019:\n r2 = 0;\t Catch:{ all -> 0x0056 }\n r2 = r0[r2];\t Catch:{ all -> 0x0056 }\n r4 = 1;\t Catch:{ all -> 0x0056 }\n if (r2 == r4) goto L_0x0020;\t Catch:{ all -> 0x0056 }\n L_0x001f:\n goto L_0x0054;\t Catch:{ all -> 0x0056 }\n L_0x0020:\n r5 = com.google.android.m4b.maps.bs.C4891e.m21914c(r0, r4);\t Catch:{ all -> 0x0056 }\n r2 = new com.google.android.m4b.maps.ar.a;\t Catch:{ all -> 0x0056 }\n r7 = com.google.android.m4b.maps.de.C5350x.f20104b;\t Catch:{ all -> 0x0056 }\n r2.<init>(r7);\t Catch:{ all -> 0x0056 }\n r7 = new java.io.ByteArrayInputStream;\t Catch:{ IOException -> 0x0052 }\n r8 = r0.length;\t Catch:{ IOException -> 0x0052 }\n r8 = r8 - r3;\t Catch:{ IOException -> 0x0052 }\n r7.<init>(r0, r3, r8);\t Catch:{ IOException -> 0x0052 }\n r2.m20818a(r7);\t Catch:{ IOException -> 0x0052 }\n r0 = 2;\n r0 = r2.m20843h(r0);\t Catch:{ all -> 0x0056 }\n r10 = r10.equals(r0);\t Catch:{ all -> 0x0056 }\n if (r10 != 0) goto L_0x0042;\n L_0x0040:\n monitor-exit(r9);\n return r1;\n L_0x0042:\n r10 = new com.google.android.m4b.maps.bu.a;\t Catch:{ all -> 0x0056 }\n r10.<init>();\t Catch:{ all -> 0x0056 }\n r10.m22018a(r4);\t Catch:{ all -> 0x0056 }\n r10.m22020a(r2);\t Catch:{ all -> 0x0056 }\n r10.m22016a(r5);\t Catch:{ all -> 0x0056 }\n monitor-exit(r9);\n return r10;\n L_0x0052:\n monitor-exit(r9);\n return r1;\n L_0x0054:\n monitor-exit(r9);\n return r1;\n L_0x0056:\n r10 = move-exception;\n monitor-exit(r9);\n throw r10;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.m4b.maps.bs.b.a(java.lang.String):com.google.android.m4b.maps.bu.a\");\n }", "public static int m22557b(java.lang.String r1) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r0 = com.google.android.gms.internal.measurement.dr.m11788a(r1);\t Catch:{ zzyn -> 0x0005 }\n goto L_0x000c;\n L_0x0005:\n r0 = com.google.android.gms.internal.measurement.zzvo.f10281a;\n r1 = r1.getBytes(r0);\n r0 = r1.length;\n L_0x000c:\n r1 = m22576g(r0);\n r1 = r1 + r0;\n return r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.measurement.zzut.b(java.lang.String):int\");\n }", "public void method_7080(String param1, class_1293 param2) {\r\n // $FF: Couldn't be decompiled\r\n }", "public void m9741j() throws cf {\r\n }", "private static void check(java.lang.String r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e9 in method: java.security.Signer.check(java.lang.String):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: java.security.Signer.check(java.lang.String):void\");\n }", "public boolean method_2153(boolean param1) {\r\n // $FF: Couldn't be decompiled\r\n }", "public void method_2259(String param1, double param2, double param4, double param6, int param8, double param9, double param11, double param13, double param15) {\r\n // $FF: Couldn't be decompiled\r\n }", "private void m50367F() {\n }", "public void mo21779D() {\n }", "public final synchronized void mo5320b() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n*/\n /*\n r6 = this;\n monitor-enter(r6);\n r0 = r6.f24853c;\t Catch:{ all -> 0x004c }\n r1 = 0;\t Catch:{ all -> 0x004c }\n r2 = 0;\t Catch:{ all -> 0x004c }\n if (r0 == 0) goto L_0x0046;\t Catch:{ all -> 0x004c }\n L_0x0007:\n r0 = r6.f24851a;\t Catch:{ all -> 0x004c }\n if (r0 != 0) goto L_0x0013;\t Catch:{ all -> 0x004c }\n L_0x000b:\n r0 = r6.f24854d;\t Catch:{ all -> 0x004c }\n r3 = r6.f24853c;\t Catch:{ all -> 0x004c }\n r0.deleteFile(r3);\t Catch:{ all -> 0x004c }\n goto L_0x0046;\t Catch:{ all -> 0x004c }\n L_0x0013:\n r0 = com.google.android.m4b.maps.cg.bx.m23058b();\t Catch:{ all -> 0x004c }\n r3 = r6.f24854d;\t Catch:{ IOException -> 0x0032, all -> 0x002f }\n r4 = r6.f24853c;\t Catch:{ IOException -> 0x0032, all -> 0x002f }\n r3 = r3.openFileOutput(r4, r1);\t Catch:{ IOException -> 0x0032, all -> 0x002f }\n r4 = r6.f24851a;\t Catch:{ IOException -> 0x0033 }\n r4 = r4.m20837d();\t Catch:{ IOException -> 0x0033 }\n r3.write(r4);\t Catch:{ IOException -> 0x0033 }\n com.google.android.m4b.maps.cg.bx.m23057a(r0);\t Catch:{ all -> 0x004c }\n L_0x002b:\n com.google.android.m4b.maps.ap.C4655c.m20770a(r3);\t Catch:{ all -> 0x004c }\n goto L_0x0046;\n L_0x002f:\n r1 = move-exception;\n r3 = r2;\n goto L_0x003f;\n L_0x0032:\n r3 = r2;\n L_0x0033:\n r4 = r6.f24854d;\t Catch:{ all -> 0x003e }\n r5 = r6.f24853c;\t Catch:{ all -> 0x003e }\n r4.deleteFile(r5);\t Catch:{ all -> 0x003e }\n com.google.android.m4b.maps.cg.bx.m23057a(r0);\t Catch:{ all -> 0x004c }\n goto L_0x002b;\t Catch:{ all -> 0x004c }\n L_0x003e:\n r1 = move-exception;\t Catch:{ all -> 0x004c }\n L_0x003f:\n com.google.android.m4b.maps.cg.bx.m23057a(r0);\t Catch:{ all -> 0x004c }\n com.google.android.m4b.maps.ap.C4655c.m20770a(r3);\t Catch:{ all -> 0x004c }\n throw r1;\t Catch:{ all -> 0x004c }\n L_0x0046:\n r6.f24851a = r2;\t Catch:{ all -> 0x004c }\n r6.f24852b = r1;\t Catch:{ all -> 0x004c }\n monitor-exit(r6);\n return;\n L_0x004c:\n r0 = move-exception;\n monitor-exit(r6);\n throw r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.m4b.maps.cg.q.b():void\");\n }", "private synchronized void m29549c() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n*/\n /*\n r6 = this;\n monitor-enter(r6);\n r0 = r6.f24853c;\t Catch:{ all -> 0x0050 }\n if (r0 == 0) goto L_0x004b;\t Catch:{ all -> 0x0050 }\n L_0x0005:\n r0 = com.google.android.m4b.maps.cg.bx.m23056a();\t Catch:{ all -> 0x0050 }\n r1 = 0;\n r2 = r6.f24854d;\t Catch:{ IOException -> 0x0035, all -> 0x0030 }\n r3 = r6.f24853c;\t Catch:{ IOException -> 0x0035, all -> 0x0030 }\n r2 = r2.openFileInput(r3);\t Catch:{ IOException -> 0x0035, all -> 0x0030 }\n if (r2 == 0) goto L_0x0027;\n L_0x0014:\n r3 = new com.google.android.m4b.maps.ar.a;\t Catch:{ IOException -> 0x0036 }\n r4 = com.google.android.m4b.maps.de.af.f19891a;\t Catch:{ IOException -> 0x0036 }\n r3.<init>(r4);\t Catch:{ IOException -> 0x0036 }\n r6.f24851a = r3;\t Catch:{ IOException -> 0x0036 }\n r3 = r6.f24851a;\t Catch:{ IOException -> 0x0036 }\n r4 = com.google.android.m4b.maps.ap.C4655c.m20771a(r2);\t Catch:{ IOException -> 0x0036 }\n r3.m20819a(r4);\t Catch:{ IOException -> 0x0036 }\n goto L_0x0029;\t Catch:{ IOException -> 0x0036 }\n L_0x0027:\n r6.f24851a = r1;\t Catch:{ IOException -> 0x0036 }\n L_0x0029:\n com.google.android.m4b.maps.cg.bx.m23057a(r0);\t Catch:{ all -> 0x0050 }\n L_0x002c:\n com.google.android.m4b.maps.ap.C4655c.m20773b(r2);\t Catch:{ all -> 0x0050 }\n goto L_0x004b;\n L_0x0030:\n r2 = move-exception;\n r5 = r2;\n r2 = r1;\n r1 = r5;\n goto L_0x0044;\n L_0x0035:\n r2 = r1;\n L_0x0036:\n r6.f24851a = r1;\t Catch:{ all -> 0x0043 }\n r1 = r6.f24854d;\t Catch:{ all -> 0x0043 }\n r3 = r6.f24853c;\t Catch:{ all -> 0x0043 }\n r1.deleteFile(r3);\t Catch:{ all -> 0x0043 }\n com.google.android.m4b.maps.cg.bx.m23057a(r0);\t Catch:{ all -> 0x0050 }\n goto L_0x002c;\t Catch:{ all -> 0x0050 }\n L_0x0043:\n r1 = move-exception;\t Catch:{ all -> 0x0050 }\n L_0x0044:\n com.google.android.m4b.maps.cg.bx.m23057a(r0);\t Catch:{ all -> 0x0050 }\n com.google.android.m4b.maps.ap.C4655c.m20773b(r2);\t Catch:{ all -> 0x0050 }\n throw r1;\t Catch:{ all -> 0x0050 }\n L_0x004b:\n r0 = 1;\t Catch:{ all -> 0x0050 }\n r6.f24852b = r0;\t Catch:{ all -> 0x0050 }\n monitor-exit(r6);\n return;\n L_0x0050:\n r0 = move-exception;\n monitor-exit(r6);\n throw r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.m4b.maps.cg.q.c():void\");\n }", "public void mo115190b() {\n }", "public void method_2249(boolean param1, class_81 param2) {\r\n // $FF: Couldn't be decompiled\r\n }", "public final void mo1285b() {\n }", "public void mo23813b() {\n }", "public boolean method_208() {\r\n return false;\r\n }", "public final void mo11687c() {\n }", "public final void mo51373a() {\n }", "public static com.facebook.ads.internal.p081a.C1714d m6464a(java.lang.String r1) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r0 = android.text.TextUtils.isEmpty(r1);\n if (r0 == 0) goto L_0x0009;\n L_0x0006:\n r1 = NONE;\n return r1;\n L_0x0009:\n r0 = java.util.Locale.US;\t Catch:{ IllegalArgumentException -> 0x0014 }\n r1 = r1.toUpperCase(r0);\t Catch:{ IllegalArgumentException -> 0x0014 }\n r1 = com.facebook.ads.internal.p081a.C1714d.valueOf(r1);\t Catch:{ IllegalArgumentException -> 0x0014 }\n return r1;\n L_0x0014:\n r1 = NONE;\n return r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.facebook.ads.internal.a.d.a(java.lang.String):com.facebook.ads.internal.a.d\");\n }", "void mo72113b();", "public boolean method_2434() {\r\n return false;\r\n }", "public void mo21787L() {\n }", "boolean m25333a(java.lang.String r1) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n*/\n /*\n r0 = this;\n java.lang.Class.forName(r1);\t Catch:{ ClassNotFoundException -> 0x0005 }\n r1 = 1;\n return r1;\n L_0x0005:\n r1 = 0;\n return r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.mapbox.android.core.location.c.a(java.lang.String):boolean\");\n }", "private void kk12() {\n\n\t}", "void mo80457c();", "@org.jetbrains.annotations.NotNull\n /* Code decompiled incorrectly, please refer to instructions dump. */\n public static /* synthetic */ com.bitcoin.mwallet.core.models.p009tx.slputxo.SlpUtxoSelection copy$default(com.bitcoin.mwallet.core.models.p009tx.slputxo.SlpUtxoSelection r4, com.bitcoin.mwallet.core.models.slp.Slp r5, java.util.List<kotlin.ULong> r6, com.bitcoin.bitcoink.p008tx.Satoshis r7, com.bitcoin.bitcoink.p008tx.Satoshis r8, java.util.List<com.bitcoin.mwallet.core.models.p009tx.utxo.Utxo> r9, com.bitcoin.mwallet.core.models.p009tx.slputxo.SlpUtxoSelection.Error r10, int r11, java.lang.Object r12) {\n /*\n r12 = r11 & 1\n if (r12 == 0) goto L_0x0006\n com.bitcoin.mwallet.core.models.slp.Slp r5 = r4.token\n L_0x0006:\n r12 = r11 & 2\n if (r12 == 0) goto L_0x000c\n java.util.List<kotlin.ULong> r6 = r4.quantities\n L_0x000c:\n r12 = r6\n r6 = r11 & 4\n if (r6 == 0) goto L_0x0013\n com.bitcoin.bitcoink.tx.Satoshis r7 = r4.fee\n L_0x0013:\n r0 = r7\n r6 = r11 & 8\n if (r6 == 0) goto L_0x001a\n com.bitcoin.bitcoink.tx.Satoshis r8 = r4.change\n L_0x001a:\n r1 = r8\n r6 = r11 & 16\n if (r6 == 0) goto L_0x0021\n java.util.List<com.bitcoin.mwallet.core.models.tx.utxo.Utxo> r9 = r4.utxos\n L_0x0021:\n r2 = r9\n r6 = r11 & 32\n if (r6 == 0) goto L_0x0028\n com.bitcoin.mwallet.core.models.tx.slputxo.SlpUtxoSelection$Error r10 = r4.error\n L_0x0028:\n r3 = r10\n r6 = r4\n r7 = r5\n r8 = r12\n r9 = r0\n r10 = r1\n r11 = r2\n r12 = r3\n com.bitcoin.mwallet.core.models.tx.slputxo.SlpUtxoSelection r4 = r6.copy(r7, r8, r9, r10, r11, r12)\n return r4\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.bitcoin.mwallet.core.models.p009tx.slputxo.SlpUtxoSelection.copy$default(com.bitcoin.mwallet.core.models.tx.slputxo.SlpUtxoSelection, com.bitcoin.mwallet.core.models.slp.Slp, java.util.List, com.bitcoin.bitcoink.tx.Satoshis, com.bitcoin.bitcoink.tx.Satoshis, java.util.List, com.bitcoin.mwallet.core.models.tx.slputxo.SlpUtxoSelection$Error, int, java.lang.Object):com.bitcoin.mwallet.core.models.tx.slputxo.SlpUtxoSelection\");\n }", "public boolean A_()\r\n/* 21: */ {\r\n/* 22:138 */ return true;\r\n/* 23: */ }", "private final boolean e() {\n /*\n r15 = this;\n r2 = 0\n r1 = 0\n dtd r0 = r15.m // Catch:{ all -> 0x008e }\n if (r0 != 0) goto L_0x000d\n dtd r0 = new dtd // Catch:{ all -> 0x008e }\n r0.<init>() // Catch:{ all -> 0x008e }\n r15.m = r0 // Catch:{ all -> 0x008e }\n L_0x000d:\n int r0 = r15.k // Catch:{ all -> 0x008e }\n dtd r3 = r15.m // Catch:{ all -> 0x008e }\n int r3 = r3.a // Catch:{ all -> 0x008e }\n int r0 = r0 - r3\n if (r0 <= 0) goto L_0x039e\n dvk r3 = r15.g // Catch:{ all -> 0x008e }\n if (r3 == 0) goto L_0x0356\n byte[] r3 = r15.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r3 == 0) goto L_0x0025\n int r3 = r15.i // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r4 = r15.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r4 = r4.length // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r3 != r4) goto L_0x0032\n L_0x0025:\n r3 = 2097152(0x200000, float:2.938736E-39)\n int r3 = java.lang.Math.min(r0, r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r3 = new byte[r3] // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r15.h = r3 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 0\n r15.i = r3 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x0032:\n byte[] r3 = r15.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r3.length // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r4 = r15.i // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r3 - r4\n int r6 = java.lang.Math.min(r0, r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r7 = r15.g // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r8 = r15.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r9 = r15.i // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n boolean r0 = r7.i // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 != 0) goto L_0x00ac\n r0 = 1\n L_0x0047:\n java.lang.String r3 = \"GzipInflatingBuffer is closed\"\n defpackage.cld.b(r0, r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 0\n r0 = 1\n r5 = r3\n L_0x004f:\n if (r0 == 0) goto L_0x02ef\n int r3 = r6 - r5\n if (r3 <= 0) goto L_0x02ef\n dvm r0 = r7.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.ordinal() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n switch(r0) {\n case 0: goto L_0x00ae;\n case 1: goto L_0x0148;\n case 2: goto L_0x0171;\n case 3: goto L_0x01d7;\n case 4: goto L_0x01fc;\n case 5: goto L_0x0221;\n case 6: goto L_0x0256;\n case 7: goto L_0x0289;\n case 8: goto L_0x02a2;\n case 9: goto L_0x02e9;\n default: goto L_0x005e;\n } // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x005e:\n java.lang.AssertionError r0 = new java.lang.AssertionError // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvm r3 = r7.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.lang.String r3 = java.lang.String.valueOf(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.lang.String r4 = java.lang.String.valueOf(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r4 = r4.length() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r4 = r4 + 15\n java.lang.StringBuilder r5 = new java.lang.StringBuilder // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r5.<init>(r4) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.lang.String r4 = \"Invalid state: \"\n java.lang.StringBuilder r4 = r5.append(r4) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.lang.StringBuilder r3 = r4.append(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.lang.String r3 = r3.toString() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0.<init>(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n throw r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x0087:\n r0 = move-exception\n java.lang.RuntimeException r3 = new java.lang.RuntimeException // Catch:{ all -> 0x008e }\n r3.<init>(r0) // Catch:{ all -> 0x008e }\n throw r3 // Catch:{ all -> 0x008e }\n L_0x008e:\n r0 = move-exception\n if (r2 <= 0) goto L_0x00ab\n dxe r3 = r15.a\n r3.a(r2)\n dxh r3 = r15.j\n dxh r4 = defpackage.dxh.BODY\n if (r3 != r4) goto L_0x00ab\n dvk r3 = r15.g\n if (r3 == 0) goto L_0x03c9\n dzo r2 = r15.d\n long r4 = (long) r1\n r2.d(r4)\n int r2 = r15.r\n int r1 = r1 + r2\n r15.r = r1\n L_0x00ab:\n throw r0\n L_0x00ac:\n r0 = 0\n goto L_0x0047\n L_0x00ae:\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.b() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 10\n if (r0 >= r3) goto L_0x00ba\n r0 = 0\n goto L_0x004f\n L_0x00ba:\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.c() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 35615(0x8b1f, float:4.9907E-41)\n if (r0 == r3) goto L_0x00d4\n java.util.zip.ZipException r0 = new java.util.zip.ZipException // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.lang.String r3 = \"Not in GZIP format\"\n r0.<init>(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n throw r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x00cd:\n r0 = move-exception\n java.lang.RuntimeException r3 = new java.lang.RuntimeException // Catch:{ all -> 0x008e }\n r3.<init>(r0) // Catch:{ all -> 0x008e }\n throw r3 // Catch:{ all -> 0x008e }\n L_0x00d4:\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.a() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 8\n if (r0 == r3) goto L_0x00e6\n java.util.zip.ZipException r0 = new java.util.zip.ZipException // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.lang.String r3 = \"Unsupported compression method\"\n r0.<init>(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n throw r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x00e6:\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.a() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.j = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvl r4 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 6\n dvk r3 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r3.f // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r10 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r10 = r10.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r3 - r10\n if (r3 <= 0) goto L_0x03d9\n r0 = 6\n int r0 = java.lang.Math.min(r3, r0) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r3 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.util.zip.CRC32 r3 = r3.b // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r10 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r10 = r10.d // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r11 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r11 = r11.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3.update(r10, r11, r0) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r3 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n defpackage.dvk.a(r3, r0) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = 6 - r0\n r3 = r0\n L_0x0118:\n if (r3 <= 0) goto L_0x013b\n r0 = 512(0x200, float:7.175E-43)\n byte[] r10 = new byte[r0] // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 0\n L_0x011f:\n if (r0 >= r3) goto L_0x013b\n int r11 = r3 - r0\n r12 = 512(0x200, float:7.175E-43)\n int r11 = java.lang.Math.min(r11, r12) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r12 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dtd r12 = r12.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r13 = 0\n r12.a(r10, r13, r11) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r12 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.util.zip.CRC32 r12 = r12.b // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r13 = 0\n r12.update(r10, r13, r11) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0 + r11\n goto L_0x011f\n L_0x013b:\n dvk r0 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 6\n defpackage.dvk.b(r0, r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvm r0 = defpackage.dvm.HEADER_EXTRA_LEN // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 1\n goto L_0x004f\n L_0x0148:\n int r0 = r7.j // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = r0 & 4\n r3 = 4\n if (r0 == r3) goto L_0x0156\n dvm r0 = defpackage.dvm.HEADER_NAME // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 1\n goto L_0x004f\n L_0x0156:\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.b() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 2\n if (r0 >= r3) goto L_0x0162\n r0 = 0\n goto L_0x004f\n L_0x0162:\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.c() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.k = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvm r0 = defpackage.dvm.HEADER_EXTRA // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 1\n goto L_0x004f\n L_0x0171:\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.b() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r7.k // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 >= r3) goto L_0x017e\n r0 = 0\n goto L_0x004f\n L_0x017e:\n dvl r10 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r4 = r7.k // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r0 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.f // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r3 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r3.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0 - r3\n if (r0 <= 0) goto L_0x03d6\n int r0 = java.lang.Math.min(r0, r4) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r3 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.util.zip.CRC32 r3 = r3.b // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r11 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r11 = r11.d // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r12 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r12 = r12.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3.update(r11, r12, r0) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r3 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n defpackage.dvk.a(r3, r0) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r4 - r0\n r3 = r0\n L_0x01a8:\n if (r3 <= 0) goto L_0x01cb\n r0 = 512(0x200, float:7.175E-43)\n byte[] r11 = new byte[r0] // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 0\n L_0x01af:\n if (r0 >= r3) goto L_0x01cb\n int r12 = r3 - r0\n r13 = 512(0x200, float:7.175E-43)\n int r12 = java.lang.Math.min(r12, r13) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r13 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dtd r13 = r13.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r14 = 0\n r13.a(r11, r14, r12) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r13 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.util.zip.CRC32 r13 = r13.b // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r14 = 0\n r13.update(r11, r14, r12) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0 + r12\n goto L_0x01af\n L_0x01cb:\n dvk r0 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n defpackage.dvk.b(r0, r4) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvm r0 = defpackage.dvm.HEADER_NAME // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 1\n goto L_0x004f\n L_0x01d7:\n int r0 = r7.j // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = r0 & 8\n r3 = 8\n if (r0 != r3) goto L_0x01f5\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x01e1:\n int r3 = r0.b() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r3 <= 0) goto L_0x01f3\n int r3 = r0.a() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r3 != 0) goto L_0x01e1\n r0 = 1\n L_0x01ee:\n if (r0 != 0) goto L_0x01f5\n r0 = 0\n goto L_0x004f\n L_0x01f3:\n r0 = 0\n goto L_0x01ee\n L_0x01f5:\n dvm r0 = defpackage.dvm.HEADER_COMMENT // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 1\n goto L_0x004f\n L_0x01fc:\n int r0 = r7.j // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = r0 & 16\n r3 = 16\n if (r0 != r3) goto L_0x021a\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x0206:\n int r3 = r0.b() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r3 <= 0) goto L_0x0218\n int r3 = r0.a() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r3 != 0) goto L_0x0206\n r0 = 1\n L_0x0213:\n if (r0 != 0) goto L_0x021a\n r0 = 0\n goto L_0x004f\n L_0x0218:\n r0 = 0\n goto L_0x0213\n L_0x021a:\n dvm r0 = defpackage.dvm.HEADER_CRC // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 1\n goto L_0x004f\n L_0x0221:\n int r0 = r7.j // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = r0 & 2\n r3 = 2\n if (r0 != r3) goto L_0x024f\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.b() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 2\n if (r0 >= r3) goto L_0x0234\n r0 = 0\n goto L_0x004f\n L_0x0234:\n java.util.zip.CRC32 r0 = r7.b // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n long r10 = r0.getValue() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = (int) r10 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 65535(0xffff, float:9.1834E-41)\n r0 = r0 & r3\n dvl r3 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r3.c() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 == r3) goto L_0x024f\n java.util.zip.ZipException r0 = new java.util.zip.ZipException // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.lang.String r3 = \"Corrupt GZIP header\"\n r0.<init>(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n throw r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x024f:\n dvm r0 = defpackage.dvm.INITIALIZE_INFLATER // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 1\n goto L_0x004f\n L_0x0256:\n java.util.zip.Inflater r0 = r7.g // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 != 0) goto L_0x027e\n java.util.zip.Inflater r0 = new java.util.zip.Inflater // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 1\n r0.<init>(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.g = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x0262:\n java.util.zip.CRC32 r0 = r7.b // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0.reset() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r7.f // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r7.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0 - r3\n if (r0 <= 0) goto L_0x0284\n java.util.zip.Inflater r3 = r7.g // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r4 = r7.d // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r10 = r7.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3.setInput(r4, r10, r0) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvm r0 = defpackage.dvm.INFLATING // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x027b:\n r0 = 1\n goto L_0x004f\n L_0x027e:\n java.util.zip.Inflater r0 = r7.g // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0.reset() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n goto L_0x0262\n L_0x0284:\n dvm r0 = defpackage.dvm.INFLATER_NEEDS_INPUT // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n goto L_0x027b\n L_0x0289:\n int r0 = r9 + r5\n int r0 = r7.a(r8, r0, r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r5 + r0\n dvm r0 = r7.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvm r4 = defpackage.dvm.TRAILER // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 != r4) goto L_0x029e\n boolean r0 = r7.a() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r5 = r3\n goto L_0x004f\n L_0x029e:\n r0 = 1\n r5 = r3\n goto L_0x004f\n L_0x02a2:\n java.util.zip.Inflater r0 = r7.g // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 == 0) goto L_0x02c7\n r0 = 1\n L_0x02a7:\n java.lang.String r3 = \"inflater is null\"\n defpackage.cld.b(r0, r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r7.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r7.f // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 != r3) goto L_0x02c9\n r0 = 1\n L_0x02b3:\n java.lang.String r3 = \"inflaterInput has unconsumed bytes\"\n defpackage.cld.b(r0, r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dtd r0 = r7.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 512(0x200, float:7.175E-43)\n int r0 = java.lang.Math.min(r0, r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 != 0) goto L_0x02cb\n r0 = 0\n goto L_0x004f\n L_0x02c7:\n r0 = 0\n goto L_0x02a7\n L_0x02c9:\n r0 = 0\n goto L_0x02b3\n L_0x02cb:\n r3 = 0\n r7.e = r3 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.f = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dtd r3 = r7.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r4 = r7.d // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r10 = r7.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3.a(r4, r10, r0) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.util.zip.Inflater r3 = r7.g // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r4 = r7.d // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r10 = r7.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3.setInput(r4, r10, r0) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvm r0 = defpackage.dvm.INFLATING // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 1\n goto L_0x004f\n L_0x02e9:\n boolean r0 = r7.a() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n goto L_0x004f\n L_0x02ef:\n if (r0 == 0) goto L_0x0301\n dvm r0 = r7.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvm r3 = defpackage.dvm.HEADER // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 != r3) goto L_0x0334\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.b() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 10\n if (r0 >= r3) goto L_0x0334\n L_0x0301:\n r0 = 1\n L_0x0302:\n r7.n = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r0 = r15.g // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r0.l // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r4 = 0\n r0.l = r4 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r2 = r2 + r3\n dvk r0 = r15.g // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r0.m // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r4 = 0\n r0.m = r4 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r1 = r1 + r3\n if (r5 != 0) goto L_0x0342\n if (r2 <= 0) goto L_0x0332\n dxe r0 = r15.a\n r0.a(r2)\n dxh r0 = r15.j\n dxh r3 = defpackage.dxh.BODY\n if (r0 != r3) goto L_0x0332\n dvk r0 = r15.g\n if (r0 == 0) goto L_0x0336\n dzo r0 = r15.d\n long r2 = (long) r1\n r0.d(r2)\n int r0 = r15.r\n int r0 = r0 + r1\n r15.r = r0\n L_0x0332:\n r0 = 0\n L_0x0333:\n return r0\n L_0x0334:\n r0 = 0\n goto L_0x0302\n L_0x0336:\n dzo r0 = r15.d\n long r4 = (long) r2\n r0.d(r4)\n int r0 = r15.r\n int r0 = r0 + r2\n r15.r = r0\n goto L_0x0332\n L_0x0342:\n dtd r0 = r15.m // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r3 = r15.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r4 = r15.i // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dxv r3 = defpackage.dxw.a(r3, r4, r5) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0.a(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r15.i // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0 + r5\n r15.i = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n goto L_0x000d\n L_0x0356:\n dtd r3 = r15.n // Catch:{ all -> 0x008e }\n int r3 = r3.a // Catch:{ all -> 0x008e }\n if (r3 != 0) goto L_0x0386\n if (r2 <= 0) goto L_0x0378\n dxe r0 = r15.a\n r0.a(r2)\n dxh r0 = r15.j\n dxh r3 = defpackage.dxh.BODY\n if (r0 != r3) goto L_0x0378\n dvk r0 = r15.g\n if (r0 == 0) goto L_0x037a\n dzo r0 = r15.d\n long r2 = (long) r1\n r0.d(r2)\n int r0 = r15.r\n int r0 = r0 + r1\n r15.r = r0\n L_0x0378:\n r0 = 0\n goto L_0x0333\n L_0x037a:\n dzo r0 = r15.d\n long r4 = (long) r2\n r0.d(r4)\n int r0 = r15.r\n int r0 = r0 + r2\n r15.r = r0\n goto L_0x0378\n L_0x0386:\n dtd r3 = r15.n // Catch:{ all -> 0x008e }\n int r3 = r3.a // Catch:{ all -> 0x008e }\n int r0 = java.lang.Math.min(r0, r3) // Catch:{ all -> 0x008e }\n int r2 = r2 + r0\n dtd r3 = r15.m // Catch:{ all -> 0x008e }\n dtd r4 = r15.n // Catch:{ all -> 0x008e }\n dxv r0 = r4.a(r0) // Catch:{ all -> 0x008e }\n dtd r0 = (defpackage.dtd) r0 // Catch:{ all -> 0x008e }\n r3.a(r0) // Catch:{ all -> 0x008e }\n goto L_0x000d\n L_0x039e:\n if (r2 <= 0) goto L_0x03ba\n dxe r0 = r15.a\n r0.a(r2)\n dxh r0 = r15.j\n dxh r3 = defpackage.dxh.BODY\n if (r0 != r3) goto L_0x03ba\n dvk r0 = r15.g\n if (r0 == 0) goto L_0x03bd\n dzo r0 = r15.d\n long r2 = (long) r1\n r0.d(r2)\n int r0 = r15.r\n int r0 = r0 + r1\n r15.r = r0\n L_0x03ba:\n r0 = 1\n goto L_0x0333\n L_0x03bd:\n dzo r0 = r15.d\n long r4 = (long) r2\n r0.d(r4)\n int r0 = r15.r\n int r0 = r0 + r2\n r15.r = r0\n goto L_0x03ba\n L_0x03c9:\n dzo r1 = r15.d\n long r4 = (long) r2\n r1.d(r4)\n int r1 = r15.r\n int r1 = r1 + r2\n r15.r = r1\n goto L_0x00ab\n L_0x03d6:\n r3 = r4\n goto L_0x01a8\n L_0x03d9:\n r3 = r0\n goto L_0x0118\n */\n throw new UnsupportedOperationException(\"Method not decompiled: defpackage.dxd.e():boolean\");\n }", "public void m23075a() {\n }", "void mo80452a();", "public final int mo11683a(com.google.android.gms.internal.ads.bci r11, com.google.android.gms.internal.ads.bcn r12) {\n /*\n r10 = this;\n L_0x0000:\n int r12 = r10.f3925e\n r0 = -1\n r1 = 1\n r2 = 0\n switch(r12) {\n case 0: goto L_0x00b2;\n case 1: goto L_0x0044;\n case 2: goto L_0x000e;\n default: goto L_0x0008;\n }\n L_0x0008:\n java.lang.IllegalStateException r11 = new java.lang.IllegalStateException\n r11.<init>()\n throw r11\n L_0x000e:\n int r12 = r10.f3928h\n if (r12 <= 0) goto L_0x0031\n com.google.android.gms.internal.ads.bkh r12 = r10.f3923c\n r12.mo12047a()\n com.google.android.gms.internal.ads.bkh r12 = r10.f3923c\n byte[] r12 = r12.f4559a\n r0 = 3\n r11.mo11675b(r12, r2, r0)\n com.google.android.gms.internal.ads.bcq r12 = r10.f3924d\n com.google.android.gms.internal.ads.bkh r3 = r10.f3923c\n r12.mo11681a(r3, r0)\n int r12 = r10.f3929i\n int r12 = r12 + r0\n r10.f3929i = r12\n int r12 = r10.f3928h\n int r12 = r12 - r1\n r10.f3928h = r12\n goto L_0x000e\n L_0x0031:\n int r11 = r10.f3929i\n if (r11 <= 0) goto L_0x0041\n com.google.android.gms.internal.ads.bcq r3 = r10.f3924d\n long r4 = r10.f3927g\n r6 = 1\n int r7 = r10.f3929i\n r8 = 0\n r9 = 0\n r3.mo11680a(r4, r6, r7, r8, r9)\n L_0x0041:\n r10.f3925e = r1\n return r2\n L_0x0044:\n com.google.android.gms.internal.ads.bkh r12 = r10.f3923c\n r12.mo12047a()\n int r12 = r10.f3926f\n if (r12 != 0) goto L_0x006a\n com.google.android.gms.internal.ads.bkh r12 = r10.f3923c\n byte[] r12 = r12.f4559a\n r3 = 5\n boolean r12 = r11.mo11672a(r12, r2, r3, r1)\n if (r12 != 0) goto L_0x005a\n L_0x0058:\n r1 = 0\n goto L_0x008d\n L_0x005a:\n com.google.android.gms.internal.ads.bkh r12 = r10.f3923c\n long r3 = r12.mo12063j()\n r5 = 1000(0x3e8, double:4.94E-321)\n long r3 = r3 * r5\n r5 = 45\n long r3 = r3 / r5\n r10.f3927g = r3\n goto L_0x0083\n L_0x006a:\n int r12 = r10.f3926f\n if (r12 != r1) goto L_0x0097\n com.google.android.gms.internal.ads.bkh r12 = r10.f3923c\n byte[] r12 = r12.f4559a\n r3 = 9\n boolean r12 = r11.mo11672a(r12, r2, r3, r1)\n if (r12 != 0) goto L_0x007b\n goto L_0x0058\n L_0x007b:\n com.google.android.gms.internal.ads.bkh r12 = r10.f3923c\n long r3 = r12.mo12066m()\n r10.f3927g = r3\n L_0x0083:\n com.google.android.gms.internal.ads.bkh r12 = r10.f3923c\n int r12 = r12.mo12059f()\n r10.f3928h = r12\n r10.f3929i = r2\n L_0x008d:\n if (r1 == 0) goto L_0x0094\n r12 = 2\n r10.f3925e = r12\n goto L_0x0000\n L_0x0094:\n r10.f3925e = r2\n return r0\n L_0x0097:\n com.google.android.gms.internal.ads.bad r11 = new com.google.android.gms.internal.ads.bad\n int r12 = r10.f3926f\n r0 = 39\n java.lang.StringBuilder r1 = new java.lang.StringBuilder\n r1.<init>(r0)\n java.lang.String r0 = \"Unsupported version number: \"\n r1.append(r0)\n r1.append(r12)\n java.lang.String r12 = r1.toString()\n r11.<init>((java.lang.String) r12)\n throw r11\n L_0x00b2:\n com.google.android.gms.internal.ads.bkh r12 = r10.f3923c\n r12.mo12047a()\n com.google.android.gms.internal.ads.bkh r12 = r10.f3923c\n byte[] r12 = r12.f4559a\n r3 = 8\n boolean r12 = r11.mo11672a(r12, r2, r3, r1)\n if (r12 == 0) goto L_0x00df\n com.google.android.gms.internal.ads.bkh r12 = r10.f3923c\n int r12 = r12.mo12065l()\n int r2 = f3921a\n if (r12 != r2) goto L_0x00d7\n com.google.android.gms.internal.ads.bkh r12 = r10.f3923c\n int r12 = r12.mo12059f()\n r10.f3926f = r12\n r2 = 1\n goto L_0x00df\n L_0x00d7:\n java.io.IOException r11 = new java.io.IOException\n java.lang.String r12 = \"Input not RawCC\"\n r11.<init>(r12)\n throw r11\n L_0x00df:\n if (r2 == 0) goto L_0x00e5\n r10.f3925e = r1\n goto L_0x0000\n L_0x00e5:\n return r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.ads.bef.mo11683a(com.google.android.gms.internal.ads.bci, com.google.android.gms.internal.ads.bcn):int\");\n }", "public void mo12628c() {\n }", "public synchronized void m6495a(int r6, int r7) throws fr.pcsoft.wdjava.geo.C0918i {\n /* JADX: method processing error */\n/*\nError: jadx.core.utils.exceptions.JadxRuntimeException: Exception block dominator not found, method:fr.pcsoft.wdjava.geo.a.b.a(int, int):void. bs: [B:13:0x001d, B:18:0x0027, B:23:0x0031, B:28:0x003a, B:44:0x005d, B:55:0x006c, B:64:0x0079]\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:86)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/70807318.run(Unknown Source)\n*/\n /*\n r5 = this;\n r4 = 2;\n r1 = 0;\n r0 = 1;\n monitor-enter(r5);\n r5.m6487e();\t Catch:{ all -> 0x0053 }\n switch(r6) {\n case 2: goto L_0x0089;\n case 3: goto L_0x000a;\n case 4: goto L_0x0013;\n default: goto L_0x000a;\n };\t Catch:{ all -> 0x0053 }\n L_0x000a:\n r0 = f2486z;\t Catch:{ all -> 0x0053 }\n r1 = 3;\t Catch:{ all -> 0x0053 }\n r0 = r0[r1];\t Catch:{ all -> 0x0053 }\n r5.f2488b = r0;\t Catch:{ all -> 0x0053 }\n L_0x0011:\n monitor-exit(r5);\n return;\n L_0x0013:\n r3 = new android.location.Criteria;\t Catch:{ all -> 0x0053 }\n r3.<init>();\t Catch:{ all -> 0x0053 }\n r2 = r7 & 2;\n if (r2 != r4) goto L_0x0058;\n L_0x001c:\n r2 = 1;\n r3.setAccuracy(r2);\t Catch:{ i -> 0x0056 }\n L_0x0020:\n r2 = r7 & 128;\n r4 = 128; // 0x80 float:1.794E-43 double:6.32E-322;\n if (r2 != r4) goto L_0x0065;\n L_0x0026:\n r2 = 3;\n r3.setPowerRequirement(r2);\t Catch:{ i -> 0x0063 }\n L_0x002a:\n r2 = r7 & 8;\n r4 = 8;\n if (r2 != r4) goto L_0x007f;\n L_0x0030:\n r2 = r0;\n L_0x0031:\n r3.setAltitudeRequired(r2);\t Catch:{ i -> 0x0081 }\n r2 = r7 & 4;\n r4 = 4;\n if (r2 != r4) goto L_0x0083;\n L_0x0039:\n r2 = r0;\n L_0x003a:\n r3.setAltitudeRequired(r2);\t Catch:{ i -> 0x0085 }\n r2 = r7 & 16;\n r4 = 16;\n if (r2 != r4) goto L_0x0087;\n L_0x0043:\n r3.setAltitudeRequired(r0);\t Catch:{ all -> 0x0053 }\n r0 = 0;\t Catch:{ all -> 0x0053 }\n r0 = r5.m6485a(r0);\t Catch:{ all -> 0x0053 }\n r1 = 1;\t Catch:{ all -> 0x0053 }\n r0 = r0.getBestProvider(r3, r1);\t Catch:{ all -> 0x0053 }\n r5.f2488b = r0;\t Catch:{ all -> 0x0053 }\n goto L_0x0011;\n L_0x0053:\n r0 = move-exception;\n monitor-exit(r5);\n throw r0;\n L_0x0056:\n r0 = move-exception;\n throw r0;\t Catch:{ all -> 0x0053 }\n L_0x0058:\n r2 = r7 & 1;\n if (r2 != r0) goto L_0x0020;\n L_0x005c:\n r2 = 2;\n r3.setAccuracy(r2);\t Catch:{ i -> 0x0061 }\n goto L_0x0020;\n L_0x0061:\n r0 = move-exception;\n throw r0;\t Catch:{ all -> 0x0053 }\n L_0x0063:\n r0 = move-exception;\t Catch:{ all -> 0x0053 }\n throw r0;\t Catch:{ all -> 0x0053 }\n L_0x0065:\n r2 = r7 & 64;\n r4 = 64;\n if (r2 != r4) goto L_0x0072;\n L_0x006b:\n r2 = 2;\n r3.setPowerRequirement(r2);\t Catch:{ i -> 0x0070 }\n goto L_0x002a;\n L_0x0070:\n r0 = move-exception;\n throw r0;\t Catch:{ all -> 0x0053 }\n L_0x0072:\n r2 = r7 & 32;\n r4 = 32;\n if (r2 != r4) goto L_0x002a;\n L_0x0078:\n r2 = 1;\n r3.setPowerRequirement(r2);\t Catch:{ i -> 0x007d }\n goto L_0x002a;\n L_0x007d:\n r0 = move-exception;\n throw r0;\t Catch:{ all -> 0x0053 }\n L_0x007f:\n r2 = r1;\t Catch:{ all -> 0x0053 }\n goto L_0x0031;\t Catch:{ all -> 0x0053 }\n L_0x0081:\n r0 = move-exception;\t Catch:{ all -> 0x0053 }\n throw r0;\t Catch:{ all -> 0x0053 }\n L_0x0083:\n r2 = r1;\t Catch:{ all -> 0x0053 }\n goto L_0x003a;\t Catch:{ all -> 0x0053 }\n L_0x0085:\n r0 = move-exception;\t Catch:{ all -> 0x0053 }\n throw r0;\t Catch:{ all -> 0x0053 }\n L_0x0087:\n r0 = r1;\t Catch:{ all -> 0x0053 }\n goto L_0x0043;\t Catch:{ all -> 0x0053 }\n L_0x0089:\n r0 = f2486z;\t Catch:{ all -> 0x0053 }\n r1 = 2;\t Catch:{ all -> 0x0053 }\n r0 = r0[r1];\t Catch:{ all -> 0x0053 }\n r5.f2488b = r0;\t Catch:{ all -> 0x0053 }\n goto L_0x0011;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: fr.pcsoft.wdjava.geo.a.b.a(int, int):void\");\n }", "void mo41086b();", "private synchronized void m3985g() {\n /*\n r8 = this;\n monitor-enter(r8);\n r2 = java.lang.Thread.currentThread();\t Catch:{ all -> 0x0063 }\n r3 = r8.f2114f;\t Catch:{ all -> 0x0063 }\n r3 = r3.mo1186c();\t Catch:{ all -> 0x0063 }\n r2 = r2.equals(r3);\t Catch:{ all -> 0x0063 }\n if (r2 != 0) goto L_0x0021;\n L_0x0011:\n r2 = r8.f2114f;\t Catch:{ all -> 0x0063 }\n r2 = r2.mo1185b();\t Catch:{ all -> 0x0063 }\n r3 = new com.google.analytics.tracking.android.aa;\t Catch:{ all -> 0x0063 }\n r3.<init>(r8);\t Catch:{ all -> 0x0063 }\n r2.add(r3);\t Catch:{ all -> 0x0063 }\n L_0x001f:\n monitor-exit(r8);\n return;\n L_0x0021:\n r2 = r8.f2122n;\t Catch:{ all -> 0x0063 }\n if (r2 == 0) goto L_0x0028;\n L_0x0025:\n r8.m3999d();\t Catch:{ all -> 0x0063 }\n L_0x0028:\n r2 = com.google.analytics.tracking.android.ab.f1966a;\t Catch:{ all -> 0x0063 }\n r3 = r8.f2110b;\t Catch:{ all -> 0x0063 }\n r3 = r3.ordinal();\t Catch:{ all -> 0x0063 }\n r2 = r2[r3];\t Catch:{ all -> 0x0063 }\n switch(r2) {\n case 1: goto L_0x0036;\n case 2: goto L_0x006e;\n case 3: goto L_0x00aa;\n default: goto L_0x0035;\n };\t Catch:{ all -> 0x0063 }\n L_0x0035:\n goto L_0x001f;\n L_0x0036:\n r2 = r8.f2116h;\t Catch:{ all -> 0x0063 }\n r2 = r2.isEmpty();\t Catch:{ all -> 0x0063 }\n if (r2 != 0) goto L_0x0066;\n L_0x003e:\n r2 = r8.f2116h;\t Catch:{ all -> 0x0063 }\n r2 = r2.poll();\t Catch:{ all -> 0x0063 }\n r0 = r2;\n r0 = (com.google.analytics.tracking.android.af) r0;\t Catch:{ all -> 0x0063 }\n r7 = r0;\n r2 = \"Sending hit to store\";\n com.google.analytics.tracking.android.av.m3818e(r2);\t Catch:{ all -> 0x0063 }\n r2 = r8.f2112d;\t Catch:{ all -> 0x0063 }\n r3 = r7.m3743a();\t Catch:{ all -> 0x0063 }\n r4 = r7.m3744b();\t Catch:{ all -> 0x0063 }\n r6 = r7.m3745c();\t Catch:{ all -> 0x0063 }\n r7 = r7.m3746d();\t Catch:{ all -> 0x0063 }\n r2.mo1197a(r3, r4, r6, r7);\t Catch:{ all -> 0x0063 }\n goto L_0x0036;\n L_0x0063:\n r2 = move-exception;\n monitor-exit(r8);\n throw r2;\n L_0x0066:\n r2 = r8.f2121m;\t Catch:{ all -> 0x0063 }\n if (r2 == 0) goto L_0x001f;\n L_0x006a:\n r8.m3987h();\t Catch:{ all -> 0x0063 }\n goto L_0x001f;\n L_0x006e:\n r2 = r8.f2116h;\t Catch:{ all -> 0x0063 }\n r2 = r2.isEmpty();\t Catch:{ all -> 0x0063 }\n if (r2 != 0) goto L_0x00a0;\n L_0x0076:\n r2 = r8.f2116h;\t Catch:{ all -> 0x0063 }\n r2 = r2.peek();\t Catch:{ all -> 0x0063 }\n r0 = r2;\n r0 = (com.google.analytics.tracking.android.af) r0;\t Catch:{ all -> 0x0063 }\n r7 = r0;\n r2 = \"Sending hit to service\";\n com.google.analytics.tracking.android.av.m3818e(r2);\t Catch:{ all -> 0x0063 }\n r2 = r8.f2111c;\t Catch:{ all -> 0x0063 }\n r3 = r7.m3743a();\t Catch:{ all -> 0x0063 }\n r4 = r7.m3744b();\t Catch:{ all -> 0x0063 }\n r6 = r7.m3745c();\t Catch:{ all -> 0x0063 }\n r7 = r7.m3746d();\t Catch:{ all -> 0x0063 }\n r2.mo1204a(r3, r4, r6, r7);\t Catch:{ all -> 0x0063 }\n r2 = r8.f2116h;\t Catch:{ all -> 0x0063 }\n r2.poll();\t Catch:{ all -> 0x0063 }\n goto L_0x006e;\n L_0x00a0:\n r2 = r8.f2123o;\t Catch:{ all -> 0x0063 }\n r2 = r2.mo1198a();\t Catch:{ all -> 0x0063 }\n r8.f2109a = r2;\t Catch:{ all -> 0x0063 }\n goto L_0x001f;\n L_0x00aa:\n r2 = \"Need to reconnect\";\n com.google.analytics.tracking.android.av.m3818e(r2);\t Catch:{ all -> 0x0063 }\n r2 = r8.f2116h;\t Catch:{ all -> 0x0063 }\n r2 = r2.isEmpty();\t Catch:{ all -> 0x0063 }\n if (r2 != 0) goto L_0x001f;\n L_0x00b7:\n r8.m3991j();\t Catch:{ all -> 0x0063 }\n goto L_0x001f;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.analytics.tracking.android.y.g():void\");\n }", "private final void m710e() {\n /*\n r12 = this;\n akn r0 = r12.f531p\n akl r0 = r0.f601d\n if (r0 == 0) goto L_0x0155\n boolean r1 = r0.f580d\n r2 = -9223372036854775807(0x8000000000000001, double:-4.9E-324)\n if (r1 == 0) goto L_0x0017\n aws r1 = r0.f577a\n long r4 = r1.mo1486c()\n r8 = r4\n goto L_0x0019\n L_0x0017:\n r8 = r2\n L_0x0019:\n int r1 = (r8 > r2 ? 1 : (r8 == r2 ? 0 : -1))\n if (r1 != 0) goto L_0x0122\n ajf r1 = r12.f528m\n akn r2 = r12.f531p\n akl r2 = r2.f602e\n akx r3 = r1.f445c\n r4 = 0\n if (r3 == 0) goto L_0x008a\n boolean r3 = r3.mo486w()\n if (r3 != 0) goto L_0x008a\n akx r3 = r1.f445c\n boolean r3 = r3.mo485v()\n if (r3 == 0) goto L_0x0037\n goto L_0x0042\n L_0x0037:\n if (r0 != r2) goto L_0x008a\n akx r2 = r1.f445c\n boolean r2 = r2.mo359g()\n if (r2 == 0) goto L_0x0042\n goto L_0x008a\n L_0x0042:\n bkr r2 = r1.f446d\n long r2 = r2.mo379b()\n boolean r5 = r1.f447e\n if (r5 == 0) goto L_0x0068\n blf r5 = r1.f443a\n long r5 = r5.mo379b()\n int r7 = (r2 > r5 ? 1 : (r2 == r5 ? 0 : -1))\n if (r7 >= 0) goto L_0x005c\n blf r2 = r1.f443a\n r2.mo2109d()\n goto L_0x0096\n L_0x005c:\n r1.f447e = r4\n boolean r5 = r1.f448f\n if (r5 == 0) goto L_0x0068\n blf r5 = r1.f443a\n r5.mo2107a()\n L_0x0068:\n blf r5 = r1.f443a\n r5.mo2108a(r2)\n bkr r2 = r1.f446d\n akq r2 = r2.mo376Q()\n blf r3 = r1.f443a\n akq r3 = r3.f4280a\n boolean r3 = r2.equals(r3)\n if (r3 != 0) goto L_0x0096\n blf r3 = r1.f443a\n r3.mo378a(r2)\n aje r3 = r1.f444b\n ake r3 = (p000.ake) r3\n r3.m694a(r2, r4)\n goto L_0x0096\n L_0x008a:\n r2 = 1\n r1.f447e = r2\n boolean r2 = r1.f448f\n if (r2 == 0) goto L_0x0096\n blf r2 = r1.f443a\n r2.mo2107a()\n L_0x0096:\n long r1 = r1.mo379b()\n r12.f513D = r1\n long r0 = r0.mo440b(r1)\n akp r2 = r12.f533r\n long r2 = r2.f623m\n java.util.ArrayList r5 = r12.f530o\n boolean r5 = r5.isEmpty()\n if (r5 != 0) goto L_0x011d\n akp r5 = r12.f533r\n awt r5 = r5.f612b\n boolean r5 = r5.mo1504a()\n if (r5 != 0) goto L_0x011d\n akp r5 = r12.f533r\n long r6 = r5.f613c\n int r8 = (r6 > r2 ? 1 : (r6 == r2 ? 0 : -1))\n if (r8 != 0) goto L_0x00c5\n boolean r6 = r12.f515F\n if (r6 == 0) goto L_0x00c5\n r6 = -1\n long r2 = r2 + r6\n L_0x00c5:\n r12.f515F = r4\n alh r4 = r5.f611a\n awt r5 = r5.f612b\n java.lang.Object r5 = r5.f2566a\n int r4 = r4.mo525a(r5)\n int r5 = r12.f514E\n r6 = 0\n if (r5 <= 0) goto L_0x00e1\n java.util.ArrayList r7 = r12.f530o\n int r5 = r5 + -1\n java.lang.Object r5 = r7.get(r5)\n akb r5 = (p000.akb) r5\n goto L_0x00e3\n L_0x00e1:\n L_0x00e2:\n r5 = r6\n L_0x00e3:\n if (r5 != 0) goto L_0x00e6\n goto L_0x0109\n L_0x00e6:\n int r5 = r5.f502a\n if (r4 >= 0) goto L_0x00eb\n L_0x00ea:\n goto L_0x00f4\n L_0x00eb:\n if (r4 != 0) goto L_0x0109\n r7 = 0\n int r5 = (r2 > r7 ? 1 : (r2 == r7 ? 0 : -1))\n if (r5 >= 0) goto L_0x0109\n goto L_0x00ea\n L_0x00f4:\n int r5 = r12.f514E\n int r5 = r5 + -1\n r12.f514E = r5\n if (r5 <= 0) goto L_0x0108\n java.util.ArrayList r7 = r12.f530o\n int r5 = r5 + -1\n java.lang.Object r5 = r7.get(r5)\n akb r5 = (p000.akb) r5\n goto L_0x00e3\n L_0x0108:\n goto L_0x00e2\n L_0x0109:\n int r2 = r12.f514E\n java.util.ArrayList r3 = r12.f530o\n int r3 = r3.size()\n if (r2 >= r3) goto L_0x011d\n java.util.ArrayList r2 = r12.f530o\n int r3 = r12.f514E\n java.lang.Object r2 = r2.get(r3)\n akb r2 = (p000.akb) r2\n L_0x011d:\n akp r2 = r12.f533r\n r2.f623m = r0\n goto L_0x0140\n L_0x0122:\n r12.m691a(r8)\n akp r0 = r12.f533r\n long r0 = r0.f623m\n int r2 = (r8 > r0 ? 1 : (r8 == r0 ? 0 : -1))\n if (r2 == 0) goto L_0x0140\n akp r0 = r12.f533r\n awt r7 = r0.f612b\n long r10 = r0.f614d\n r6 = r12\n akp r0 = r6.m686a(r7, r8, r10)\n r12.f533r = r0\n akc r0 = r12.f529n\n r1 = 4\n r0.mo409b(r1)\n L_0x0140:\n akn r0 = r12.f531p\n akl r0 = r0.f603f\n akp r1 = r12.f533r\n long r2 = r0.mo442c()\n r1.f621k = r2\n akp r0 = r12.f533r\n long r1 = r12.m719n()\n r0.f622l = r1\n return\n L_0x0155:\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: p000.ake.m710e():void\");\n }", "public void mo21785J() {\n }", "public final com.google.android.gms.internal.ads.zzafx mo4170d() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n*/\n /*\n r2 = this;\n r0 = r2.f19705f;\n monitor-enter(r0);\n r1 = r2.f19706g;\t Catch:{ IllegalStateException -> 0x000d, IllegalStateException -> 0x000d }\n r1 = r1.m26175a();\t Catch:{ IllegalStateException -> 0x000d, IllegalStateException -> 0x000d }\n monitor-exit(r0);\t Catch:{ all -> 0x000b }\n return r1;\t Catch:{ all -> 0x000b }\n L_0x000b:\n r1 = move-exception;\t Catch:{ all -> 0x000b }\n goto L_0x0010;\t Catch:{ all -> 0x000b }\n L_0x000d:\n r1 = 0;\t Catch:{ all -> 0x000b }\n monitor-exit(r0);\t Catch:{ all -> 0x000b }\n return r1;\t Catch:{ all -> 0x000b }\n L_0x0010:\n monitor-exit(r0);\t Catch:{ all -> 0x000b }\n throw r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.ads.zzafn.d():com.google.android.gms.internal.ads.zzafx\");\n }", "protected boolean func_70041_e_() { return false; }", "static /* synthetic */ void m204-wrap8(com.mediatek.internal.telephony.worldphone.WorldPhoneOp01 r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 0073 in method: com.mediatek.internal.telephony.worldphone.WorldPhoneOp01.-wrap8(com.mediatek.internal.telephony.worldphone.WorldPhoneOp01):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.mediatek.internal.telephony.worldphone.WorldPhoneOp01.-wrap8(com.mediatek.internal.telephony.worldphone.WorldPhoneOp01):void\");\n }", "public int g()\r\n/* 173: */ {\r\n/* 174:198 */ return 0;\r\n/* 175: */ }" ]
[ "0.7616353", "0.7572131", "0.75251985", "0.74502295", "0.74494404", "0.7436729", "0.738065", "0.738065", "0.7365641", "0.73525214", "0.73411334", "0.7314028", "0.7307766", "0.7304578", "0.7273524", "0.7251268", "0.72207904", "0.71969974", "0.7176537", "0.7135733", "0.710486", "0.70408154", "0.7023884", "0.70184636", "0.6990726", "0.696002", "0.6940071", "0.69067246", "0.6888959", "0.68510413", "0.6827415", "0.67943865", "0.678407", "0.6777927", "0.6771681", "0.6771006", "0.6769211", "0.676746", "0.67416275", "0.6708043", "0.67009026", "0.6699805", "0.6699002", "0.66983634", "0.6669125", "0.66672784", "0.66540927", "0.66129684", "0.6610931", "0.66098416", "0.65935856", "0.65686744", "0.65636337", "0.6539728", "0.6513091", "0.65095264", "0.6509282", "0.6488443", "0.6435971", "0.6432371", "0.6430695", "0.6403981", "0.6400266", "0.637223", "0.6369163", "0.63668054", "0.6355758", "0.63298243", "0.63269496", "0.6325034", "0.6317447", "0.6303614", "0.6303489", "0.6298925", "0.6281936", "0.62809545", "0.6241804", "0.6228259", "0.62273794", "0.62273574", "0.6225269", "0.62191737", "0.62178576", "0.62053037", "0.6198289", "0.6194281", "0.61797875", "0.6171343", "0.6167842", "0.6164482", "0.61626977", "0.6162113", "0.6156989", "0.61556643", "0.6152375", "0.6140879", "0.6126532", "0.6114693", "0.6111775", "0.61019915", "0.6096907" ]
0.0
-1
/ JADX WARNING: inconsistent code. / Code decompiled incorrectly, please refer to instructions dump.
public final void m9111a(com.facebook.api.feedcache.db.FeedDbMutationService.FeedDbInsertionRequest r4) { /* r3 = this; r0 = "FeedDbMutationService.processInsert"; r1 = 1073032506; // 0x3ff52d3a float:1.9154427 double:5.30148498E-315; com.facebook.tools.dextr.runtime.detour.TracerDetour.a(r0, r1); r0 = r3.f5229d; Catch:{ Exception -> 0x0039 } r1 = r4.f16266a; Catch:{ Exception -> 0x0039 } r0.m9176c(r1); Catch:{ Exception -> 0x0039 } r0 = r3.m9108e(); Catch:{ Exception -> 0x0039 } if (r0 == 0) goto L_0x0025; L_0x0015: r0 = r3.f5231f; Catch:{ Exception -> 0x0039 } r0 = r0.get(); Catch:{ Exception -> 0x0039 } r0 = (com.facebook.api.feedcache.omnistore.FeedUnitUpdateHandler) r0; Catch:{ Exception -> 0x0039 } r1 = r4.f16266a; Catch:{ Exception -> 0x0039 } r0.a(r1); Catch:{ Exception -> 0x0039 } r3.m9107d(); Catch:{ Exception -> 0x0039 } L_0x0025: r0 = r3.m9110g(); Catch:{ Exception -> 0x0039 } if (r0 == 0) goto L_0x0032; L_0x002b: r0 = r3.f5238m; Catch:{ Exception -> 0x0039 } r1 = r4.f16266a; Catch:{ Exception -> 0x0039 } r0.m9382a(r1, r3); Catch:{ Exception -> 0x0039 } L_0x0032: r0 = -1434301058; // 0xffffffffaa824d7e float:-2.314641E-13 double:NaN; com.facebook.tools.dextr.runtime.detour.TracerDetour.a(r0); L_0x0038: return; L_0x0039: r0 = move-exception; r1 = "FeedDbMutationService"; r2 = "Error performing insertion on feed"; com.facebook.debug.log.BLog.b(r1, r2, r0); Catch:{ all -> 0x0048 } r0 = -816361482; // 0xffffffffcf574ff6 float:-3.61234176E9 double:NaN; com.facebook.tools.dextr.runtime.detour.TracerDetour.a(r0); goto L_0x0038; L_0x0048: r0 = move-exception; r1 = -601875320; // 0xffffffffdc201c88 float:-1.80269467E17 double:NaN; com.facebook.tools.dextr.runtime.detour.TracerDetour.a(r1); throw r0; */ throw new UnsupportedOperationException("Method not decompiled: com.facebook.api.feedcache.db.FeedDbMutationService.a(com.facebook.api.feedcache.db.FeedDbMutationService$FeedDbInsertionRequest):void"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void method_2241() {\r\n // $FF: Couldn't be decompiled\r\n }", "private void method_7083() {\r\n // $FF: Couldn't be decompiled\r\n }", "protected void method_2145() {\r\n // $FF: Couldn't be decompiled\r\n }", "protected void method_2247() {\r\n // $FF: Couldn't be decompiled\r\n }", "static void method_1148() {\r\n // $FF: Couldn't be decompiled\r\n }", "protected void method_2141() {\r\n // $FF: Couldn't be decompiled\r\n }", "static void method_2537() {\r\n // $FF: Couldn't be decompiled\r\n }", "static void method_2537() {\r\n // $FF: Couldn't be decompiled\r\n }", "public void method_7081() {\r\n // $FF: Couldn't be decompiled\r\n }", "public void method_2113() {\r\n // $FF: Couldn't be decompiled\r\n }", "public void method_2139() {\r\n // $FF: Couldn't be decompiled\r\n }", "static void method_6338() {\r\n // $FF: Couldn't be decompiled\r\n }", "static void m13383b() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/79094208.run(Unknown Source)\n*/\n /*\n r0 = com.foursquare.internal.data.db.C1916a.getDatabase();\t Catch:{ Exception -> 0x000a }\n r1 = \"battery_watcher\";\t Catch:{ Exception -> 0x000a }\n r2 = 0;\t Catch:{ Exception -> 0x000a }\n r0.delete(r1, r2, r2);\t Catch:{ Exception -> 0x000a }\n L_0x000a:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.foursquare.pilgrim.e.b():void\");\n }", "static void method_2226() {\r\n // $FF: Couldn't be decompiled\r\n }", "private void m14210a(java.io.IOException r4, java.io.IOException r5) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r3 = this;\n r0 = f12370a;\n if (r0 == 0) goto L_0x000f;\n L_0x0004:\n r0 = f12370a;\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n r1 = 1;\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n r1 = new java.lang.Object[r1];\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n r2 = 0;\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n r1[r2] = r5;\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n r0.invoke(r4, r1);\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n L_0x000f:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: okhttp3.internal.connection.RouteException.a(java.io.IOException, java.io.IOException):void\");\n }", "public void method_2046() {\r\n // $FF: Couldn't be decompiled\r\n }", "public void method_2197() {\r\n // $FF: Couldn't be decompiled\r\n }", "static void method_7086() {\r\n // $FF: Couldn't be decompiled\r\n }", "public void method_2250() {\r\n // $FF: Couldn't be decompiled\r\n }", "static void method_28() {\r\n // $FF: Couldn't be decompiled\r\n }", "private boolean method_2253(class_1033 param1) {\r\n // $FF: Couldn't be decompiled\r\n }", "public long mo915b() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:14)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r4 = this;\n r0 = -1;\n r2 = r4.f18088d;\t Catch:{ NumberFormatException -> 0x000e }\n if (r2 == 0) goto L_0x000d;\t Catch:{ NumberFormatException -> 0x000e }\n L_0x0006:\n r2 = r4.f18088d;\t Catch:{ NumberFormatException -> 0x000e }\n r2 = java.lang.Long.parseLong(r2);\t Catch:{ NumberFormatException -> 0x000e }\n r0 = r2;\n L_0x000d:\n return r0;\n L_0x000e:\n return r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: okhttp3.c.b.b():long\");\n }", "private void m25427g() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n*/\n /*\n r2 = this;\n r0 = r2.f19111m;\n if (r0 == 0) goto L_0x000f;\n L_0x0004:\n r0 = r2.f19104f;\t Catch:{ Exception -> 0x000f }\n r0 = android.support.v4.content.C0396d.m1465a(r0);\t Catch:{ Exception -> 0x000f }\n r1 = r2.f19111m;\t Catch:{ Exception -> 0x000f }\n r0.m1468a(r1);\t Catch:{ Exception -> 0x000f }\n L_0x000f:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.facebook.ads.internal.adapters.w.g():void\");\n }", "public void mo2485a() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/79094208.run(Unknown Source)\n*/\n /*\n r2 = this;\n r0 = r2.f11863a;\n monitor-enter(r0);\n r1 = r2.f11873l;\t Catch:{ all -> 0x002a }\n if (r1 != 0) goto L_0x0028;\t Catch:{ all -> 0x002a }\n L_0x0007:\n r1 = r2.f11872k;\t Catch:{ all -> 0x002a }\n if (r1 == 0) goto L_0x000c;\t Catch:{ all -> 0x002a }\n L_0x000b:\n goto L_0x0028;\t Catch:{ all -> 0x002a }\n L_0x000c:\n r1 = r2.f11875n;\t Catch:{ all -> 0x002a }\n if (r1 == 0) goto L_0x0015;\n L_0x0010:\n r1 = r2.f11875n;\t Catch:{ RemoteException -> 0x0015 }\n r1.cancel();\t Catch:{ RemoteException -> 0x0015 }\n L_0x0015:\n r1 = r2.f11870i;\t Catch:{ all -> 0x002a }\n m14216b(r1);\t Catch:{ all -> 0x002a }\n r1 = 1;\t Catch:{ all -> 0x002a }\n r2.f11873l = r1;\t Catch:{ all -> 0x002a }\n r1 = com.google.android.gms.common.api.Status.zzfnm;\t Catch:{ all -> 0x002a }\n r1 = r2.mo3568a(r1);\t Catch:{ all -> 0x002a }\n r2.m14217c(r1);\t Catch:{ all -> 0x002a }\n monitor-exit(r0);\t Catch:{ all -> 0x002a }\n return;\t Catch:{ all -> 0x002a }\n L_0x0028:\n monitor-exit(r0);\t Catch:{ all -> 0x002a }\n return;\t Catch:{ all -> 0x002a }\n L_0x002a:\n r1 = move-exception;\t Catch:{ all -> 0x002a }\n monitor-exit(r0);\t Catch:{ all -> 0x002a }\n throw r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.common.api.internal.BasePendingResult.a():void\");\n }", "private void method_7082(class_1293 param1) {\r\n // $FF: Couldn't be decompiled\r\n }", "public void mo3613a() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:14)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r4 = this;\n r0 = r4.f18081b;\n monitor-enter(r0);\n r1 = r4.f18080a;\t Catch:{ all -> 0x001f }\n if (r1 == 0) goto L_0x0009;\t Catch:{ all -> 0x001f }\n L_0x0007:\n monitor-exit(r0);\t Catch:{ all -> 0x001f }\n return;\t Catch:{ all -> 0x001f }\n L_0x0009:\n r1 = 1;\t Catch:{ all -> 0x001f }\n r4.f18080a = r1;\t Catch:{ all -> 0x001f }\n r2 = r4.f18081b;\t Catch:{ all -> 0x001f }\n r3 = r2.f12200d;\t Catch:{ all -> 0x001f }\n r3 = r3 + r1;\t Catch:{ all -> 0x001f }\n r2.f12200d = r3;\t Catch:{ all -> 0x001f }\n monitor-exit(r0);\t Catch:{ all -> 0x001f }\n r0 = r4.f18083d;\n okhttp3.internal.C2933c.m14194a(r0);\n r0 = r4.f18082c;\t Catch:{ IOException -> 0x001e }\n r0.m14100c();\t Catch:{ IOException -> 0x001e }\n L_0x001e:\n return;\n L_0x001f:\n r1 = move-exception;\n monitor-exit(r0);\t Catch:{ all -> 0x001f }\n throw r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: okhttp3.c.a.a():void\");\n }", "private static void m13385d() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/79094208.run(Unknown Source)\n*/\n /*\n r0 = java.lang.System.currentTimeMillis();\t Catch:{ Exception -> 0x0024 }\n r2 = java.util.concurrent.TimeUnit.DAYS;\t Catch:{ Exception -> 0x0024 }\n r3 = 1;\t Catch:{ Exception -> 0x0024 }\n r2 = r2.toMillis(r3);\t Catch:{ Exception -> 0x0024 }\n r4 = 0;\t Catch:{ Exception -> 0x0024 }\n r4 = r0 - r2;\t Catch:{ Exception -> 0x0024 }\n r0 = com.foursquare.internal.data.db.C1916a.getDatabase();\t Catch:{ Exception -> 0x0024 }\n r1 = \"battery_watcher\";\t Catch:{ Exception -> 0x0024 }\n r2 = \"timestamp < ?\";\t Catch:{ Exception -> 0x0024 }\n r3 = 1;\t Catch:{ Exception -> 0x0024 }\n r3 = new java.lang.String[r3];\t Catch:{ Exception -> 0x0024 }\n r6 = 0;\t Catch:{ Exception -> 0x0024 }\n r4 = java.lang.String.valueOf(r4);\t Catch:{ Exception -> 0x0024 }\n r3[r6] = r4;\t Catch:{ Exception -> 0x0024 }\n r0.delete(r1, r2, r3);\t Catch:{ Exception -> 0x0024 }\n L_0x0024:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.foursquare.pilgrim.e.d():void\");\n }", "private boolean m2248a(java.lang.String r3, com.onesignal.La.C0596a r4) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/318857719.run(Unknown Source)\n*/\n /*\n r2 = this;\n r0 = 0;\n r1 = 1;\n java.lang.Float.parseFloat(r3);\t Catch:{ Throwable -> 0x0007 }\n r3 = 1;\n goto L_0x0008;\n L_0x0007:\n r3 = 0;\n L_0x0008:\n if (r3 != 0) goto L_0x0017;\n L_0x000a:\n r3 = com.onesignal.sa.C0650i.ERROR;\n r1 = \"Missing Google Project number!\\nPlease enter a Google Project number / Sender ID on under App Settings > Android > Configuration on the OneSignal dashboard.\";\n com.onesignal.sa.m1656a(r3, r1);\n r3 = 0;\n r1 = -6;\n r4.mo1392a(r3, r1);\n return r0;\n L_0x0017:\n return r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.onesignal.Pa.a(java.lang.String, com.onesignal.La$a):boolean\");\n }", "public static boolean m19464a(java.lang.String r3, int[] r4) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/79094208.run(Unknown Source)\n*/\n /*\n r0 = android.text.TextUtils.isEmpty(r3);\n r1 = 0;\n if (r0 == 0) goto L_0x0008;\n L_0x0007:\n return r1;\n L_0x0008:\n r0 = r4.length;\n r2 = 2;\n if (r0 == r2) goto L_0x000d;\n L_0x000c:\n return r1;\n L_0x000d:\n r0 = \"x\";\n r3 = r3.split(r0);\n r0 = r3.length;\n if (r0 == r2) goto L_0x0017;\n L_0x0016:\n return r1;\n L_0x0017:\n r0 = r3[r1];\t Catch:{ NumberFormatException -> 0x0029 }\n r0 = java.lang.Integer.parseInt(r0);\t Catch:{ NumberFormatException -> 0x0029 }\n r4[r1] = r0;\t Catch:{ NumberFormatException -> 0x0029 }\n r0 = 1;\t Catch:{ NumberFormatException -> 0x0029 }\n r3 = r3[r0];\t Catch:{ NumberFormatException -> 0x0029 }\n r3 = java.lang.Integer.parseInt(r3);\t Catch:{ NumberFormatException -> 0x0029 }\n r4[r0] = r3;\t Catch:{ NumberFormatException -> 0x0029 }\n return r0;\n L_0x0029:\n return r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.arp.a(java.lang.String, int[]):boolean\");\n }", "public boolean mo3969a() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r4 = this;\n r0 = r4.f19005h;\n if (r0 != 0) goto L_0x0011;\n L_0x0004:\n r0 = r4.f19004g;\n if (r0 == 0) goto L_0x000f;\n L_0x0008:\n r0 = r4.f19004g;\n r1 = com.facebook.ads.C1700b.f5123e;\n r0.mo1313a(r4, r1);\n L_0x000f:\n r0 = 0;\n return r0;\n L_0x0011:\n r0 = new android.content.Intent;\n r1 = r4.f19002e;\n r2 = com.facebook.ads.AudienceNetworkActivity.class;\n r0.<init>(r1, r2);\n r1 = \"predefinedOrientationKey\";\n r2 = r4.m25306b();\n r0.putExtra(r1, r2);\n r1 = \"uniqueId\";\n r2 = r4.f18999b;\n r0.putExtra(r1, r2);\n r1 = \"placementId\";\n r2 = r4.f19000c;\n r0.putExtra(r1, r2);\n r1 = \"requestTime\";\n r2 = r4.f19001d;\n r0.putExtra(r1, r2);\n r1 = \"viewType\";\n r2 = r4.f19009l;\n r0.putExtra(r1, r2);\n r1 = \"useCache\";\n r2 = r4.f19010m;\n r0.putExtra(r1, r2);\n r1 = r4.f19008k;\n if (r1 == 0) goto L_0x0052;\n L_0x004a:\n r1 = \"ad_data_bundle\";\n r2 = r4.f19008k;\n r0.putExtra(r1, r2);\n goto L_0x005b;\n L_0x0052:\n r1 = r4.f19006i;\n if (r1 == 0) goto L_0x005b;\n L_0x0056:\n r1 = r4.f19006i;\n r1.m18953a(r0);\n L_0x005b:\n r1 = 268435456; // 0x10000000 float:2.5243549E-29 double:1.32624737E-315;\n r0.addFlags(r1);\n r1 = r4.f19002e;\t Catch:{ ActivityNotFoundException -> 0x0066 }\n r1.startActivity(r0);\t Catch:{ ActivityNotFoundException -> 0x0066 }\n goto L_0x0072;\n L_0x0066:\n r1 = r4.f19002e;\n r2 = com.facebook.ads.InterstitialAdActivity.class;\n r0.setClass(r1, r2);\n r1 = r4.f19002e;\n r1.startActivity(r0);\n L_0x0072:\n r0 = 1;\n return r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.facebook.ads.internal.adapters.k.a():boolean\");\n }", "protected void method_2045(class_1045 param1) {\r\n // $FF: Couldn't be decompiled\r\n }", "protected void method_2246(class_1045 param1) {\r\n // $FF: Couldn't be decompiled\r\n }", "private final java.util.Map<java.lang.String, java.lang.String> m11967c() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r7 = this;\n r0 = new java.util.HashMap;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r0.<init>();\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r1 = r7.f10169c;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r2 = r7.f10170d;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r3 = f10168i;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r4 = 0;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r5 = 0;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r6 = 0;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r1 = r1.query(r2, r3, r4, r5, r6);\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n if (r1 == 0) goto L_0x0031;\n L_0x0014:\n r2 = r1.moveToNext();\t Catch:{ all -> 0x002c }\n if (r2 == 0) goto L_0x0028;\t Catch:{ all -> 0x002c }\n L_0x001a:\n r2 = 0;\t Catch:{ all -> 0x002c }\n r2 = r1.getString(r2);\t Catch:{ all -> 0x002c }\n r3 = 1;\t Catch:{ all -> 0x002c }\n r3 = r1.getString(r3);\t Catch:{ all -> 0x002c }\n r0.put(r2, r3);\t Catch:{ all -> 0x002c }\n goto L_0x0014;\n L_0x0028:\n r1.close();\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n goto L_0x0031;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n L_0x002c:\n r0 = move-exception;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r1.close();\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n throw r0;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n L_0x0031:\n return r0;\n L_0x0032:\n r0 = \"ConfigurationContentLoader\";\n r1 = \"PhenotypeFlag unable to load ContentProvider, using default values\";\n android.util.Log.e(r0, r1);\n r0 = 0;\n return r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.measurement.zzsi.c():java.util.Map<java.lang.String, java.lang.String>\");\n }", "private void m50366E() {\n }", "public int method_7084(String param1) {\r\n // $FF: Couldn't be decompiled\r\n }", "private p000a.p001a.p002a.p003a.C0916s m1655b(p000a.p001a.p002a.p003a.p022i.p024b.C0112x r7, p000a.p001a.p002a.p003a.p034n.C0157e r8) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/293907205.run(Unknown Source)\n*/\n /*\n r6 = this;\n r0 = r7.m321a();\n r7 = r7.m322b();\n r1 = 0;\n r2 = r1;\n L_0x000a:\n r3 = r6.f1533u;\n r3 = r3 + 1;\n r6.f1533u = r3;\n r0.m2803e();\n r3 = r0.mo2010a();\n if (r3 != 0) goto L_0x0032;\n L_0x0019:\n r7 = r6.f1513a;\n r8 = \"Cannot retry non-repeatable request\";\n r7.m260a(r8);\n if (r2 == 0) goto L_0x002a;\n L_0x0022:\n r7 = new a.a.a.a.b.m;\n r8 = \"Cannot retry request with a non-repeatable request entity. The cause lists the reason the original request failed.\";\n r7.<init>(r8, r2);\n throw r7;\n L_0x002a:\n r7 = new a.a.a.a.b.m;\n r8 = \"Cannot retry request with a non-repeatable request entity.\";\n r7.<init>(r8);\n throw r7;\n L_0x0032:\n r2 = r6.f1529q;\t Catch:{ IOException -> 0x0086 }\n r2 = r2.mo1932c();\t Catch:{ IOException -> 0x0086 }\n if (r2 != 0) goto L_0x0057;\t Catch:{ IOException -> 0x0086 }\n L_0x003a:\n r2 = r7.mo15e();\t Catch:{ IOException -> 0x0086 }\n if (r2 != 0) goto L_0x004f;\t Catch:{ IOException -> 0x0086 }\n L_0x0040:\n r2 = r6.f1513a;\t Catch:{ IOException -> 0x0086 }\n r3 = \"Reopening the direct connection.\";\t Catch:{ IOException -> 0x0086 }\n r2.m260a(r3);\t Catch:{ IOException -> 0x0086 }\n r2 = r6.f1529q;\t Catch:{ IOException -> 0x0086 }\n r3 = r6.f1528p;\t Catch:{ IOException -> 0x0086 }\n r2.mo2023a(r7, r8, r3);\t Catch:{ IOException -> 0x0086 }\n goto L_0x0057;\t Catch:{ IOException -> 0x0086 }\n L_0x004f:\n r2 = r6.f1513a;\t Catch:{ IOException -> 0x0086 }\n r3 = \"Proxied connection. Need to start over.\";\t Catch:{ IOException -> 0x0086 }\n r2.m260a(r3);\t Catch:{ IOException -> 0x0086 }\n goto L_0x0085;\t Catch:{ IOException -> 0x0086 }\n L_0x0057:\n r2 = r6.f1513a;\t Catch:{ IOException -> 0x0086 }\n r2 = r2.m262a();\t Catch:{ IOException -> 0x0086 }\n if (r2 == 0) goto L_0x007c;\t Catch:{ IOException -> 0x0086 }\n L_0x005f:\n r2 = r6.f1513a;\t Catch:{ IOException -> 0x0086 }\n r3 = new java.lang.StringBuilder;\t Catch:{ IOException -> 0x0086 }\n r3.<init>();\t Catch:{ IOException -> 0x0086 }\n r4 = \"Attempt \";\t Catch:{ IOException -> 0x0086 }\n r3.append(r4);\t Catch:{ IOException -> 0x0086 }\n r4 = r6.f1533u;\t Catch:{ IOException -> 0x0086 }\n r3.append(r4);\t Catch:{ IOException -> 0x0086 }\n r4 = \" to execute request\";\t Catch:{ IOException -> 0x0086 }\n r3.append(r4);\t Catch:{ IOException -> 0x0086 }\n r3 = r3.toString();\t Catch:{ IOException -> 0x0086 }\n r2.m260a(r3);\t Catch:{ IOException -> 0x0086 }\n L_0x007c:\n r2 = r6.f1518f;\t Catch:{ IOException -> 0x0086 }\n r3 = r6.f1529q;\t Catch:{ IOException -> 0x0086 }\n r2 = r2.m464a(r0, r3, r8);\t Catch:{ IOException -> 0x0086 }\n r1 = r2;\n L_0x0085:\n return r1;\n L_0x0086:\n r2 = move-exception;\n r3 = r6.f1513a;\n r4 = \"Closing the connection.\";\n r3.m260a(r4);\n r3 = r6.f1529q;\t Catch:{ IOException -> 0x0093 }\n r3.close();\t Catch:{ IOException -> 0x0093 }\n L_0x0093:\n r3 = r6.f1520h;\n r4 = r0.m2802d();\n r3 = r3.retryRequest(r2, r4, r8);\n if (r3 == 0) goto L_0x010a;\n L_0x009f:\n r3 = r6.f1513a;\n r3 = r3.m270d();\n if (r3 == 0) goto L_0x00d9;\n L_0x00a7:\n r3 = r6.f1513a;\n r4 = new java.lang.StringBuilder;\n r4.<init>();\n r5 = \"I/O exception (\";\n r4.append(r5);\n r5 = r2.getClass();\n r5 = r5.getName();\n r4.append(r5);\n r5 = \") caught when processing request to \";\n r4.append(r5);\n r4.append(r7);\n r5 = \": \";\n r4.append(r5);\n r5 = r2.getMessage();\n r4.append(r5);\n r4 = r4.toString();\n r3.m269d(r4);\n L_0x00d9:\n r3 = r6.f1513a;\n r3 = r3.m262a();\n if (r3 == 0) goto L_0x00ea;\n L_0x00e1:\n r3 = r6.f1513a;\n r4 = r2.getMessage();\n r3.m261a(r4, r2);\n L_0x00ea:\n r3 = r6.f1513a;\n r3 = r3.m270d();\n if (r3 == 0) goto L_0x000a;\n L_0x00f2:\n r3 = r6.f1513a;\n r4 = new java.lang.StringBuilder;\n r4.<init>();\n r5 = \"Retrying request to \";\n r4.append(r5);\n r4.append(r7);\n r4 = r4.toString();\n r3.m269d(r4);\n goto L_0x000a;\n L_0x010a:\n r8 = r2 instanceof p000a.p001a.p002a.p003a.C0176z;\n if (r8 == 0) goto L_0x0134;\n L_0x010e:\n r8 = new a.a.a.a.z;\n r0 = new java.lang.StringBuilder;\n r0.<init>();\n r7 = r7.mo10a();\n r7 = r7.m474e();\n r0.append(r7);\n r7 = \" failed to respond\";\n r0.append(r7);\n r7 = r0.toString();\n r8.<init>(r7);\n r7 = r2.getStackTrace();\n r8.setStackTrace(r7);\n throw r8;\n L_0x0134:\n throw r2;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: a.a.a.a.i.b.p.b(a.a.a.a.i.b.x, a.a.a.a.n.e):a.a.a.a.s\");\n }", "void m5768b() throws C0841b;", "void m1864a() {\r\n }", "public boolean method_2088(class_689 param1) {\r\n // $FF: Couldn't be decompiled\r\n }", "void m5770d() throws C0841b;", "public static void m5820b(java.lang.String r3, java.lang.String r4, java.lang.String r5) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r0 = new com.crashlytics.android.answers.StartCheckoutEvent;\n r0.<init>();\n r1 = java.util.Locale.getDefault();\n r1 = java.util.Currency.getInstance(r1);\n r0.putCurrency(r1);\n r1 = 1;\n r0.putItemCount(r1);\n r1 = java.lang.Long.parseLong(r3);\t Catch:{ Exception -> 0x001f }\n r3 = java.math.BigDecimal.valueOf(r1);\t Catch:{ Exception -> 0x001f }\n r0.putTotalPrice(r3);\t Catch:{ Exception -> 0x001f }\n L_0x001f:\n r3 = \"type\";\n r0.putCustomAttribute(r3, r4);\n r3 = \"cta\";\n r0.putCustomAttribute(r3, r5);\n r3 = com.crashlytics.android.answers.Answers.getInstance();\n r3.logStartCheckout(r0);\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.cuvora.carinfo.helpers.d.b(java.lang.String, java.lang.String, java.lang.String):void\");\n }", "public final void mo91715d() {\n }", "public void method_4270() {}", "public static void m5812a(java.lang.String r0, java.lang.String r1, java.lang.String r2) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r2 = new com.crashlytics.android.answers.AddToCartEvent;\n r2.<init>();\n r2.putItemType(r0);\n r0 = java.lang.Long.parseLong(r1);\t Catch:{ Exception -> 0x0013 }\n r0 = java.math.BigDecimal.valueOf(r0);\t Catch:{ Exception -> 0x0013 }\n r2.putItemPrice(r0);\t Catch:{ Exception -> 0x0013 }\n L_0x0013:\n r0 = java.util.Locale.getDefault();\n r0 = java.util.Currency.getInstance(r0);\n r2.putCurrency(r0);\n r0 = com.crashlytics.android.answers.Answers.getInstance();\n r0.logAddToCart(r2);\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.cuvora.carinfo.helpers.d.a(java.lang.String, java.lang.String, java.lang.String):void\");\n }", "private static void m13381a(long r3, float r5) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/79094208.run(Unknown Source)\n*/\n /*\n r0 = com.foursquare.internal.data.db.C1916a.getDatabase();\n r0.beginTransaction();\t Catch:{ Exception -> 0x001f }\n r1 = \"INSERT INTO battery_watcher (timestamp, level) VALUES (?, ?)\";\t Catch:{ Exception -> 0x001f }\n r1 = r0.compileStatement(r1);\t Catch:{ Exception -> 0x001f }\n r2 = 1;\t Catch:{ Exception -> 0x001f }\n r1.bindLong(r2, r3);\t Catch:{ Exception -> 0x001f }\n r3 = 2;\t Catch:{ Exception -> 0x001f }\n r4 = (double) r5;\t Catch:{ Exception -> 0x001f }\n r1.bindDouble(r3, r4);\t Catch:{ Exception -> 0x001f }\n r1.execute();\t Catch:{ Exception -> 0x001f }\n r0.setTransactionSuccessful();\t Catch:{ Exception -> 0x001f }\n goto L_0x0026;\n L_0x001d:\n r3 = move-exception;\n goto L_0x002a;\n L_0x001f:\n r3 = f10646a;\t Catch:{ all -> 0x001d }\n r4 = \"Issue adding location to battery history\";\t Catch:{ all -> 0x001d }\n com.foursquare.internal.util.FsLog.m6807d(r3, r4);\t Catch:{ all -> 0x001d }\n L_0x0026:\n r0.endTransaction();\n return;\n L_0x002a:\n r0.endTransaction();\n throw r3;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.foursquare.pilgrim.e.a(long, float):void\");\n }", "static void method_461() {\r\n // $FF: Couldn't be decompiled\r\n }", "private static class_1205 method_6442(String param0, int param1) {\r\n // $FF: Couldn't be decompiled\r\n }", "void m5769c() throws C0841b;", "public void method_2112(int param1, int param2, int param3, aji param4, int param5, int param6) {\r\n // $FF: Couldn't be decompiled\r\n }", "void m5771e() throws C0841b;", "@Override // X.AnonymousClass0PN\n /* Code decompiled incorrectly, please refer to instructions dump. */\n public void A0D() {\n /*\n r5 = this;\n super.A0D()\n X.08d r0 = r5.A05\n X.0OQ r4 = r0.A04()\n X.0Rk r3 = r4.A00() // Catch:{ all -> 0x003d }\n X.0BK r2 = r4.A04 // Catch:{ all -> 0x0036 }\n java.lang.String r1 = \"DELETE FROM receipt_device\"\n java.lang.String r0 = \"CLEAR_TABLE_RECEIPT_DEVICE\"\n r2.A0C(r1, r0) // Catch:{ all -> 0x0036 }\n X.08m r1 = r5.A03 // Catch:{ all -> 0x0036 }\n java.lang.String r0 = \"receipt_device_migration_complete\"\n r1.A02(r0) // Catch:{ all -> 0x0036 }\n java.lang.String r0 = \"migration_receipt_device_index\"\n r1.A02(r0) // Catch:{ all -> 0x0036 }\n java.lang.String r0 = \"migration_receipt_device_retry\"\n r1.A02(r0) // Catch:{ all -> 0x0036 }\n r3.A00() // Catch:{ all -> 0x0036 }\n r3.close()\n r4.close()\n java.lang.String r0 = \"ReceiptDeviceStore/ReceiptDeviceDatabaseMigration/resetMigration/done\"\n com.whatsapp.util.Log.i(r0)\n return\n L_0x0036:\n r0 = move-exception\n throw r0 // Catch:{ all -> 0x0038 }\n L_0x0038:\n r0 = move-exception\n r3.close() // Catch:{ all -> 0x003c }\n L_0x003c:\n throw r0\n L_0x003d:\n r0 = move-exception\n throw r0 // Catch:{ all -> 0x003f }\n L_0x003f:\n r0 = move-exception\n r4.close() // Catch:{ all -> 0x0043 }\n L_0x0043:\n throw r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: X.C43661yk.A0D():void\");\n }", "public static void m5813a(java.lang.String r2, java.lang.String r3, java.lang.String r4, boolean r5) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r0 = new com.crashlytics.android.answers.PurchaseEvent;\n r0.<init>();\n r1 = java.util.Locale.getDefault();\n r1 = java.util.Currency.getInstance(r1);\n r0.putCurrency(r1);\n r0.putItemId(r2);\n r0.putItemType(r3);\n r2 = java.lang.Long.parseLong(r4);\t Catch:{ Exception -> 0x0021 }\n r2 = java.math.BigDecimal.valueOf(r2);\t Catch:{ Exception -> 0x0021 }\n r0.putItemPrice(r2);\t Catch:{ Exception -> 0x0021 }\n L_0x0021:\n r0.putSuccess(r5);\n r2 = com.crashlytics.android.answers.Answers.getInstance();\n r2.logPurchase(r0);\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.cuvora.carinfo.helpers.d.a(java.lang.String, java.lang.String, java.lang.String, boolean):void\");\n }", "public void method_2111(int param1, int param2, int param3, aji param4, int param5, int param6) {\r\n // $FF: Couldn't be decompiled\r\n }", "@androidx.annotation.Nullable\n /* renamed from: j */\n /* Code decompiled incorrectly, please refer to instructions dump. */\n public final p005b.p096l.p097a.p151d.p152a.p154b.C3474b mo14822j(java.lang.String r9) {\n /*\n r8 = this;\n java.io.File r0 = new java.io.File\n java.io.File r1 = r8.mo14820g()\n r0.<init>(r1, r9)\n boolean r1 = r0.exists()\n r2 = 3\n r3 = 6\n r4 = 1\n r5 = 0\n r6 = 0\n if (r1 != 0) goto L_0x0022\n b.l.a.d.a.e.f r0 = f6563c\n java.lang.Object[] r1 = new java.lang.Object[r4]\n r1[r5] = r9\n java.lang.String r9 = \"Pack not found with pack name: %s\"\n r0.mo14884b(r2, r9, r1)\n L_0x001f:\n r9 = r6\n goto L_0x0093\n L_0x0022:\n java.io.File r1 = new java.io.File\n b.l.a.d.a.b.o1 r7 = r8.f6567b\n int r7 = r7.mo14797a()\n java.lang.String r7 = java.lang.String.valueOf(r7)\n r1.<init>(r0, r7)\n boolean r0 = r1.exists()\n r7 = 2\n if (r0 != 0) goto L_0x0050\n b.l.a.d.a.e.f r0 = f6563c\n java.lang.Object[] r1 = new java.lang.Object[r7]\n r1[r5] = r9\n b.l.a.d.a.b.o1 r9 = r8.f6567b\n int r9 = r9.mo14797a()\n java.lang.Integer r9 = java.lang.Integer.valueOf(r9)\n r1[r4] = r9\n java.lang.String r9 = \"Pack not found with pack name: %s app version: %s\"\n r0.mo14884b(r2, r9, r1)\n goto L_0x001f\n L_0x0050:\n java.io.File[] r0 = r1.listFiles()\n if (r0 == 0) goto L_0x007b\n int r1 = r0.length\n if (r1 != 0) goto L_0x005a\n goto L_0x007b\n L_0x005a:\n if (r1 <= r4) goto L_0x0074\n b.l.a.d.a.e.f r0 = f6563c\n java.lang.Object[] r1 = new java.lang.Object[r7]\n r1[r5] = r9\n b.l.a.d.a.b.o1 r9 = r8.f6567b\n int r9 = r9.mo14797a()\n java.lang.Integer r9 = java.lang.Integer.valueOf(r9)\n r1[r4] = r9\n java.lang.String r9 = \"Multiple pack versions found for pack name: %s app version: %s\"\n r0.mo14884b(r3, r9, r1)\n goto L_0x001f\n L_0x0074:\n r9 = r0[r5]\n java.lang.String r9 = r9.getCanonicalPath()\n goto L_0x0093\n L_0x007b:\n b.l.a.d.a.e.f r0 = f6563c\n java.lang.Object[] r1 = new java.lang.Object[r7]\n r1[r5] = r9\n b.l.a.d.a.b.o1 r9 = r8.f6567b\n int r9 = r9.mo14797a()\n java.lang.Integer r9 = java.lang.Integer.valueOf(r9)\n r1[r4] = r9\n java.lang.String r9 = \"No pack version found for pack name: %s app version: %s\"\n r0.mo14884b(r2, r9, r1)\n goto L_0x001f\n L_0x0093:\n if (r9 != 0) goto L_0x0096\n return r6\n L_0x0096:\n java.io.File r0 = new java.io.File\n java.lang.String r1 = \"assets\"\n r0.<init>(r9, r1)\n boolean r1 = r0.isDirectory()\n if (r1 != 0) goto L_0x00af\n b.l.a.d.a.e.f r9 = f6563c\n java.lang.Object[] r1 = new java.lang.Object[r4]\n r1[r5] = r0\n java.lang.String r0 = \"Failed to find assets directory: %s\"\n r9.mo14884b(r3, r0, r1)\n return r6\n L_0x00af:\n java.lang.String r0 = r0.getCanonicalPath()\n b.l.a.d.a.b.w r1 = new b.l.a.d.a.b.w\n r1.<init>(r5, r9, r0)\n return r1\n */\n throw new UnsupportedOperationException(\"Method not decompiled: p005b.p096l.p097a.p151d.p152a.p154b.C3544t.mo14822j(java.lang.String):b.l.a.d.a.b.b\");\n }", "public boolean method_2243() {\r\n // $FF: Couldn't be decompiled\r\n }", "private final void asx() {\n /*\n r12 = this;\n r0 = r12.cFE;\n if (r0 == 0) goto L_0x0073;\n L_0x0004:\n r1 = r12.cxs;\n if (r1 == 0) goto L_0x0073;\n L_0x0008:\n r1 = r12.ayL;\n if (r1 != 0) goto L_0x000d;\n L_0x000c:\n goto L_0x0073;\n L_0x000d:\n r2 = 0;\n if (r1 == 0) goto L_0x0027;\n L_0x0010:\n r1 = r1.Km();\n if (r1 == 0) goto L_0x0027;\n L_0x0016:\n r1 = r1.aar();\n if (r1 == 0) goto L_0x0027;\n L_0x001c:\n r3 = r0.getName();\n r1 = r1.get(r3);\n r1 = (java.util.ArrayList) r1;\n goto L_0x0028;\n L_0x0027:\n r1 = r2;\n L_0x0028:\n if (r1 == 0) goto L_0x0051;\n L_0x002a:\n r1 = (java.lang.Iterable) r1;\n r1 = kotlin.collections.u.Z(r1);\n if (r1 == 0) goto L_0x0051;\n L_0x0032:\n r3 = new com.iqoption.deposit.light.perform.DepositPerformLightFragment$setPresets$items$1;\n r3.<init>(r12);\n r3 = (kotlin.jvm.a.b) r3;\n r1 = kotlin.sequences.n.b(r1, r3);\n if (r1 == 0) goto L_0x0051;\n L_0x003f:\n r3 = new com.iqoption.deposit.light.perform.DepositPerformLightFragment$setPresets$items$2;\n r3.<init>(r0);\n r3 = (kotlin.jvm.a.b) r3;\n r1 = kotlin.sequences.n.f(r1, r3);\n if (r1 == 0) goto L_0x0051;\n L_0x004c:\n r1 = kotlin.sequences.n.f(r1);\n goto L_0x0052;\n L_0x0051:\n r1 = r2;\n L_0x0052:\n r3 = r12.asr();\n if (r1 == 0) goto L_0x0059;\n L_0x0058:\n goto L_0x005d;\n L_0x0059:\n r1 = kotlin.collections.m.emptyList();\n L_0x005d:\n r4 = r12.bub;\n if (r4 == 0) goto L_0x006d;\n L_0x0061:\n r5 = 0;\n r6 = 0;\n r7 = 1;\n r8 = 0;\n r9 = 0;\n r10 = 19;\n r11 = 0;\n r2 = com.iqoption.core.util.e.a(r4, r5, r6, r7, r8, r9, r10, r11);\n L_0x006d:\n r3.c(r1, r2);\n r12.d(r0);\n L_0x0073:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.iqoption.deposit.light.perform.c.asx():void\");\n }", "private void m1654a(p000a.p001a.p002a.p003a.p022i.p024b.C0112x r7, p000a.p001a.p002a.p003a.p034n.C0157e r8) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/293907205.run(Unknown Source)\n*/\n /*\n r6 = this;\n r0 = r7.m322b();\n r7 = r7.m321a();\n r1 = 0;\n L_0x0009:\n r2 = \"http.request\";\n r8.mo160a(r2, r7);\n r1 = r1 + 1;\n r2 = r6.f1529q;\t Catch:{ IOException -> 0x002f }\n r2 = r2.mo1932c();\t Catch:{ IOException -> 0x002f }\n if (r2 != 0) goto L_0x0020;\t Catch:{ IOException -> 0x002f }\n L_0x0018:\n r2 = r6.f1529q;\t Catch:{ IOException -> 0x002f }\n r3 = r6.f1528p;\t Catch:{ IOException -> 0x002f }\n r2.mo2023a(r0, r8, r3);\t Catch:{ IOException -> 0x002f }\n goto L_0x002b;\t Catch:{ IOException -> 0x002f }\n L_0x0020:\n r2 = r6.f1529q;\t Catch:{ IOException -> 0x002f }\n r3 = r6.f1528p;\t Catch:{ IOException -> 0x002f }\n r3 = p000a.p001a.p002a.p003a.p032l.C0150c.m428a(r3);\t Catch:{ IOException -> 0x002f }\n r2.mo1931b(r3);\t Catch:{ IOException -> 0x002f }\n L_0x002b:\n r6.m1660a(r0, r8);\t Catch:{ IOException -> 0x002f }\n return;\n L_0x002f:\n r2 = move-exception;\n r3 = r6.f1529q;\t Catch:{ IOException -> 0x0035 }\n r3.close();\t Catch:{ IOException -> 0x0035 }\n L_0x0035:\n r3 = r6.f1520h;\n r3 = r3.retryRequest(r2, r1, r8);\n if (r3 == 0) goto L_0x00a0;\n L_0x003d:\n r3 = r6.f1513a;\n r3 = r3.m270d();\n if (r3 == 0) goto L_0x0009;\n L_0x0045:\n r3 = r6.f1513a;\n r4 = new java.lang.StringBuilder;\n r4.<init>();\n r5 = \"I/O exception (\";\n r4.append(r5);\n r5 = r2.getClass();\n r5 = r5.getName();\n r4.append(r5);\n r5 = \") caught when connecting to \";\n r4.append(r5);\n r4.append(r0);\n r5 = \": \";\n r4.append(r5);\n r5 = r2.getMessage();\n r4.append(r5);\n r4 = r4.toString();\n r3.m269d(r4);\n r3 = r6.f1513a;\n r3 = r3.m262a();\n if (r3 == 0) goto L_0x0088;\n L_0x007f:\n r3 = r6.f1513a;\n r4 = r2.getMessage();\n r3.m261a(r4, r2);\n L_0x0088:\n r2 = r6.f1513a;\n r3 = new java.lang.StringBuilder;\n r3.<init>();\n r4 = \"Retrying connect to \";\n r3.append(r4);\n r3.append(r0);\n r3 = r3.toString();\n r2.m269d(r3);\n goto L_0x0009;\n L_0x00a0:\n throw r2;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: a.a.a.a.i.b.p.a(a.a.a.a.i.b.x, a.a.a.a.n.e):void\");\n }", "public void method_2116(class_689 param1, boolean param2) {\r\n // $FF: Couldn't be decompiled\r\n }", "private static int m69982c() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n*/\n /*\n r0 = \"android.os.Build$VERSION\";\t Catch:{ Exception -> 0x0018 }\n r0 = java.lang.Class.forName(r0);\t Catch:{ Exception -> 0x0018 }\n r1 = \"SDK_INT\";\t Catch:{ Exception -> 0x0018 }\n r0 = r0.getField(r1);\t Catch:{ Exception -> 0x0018 }\n r1 = 0;\t Catch:{ Exception -> 0x0018 }\n r0 = r0.get(r1);\t Catch:{ Exception -> 0x0018 }\n r0 = (java.lang.Integer) r0;\t Catch:{ Exception -> 0x0018 }\n r0 = r0.intValue();\t Catch:{ Exception -> 0x0018 }\n return r0;\n L_0x0018:\n r0 = 0;\n return r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: rx.internal.util.f.c():int\");\n }", "static void m7753b() {\n f8029a = false;\n }", "public final synchronized com.google.android.m4b.maps.bu.C4910a m21843a(java.lang.String r10) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/79094208.run(Unknown Source)\n*/\n /*\n r9 = this;\n monitor-enter(r9);\n r0 = r9.f17909e;\t Catch:{ all -> 0x0056 }\n r1 = 0;\n if (r0 != 0) goto L_0x0008;\n L_0x0006:\n monitor-exit(r9);\n return r1;\n L_0x0008:\n r0 = r9.f17907c;\t Catch:{ all -> 0x0056 }\n r2 = com.google.android.m4b.maps.az.C4733b.m21060a(r10);\t Catch:{ all -> 0x0056 }\n r0 = r0.m21933a(r2, r1);\t Catch:{ all -> 0x0056 }\n if (r0 == 0) goto L_0x0054;\t Catch:{ all -> 0x0056 }\n L_0x0014:\n r2 = r0.length;\t Catch:{ all -> 0x0056 }\n r3 = 9;\t Catch:{ all -> 0x0056 }\n if (r2 <= r3) goto L_0x0054;\t Catch:{ all -> 0x0056 }\n L_0x0019:\n r2 = 0;\t Catch:{ all -> 0x0056 }\n r2 = r0[r2];\t Catch:{ all -> 0x0056 }\n r4 = 1;\t Catch:{ all -> 0x0056 }\n if (r2 == r4) goto L_0x0020;\t Catch:{ all -> 0x0056 }\n L_0x001f:\n goto L_0x0054;\t Catch:{ all -> 0x0056 }\n L_0x0020:\n r5 = com.google.android.m4b.maps.bs.C4891e.m21914c(r0, r4);\t Catch:{ all -> 0x0056 }\n r2 = new com.google.android.m4b.maps.ar.a;\t Catch:{ all -> 0x0056 }\n r7 = com.google.android.m4b.maps.de.C5350x.f20104b;\t Catch:{ all -> 0x0056 }\n r2.<init>(r7);\t Catch:{ all -> 0x0056 }\n r7 = new java.io.ByteArrayInputStream;\t Catch:{ IOException -> 0x0052 }\n r8 = r0.length;\t Catch:{ IOException -> 0x0052 }\n r8 = r8 - r3;\t Catch:{ IOException -> 0x0052 }\n r7.<init>(r0, r3, r8);\t Catch:{ IOException -> 0x0052 }\n r2.m20818a(r7);\t Catch:{ IOException -> 0x0052 }\n r0 = 2;\n r0 = r2.m20843h(r0);\t Catch:{ all -> 0x0056 }\n r10 = r10.equals(r0);\t Catch:{ all -> 0x0056 }\n if (r10 != 0) goto L_0x0042;\n L_0x0040:\n monitor-exit(r9);\n return r1;\n L_0x0042:\n r10 = new com.google.android.m4b.maps.bu.a;\t Catch:{ all -> 0x0056 }\n r10.<init>();\t Catch:{ all -> 0x0056 }\n r10.m22018a(r4);\t Catch:{ all -> 0x0056 }\n r10.m22020a(r2);\t Catch:{ all -> 0x0056 }\n r10.m22016a(r5);\t Catch:{ all -> 0x0056 }\n monitor-exit(r9);\n return r10;\n L_0x0052:\n monitor-exit(r9);\n return r1;\n L_0x0054:\n monitor-exit(r9);\n return r1;\n L_0x0056:\n r10 = move-exception;\n monitor-exit(r9);\n throw r10;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.m4b.maps.bs.b.a(java.lang.String):com.google.android.m4b.maps.bu.a\");\n }", "public static int m22557b(java.lang.String r1) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r0 = com.google.android.gms.internal.measurement.dr.m11788a(r1);\t Catch:{ zzyn -> 0x0005 }\n goto L_0x000c;\n L_0x0005:\n r0 = com.google.android.gms.internal.measurement.zzvo.f10281a;\n r1 = r1.getBytes(r0);\n r0 = r1.length;\n L_0x000c:\n r1 = m22576g(r0);\n r1 = r1 + r0;\n return r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.measurement.zzut.b(java.lang.String):int\");\n }", "public void method_7080(String param1, class_1293 param2) {\r\n // $FF: Couldn't be decompiled\r\n }", "public void m9741j() throws cf {\r\n }", "private static void check(java.lang.String r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e9 in method: java.security.Signer.check(java.lang.String):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: java.security.Signer.check(java.lang.String):void\");\n }", "public boolean method_2153(boolean param1) {\r\n // $FF: Couldn't be decompiled\r\n }", "public void method_2259(String param1, double param2, double param4, double param6, int param8, double param9, double param11, double param13, double param15) {\r\n // $FF: Couldn't be decompiled\r\n }", "private void m50367F() {\n }", "public void mo21779D() {\n }", "public final synchronized void mo5320b() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n*/\n /*\n r6 = this;\n monitor-enter(r6);\n r0 = r6.f24853c;\t Catch:{ all -> 0x004c }\n r1 = 0;\t Catch:{ all -> 0x004c }\n r2 = 0;\t Catch:{ all -> 0x004c }\n if (r0 == 0) goto L_0x0046;\t Catch:{ all -> 0x004c }\n L_0x0007:\n r0 = r6.f24851a;\t Catch:{ all -> 0x004c }\n if (r0 != 0) goto L_0x0013;\t Catch:{ all -> 0x004c }\n L_0x000b:\n r0 = r6.f24854d;\t Catch:{ all -> 0x004c }\n r3 = r6.f24853c;\t Catch:{ all -> 0x004c }\n r0.deleteFile(r3);\t Catch:{ all -> 0x004c }\n goto L_0x0046;\t Catch:{ all -> 0x004c }\n L_0x0013:\n r0 = com.google.android.m4b.maps.cg.bx.m23058b();\t Catch:{ all -> 0x004c }\n r3 = r6.f24854d;\t Catch:{ IOException -> 0x0032, all -> 0x002f }\n r4 = r6.f24853c;\t Catch:{ IOException -> 0x0032, all -> 0x002f }\n r3 = r3.openFileOutput(r4, r1);\t Catch:{ IOException -> 0x0032, all -> 0x002f }\n r4 = r6.f24851a;\t Catch:{ IOException -> 0x0033 }\n r4 = r4.m20837d();\t Catch:{ IOException -> 0x0033 }\n r3.write(r4);\t Catch:{ IOException -> 0x0033 }\n com.google.android.m4b.maps.cg.bx.m23057a(r0);\t Catch:{ all -> 0x004c }\n L_0x002b:\n com.google.android.m4b.maps.ap.C4655c.m20770a(r3);\t Catch:{ all -> 0x004c }\n goto L_0x0046;\n L_0x002f:\n r1 = move-exception;\n r3 = r2;\n goto L_0x003f;\n L_0x0032:\n r3 = r2;\n L_0x0033:\n r4 = r6.f24854d;\t Catch:{ all -> 0x003e }\n r5 = r6.f24853c;\t Catch:{ all -> 0x003e }\n r4.deleteFile(r5);\t Catch:{ all -> 0x003e }\n com.google.android.m4b.maps.cg.bx.m23057a(r0);\t Catch:{ all -> 0x004c }\n goto L_0x002b;\t Catch:{ all -> 0x004c }\n L_0x003e:\n r1 = move-exception;\t Catch:{ all -> 0x004c }\n L_0x003f:\n com.google.android.m4b.maps.cg.bx.m23057a(r0);\t Catch:{ all -> 0x004c }\n com.google.android.m4b.maps.ap.C4655c.m20770a(r3);\t Catch:{ all -> 0x004c }\n throw r1;\t Catch:{ all -> 0x004c }\n L_0x0046:\n r6.f24851a = r2;\t Catch:{ all -> 0x004c }\n r6.f24852b = r1;\t Catch:{ all -> 0x004c }\n monitor-exit(r6);\n return;\n L_0x004c:\n r0 = move-exception;\n monitor-exit(r6);\n throw r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.m4b.maps.cg.q.b():void\");\n }", "private synchronized void m29549c() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n*/\n /*\n r6 = this;\n monitor-enter(r6);\n r0 = r6.f24853c;\t Catch:{ all -> 0x0050 }\n if (r0 == 0) goto L_0x004b;\t Catch:{ all -> 0x0050 }\n L_0x0005:\n r0 = com.google.android.m4b.maps.cg.bx.m23056a();\t Catch:{ all -> 0x0050 }\n r1 = 0;\n r2 = r6.f24854d;\t Catch:{ IOException -> 0x0035, all -> 0x0030 }\n r3 = r6.f24853c;\t Catch:{ IOException -> 0x0035, all -> 0x0030 }\n r2 = r2.openFileInput(r3);\t Catch:{ IOException -> 0x0035, all -> 0x0030 }\n if (r2 == 0) goto L_0x0027;\n L_0x0014:\n r3 = new com.google.android.m4b.maps.ar.a;\t Catch:{ IOException -> 0x0036 }\n r4 = com.google.android.m4b.maps.de.af.f19891a;\t Catch:{ IOException -> 0x0036 }\n r3.<init>(r4);\t Catch:{ IOException -> 0x0036 }\n r6.f24851a = r3;\t Catch:{ IOException -> 0x0036 }\n r3 = r6.f24851a;\t Catch:{ IOException -> 0x0036 }\n r4 = com.google.android.m4b.maps.ap.C4655c.m20771a(r2);\t Catch:{ IOException -> 0x0036 }\n r3.m20819a(r4);\t Catch:{ IOException -> 0x0036 }\n goto L_0x0029;\t Catch:{ IOException -> 0x0036 }\n L_0x0027:\n r6.f24851a = r1;\t Catch:{ IOException -> 0x0036 }\n L_0x0029:\n com.google.android.m4b.maps.cg.bx.m23057a(r0);\t Catch:{ all -> 0x0050 }\n L_0x002c:\n com.google.android.m4b.maps.ap.C4655c.m20773b(r2);\t Catch:{ all -> 0x0050 }\n goto L_0x004b;\n L_0x0030:\n r2 = move-exception;\n r5 = r2;\n r2 = r1;\n r1 = r5;\n goto L_0x0044;\n L_0x0035:\n r2 = r1;\n L_0x0036:\n r6.f24851a = r1;\t Catch:{ all -> 0x0043 }\n r1 = r6.f24854d;\t Catch:{ all -> 0x0043 }\n r3 = r6.f24853c;\t Catch:{ all -> 0x0043 }\n r1.deleteFile(r3);\t Catch:{ all -> 0x0043 }\n com.google.android.m4b.maps.cg.bx.m23057a(r0);\t Catch:{ all -> 0x0050 }\n goto L_0x002c;\t Catch:{ all -> 0x0050 }\n L_0x0043:\n r1 = move-exception;\t Catch:{ all -> 0x0050 }\n L_0x0044:\n com.google.android.m4b.maps.cg.bx.m23057a(r0);\t Catch:{ all -> 0x0050 }\n com.google.android.m4b.maps.ap.C4655c.m20773b(r2);\t Catch:{ all -> 0x0050 }\n throw r1;\t Catch:{ all -> 0x0050 }\n L_0x004b:\n r0 = 1;\t Catch:{ all -> 0x0050 }\n r6.f24852b = r0;\t Catch:{ all -> 0x0050 }\n monitor-exit(r6);\n return;\n L_0x0050:\n r0 = move-exception;\n monitor-exit(r6);\n throw r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.m4b.maps.cg.q.c():void\");\n }", "public void mo115190b() {\n }", "public void method_2249(boolean param1, class_81 param2) {\r\n // $FF: Couldn't be decompiled\r\n }", "public final void mo1285b() {\n }", "public void mo23813b() {\n }", "public boolean method_208() {\r\n return false;\r\n }", "public final void mo11687c() {\n }", "public final void mo51373a() {\n }", "public static com.facebook.ads.internal.p081a.C1714d m6464a(java.lang.String r1) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r0 = android.text.TextUtils.isEmpty(r1);\n if (r0 == 0) goto L_0x0009;\n L_0x0006:\n r1 = NONE;\n return r1;\n L_0x0009:\n r0 = java.util.Locale.US;\t Catch:{ IllegalArgumentException -> 0x0014 }\n r1 = r1.toUpperCase(r0);\t Catch:{ IllegalArgumentException -> 0x0014 }\n r1 = com.facebook.ads.internal.p081a.C1714d.valueOf(r1);\t Catch:{ IllegalArgumentException -> 0x0014 }\n return r1;\n L_0x0014:\n r1 = NONE;\n return r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.facebook.ads.internal.a.d.a(java.lang.String):com.facebook.ads.internal.a.d\");\n }", "void mo72113b();", "public boolean method_2434() {\r\n return false;\r\n }", "public void mo21787L() {\n }", "boolean m25333a(java.lang.String r1) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n*/\n /*\n r0 = this;\n java.lang.Class.forName(r1);\t Catch:{ ClassNotFoundException -> 0x0005 }\n r1 = 1;\n return r1;\n L_0x0005:\n r1 = 0;\n return r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.mapbox.android.core.location.c.a(java.lang.String):boolean\");\n }", "private void kk12() {\n\n\t}", "void mo80457c();", "@org.jetbrains.annotations.NotNull\n /* Code decompiled incorrectly, please refer to instructions dump. */\n public static /* synthetic */ com.bitcoin.mwallet.core.models.p009tx.slputxo.SlpUtxoSelection copy$default(com.bitcoin.mwallet.core.models.p009tx.slputxo.SlpUtxoSelection r4, com.bitcoin.mwallet.core.models.slp.Slp r5, java.util.List<kotlin.ULong> r6, com.bitcoin.bitcoink.p008tx.Satoshis r7, com.bitcoin.bitcoink.p008tx.Satoshis r8, java.util.List<com.bitcoin.mwallet.core.models.p009tx.utxo.Utxo> r9, com.bitcoin.mwallet.core.models.p009tx.slputxo.SlpUtxoSelection.Error r10, int r11, java.lang.Object r12) {\n /*\n r12 = r11 & 1\n if (r12 == 0) goto L_0x0006\n com.bitcoin.mwallet.core.models.slp.Slp r5 = r4.token\n L_0x0006:\n r12 = r11 & 2\n if (r12 == 0) goto L_0x000c\n java.util.List<kotlin.ULong> r6 = r4.quantities\n L_0x000c:\n r12 = r6\n r6 = r11 & 4\n if (r6 == 0) goto L_0x0013\n com.bitcoin.bitcoink.tx.Satoshis r7 = r4.fee\n L_0x0013:\n r0 = r7\n r6 = r11 & 8\n if (r6 == 0) goto L_0x001a\n com.bitcoin.bitcoink.tx.Satoshis r8 = r4.change\n L_0x001a:\n r1 = r8\n r6 = r11 & 16\n if (r6 == 0) goto L_0x0021\n java.util.List<com.bitcoin.mwallet.core.models.tx.utxo.Utxo> r9 = r4.utxos\n L_0x0021:\n r2 = r9\n r6 = r11 & 32\n if (r6 == 0) goto L_0x0028\n com.bitcoin.mwallet.core.models.tx.slputxo.SlpUtxoSelection$Error r10 = r4.error\n L_0x0028:\n r3 = r10\n r6 = r4\n r7 = r5\n r8 = r12\n r9 = r0\n r10 = r1\n r11 = r2\n r12 = r3\n com.bitcoin.mwallet.core.models.tx.slputxo.SlpUtxoSelection r4 = r6.copy(r7, r8, r9, r10, r11, r12)\n return r4\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.bitcoin.mwallet.core.models.p009tx.slputxo.SlpUtxoSelection.copy$default(com.bitcoin.mwallet.core.models.tx.slputxo.SlpUtxoSelection, com.bitcoin.mwallet.core.models.slp.Slp, java.util.List, com.bitcoin.bitcoink.tx.Satoshis, com.bitcoin.bitcoink.tx.Satoshis, java.util.List, com.bitcoin.mwallet.core.models.tx.slputxo.SlpUtxoSelection$Error, int, java.lang.Object):com.bitcoin.mwallet.core.models.tx.slputxo.SlpUtxoSelection\");\n }", "public boolean A_()\r\n/* 21: */ {\r\n/* 22:138 */ return true;\r\n/* 23: */ }", "private final boolean e() {\n /*\n r15 = this;\n r2 = 0\n r1 = 0\n dtd r0 = r15.m // Catch:{ all -> 0x008e }\n if (r0 != 0) goto L_0x000d\n dtd r0 = new dtd // Catch:{ all -> 0x008e }\n r0.<init>() // Catch:{ all -> 0x008e }\n r15.m = r0 // Catch:{ all -> 0x008e }\n L_0x000d:\n int r0 = r15.k // Catch:{ all -> 0x008e }\n dtd r3 = r15.m // Catch:{ all -> 0x008e }\n int r3 = r3.a // Catch:{ all -> 0x008e }\n int r0 = r0 - r3\n if (r0 <= 0) goto L_0x039e\n dvk r3 = r15.g // Catch:{ all -> 0x008e }\n if (r3 == 0) goto L_0x0356\n byte[] r3 = r15.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r3 == 0) goto L_0x0025\n int r3 = r15.i // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r4 = r15.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r4 = r4.length // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r3 != r4) goto L_0x0032\n L_0x0025:\n r3 = 2097152(0x200000, float:2.938736E-39)\n int r3 = java.lang.Math.min(r0, r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r3 = new byte[r3] // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r15.h = r3 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 0\n r15.i = r3 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x0032:\n byte[] r3 = r15.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r3.length // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r4 = r15.i // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r3 - r4\n int r6 = java.lang.Math.min(r0, r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r7 = r15.g // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r8 = r15.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r9 = r15.i // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n boolean r0 = r7.i // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 != 0) goto L_0x00ac\n r0 = 1\n L_0x0047:\n java.lang.String r3 = \"GzipInflatingBuffer is closed\"\n defpackage.cld.b(r0, r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 0\n r0 = 1\n r5 = r3\n L_0x004f:\n if (r0 == 0) goto L_0x02ef\n int r3 = r6 - r5\n if (r3 <= 0) goto L_0x02ef\n dvm r0 = r7.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.ordinal() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n switch(r0) {\n case 0: goto L_0x00ae;\n case 1: goto L_0x0148;\n case 2: goto L_0x0171;\n case 3: goto L_0x01d7;\n case 4: goto L_0x01fc;\n case 5: goto L_0x0221;\n case 6: goto L_0x0256;\n case 7: goto L_0x0289;\n case 8: goto L_0x02a2;\n case 9: goto L_0x02e9;\n default: goto L_0x005e;\n } // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x005e:\n java.lang.AssertionError r0 = new java.lang.AssertionError // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvm r3 = r7.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.lang.String r3 = java.lang.String.valueOf(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.lang.String r4 = java.lang.String.valueOf(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r4 = r4.length() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r4 = r4 + 15\n java.lang.StringBuilder r5 = new java.lang.StringBuilder // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r5.<init>(r4) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.lang.String r4 = \"Invalid state: \"\n java.lang.StringBuilder r4 = r5.append(r4) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.lang.StringBuilder r3 = r4.append(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.lang.String r3 = r3.toString() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0.<init>(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n throw r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x0087:\n r0 = move-exception\n java.lang.RuntimeException r3 = new java.lang.RuntimeException // Catch:{ all -> 0x008e }\n r3.<init>(r0) // Catch:{ all -> 0x008e }\n throw r3 // Catch:{ all -> 0x008e }\n L_0x008e:\n r0 = move-exception\n if (r2 <= 0) goto L_0x00ab\n dxe r3 = r15.a\n r3.a(r2)\n dxh r3 = r15.j\n dxh r4 = defpackage.dxh.BODY\n if (r3 != r4) goto L_0x00ab\n dvk r3 = r15.g\n if (r3 == 0) goto L_0x03c9\n dzo r2 = r15.d\n long r4 = (long) r1\n r2.d(r4)\n int r2 = r15.r\n int r1 = r1 + r2\n r15.r = r1\n L_0x00ab:\n throw r0\n L_0x00ac:\n r0 = 0\n goto L_0x0047\n L_0x00ae:\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.b() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 10\n if (r0 >= r3) goto L_0x00ba\n r0 = 0\n goto L_0x004f\n L_0x00ba:\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.c() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 35615(0x8b1f, float:4.9907E-41)\n if (r0 == r3) goto L_0x00d4\n java.util.zip.ZipException r0 = new java.util.zip.ZipException // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.lang.String r3 = \"Not in GZIP format\"\n r0.<init>(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n throw r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x00cd:\n r0 = move-exception\n java.lang.RuntimeException r3 = new java.lang.RuntimeException // Catch:{ all -> 0x008e }\n r3.<init>(r0) // Catch:{ all -> 0x008e }\n throw r3 // Catch:{ all -> 0x008e }\n L_0x00d4:\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.a() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 8\n if (r0 == r3) goto L_0x00e6\n java.util.zip.ZipException r0 = new java.util.zip.ZipException // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.lang.String r3 = \"Unsupported compression method\"\n r0.<init>(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n throw r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x00e6:\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.a() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.j = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvl r4 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 6\n dvk r3 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r3.f // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r10 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r10 = r10.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r3 - r10\n if (r3 <= 0) goto L_0x03d9\n r0 = 6\n int r0 = java.lang.Math.min(r3, r0) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r3 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.util.zip.CRC32 r3 = r3.b // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r10 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r10 = r10.d // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r11 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r11 = r11.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3.update(r10, r11, r0) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r3 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n defpackage.dvk.a(r3, r0) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = 6 - r0\n r3 = r0\n L_0x0118:\n if (r3 <= 0) goto L_0x013b\n r0 = 512(0x200, float:7.175E-43)\n byte[] r10 = new byte[r0] // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 0\n L_0x011f:\n if (r0 >= r3) goto L_0x013b\n int r11 = r3 - r0\n r12 = 512(0x200, float:7.175E-43)\n int r11 = java.lang.Math.min(r11, r12) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r12 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dtd r12 = r12.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r13 = 0\n r12.a(r10, r13, r11) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r12 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.util.zip.CRC32 r12 = r12.b // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r13 = 0\n r12.update(r10, r13, r11) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0 + r11\n goto L_0x011f\n L_0x013b:\n dvk r0 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 6\n defpackage.dvk.b(r0, r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvm r0 = defpackage.dvm.HEADER_EXTRA_LEN // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 1\n goto L_0x004f\n L_0x0148:\n int r0 = r7.j // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = r0 & 4\n r3 = 4\n if (r0 == r3) goto L_0x0156\n dvm r0 = defpackage.dvm.HEADER_NAME // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 1\n goto L_0x004f\n L_0x0156:\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.b() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 2\n if (r0 >= r3) goto L_0x0162\n r0 = 0\n goto L_0x004f\n L_0x0162:\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.c() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.k = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvm r0 = defpackage.dvm.HEADER_EXTRA // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 1\n goto L_0x004f\n L_0x0171:\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.b() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r7.k // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 >= r3) goto L_0x017e\n r0 = 0\n goto L_0x004f\n L_0x017e:\n dvl r10 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r4 = r7.k // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r0 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.f // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r3 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r3.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0 - r3\n if (r0 <= 0) goto L_0x03d6\n int r0 = java.lang.Math.min(r0, r4) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r3 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.util.zip.CRC32 r3 = r3.b // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r11 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r11 = r11.d // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r12 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r12 = r12.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3.update(r11, r12, r0) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r3 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n defpackage.dvk.a(r3, r0) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r4 - r0\n r3 = r0\n L_0x01a8:\n if (r3 <= 0) goto L_0x01cb\n r0 = 512(0x200, float:7.175E-43)\n byte[] r11 = new byte[r0] // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 0\n L_0x01af:\n if (r0 >= r3) goto L_0x01cb\n int r12 = r3 - r0\n r13 = 512(0x200, float:7.175E-43)\n int r12 = java.lang.Math.min(r12, r13) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r13 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dtd r13 = r13.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r14 = 0\n r13.a(r11, r14, r12) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r13 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.util.zip.CRC32 r13 = r13.b // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r14 = 0\n r13.update(r11, r14, r12) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0 + r12\n goto L_0x01af\n L_0x01cb:\n dvk r0 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n defpackage.dvk.b(r0, r4) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvm r0 = defpackage.dvm.HEADER_NAME // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 1\n goto L_0x004f\n L_0x01d7:\n int r0 = r7.j // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = r0 & 8\n r3 = 8\n if (r0 != r3) goto L_0x01f5\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x01e1:\n int r3 = r0.b() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r3 <= 0) goto L_0x01f3\n int r3 = r0.a() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r3 != 0) goto L_0x01e1\n r0 = 1\n L_0x01ee:\n if (r0 != 0) goto L_0x01f5\n r0 = 0\n goto L_0x004f\n L_0x01f3:\n r0 = 0\n goto L_0x01ee\n L_0x01f5:\n dvm r0 = defpackage.dvm.HEADER_COMMENT // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 1\n goto L_0x004f\n L_0x01fc:\n int r0 = r7.j // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = r0 & 16\n r3 = 16\n if (r0 != r3) goto L_0x021a\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x0206:\n int r3 = r0.b() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r3 <= 0) goto L_0x0218\n int r3 = r0.a() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r3 != 0) goto L_0x0206\n r0 = 1\n L_0x0213:\n if (r0 != 0) goto L_0x021a\n r0 = 0\n goto L_0x004f\n L_0x0218:\n r0 = 0\n goto L_0x0213\n L_0x021a:\n dvm r0 = defpackage.dvm.HEADER_CRC // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 1\n goto L_0x004f\n L_0x0221:\n int r0 = r7.j // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = r0 & 2\n r3 = 2\n if (r0 != r3) goto L_0x024f\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.b() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 2\n if (r0 >= r3) goto L_0x0234\n r0 = 0\n goto L_0x004f\n L_0x0234:\n java.util.zip.CRC32 r0 = r7.b // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n long r10 = r0.getValue() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = (int) r10 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 65535(0xffff, float:9.1834E-41)\n r0 = r0 & r3\n dvl r3 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r3.c() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 == r3) goto L_0x024f\n java.util.zip.ZipException r0 = new java.util.zip.ZipException // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.lang.String r3 = \"Corrupt GZIP header\"\n r0.<init>(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n throw r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x024f:\n dvm r0 = defpackage.dvm.INITIALIZE_INFLATER // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 1\n goto L_0x004f\n L_0x0256:\n java.util.zip.Inflater r0 = r7.g // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 != 0) goto L_0x027e\n java.util.zip.Inflater r0 = new java.util.zip.Inflater // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 1\n r0.<init>(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.g = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x0262:\n java.util.zip.CRC32 r0 = r7.b // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0.reset() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r7.f // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r7.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0 - r3\n if (r0 <= 0) goto L_0x0284\n java.util.zip.Inflater r3 = r7.g // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r4 = r7.d // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r10 = r7.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3.setInput(r4, r10, r0) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvm r0 = defpackage.dvm.INFLATING // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x027b:\n r0 = 1\n goto L_0x004f\n L_0x027e:\n java.util.zip.Inflater r0 = r7.g // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0.reset() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n goto L_0x0262\n L_0x0284:\n dvm r0 = defpackage.dvm.INFLATER_NEEDS_INPUT // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n goto L_0x027b\n L_0x0289:\n int r0 = r9 + r5\n int r0 = r7.a(r8, r0, r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r5 + r0\n dvm r0 = r7.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvm r4 = defpackage.dvm.TRAILER // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 != r4) goto L_0x029e\n boolean r0 = r7.a() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r5 = r3\n goto L_0x004f\n L_0x029e:\n r0 = 1\n r5 = r3\n goto L_0x004f\n L_0x02a2:\n java.util.zip.Inflater r0 = r7.g // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 == 0) goto L_0x02c7\n r0 = 1\n L_0x02a7:\n java.lang.String r3 = \"inflater is null\"\n defpackage.cld.b(r0, r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r7.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r7.f // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 != r3) goto L_0x02c9\n r0 = 1\n L_0x02b3:\n java.lang.String r3 = \"inflaterInput has unconsumed bytes\"\n defpackage.cld.b(r0, r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dtd r0 = r7.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 512(0x200, float:7.175E-43)\n int r0 = java.lang.Math.min(r0, r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 != 0) goto L_0x02cb\n r0 = 0\n goto L_0x004f\n L_0x02c7:\n r0 = 0\n goto L_0x02a7\n L_0x02c9:\n r0 = 0\n goto L_0x02b3\n L_0x02cb:\n r3 = 0\n r7.e = r3 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.f = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dtd r3 = r7.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r4 = r7.d // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r10 = r7.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3.a(r4, r10, r0) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.util.zip.Inflater r3 = r7.g // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r4 = r7.d // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r10 = r7.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3.setInput(r4, r10, r0) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvm r0 = defpackage.dvm.INFLATING // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 1\n goto L_0x004f\n L_0x02e9:\n boolean r0 = r7.a() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n goto L_0x004f\n L_0x02ef:\n if (r0 == 0) goto L_0x0301\n dvm r0 = r7.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvm r3 = defpackage.dvm.HEADER // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 != r3) goto L_0x0334\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.b() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 10\n if (r0 >= r3) goto L_0x0334\n L_0x0301:\n r0 = 1\n L_0x0302:\n r7.n = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r0 = r15.g // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r0.l // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r4 = 0\n r0.l = r4 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r2 = r2 + r3\n dvk r0 = r15.g // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r0.m // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r4 = 0\n r0.m = r4 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r1 = r1 + r3\n if (r5 != 0) goto L_0x0342\n if (r2 <= 0) goto L_0x0332\n dxe r0 = r15.a\n r0.a(r2)\n dxh r0 = r15.j\n dxh r3 = defpackage.dxh.BODY\n if (r0 != r3) goto L_0x0332\n dvk r0 = r15.g\n if (r0 == 0) goto L_0x0336\n dzo r0 = r15.d\n long r2 = (long) r1\n r0.d(r2)\n int r0 = r15.r\n int r0 = r0 + r1\n r15.r = r0\n L_0x0332:\n r0 = 0\n L_0x0333:\n return r0\n L_0x0334:\n r0 = 0\n goto L_0x0302\n L_0x0336:\n dzo r0 = r15.d\n long r4 = (long) r2\n r0.d(r4)\n int r0 = r15.r\n int r0 = r0 + r2\n r15.r = r0\n goto L_0x0332\n L_0x0342:\n dtd r0 = r15.m // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r3 = r15.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r4 = r15.i // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dxv r3 = defpackage.dxw.a(r3, r4, r5) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0.a(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r15.i // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0 + r5\n r15.i = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n goto L_0x000d\n L_0x0356:\n dtd r3 = r15.n // Catch:{ all -> 0x008e }\n int r3 = r3.a // Catch:{ all -> 0x008e }\n if (r3 != 0) goto L_0x0386\n if (r2 <= 0) goto L_0x0378\n dxe r0 = r15.a\n r0.a(r2)\n dxh r0 = r15.j\n dxh r3 = defpackage.dxh.BODY\n if (r0 != r3) goto L_0x0378\n dvk r0 = r15.g\n if (r0 == 0) goto L_0x037a\n dzo r0 = r15.d\n long r2 = (long) r1\n r0.d(r2)\n int r0 = r15.r\n int r0 = r0 + r1\n r15.r = r0\n L_0x0378:\n r0 = 0\n goto L_0x0333\n L_0x037a:\n dzo r0 = r15.d\n long r4 = (long) r2\n r0.d(r4)\n int r0 = r15.r\n int r0 = r0 + r2\n r15.r = r0\n goto L_0x0378\n L_0x0386:\n dtd r3 = r15.n // Catch:{ all -> 0x008e }\n int r3 = r3.a // Catch:{ all -> 0x008e }\n int r0 = java.lang.Math.min(r0, r3) // Catch:{ all -> 0x008e }\n int r2 = r2 + r0\n dtd r3 = r15.m // Catch:{ all -> 0x008e }\n dtd r4 = r15.n // Catch:{ all -> 0x008e }\n dxv r0 = r4.a(r0) // Catch:{ all -> 0x008e }\n dtd r0 = (defpackage.dtd) r0 // Catch:{ all -> 0x008e }\n r3.a(r0) // Catch:{ all -> 0x008e }\n goto L_0x000d\n L_0x039e:\n if (r2 <= 0) goto L_0x03ba\n dxe r0 = r15.a\n r0.a(r2)\n dxh r0 = r15.j\n dxh r3 = defpackage.dxh.BODY\n if (r0 != r3) goto L_0x03ba\n dvk r0 = r15.g\n if (r0 == 0) goto L_0x03bd\n dzo r0 = r15.d\n long r2 = (long) r1\n r0.d(r2)\n int r0 = r15.r\n int r0 = r0 + r1\n r15.r = r0\n L_0x03ba:\n r0 = 1\n goto L_0x0333\n L_0x03bd:\n dzo r0 = r15.d\n long r4 = (long) r2\n r0.d(r4)\n int r0 = r15.r\n int r0 = r0 + r2\n r15.r = r0\n goto L_0x03ba\n L_0x03c9:\n dzo r1 = r15.d\n long r4 = (long) r2\n r1.d(r4)\n int r1 = r15.r\n int r1 = r1 + r2\n r15.r = r1\n goto L_0x00ab\n L_0x03d6:\n r3 = r4\n goto L_0x01a8\n L_0x03d9:\n r3 = r0\n goto L_0x0118\n */\n throw new UnsupportedOperationException(\"Method not decompiled: defpackage.dxd.e():boolean\");\n }", "public void m23075a() {\n }", "void mo80452a();", "public final int mo11683a(com.google.android.gms.internal.ads.bci r11, com.google.android.gms.internal.ads.bcn r12) {\n /*\n r10 = this;\n L_0x0000:\n int r12 = r10.f3925e\n r0 = -1\n r1 = 1\n r2 = 0\n switch(r12) {\n case 0: goto L_0x00b2;\n case 1: goto L_0x0044;\n case 2: goto L_0x000e;\n default: goto L_0x0008;\n }\n L_0x0008:\n java.lang.IllegalStateException r11 = new java.lang.IllegalStateException\n r11.<init>()\n throw r11\n L_0x000e:\n int r12 = r10.f3928h\n if (r12 <= 0) goto L_0x0031\n com.google.android.gms.internal.ads.bkh r12 = r10.f3923c\n r12.mo12047a()\n com.google.android.gms.internal.ads.bkh r12 = r10.f3923c\n byte[] r12 = r12.f4559a\n r0 = 3\n r11.mo11675b(r12, r2, r0)\n com.google.android.gms.internal.ads.bcq r12 = r10.f3924d\n com.google.android.gms.internal.ads.bkh r3 = r10.f3923c\n r12.mo11681a(r3, r0)\n int r12 = r10.f3929i\n int r12 = r12 + r0\n r10.f3929i = r12\n int r12 = r10.f3928h\n int r12 = r12 - r1\n r10.f3928h = r12\n goto L_0x000e\n L_0x0031:\n int r11 = r10.f3929i\n if (r11 <= 0) goto L_0x0041\n com.google.android.gms.internal.ads.bcq r3 = r10.f3924d\n long r4 = r10.f3927g\n r6 = 1\n int r7 = r10.f3929i\n r8 = 0\n r9 = 0\n r3.mo11680a(r4, r6, r7, r8, r9)\n L_0x0041:\n r10.f3925e = r1\n return r2\n L_0x0044:\n com.google.android.gms.internal.ads.bkh r12 = r10.f3923c\n r12.mo12047a()\n int r12 = r10.f3926f\n if (r12 != 0) goto L_0x006a\n com.google.android.gms.internal.ads.bkh r12 = r10.f3923c\n byte[] r12 = r12.f4559a\n r3 = 5\n boolean r12 = r11.mo11672a(r12, r2, r3, r1)\n if (r12 != 0) goto L_0x005a\n L_0x0058:\n r1 = 0\n goto L_0x008d\n L_0x005a:\n com.google.android.gms.internal.ads.bkh r12 = r10.f3923c\n long r3 = r12.mo12063j()\n r5 = 1000(0x3e8, double:4.94E-321)\n long r3 = r3 * r5\n r5 = 45\n long r3 = r3 / r5\n r10.f3927g = r3\n goto L_0x0083\n L_0x006a:\n int r12 = r10.f3926f\n if (r12 != r1) goto L_0x0097\n com.google.android.gms.internal.ads.bkh r12 = r10.f3923c\n byte[] r12 = r12.f4559a\n r3 = 9\n boolean r12 = r11.mo11672a(r12, r2, r3, r1)\n if (r12 != 0) goto L_0x007b\n goto L_0x0058\n L_0x007b:\n com.google.android.gms.internal.ads.bkh r12 = r10.f3923c\n long r3 = r12.mo12066m()\n r10.f3927g = r3\n L_0x0083:\n com.google.android.gms.internal.ads.bkh r12 = r10.f3923c\n int r12 = r12.mo12059f()\n r10.f3928h = r12\n r10.f3929i = r2\n L_0x008d:\n if (r1 == 0) goto L_0x0094\n r12 = 2\n r10.f3925e = r12\n goto L_0x0000\n L_0x0094:\n r10.f3925e = r2\n return r0\n L_0x0097:\n com.google.android.gms.internal.ads.bad r11 = new com.google.android.gms.internal.ads.bad\n int r12 = r10.f3926f\n r0 = 39\n java.lang.StringBuilder r1 = new java.lang.StringBuilder\n r1.<init>(r0)\n java.lang.String r0 = \"Unsupported version number: \"\n r1.append(r0)\n r1.append(r12)\n java.lang.String r12 = r1.toString()\n r11.<init>((java.lang.String) r12)\n throw r11\n L_0x00b2:\n com.google.android.gms.internal.ads.bkh r12 = r10.f3923c\n r12.mo12047a()\n com.google.android.gms.internal.ads.bkh r12 = r10.f3923c\n byte[] r12 = r12.f4559a\n r3 = 8\n boolean r12 = r11.mo11672a(r12, r2, r3, r1)\n if (r12 == 0) goto L_0x00df\n com.google.android.gms.internal.ads.bkh r12 = r10.f3923c\n int r12 = r12.mo12065l()\n int r2 = f3921a\n if (r12 != r2) goto L_0x00d7\n com.google.android.gms.internal.ads.bkh r12 = r10.f3923c\n int r12 = r12.mo12059f()\n r10.f3926f = r12\n r2 = 1\n goto L_0x00df\n L_0x00d7:\n java.io.IOException r11 = new java.io.IOException\n java.lang.String r12 = \"Input not RawCC\"\n r11.<init>(r12)\n throw r11\n L_0x00df:\n if (r2 == 0) goto L_0x00e5\n r10.f3925e = r1\n goto L_0x0000\n L_0x00e5:\n return r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.ads.bef.mo11683a(com.google.android.gms.internal.ads.bci, com.google.android.gms.internal.ads.bcn):int\");\n }", "public void mo12628c() {\n }", "public synchronized void m6495a(int r6, int r7) throws fr.pcsoft.wdjava.geo.C0918i {\n /* JADX: method processing error */\n/*\nError: jadx.core.utils.exceptions.JadxRuntimeException: Exception block dominator not found, method:fr.pcsoft.wdjava.geo.a.b.a(int, int):void. bs: [B:13:0x001d, B:18:0x0027, B:23:0x0031, B:28:0x003a, B:44:0x005d, B:55:0x006c, B:64:0x0079]\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:86)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/70807318.run(Unknown Source)\n*/\n /*\n r5 = this;\n r4 = 2;\n r1 = 0;\n r0 = 1;\n monitor-enter(r5);\n r5.m6487e();\t Catch:{ all -> 0x0053 }\n switch(r6) {\n case 2: goto L_0x0089;\n case 3: goto L_0x000a;\n case 4: goto L_0x0013;\n default: goto L_0x000a;\n };\t Catch:{ all -> 0x0053 }\n L_0x000a:\n r0 = f2486z;\t Catch:{ all -> 0x0053 }\n r1 = 3;\t Catch:{ all -> 0x0053 }\n r0 = r0[r1];\t Catch:{ all -> 0x0053 }\n r5.f2488b = r0;\t Catch:{ all -> 0x0053 }\n L_0x0011:\n monitor-exit(r5);\n return;\n L_0x0013:\n r3 = new android.location.Criteria;\t Catch:{ all -> 0x0053 }\n r3.<init>();\t Catch:{ all -> 0x0053 }\n r2 = r7 & 2;\n if (r2 != r4) goto L_0x0058;\n L_0x001c:\n r2 = 1;\n r3.setAccuracy(r2);\t Catch:{ i -> 0x0056 }\n L_0x0020:\n r2 = r7 & 128;\n r4 = 128; // 0x80 float:1.794E-43 double:6.32E-322;\n if (r2 != r4) goto L_0x0065;\n L_0x0026:\n r2 = 3;\n r3.setPowerRequirement(r2);\t Catch:{ i -> 0x0063 }\n L_0x002a:\n r2 = r7 & 8;\n r4 = 8;\n if (r2 != r4) goto L_0x007f;\n L_0x0030:\n r2 = r0;\n L_0x0031:\n r3.setAltitudeRequired(r2);\t Catch:{ i -> 0x0081 }\n r2 = r7 & 4;\n r4 = 4;\n if (r2 != r4) goto L_0x0083;\n L_0x0039:\n r2 = r0;\n L_0x003a:\n r3.setAltitudeRequired(r2);\t Catch:{ i -> 0x0085 }\n r2 = r7 & 16;\n r4 = 16;\n if (r2 != r4) goto L_0x0087;\n L_0x0043:\n r3.setAltitudeRequired(r0);\t Catch:{ all -> 0x0053 }\n r0 = 0;\t Catch:{ all -> 0x0053 }\n r0 = r5.m6485a(r0);\t Catch:{ all -> 0x0053 }\n r1 = 1;\t Catch:{ all -> 0x0053 }\n r0 = r0.getBestProvider(r3, r1);\t Catch:{ all -> 0x0053 }\n r5.f2488b = r0;\t Catch:{ all -> 0x0053 }\n goto L_0x0011;\n L_0x0053:\n r0 = move-exception;\n monitor-exit(r5);\n throw r0;\n L_0x0056:\n r0 = move-exception;\n throw r0;\t Catch:{ all -> 0x0053 }\n L_0x0058:\n r2 = r7 & 1;\n if (r2 != r0) goto L_0x0020;\n L_0x005c:\n r2 = 2;\n r3.setAccuracy(r2);\t Catch:{ i -> 0x0061 }\n goto L_0x0020;\n L_0x0061:\n r0 = move-exception;\n throw r0;\t Catch:{ all -> 0x0053 }\n L_0x0063:\n r0 = move-exception;\t Catch:{ all -> 0x0053 }\n throw r0;\t Catch:{ all -> 0x0053 }\n L_0x0065:\n r2 = r7 & 64;\n r4 = 64;\n if (r2 != r4) goto L_0x0072;\n L_0x006b:\n r2 = 2;\n r3.setPowerRequirement(r2);\t Catch:{ i -> 0x0070 }\n goto L_0x002a;\n L_0x0070:\n r0 = move-exception;\n throw r0;\t Catch:{ all -> 0x0053 }\n L_0x0072:\n r2 = r7 & 32;\n r4 = 32;\n if (r2 != r4) goto L_0x002a;\n L_0x0078:\n r2 = 1;\n r3.setPowerRequirement(r2);\t Catch:{ i -> 0x007d }\n goto L_0x002a;\n L_0x007d:\n r0 = move-exception;\n throw r0;\t Catch:{ all -> 0x0053 }\n L_0x007f:\n r2 = r1;\t Catch:{ all -> 0x0053 }\n goto L_0x0031;\t Catch:{ all -> 0x0053 }\n L_0x0081:\n r0 = move-exception;\t Catch:{ all -> 0x0053 }\n throw r0;\t Catch:{ all -> 0x0053 }\n L_0x0083:\n r2 = r1;\t Catch:{ all -> 0x0053 }\n goto L_0x003a;\t Catch:{ all -> 0x0053 }\n L_0x0085:\n r0 = move-exception;\t Catch:{ all -> 0x0053 }\n throw r0;\t Catch:{ all -> 0x0053 }\n L_0x0087:\n r0 = r1;\t Catch:{ all -> 0x0053 }\n goto L_0x0043;\t Catch:{ all -> 0x0053 }\n L_0x0089:\n r0 = f2486z;\t Catch:{ all -> 0x0053 }\n r1 = 2;\t Catch:{ all -> 0x0053 }\n r0 = r0[r1];\t Catch:{ all -> 0x0053 }\n r5.f2488b = r0;\t Catch:{ all -> 0x0053 }\n goto L_0x0011;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: fr.pcsoft.wdjava.geo.a.b.a(int, int):void\");\n }", "void mo41086b();", "private synchronized void m3985g() {\n /*\n r8 = this;\n monitor-enter(r8);\n r2 = java.lang.Thread.currentThread();\t Catch:{ all -> 0x0063 }\n r3 = r8.f2114f;\t Catch:{ all -> 0x0063 }\n r3 = r3.mo1186c();\t Catch:{ all -> 0x0063 }\n r2 = r2.equals(r3);\t Catch:{ all -> 0x0063 }\n if (r2 != 0) goto L_0x0021;\n L_0x0011:\n r2 = r8.f2114f;\t Catch:{ all -> 0x0063 }\n r2 = r2.mo1185b();\t Catch:{ all -> 0x0063 }\n r3 = new com.google.analytics.tracking.android.aa;\t Catch:{ all -> 0x0063 }\n r3.<init>(r8);\t Catch:{ all -> 0x0063 }\n r2.add(r3);\t Catch:{ all -> 0x0063 }\n L_0x001f:\n monitor-exit(r8);\n return;\n L_0x0021:\n r2 = r8.f2122n;\t Catch:{ all -> 0x0063 }\n if (r2 == 0) goto L_0x0028;\n L_0x0025:\n r8.m3999d();\t Catch:{ all -> 0x0063 }\n L_0x0028:\n r2 = com.google.analytics.tracking.android.ab.f1966a;\t Catch:{ all -> 0x0063 }\n r3 = r8.f2110b;\t Catch:{ all -> 0x0063 }\n r3 = r3.ordinal();\t Catch:{ all -> 0x0063 }\n r2 = r2[r3];\t Catch:{ all -> 0x0063 }\n switch(r2) {\n case 1: goto L_0x0036;\n case 2: goto L_0x006e;\n case 3: goto L_0x00aa;\n default: goto L_0x0035;\n };\t Catch:{ all -> 0x0063 }\n L_0x0035:\n goto L_0x001f;\n L_0x0036:\n r2 = r8.f2116h;\t Catch:{ all -> 0x0063 }\n r2 = r2.isEmpty();\t Catch:{ all -> 0x0063 }\n if (r2 != 0) goto L_0x0066;\n L_0x003e:\n r2 = r8.f2116h;\t Catch:{ all -> 0x0063 }\n r2 = r2.poll();\t Catch:{ all -> 0x0063 }\n r0 = r2;\n r0 = (com.google.analytics.tracking.android.af) r0;\t Catch:{ all -> 0x0063 }\n r7 = r0;\n r2 = \"Sending hit to store\";\n com.google.analytics.tracking.android.av.m3818e(r2);\t Catch:{ all -> 0x0063 }\n r2 = r8.f2112d;\t Catch:{ all -> 0x0063 }\n r3 = r7.m3743a();\t Catch:{ all -> 0x0063 }\n r4 = r7.m3744b();\t Catch:{ all -> 0x0063 }\n r6 = r7.m3745c();\t Catch:{ all -> 0x0063 }\n r7 = r7.m3746d();\t Catch:{ all -> 0x0063 }\n r2.mo1197a(r3, r4, r6, r7);\t Catch:{ all -> 0x0063 }\n goto L_0x0036;\n L_0x0063:\n r2 = move-exception;\n monitor-exit(r8);\n throw r2;\n L_0x0066:\n r2 = r8.f2121m;\t Catch:{ all -> 0x0063 }\n if (r2 == 0) goto L_0x001f;\n L_0x006a:\n r8.m3987h();\t Catch:{ all -> 0x0063 }\n goto L_0x001f;\n L_0x006e:\n r2 = r8.f2116h;\t Catch:{ all -> 0x0063 }\n r2 = r2.isEmpty();\t Catch:{ all -> 0x0063 }\n if (r2 != 0) goto L_0x00a0;\n L_0x0076:\n r2 = r8.f2116h;\t Catch:{ all -> 0x0063 }\n r2 = r2.peek();\t Catch:{ all -> 0x0063 }\n r0 = r2;\n r0 = (com.google.analytics.tracking.android.af) r0;\t Catch:{ all -> 0x0063 }\n r7 = r0;\n r2 = \"Sending hit to service\";\n com.google.analytics.tracking.android.av.m3818e(r2);\t Catch:{ all -> 0x0063 }\n r2 = r8.f2111c;\t Catch:{ all -> 0x0063 }\n r3 = r7.m3743a();\t Catch:{ all -> 0x0063 }\n r4 = r7.m3744b();\t Catch:{ all -> 0x0063 }\n r6 = r7.m3745c();\t Catch:{ all -> 0x0063 }\n r7 = r7.m3746d();\t Catch:{ all -> 0x0063 }\n r2.mo1204a(r3, r4, r6, r7);\t Catch:{ all -> 0x0063 }\n r2 = r8.f2116h;\t Catch:{ all -> 0x0063 }\n r2.poll();\t Catch:{ all -> 0x0063 }\n goto L_0x006e;\n L_0x00a0:\n r2 = r8.f2123o;\t Catch:{ all -> 0x0063 }\n r2 = r2.mo1198a();\t Catch:{ all -> 0x0063 }\n r8.f2109a = r2;\t Catch:{ all -> 0x0063 }\n goto L_0x001f;\n L_0x00aa:\n r2 = \"Need to reconnect\";\n com.google.analytics.tracking.android.av.m3818e(r2);\t Catch:{ all -> 0x0063 }\n r2 = r8.f2116h;\t Catch:{ all -> 0x0063 }\n r2 = r2.isEmpty();\t Catch:{ all -> 0x0063 }\n if (r2 != 0) goto L_0x001f;\n L_0x00b7:\n r8.m3991j();\t Catch:{ all -> 0x0063 }\n goto L_0x001f;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.analytics.tracking.android.y.g():void\");\n }", "private final void m710e() {\n /*\n r12 = this;\n akn r0 = r12.f531p\n akl r0 = r0.f601d\n if (r0 == 0) goto L_0x0155\n boolean r1 = r0.f580d\n r2 = -9223372036854775807(0x8000000000000001, double:-4.9E-324)\n if (r1 == 0) goto L_0x0017\n aws r1 = r0.f577a\n long r4 = r1.mo1486c()\n r8 = r4\n goto L_0x0019\n L_0x0017:\n r8 = r2\n L_0x0019:\n int r1 = (r8 > r2 ? 1 : (r8 == r2 ? 0 : -1))\n if (r1 != 0) goto L_0x0122\n ajf r1 = r12.f528m\n akn r2 = r12.f531p\n akl r2 = r2.f602e\n akx r3 = r1.f445c\n r4 = 0\n if (r3 == 0) goto L_0x008a\n boolean r3 = r3.mo486w()\n if (r3 != 0) goto L_0x008a\n akx r3 = r1.f445c\n boolean r3 = r3.mo485v()\n if (r3 == 0) goto L_0x0037\n goto L_0x0042\n L_0x0037:\n if (r0 != r2) goto L_0x008a\n akx r2 = r1.f445c\n boolean r2 = r2.mo359g()\n if (r2 == 0) goto L_0x0042\n goto L_0x008a\n L_0x0042:\n bkr r2 = r1.f446d\n long r2 = r2.mo379b()\n boolean r5 = r1.f447e\n if (r5 == 0) goto L_0x0068\n blf r5 = r1.f443a\n long r5 = r5.mo379b()\n int r7 = (r2 > r5 ? 1 : (r2 == r5 ? 0 : -1))\n if (r7 >= 0) goto L_0x005c\n blf r2 = r1.f443a\n r2.mo2109d()\n goto L_0x0096\n L_0x005c:\n r1.f447e = r4\n boolean r5 = r1.f448f\n if (r5 == 0) goto L_0x0068\n blf r5 = r1.f443a\n r5.mo2107a()\n L_0x0068:\n blf r5 = r1.f443a\n r5.mo2108a(r2)\n bkr r2 = r1.f446d\n akq r2 = r2.mo376Q()\n blf r3 = r1.f443a\n akq r3 = r3.f4280a\n boolean r3 = r2.equals(r3)\n if (r3 != 0) goto L_0x0096\n blf r3 = r1.f443a\n r3.mo378a(r2)\n aje r3 = r1.f444b\n ake r3 = (p000.ake) r3\n r3.m694a(r2, r4)\n goto L_0x0096\n L_0x008a:\n r2 = 1\n r1.f447e = r2\n boolean r2 = r1.f448f\n if (r2 == 0) goto L_0x0096\n blf r2 = r1.f443a\n r2.mo2107a()\n L_0x0096:\n long r1 = r1.mo379b()\n r12.f513D = r1\n long r0 = r0.mo440b(r1)\n akp r2 = r12.f533r\n long r2 = r2.f623m\n java.util.ArrayList r5 = r12.f530o\n boolean r5 = r5.isEmpty()\n if (r5 != 0) goto L_0x011d\n akp r5 = r12.f533r\n awt r5 = r5.f612b\n boolean r5 = r5.mo1504a()\n if (r5 != 0) goto L_0x011d\n akp r5 = r12.f533r\n long r6 = r5.f613c\n int r8 = (r6 > r2 ? 1 : (r6 == r2 ? 0 : -1))\n if (r8 != 0) goto L_0x00c5\n boolean r6 = r12.f515F\n if (r6 == 0) goto L_0x00c5\n r6 = -1\n long r2 = r2 + r6\n L_0x00c5:\n r12.f515F = r4\n alh r4 = r5.f611a\n awt r5 = r5.f612b\n java.lang.Object r5 = r5.f2566a\n int r4 = r4.mo525a(r5)\n int r5 = r12.f514E\n r6 = 0\n if (r5 <= 0) goto L_0x00e1\n java.util.ArrayList r7 = r12.f530o\n int r5 = r5 + -1\n java.lang.Object r5 = r7.get(r5)\n akb r5 = (p000.akb) r5\n goto L_0x00e3\n L_0x00e1:\n L_0x00e2:\n r5 = r6\n L_0x00e3:\n if (r5 != 0) goto L_0x00e6\n goto L_0x0109\n L_0x00e6:\n int r5 = r5.f502a\n if (r4 >= 0) goto L_0x00eb\n L_0x00ea:\n goto L_0x00f4\n L_0x00eb:\n if (r4 != 0) goto L_0x0109\n r7 = 0\n int r5 = (r2 > r7 ? 1 : (r2 == r7 ? 0 : -1))\n if (r5 >= 0) goto L_0x0109\n goto L_0x00ea\n L_0x00f4:\n int r5 = r12.f514E\n int r5 = r5 + -1\n r12.f514E = r5\n if (r5 <= 0) goto L_0x0108\n java.util.ArrayList r7 = r12.f530o\n int r5 = r5 + -1\n java.lang.Object r5 = r7.get(r5)\n akb r5 = (p000.akb) r5\n goto L_0x00e3\n L_0x0108:\n goto L_0x00e2\n L_0x0109:\n int r2 = r12.f514E\n java.util.ArrayList r3 = r12.f530o\n int r3 = r3.size()\n if (r2 >= r3) goto L_0x011d\n java.util.ArrayList r2 = r12.f530o\n int r3 = r12.f514E\n java.lang.Object r2 = r2.get(r3)\n akb r2 = (p000.akb) r2\n L_0x011d:\n akp r2 = r12.f533r\n r2.f623m = r0\n goto L_0x0140\n L_0x0122:\n r12.m691a(r8)\n akp r0 = r12.f533r\n long r0 = r0.f623m\n int r2 = (r8 > r0 ? 1 : (r8 == r0 ? 0 : -1))\n if (r2 == 0) goto L_0x0140\n akp r0 = r12.f533r\n awt r7 = r0.f612b\n long r10 = r0.f614d\n r6 = r12\n akp r0 = r6.m686a(r7, r8, r10)\n r12.f533r = r0\n akc r0 = r12.f529n\n r1 = 4\n r0.mo409b(r1)\n L_0x0140:\n akn r0 = r12.f531p\n akl r0 = r0.f603f\n akp r1 = r12.f533r\n long r2 = r0.mo442c()\n r1.f621k = r2\n akp r0 = r12.f533r\n long r1 = r12.m719n()\n r0.f622l = r1\n return\n L_0x0155:\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: p000.ake.m710e():void\");\n }", "public void mo21785J() {\n }", "public final com.google.android.gms.internal.ads.zzafx mo4170d() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n*/\n /*\n r2 = this;\n r0 = r2.f19705f;\n monitor-enter(r0);\n r1 = r2.f19706g;\t Catch:{ IllegalStateException -> 0x000d, IllegalStateException -> 0x000d }\n r1 = r1.m26175a();\t Catch:{ IllegalStateException -> 0x000d, IllegalStateException -> 0x000d }\n monitor-exit(r0);\t Catch:{ all -> 0x000b }\n return r1;\t Catch:{ all -> 0x000b }\n L_0x000b:\n r1 = move-exception;\t Catch:{ all -> 0x000b }\n goto L_0x0010;\t Catch:{ all -> 0x000b }\n L_0x000d:\n r1 = 0;\t Catch:{ all -> 0x000b }\n monitor-exit(r0);\t Catch:{ all -> 0x000b }\n return r1;\t Catch:{ all -> 0x000b }\n L_0x0010:\n monitor-exit(r0);\t Catch:{ all -> 0x000b }\n throw r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.ads.zzafn.d():com.google.android.gms.internal.ads.zzafx\");\n }", "protected boolean func_70041_e_() { return false; }", "static /* synthetic */ void m204-wrap8(com.mediatek.internal.telephony.worldphone.WorldPhoneOp01 r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 0073 in method: com.mediatek.internal.telephony.worldphone.WorldPhoneOp01.-wrap8(com.mediatek.internal.telephony.worldphone.WorldPhoneOp01):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.mediatek.internal.telephony.worldphone.WorldPhoneOp01.-wrap8(com.mediatek.internal.telephony.worldphone.WorldPhoneOp01):void\");\n }", "public int g()\r\n/* 173: */ {\r\n/* 174:198 */ return 0;\r\n/* 175: */ }" ]
[ "0.7616353", "0.7572131", "0.75251985", "0.74502295", "0.74494404", "0.7436729", "0.738065", "0.738065", "0.7365641", "0.73525214", "0.73411334", "0.7314028", "0.7307766", "0.7304578", "0.7273524", "0.7251268", "0.72207904", "0.71969974", "0.7176537", "0.7135733", "0.710486", "0.70408154", "0.7023884", "0.70184636", "0.6990726", "0.696002", "0.6940071", "0.69067246", "0.6888959", "0.68510413", "0.6827415", "0.67943865", "0.678407", "0.6777927", "0.6771681", "0.6771006", "0.6769211", "0.676746", "0.67416275", "0.6708043", "0.67009026", "0.6699805", "0.6699002", "0.66983634", "0.6669125", "0.66672784", "0.66540927", "0.66129684", "0.6610931", "0.66098416", "0.65935856", "0.65686744", "0.65636337", "0.6539728", "0.6513091", "0.65095264", "0.6509282", "0.6488443", "0.6435971", "0.6432371", "0.6430695", "0.6403981", "0.6400266", "0.637223", "0.6369163", "0.63668054", "0.6355758", "0.63298243", "0.63269496", "0.6325034", "0.6317447", "0.6303614", "0.6303489", "0.6298925", "0.6281936", "0.62809545", "0.6241804", "0.6228259", "0.62273794", "0.62273574", "0.6225269", "0.62191737", "0.62178576", "0.62053037", "0.6198289", "0.6194281", "0.61797875", "0.6171343", "0.6167842", "0.6164482", "0.61626977", "0.6162113", "0.6156989", "0.61556643", "0.6152375", "0.6140879", "0.6126532", "0.6114693", "0.6111775", "0.61019915", "0.6096907" ]
0.0
-1
Method to add a new doctor user
public static void adder(DoctorInformation NewUser) { int hola = 0; for (int i = 0; i < doctorsList.size(); i++) { String useremail = NewUser.getEmail(); if (useremail.equals(doctorsList.get(i).getEmail())) { if (NewUser.getPassword().equals(doctorsList.get(i).getPassword())) { doctorsList.set(i, NewUser); hola = 1; } } } if (hola == 0) { doctorsList.add(NewUser); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addUser(User user) {\n\t\t\r\n\t}", "public void addUser(User user);", "void addUser(User user);", "void addUser(User user);", "boolean addUser(int employeeId, String name, String password, String role);", "public void addUser(Customer user) {}", "public void addUser(UserModel user);", "void addNewUser(User user, int roleId) throws DAOException;", "public void addUser() {\n\t\tUser user = dataManager.findCurrentUser();\r\n\t\tif (user != null) {\r\n\t\t\tframeManager.addUser(user);\r\n\t\t\tpesquisar();\r\n\t\t} else {\r\n\t\t\tAlertUtils.alertSemPrivelegio();\r\n\t\t}\r\n\t}", "@Override\n\tpublic void addUser(ERSUser user) {\n\t\tuserDao.insertUser(user);\n\t}", "public void addUser() {\n\t\tSystem.out.println(\"com.zzu.yhl.a_jdk addUser\");\r\n\t}", "public boolean addUser(UserDTO user);", "@Override\r\n\tpublic Utilisateur addUser() {\n\t\treturn null;\r\n\t}", "public void createUser(User user) {\n\n\t}", "public void addDoctor(Doctor D)\r\n {\r\n\t try{\r\n\t\t \r\n\t\t \r\n\t String command = \"INSERT INTO DOCTORDATA (FIRSTNAME,LASTNAME,USERNAME,PASSWORD,SECURITYQN,SECURITYANS)\"+\r\n\t\t\t \"VALUES ('\"+D.firstName+\"', '\"+D.lastName+\"', '\"+D.userName+\"', '\"+D.password+\"', '\"+D.securityQuestion+\"', '\"+D.securityQuestionAnswer+\"');\";\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 void addUser(User user){\n loginDAO.saveUser(user.getId(),user.getName(),user.getPassword());\n }", "User addUser(IDAOSession session, String fullName, String userName,\n\t\t\tString password);", "public void insertUser() {}", "@Override\r\n\tpublic void add(User user) {\n\r\n\t}", "public void Adduser(User u1) {\n\t\tUserDao ua=new UserDao();\n\t\tua.adduser(u1);\n\t\t\n\t}", "public String add() {\r\n\t\tuserAdd = new User();\r\n\t\treturn \"add\";\r\n\t}", "public void createUser(User user);", "public String create() {\r\n\t\tuserService.create(userAdd);\r\n\t\tusers.setWrappedData(userService.list());\r\n\t\treturn \"create\";\r\n\t}", "public void addAccount(String user, String password);", "public eu.aladdin_project.xsd.User addNewUser()\n {\n synchronized (monitor())\n {\n check_orphaned();\n eu.aladdin_project.xsd.User target = null;\n target = (eu.aladdin_project.xsd.User)get_store().add_element_user(USER$0);\n return target;\n }\n }", "public void addUserUI() throws IOException {\n System.out.println(\"Add user: id;surname;first name;username;password\");\n\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n String line = reader.readLine();\n String[] a = line.split(\";\");\n User user = new User(a[1], a[2], a[3], a[4], \" \");\n user.setId(Long.parseLong(a[0]));\n try\n {\n User newUser = service.addUser(user);\n if(newUser != null)\n System.out.println(\"ID already exists for \" + user.toString());\n else\n System.out.println(\"User added successfully!\");\n }\n catch (ValidationException ex)\n {\n System.out.println(ex.getMessage());\n }\n catch (IllegalArgumentException ex)\n {\n System.out.println(ex.getMessage());\n }\n }", "void addUser(String uid, String firstname, String lastname, String pseudo);", "void add(User user) throws AccessControlException;", "UserDTO addNewData(UserDTO userDTO);", "public void newUser(User user);", "public void newUser(User user) {\n users.add(user);\n }", "@Override\n\tpublic User add(String name, String pwd, String phone) {\n\t\tSystem.out.println(\"OracleDao is add\");\n\t\treturn null;\n\t}", "public void addUser(User user){\r\n users.add(user);\r\n }", "void add(User user) throws SQLException;", "@Override\n\tpublic boolean addNewUser() {\n\t\treturn false;\n\t}", "void addUser(BlogUser user) throws DAOException;", "public void addUser(User user){\n SQLiteDatabase db = this.getWritableDatabase();\n\n ContentValues values = new ContentValues();\n values.put(USER_NAME,user.getName());\n values.put(USER_PASSWORD,user.getPassword());\n db.insert(TABLE_USER,null,values);\n db.close();\n }", "public void addUser() throws AccountException {\n System.out.println(\"----------------- Add User -----------------\");\n System.out.print(\"Account: \");\n String username = this.checkUsername(); // Call method to check input of username\n\n System.out.print(\"Password: \");\n String password = this.checkEmpty(\"Password\"); // Call method to check input of password\n\n System.out.print(\"Name: \");\n String name = this.checkEmpty(\"Name\"); // Call method to check input of name\n\n System.out.print(\"Phone: \");\n String phone = this.checkPhone(); // Call method to check nput of phone\n\n System.out.print(\"Email: \");\n String email = this.checkEmail(); // Call method to check input of email\n\n System.out.print(\"Address: \");\n String address = this.checkEmpty(\"Address\"); // Call method to check input of address\n\n System.out.print(\"DOB: \");\n Date dob = this.checkDate(); // Call method to check input of dob\n\n // Add new user and print success if created\n this.addUser(username, password, name, phone, email, address, dob);\n System.out.println(\"Create account success.\");\n }", "private void registerUser()\n {\n /*AuthService.createAccount takes a Consumer<Boolean> where the result will be true if the user successfully logged in, or false otherwise*/\n authService.createAccount(entryService.extractText(namedFields), result -> {\n if (result.isEmpty()) {\n startActivity(new Intent(this, DashboardActivity.class));\n } else {\n makeToast(result);\n formContainer.setAlpha(1f);\n progressContainer.setVisibility(View.GONE);\n progressContainer.setOnClickListener(null);\n }\n });\n }", "private void addNewUser() throws Exception, UnitException {\n String firstNameInput = firstName.getText();\n String lastNameInput = lastName.getText();\n String unitInput = unitID.getText();\n String accountInput = accountTypeValue;\n String passwordInput = password.getText();\n User newUserInfo;\n\n // Create user type based on the commandbox input\n switch (accountInput) {\n case \"Employee\":\n newUserInfo = new Employee(firstNameInput, lastNameInput, unitInput, passwordInput);\n break;\n case \"Lead\":\n newUserInfo = new Lead(firstNameInput, lastNameInput, unitInput, passwordInput);\n break;\n case \"Admin\":\n newUserInfo = new Admin(firstNameInput, lastNameInput, unitInput, passwordInput);\n break;\n default:\n throw new IllegalStateException(\"Unexpected value: \" + accountInput);\n }\n\n // Try adding this new user information to the database, if successful will return success prompt\n try {\n Admin.addUserToDatabase(newUserInfo);\n\n // If successful, output message dialog\n String msg = \"New User \" + firstNameInput + \" \" + lastNameInput + \" with UserID \"\n + newUserInfo.returnUserID() + \" successfully created\";\n JOptionPane.showMessageDialog(null, msg);\n\n // Reset Values\n firstName.setText(\"\");\n lastName.setText(\"\");\n unitID.setText(\"\");\n password.setText(\"\");\n } catch (UserException e) {\n JOptionPane.showMessageDialog(null, e.getMessage());\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, e.getMessage());\n }\n }", "ResponseMessage addUser(User user);", "@Override\r\n\tpublic boolean addNewUser(User user) {\n\t\treturn false;\r\n\t}", "public eu.aladdin_project.storagecomponent.CreateUserDocument.CreateUser addNewCreateUser()\n {\n synchronized (monitor())\n {\n check_orphaned();\n eu.aladdin_project.storagecomponent.CreateUserDocument.CreateUser target = null;\n target = (eu.aladdin_project.storagecomponent.CreateUserDocument.CreateUser)get_store().add_element_user(CREATEUSER$0);\n return target;\n }\n }", "@Override\n\tpublic boolean addUser(User user) {\n\t\tObject object = null;\n\t\tboolean flag = false;\n\t\ttry {\n\t\t\tobject = client.insert(\"addUser\", user);\n\t\t\tSystem.out.println(\"添加学生信息的返回值:\" + object);\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tif (object != null) {\n\t\t\tflag = true;\n\t\t}\n\t\treturn flag;\n\t}", "@Override\n\tpublic int addUser(TbUser user) {\n\t\treturn new userDaoImpl().addUser(user);\n\t}", "@Override\n\tpublic void addNewUser(User user) {\n\t\tusersHashtable.put(user.getAccount(),user);\n\t}", "public void addUser(String userId) {\n addUser(new IndividualUser(userId));\n }", "public void addUser(User user) {\n\t\tSystem.out.println(\"adding user :\"+user.toString());\n\t\tuserList.add(user);\n\t}", "public void insertDoctor() {\n\t\tScanner sc = new Scanner(System.in);\n\t\ttry {\n\t\t\tDoctorDto doctorDto = new DoctorDto();\n\n\t\t\tSystem.out.println(\"\\n\\n--Insert doctor details--\");\n\t\t\tSystem.out.print(\"Enter Name: \");\n\t\t\tString dname = sc.nextLine();\n\t\t\tdoctorDto.setName(dname);\n\n\t\t\tSystem.out.print(\"\\nEnter Username: \");\n\t\t\tString username = sc.nextLine();\n\t\t\tdoctorDto.setUsername(username);\n\n\t\t\tSystem.out.print(\"\\nEnter Password: \");\n\t\t\tString password = sc.nextLine();\n\t\t\tdoctorDto.setPassword(password);\n\n\t\t\tSystem.out.print(\"\\nEnter Speciality: \");\n\t\t\tString speciality = sc.nextLine();\n\t\t\tdoctorDto.setSpeciality(speciality);\n\n\t\t\tif (validateDoctor(doctorDto)) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tint i = doctorDao.insert(dname, username, password, speciality);\n\t\t\tif (i > 0) {\n\t\t\t\tlogger.info(\"Data Inserted Successfully...\");\n\t\t\t} else {\n\t\t\t\tlogger.info(\"Data Insertion Unsucessful!\");\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tlogger.info(e.getMessage());\n\t\t}\n\n\t}", "private void createNewUser() {\n ContentValues contentValues = new ContentValues();\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.GENDER, getSelectedGender());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.PIN, edtConfirmPin.getText().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.LAST_NAME, edtLastName.getText().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.FIRST_NAME, edtFirstName.getText().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.STATUS, spnStatus.getSelectedItem().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.DATE_OF_BIRTH, edtDateOfBirth.getText().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.BLOOD_GROUP, spnBloodGroup.getSelectedItem().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.IS_DELETED, \"N\");\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.MOBILE_NUMBER, edtMobileNumber.getText().toString());\n contentValues.put(DataBaseConstants.Constants_TBL_CATEGORIES.CREATE_DATE, Utils.getCurrentDateTime(Utils.DD_MM_YYYY));\n\n dataBaseHelper.saveToLocalTable(DataBaseConstants.TableNames.TBL_PATIENTS, contentValues);\n context.startActivity(new Intent(CreatePinActivity.this, LoginActivity.class));\n }", "@Override\n public boolean addUser(User user) {\n return controller.addUser(user);\n }", "public void addUserBtn(){\n\t\t\n\t\t// TODO: ERROR CHECK\n\t\t\n\t\tUserEntry user = new UserEntry(nameTF.getText(), (String)usertypeCB.getValue(), emailTF.getText());\n\t\tAdminController.userEntryList.add(user);\n\t\t\n\t\t\n\t\t// Create a UserEntry and add it to the observable list\n\t\tAdminController.userList.add(user);\t\t\n\t\t\n\t //AdminController.adminTV.setItems(AdminController.userList);\n\t\t\n\t\t//Close current stage\n\t\tAdminController.addUserStage.close();\n\t\t\n\t}", "public String addUser() {\n\t\t\t\treturn null;\r\n\t\t\t}", "private User addNewUser(CustomerRegRequestDto requestDto, Customer addNewCustomer) {\n\t\tString userId = null;\n\t\tOptional<User> getUser = userRepo.findFirstByOrderByCreatedDateDesc();\n\t\tif (getUser.isPresent()) {\n\t\t\tif (getUser.get().getUserId().charAt(0) == CustomerConstants.CUSTOMER_USER_STARTING)\n\t\t\t\tuserId = Helper.generateNextUserId(getUser.get().getUserId());\n\t\t\telse\n\t\t\t\tuserId = Helper.generateUniqueUserId(CustomerConstants.CUSTOMER_USER_STARTING);\n\n\t\t} else {\n\t\t\tuserId = Helper.generateUniqueUserId(CustomerConstants.CUSTOMER_USER_STARTING);\n\n\t\t}\n\t\trequestDto.setRoleId(CustomerConstants.CUSTOMER_ADMIN_ROLE_ID);\n\t\tmodelMapper.getConfiguration().setAmbiguityIgnored(true);\n\t\tUser addUser = modelMapper.map(requestDto, User.class);\n\t\tString hashOfPassword = PasswordDecode.getHash(requestDto.getCustomerUserName().toLowerCase(), \"MD5\");\n\t\tString passwordHash = PasswordDecode.getHash(requestDto.getConfirmPassword(), hashOfPassword, \"MD5\");\n\t\taddUser.setUserName(requestDto.getCustomerUserName());\n\t\taddUser.setFirstName(requestDto.getCustomerName());\n\t\taddUser.setLastName(requestDto.getCustomerName());\n\t\taddUser.setMiddleName(requestDto.getCustomerName());\n\t\taddUser.setUserStatus(requestDto.getCustomerStatus());\n\t\taddUser.setUserId(userId);\n\t\taddUser.setEmailId(addNewCustomer.getCustomerEmailId());\n\t\taddUser.setPassword(passwordHash);\n\t\taddUser.setPasswordHash(hashOfPassword);\n\t\taddUser.setCustomer(addNewCustomer);\n\t\taddUser.setIsActive(true);\n\t\taddUser.setCreatedBy(requestDto.getUserId());\n\t\taddUser.setCreatedDate(new Date());\n\t\taddUser.setModifiedBy(requestDto.getUserId());\n\t\taddUser.setModifiedDate(new Date());\n\t\treturn userRepo.save(addUser);\n\n\t}", "public void newUserAdded(String userID);", "@Override\n\tpublic void addPerson(User pUser) {\n\t\t\n\t}", "public void addUser(User user) {\n\t\tuserDao.addUser(user);\r\n\r\n\t}", "private void newUser(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {\n\t\ttry {\n\t\t\tPrintWriter out = res.getWriter();\n\t\t\tString name = req.getParameter(Constants.NAME_USER);\n\t\t\tUserDB.introduceUser(name);\n\t\t\tlong id = UserDB.getUserId(name);\n\t\t\tUsuario u = new Usuario(name, Long.toString(id));\n\t\t\tout.print(gson.toJson(u));\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tres.setStatus(HttpServletResponse.SC_BAD_REQUEST);\n\t\t}\n\t}", "@Override\n\tpublic String addSingleUser(UserDTO userDTOObj) throws UserException {\n\t\tUserEntity userEntityObj = modelMapper.map(userDTOObj, UserEntity.class);\n\t\ttry {\n\t\t\t//UserEntity userEntityObj = setUserData(userDTOObj);\n\t\t\tuserEntityObj.setAddDt(new Timestamp(Calendar.getInstance().getTimeInMillis()));\n\t\t\tuserEntityObj.setModDt(new Timestamp(Calendar.getInstance().getTimeInMillis()));\n\t\t\t\n\t\t\tuserDataRepository.save(userEntityObj);\n\t\t}catch(Exception e) {\n\t\t\tthrow new UserException(\"Error while adding new User\", e.getMessage());\n\t\t}\n\t\treturn \"USER added successfully\";\n\t}", "public User addUser(User user) {\n\t\treturn null;\r\n\t}", "void addUserpan(String userid,String username,String userpwd);", "public void addUser() {\n\t\tthis.users++;\n\t}", "public void addUser(\n\t\t\tActionRequest request, ActionResponse response) \n\t\t\tthrows Exception {\n\t\t\n\t\tString firstName = ParamUtil.getString(request, \"firstName\");\n\t\tString lastName = ParamUtil.getString(request, \"lastName\");\n\t\tString email = ParamUtil.getString(request, \"email\");\n\t\tString username = ParamUtil.getString(request, \"username\");\n\t\t\n\t\t//Determine gender\n\t\tString gender = ParamUtil.getString(request, \"male\");\n\t\tboolean male = true;\n\t\tif (gender.contains(\"Female\"))\n\t\t\tmale = false;\n\t\t\n\t\tString birthday = ParamUtil.getString(request, \"birthday\"); //update validation to account for date being a STRING now\n\t\tString password1 = ParamUtil.getString(request, \"password1\");\n\t\tString password2 = ParamUtil.getString(request, \"password2\");\n\n\t\tString homePhone = ParamUtil.getString(request, \"homePhone\");\n\t\tString mobilePhone = ParamUtil.getString(request, \"mobilePhone\");\n\t\t\n\t\tString address1 = ParamUtil.getString(request, \"address1\");\n\t\tString address2 = ParamUtil.getString(request, \"address2\");\n\t\tString city = ParamUtil.getString(request, \"city\");\n\t\tString state = ParamUtil.getString(request, \"state\");\n\t\tString zip = ParamUtil.getString(request, \"zip\");\n\t\t\n\t\tString secQuestion = ParamUtil.getString(request, \"secQuestion\");\n\t\tString secAnswer = ParamUtil.getString(request, \"secAnswer\");\n\t\t\n\t\tString terms = ParamUtil.getString(request, \"termsOfUse\");\n\t\tboolean tOU = false;\n\t\tif (terms.equals(\"accepted\")) {\n\t\t\ttOU = true;\n\t\t}\n\n\t\ttry {\n\t\t\t_userLocalService.registerUser(firstName, lastName, email, username, male, birthday, password1, password2, homePhone,\n\t\t\tmobilePhone, address1, address2, city, state, zip, secQuestion, secAnswer, tOU);\n\t\t\t\n\t\t\tSessionMessages.add(request, \"userAdded\");\n\t\t\t\n\t\t\tsendRedirect(request, response);\n\t\t}\n\t\tcatch(UserValidationException ave) {\n\t\t\tave.getErrors().forEach(key -> SessionErrors.add(request, key));\n\t\t\tresponse.setRenderParameter(\"\", \"registration/user/add\");\n\t\t}\n\t\tcatch(PortalException pe) {\n\t\t\tSessionErrors.add(request, \"serviceErrorDetails\", pe);\n\t\t\tresponse.setRenderParameter(\"\", \"registration/user/add\");\n\t\t}\n\t}", "@Override\r\n\tpublic void add(User1 user) {\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\tsession.save(user);\r\n\t}", "@Override\r\n\tpublic void postRequest(Request request, Response response) {\r\n\t\tcreateUser(request, response);\r\n\t}", "@Override\r\n\tpublic String addUser(taskPojo addUser,HttpServletRequest request, HttpServletResponse response) {\n\t\treturn dao.addUser(addUser,request,response);\r\n\t}", "Boolean registerNewUser(User user);", "public void addUserData(HttpServletRequest request) {\n\n String userName = request.getParameter(\"userName\");\n String password = request.getParameter(\"userPassword\");\n String address = request.getParameter(\"userAddress\");\n String phone = request.getParameter(\"userPhone\");\n String email = request.getParameter(\"userEmail\");\n\n userDao = new UserDao();\n //user = new User(0, userName, password, address, phone, email);\n //userDao.addUser(user);\n\n log.info(user.toString());\n }", "void userAddByAdmin(AdminUserAddDTO adminUserAddDTO) throws RecordExistException;", "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}", "void registerUser(User newUser);", "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}", "public void AddUserDepot(String id, String label) {\r\n try {\r\n UserManager mydb = new UserManager(activity);\r\n mydb.open();\r\n mydb.AddUserWarehouse(id, label);\r\n mydb.close();\r\n }catch(Exception e) {\r\n e.printStackTrace();\r\n }\r\n }", "private void createUser(String Address, String Phone_number,String needy) {\n // TODO\n // In real apps this userId should be fetched\n // by implementing firebase auth\n if (TextUtils.isEmpty(userId)) {\n userId = mFirebaseDatabase.push().getKey();\n }\n\n com.glitch.annapurna.needy user = new needy(Address,Phone_number,needy);\n\n mFirebaseDatabase.child(userId).setValue(user);\n\n addUserChangeListener();\n }", "@Override\n\tpublic void addUser(User user) {\n\t\tiUserDao.addUser(user);\n\t}", "@Override\r\n\tpublic boolean createUser(Utilisateur u) {\n\t\treturn false;\r\n\t}", "@Override\n\tpublic int addUser(User user) {\n\t\treturn userDao.addUser(user);\n\t}", "public void addingNewUser() throws Exception {\n\t\tlog.info(\"Started ----- Adding New User -----\");\n\t\tFirstNameField.sendKeys(pr.loaddata(\"FirstNameField\"));\n\t\tExcelAPI e=new ExcelAPI(System.getProperty(\"user.dir\")\n\t\t\t\t+ \"/src/main/java/WebTesting/AutomationTask/TestData/AutomationTask_TestData.xlsx\");\n\t\tint rcnt = e.getRowCount(\"Task2_TestData\");\n\t\tfor (int i = 1; i < rcnt; i++) {\n\t\t\tLastNameField.clear();\n\t\t\tLastNameField.sendKeys(e.getCellData(\"Task2_TestData\", \"Last Name\", i));\n\t\t\tPasswordField.sendKeys(e.getCellData(\"Task2_TestData\", \"Password\", i));\n\t\t\tEmailField.sendKeys(e.getCellData(\"Task2_TestData\", \"Email\", i));\n\t\t}\n\t\tUserNameField.sendKeys(pr.loaddata(\"username\") + pr.randomusername());\n\t\tWebElement radio_Button = CustomerField;\n\t\tif (!radio_Button.isSelected()) {\n\t\t\tCustomerField.click();\n\t\t\tThread.sleep(1000);\n\t\t}\n\t\tRoleField.click();\n\t\tdriver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS); // Implicitly Wait\n\t\tPhoneField.sendKeys(pr.loaddata(\"phonenumber\") + pr.randomphonenumber());\n\t\tSaveButtonField.click();\n\t\twaitforElement(SearchField, 30); // Explicitly Wait\n\t\tlog.info(\"Ended ----- Adding New User -----\");\n\t}", "public void register() {\n int index = requestFromList(getUserTypes(), true);\n if (index == -1) {\n guestPresenter.returnToMainMenu();\n return;\n }\n UserManager.UserType type;\n if (index == 0) {\n type = UserManager.UserType.ATTENDEE;\n } else if (index == 1) {\n type = UserManager.UserType.ORGANIZER;\n } else {\n type = UserManager.UserType.SPEAKER;\n }\n String name = requestString(\"name\");\n char[] password = requestString(\"password\").toCharArray();\n boolean vip = false;\n if(type == UserManager.UserType.ATTENDEE) {\n vip = requestBoolean(\"vip\");\n }\n List<Object> list = guestManager.register(type, name, password, vip);\n int id = (int)list.get(0);\n updater.addCredentials((byte[])list.get(1), (byte[])list.get(2));\n updater.addUser(id, type, name, vip);\n guestPresenter.printSuccessRegistration(id);\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 }", "private void addNewUser(User user) {\n\t\tSystem.out.println(\"BirdersRepo. Adding new user to DB: \" + user.getUsername());\n\t\tDocument document = Document.parse(gson.toJson(user));\n\t\tcollection.insertOne(document);\n\t}", "@Override\n\tpublic void addUser(User user) {\n mapper.addUser(user);\n\t}", "public void add(User user) {\n\t\tuserDao.add(user);\n\t}", "public Boolean addUser(User user) throws ApplicationException;", "public void addUser(User user) {\n\t\tuserList.addUser(user);\n\t}", "public void createAndAddUser(String fName, String lName){\n ModelPlayer user = new ModelPlayer(fName, lName);\n user.setUserID(this.generateNewId());\n userListCtrl.addUser(user);\n }", "public void addUser(User user) {\n \t\tuser.setId(userCounterIdCounter);\n \t\tusers.add(user);\n \t\tuserCounterIdCounter++;\n \t}", "@PostMapping(\"/add\")\n\tpublic User addUser( @Valid @RequestBody User user) {\n\t\tcontrollerLogger.info(\"new user sign up\");\n\t\treturn service.signUp(user);\n\t}", "@Override\n\tpublic User addUser(User user) {\n\t\treturn userDatabase.put(user.getEmail(), user);\n\t}", "@Override\n\tpublic int create(Users user) {\n\t\tSystem.out.println(\"service:creating new user...\");\n\t\treturn userDAO.create(user);\n\t}", "void addUser(User user) {\n SQLiteDatabase db = this.getWritableDatabase();\n ContentValues values = new ContentValues();\n values.put(KEY_utilizador, user.getUser()); // Contact Name\n values.put(KEY_pass, user.getPass()); // Contact Phone\n values.put(KEY_Escola, user.getEscola());\n db.insert(tabela, null, values);\n db.close(); // Closing database connection\n }", "@SuppressWarnings({ \"unchecked\", \"unused\" })\n\tprivate void addUser(TextField nameField, TextField passwordField) {\n\t\t\n\t\tString name = nameField.getText();\n\t\tString password = passwordField.getText();\n\t\tname.trim();\n\t\tpassword.trim();\n\t\t\n\t\tif(name.isEmpty()) {\n\t\t\tAlertMe alert = new AlertMe(\"You must enter a user name!\");\n\t\t}\n\t\telse if(password.isEmpty()) {\n\t\t\tAlertMe alert = new AlertMe(\"You must enter a user password!\");\n\t\t}\n\t\telse if(admin == null) {\n\t\t\tAlertMe alert = new AlertMe(\"You must select an account type!\");\n\t\t}\n\t\telse {\n\t\t\tArrayList<Student> students = JukeBox.getUsers();\n\t\t\t\n\t\t\tif(JukeBox.locateUser(name) != -1) {\n\t\t\t\tAlertMe alert = new AlertMe(\"User \" + name + \" already exists!\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\tStudent newStudent;\n\t\t\t\tif(admin) {\n\t\t\t\t\tnewStudent = new Student(name, password, true);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tnewStudent = new Student(name, password, false);\n\t\t\t\t}\n\t\t\t\tstudents.add(newStudent);\n\t\t\t\t\n\t\t\t\tnameField.setText(\"\");\n\t\t\t\tpasswordField.setText(\"\");\n\t\t\t\t\n\t\t\t\tusers.setItems(null); \n\t\t\t\tusers.layout(); \n\n\t\t\t\tObservableList<Student> data = FXCollections.observableArrayList(JukeBox.getUsers());\n\t\t\t\tusers.setItems(data);\n\t\t\t}\n\t\t}\n\t}", "private void register_user() {\n\n\t\tHttpRegister post = new HttpRegister();\n\t\tpost.execute(Config.URL + \"/api/newuser\");\n\n\t}", "public boolean addUser(User user) {\n\t\treturn false;\r\n\t}", "@Override\r\n\tpublic boolean addUser(user user) {\n\t\tif(userdao.insert(user)==1){\r\n\t\t\treturn true;}else {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t}", "public int adduser(UserBean user) {\n\t\t// TODO Auto-generated method stub\n\t\tuser.setGrantedpermission(0);\n\t\tuser.setFirsttimelogin(1);\n\t\tuser.setStartdate(LocalDate.now().toString());\n\t\tuser.setUserpassword(\"Hello@123\");\n\t\tcrud1.save(user);\n\t\tValidateBean validate = new ValidateBean();\n\n\t\tvalidate.setId(user.getUserid());\n\n\t\tvalidate.setPassword(user.getUserpassword());\n\t\tvalidate.setRole(\"user\");\n\t\tcrud.save(validate);\n\t\treturn 1;\n\t}", "public void add(User user) {\r\n this.UserList.add(user);\r\n }", "public void setAddUser(Long addUser) {\n this.addUser = addUser;\n }", "@Override\n public void addUser(User u) {\n Session session = this.sessionFactory.getCurrentSession();\n session.persist(u);\n logger.info(\"User saved successfully, User Details=\"+u);\n }", "private void addUser(){\r\n\t\ttry{\r\n\t\t\tSystem.out.println(\"Adding a new user\");\r\n\r\n\t\t\tfor(int i = 0; i < commandList.size(); i++){//go through command list\r\n\t\t\t\tSystem.out.print(commandList.get(i) + \"\\t\");//print out the command and params\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\r\n\t\t\t//build SQL statement\r\n\t\t\tString sqlCmd = \"INSERT INTO users VALUES ('\" + commandList.get(1) + \"', '\"\r\n\t\t\t\t\t+ commandList.get(2) + \"', '\" + commandList.get(3) + \"', '\"\r\n\t\t\t\t\t+ commandList.get(4) + \"', '\" + commandList.get(5) + \"', '\"\r\n\t\t\t\t\t+ commandList.get(6) + \"');\";\r\n\t\t\tSystem.out.println(\"sending command:\" + sqlCmd);//print SQL command to console\r\n\t\t\tstmt.executeUpdate(sqlCmd);//send command\r\n\r\n\t\t} catch(SQLException se){\r\n\t\t\t//Handle errors for JDBC\r\n\t\t\terror = true;\r\n\t\t\tse.printStackTrace();\r\n\t\t\tout.println(se.getMessage());//return error message\r\n\t\t} catch(Exception e){\r\n\t\t\t//general error case, Class.forName\r\n\t\t\terror = true;\r\n\t\t\te.printStackTrace();\r\n\t\t\tout.println(e.getMessage());\r\n\t\t} \r\n\t\tif(error == false)\r\n\t\t\tout.println(\"true\");//end try\r\n\t}" ]
[ "0.68773425", "0.6836963", "0.68215764", "0.68215764", "0.6677276", "0.6641736", "0.6619928", "0.6565915", "0.6556858", "0.6455996", "0.6451921", "0.64460903", "0.64336634", "0.6432906", "0.6429713", "0.6429376", "0.6416519", "0.6367854", "0.63669926", "0.6356869", "0.63389623", "0.630952", "0.6303568", "0.6301856", "0.62756056", "0.6241052", "0.6228234", "0.6226719", "0.6225802", "0.6214644", "0.6202673", "0.61955374", "0.6186942", "0.6152767", "0.61503196", "0.61496603", "0.61463106", "0.61336565", "0.6131273", "0.6119842", "0.6115946", "0.6115027", "0.6108661", "0.61059976", "0.60940003", "0.60936075", "0.60892385", "0.60879934", "0.608469", "0.6064583", "0.60627955", "0.6053455", "0.6051644", "0.6049956", "0.604577", "0.60415137", "0.6033409", "0.6032952", "0.60237646", "0.60184276", "0.60154593", "0.600997", "0.5999977", "0.599701", "0.5991116", "0.59904397", "0.5987828", "0.5987725", "0.5987662", "0.5978793", "0.5972685", "0.59713715", "0.59660274", "0.59603024", "0.5958392", "0.595332", "0.59516054", "0.5943678", "0.594325", "0.59412074", "0.59391713", "0.59368396", "0.59318054", "0.5931628", "0.5929751", "0.5928347", "0.5928144", "0.59237856", "0.59220064", "0.59158814", "0.5914267", "0.5910914", "0.58956337", "0.589362", "0.58931696", "0.58880883", "0.5882397", "0.58794534", "0.58763057", "0.5875323" ]
0.58840406
96
Methods to manage access
public void patientadder (String index, String email){ String test2 = email; for(int i = 0; i < doctorsList.size(); i++){ String test = doctorsList.get(i).getEmail(); if(test.equals(test2)){ patients.add(index); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getAccess();", "String getAccess();", "String getAccess();", "private void authorize() {\r\n\r\n\t}", "public interface AccessManager {\n\n /**\n * predefined action constants\n */\n public String READ_ACTION = javax.jcr.Session.ACTION_READ;\n public String REMOVE_ACTION = javax.jcr.Session.ACTION_REMOVE;\n public String ADD_NODE_ACTION = javax.jcr.Session.ACTION_ADD_NODE;\n public String SET_PROPERTY_ACTION = javax.jcr.Session.ACTION_SET_PROPERTY;\n\n public String[] READ = new String[] {READ_ACTION};\n public String[] REMOVE = new String[] {REMOVE_ACTION};\n\n /**\n * Determines whether the specified <code>permissions</code> are granted\n * on the item with the specified path.\n *\n * @param parentState The node state of the next existing ancestor.\n * @param relPath The relative path pointing to the non-existing target item.\n * @param actions An array of actions that need to be checked.\n * @return <code>true</code> if the actions are granted; otherwise <code>false</code>\n * @throws ItemNotFoundException if the target item does not exist\n * @throws RepositoryException if another error occurs\n */\n boolean isGranted(NodeState parentState, Path relPath, String[] actions) throws ItemNotFoundException, RepositoryException;\n\n /**\n * Determines whether the specified <code>permissions</code> are granted\n * on the item with the specified path.\n *\n * @param itemState\n * @param actions An array of actions that need to be checked.\n * @return <code>true</code> if the actions are granted; otherwise <code>false</code>\n * @throws ItemNotFoundException if the target item does not exist\n * @throws RepositoryException if another error occurs\n */\n boolean isGranted(ItemState itemState, String[] actions) throws ItemNotFoundException, RepositoryException;\n\n\n /**\n * Returns true if the existing item with the given <code>ItemId</code> can\n * be read.\n *\n * @param itemState\n * @return\n * @throws ItemNotFoundException\n * @throws RepositoryException\n */\n boolean canRead(ItemState itemState) throws ItemNotFoundException, RepositoryException;\n\n /**\n * Returns true if the existing item state can be removed.\n *\n * @param itemState\n * @return\n * @throws ItemNotFoundException\n * @throws RepositoryException\n */\n boolean canRemove(ItemState itemState) throws ItemNotFoundException, RepositoryException;\n\n /**\n * Determines whether the subject of the current context is granted access\n * to the given workspace.\n *\n * @param workspaceName name of workspace\n * @return <code>true</code> if the subject of the current context is\n * granted access to the given workspace; otherwise <code>false</code>.\n * @throws NoSuchWorkspaceException if a workspace with the given name does not exist.\n * @throws RepositoryException if another error occurs\n */\n boolean canAccess(String workspaceName) throws NoSuchWorkspaceException, RepositoryException;\n}", "@Override\n public boolean userCanAccess(int id) {\n return true;\n }", "public void checkAuthority() {\n }", "private void checkAccessAndLoggIn() {\n // Make sure we have access\n ConnectionChecker connectionHelper = new ConnectionChecker(this);\n boolean haveAccess = connectionHelper.canConnectInternet();\n if (haveAccess) {\n // Check if user is logged in\n final ParseUser user = ParseUser.getCurrentUser();\n boolean isLoggedIn = (user != null);\n Log.d(TAG, \"User logged in = \" + isLoggedIn);\n checkLogIn(isLoggedIn);\n } else {\n // Alert user we need access to internet\n Toast.makeText(this, \"We are unable to access Good Feed. Please check your connection\", Toast.LENGTH_LONG).show();\n }\n }", "public void getAccess() {\n\t\t// Display menu options\n\t\tSystem.out.println(\n\t\t\t\"\\nWelcome to PittTours are you a:\" +\n\t\t\t\"\\n1: Administrator\" +\n\t\t\t\"\\n2: Customer\" +\n\t\t\t\"\\n3: Neither, Quit\\n\");\n\n\t\t// Get user input\n\t\tSystem.out.print(\"Enter menu choice: \");\n\t\tinputString = scan.nextLine();\n\t\t// Convert input to integer, if not convertable, set to 0 (invalid)\n\t\ttry { choice = Integer.parseInt(inputString);\n\t\t} catch(NumberFormatException e) {choice = 0;}\n\n\t\t// Handle user choices\n\t\tif(choice == 1)\n\t\t\tdisplayAdmInterface();\n\t\telse if(choice == 2)\n\t\t\tdisplayCusInterface();\n\t\telse if(choice == 3) {} // Simply drops back to main to properly exit\n\t\telse { // If invalid choice, recall method\n\t\t\tSystem.out.println(\"INVALID CHOICE\");\n\t\t\tgetAccess();\n\t\t}\n\t}", "public void provideAccess() {\n\t\tint choice = View.NO_CHOICE;\n\t\twhile (choice != View.EXIT) {\n\t\t\tview.displayMenu();\n\t\t\tchoice = view.readIntWithPrompt(\"Enter choice: \");\n\t\t\texecuteChoice(choice);\n\t\t}\n\t}", "public static void checkAccess() throws SecurityException {\n if(isSystemThread.get()) {\n return;\n }\n //TODO: Add Admin Checking Code\n// if(getCurrentUser() != null && getCurrentUser().isAdmin()) {\n// return;\n// }\n throw new SecurityException(\"Invalid Permissions\");\n }", "private void checkAdminOrModerator(HttpServletRequest request, String uri)\n throws ForbiddenAccessException, ResourceNotFoundException {\n if (isAdministrator(request)) {\n return;\n }\n\n ModeratedItem moderatedItem = getModeratedItem(uri);\n if (moderatedItem == null) {\n throw new ResourceNotFoundException(uri);\n }\n\n String loggedInUser = getLoggedInUserEmail(request);\n if (moderatedItem.isModerator(loggedInUser)) {\n return;\n }\n\n throw new ForbiddenAccessException(loggedInUser);\n }", "@Override\n\tpublic void credite() {\n\t\t\n\t}", "boolean isSecureAccess();", "private void checkPermission(User user, List sourceList, List targetList)\n throws AccessDeniedException\n {\n logger.debug(\"+\");\n if (isMove) {\n if (!SecurityGuard.canManage(user, sourceList.getContainerId()) ||\n !SecurityGuard.canContribute(user, targetList.getContainerId()))\n throw new AccessDeniedException(\"Forbidden\");\n }\n else {\n if (!SecurityGuard.canView(user, sourceList.getContainerId()) ||\n !SecurityGuard.canContribute(user, targetList.getContainerId()))\n throw new AccessDeniedException(\"Forbidden\");\n }\n logger.debug(\"-\");\n }", "abstract public void getPermission();", "public static void main(String[] args) {\n\t\n\tAccesingModifiers.hello();//heryerden accessable \n\tAccesingModifiers.hello1();\n\tAccesingModifiers.hello2();\n\t\n\t//AccesingModifiers.hello3(); not acceptable since permission is set to private\n\t\n}", "public static Access granted() {\n return new Access() {\n @Override\n void exec(BeforeEnterEvent enterEvent) {\n }\n };\n }", "@Override\n protected boolean isAuthorized(PipelineData pipelineData) throws Exception\n {\n \t// use data.getACL() \n \treturn true;\n }", "@Override\r\n\tprotected void verificaUtentePrivilegiato() {\n\r\n\t}", "@Override\n\t\t\tpublic void handle(Request req, Response res) throws Exception {\n\t\t\t\tfinal String op = req.params(\":op\");\n\t\t\t\tfinal String username = req.queryParams(\"user\");\n\t\t\t\tfinal String path = req.queryParams(\"path\");\n\t\t\t\t\n\t\t\t\t//--- framework access ---//\n\t\t\t\tif (!Results.hasFrameworkAccess(op, path)) halt(404);\n\t\t\t\t//--- path exists? ---//\n\t\t\t\tif (!Directories.isExist(path)) halt(404);\n\t\t\t\t//--- section and path access ---//\n\t\t\t\tif (!AccessManager.hasAccess(username, path)) halt(401);\n\n\t\t\t}", "void ensureAdminAccess() {\n Account currentAccount = SecurityContextHolder.getContext().getAccount();\n if (!currentAccount.isAdmin()) {\n throw new IllegalStateException(\"Permission denied.\");\n }\n }", "@Override\n public boolean execute(Context ctx) {\n AccessContext accessCtx = (AccessContext)ctx;\n HttpServletRequest req = accessCtx.getHttpRequest();\n HttpServletResponse resp = accessCtx.getHttpResponse();\n String contextPath = req.getContextPath();\n LogUtils.logDebug(logger, \"getContextPath: \", contextPath);\n\n if (this.authLevel >= AUTH_LEVEL_LOGGED_IN) {\n if (!accessCtx.containsAttribute(AccessContext.KEY_USER_ITEM)) {\n throw new IllegalStateException(\n \"User Item was not found, perhaps LoadUserItemCommand was not executed\");\n }\n }\n // From this point accessCtx.getUserItem is a valid entry.\n\n if (this.authLevel >= AUTH_LEVEL_LOGGED_IN) {\n if (accessCtx.getUserItem() == null) {\n try {\n if (accessCtx.getDatasetItem() == null) {\n // If datasetItem not exists, redirect to login page.\n String redirUrl = contextPath + AccessFilter.REDIRECT_LOGIN;\n LogUtils.logDebug(logger,\n \"Not logged in, redirecting to \", redirUrl);\n AccessFilter.redirect(req, resp, redirUrl);\n } else {\n // If datasetItem exists, then redirect to Dataset Overview page.\n String redirUrl = contextPath + AccessFilter.REDIRECT_DATASET_INFO\n + \"?datasetId=\" + accessCtx.getDatasetId()\n + \"&access_redir=1\";\n LogUtils.logDebug(logger,\n \"(1)Not authorized for this dataset, redirecting to \", redirUrl);\n AccessFilter.redirect(req, resp, redirUrl);\n }\n } catch (IOException e) {\n throw new RuntimeException(\"Error while redirecting.\", e);\n }\n return true;\n }\n }\n\n // from this point accessCtx.getUserItem is a valid object.\n\n if (this.authLevel == AUTH_LEVEL_AUTHORIZED_FOR_DS) {\n if (!accessCtx.containsAttribute(AccessContext.KEY_IS_AUTHORIZED_FOR_DS)) {\n throw new IllegalStateException(\n \"IsAuthorizedForDataset was not set. \"\n + \"Perhaps LoadDatsetCommand was not executed.\");\n }\n\n if (!accessCtx.isAuthorizedForDataset()) {\n try {\n String redirUrl = contextPath + AccessFilter.REDIRECT_DATASET_INFO\n + \"?datasetId=\" + accessCtx.getDatasetId()\n + \"&access_redir=1\";\n LogUtils.logDebug(logger,\n \"(2)Not authorized for this dataset, redirecting to \", redirUrl);\n AccessFilter.redirect(req, resp, redirUrl);\n } catch (IOException e) {\n throw new RuntimeException(\"Error while redirecting.\", e);\n }\n return true;\n }\n }\n\n if (this.authLevel == AUTH_LEVEL_ADMIN) {\n if (!accessCtx.getUserItem().getAdminFlag()) {\n try {\n String redirUrl = AccessFilter.REDIRECT_INDEX_JSP;\n LogUtils.logDebug(logger,\n \"Not admin, redirecting to \", redirUrl);\n AccessFilter.redirect(req, resp, redirUrl);\n } catch (IOException e) {\n throw new RuntimeException(\"Error while redirecting.\", e);\n }\n return true;\n }\n }\n return false;\n }", "public int getAccess() {\n\t\treturn access;\n\t}", "public abstract List<String> getAdditionalAccessions();", "public interface AccessControlled {\r\n\r\n}", "@Override\r\n\tpublic void checkPermission(String absPath, String actions)\r\n\t\t\tthrows AccessControlException, RepositoryException {\n\t\t\r\n\t}", "protected abstract String getAuthorization();", "public interface IAccessPolicy {\n\n\t/**\n\t * Indicating if the current session can do a register process\n\t * \n\t * @param session\n\t * To be checked\n\t * @return true if operation succeeds if denied false\n\t */\n\tpublic boolean canRegister(Session session);\n\n\t/**\n\t * Indicating if the current session can do a login process\n\t * \n\t * @param session\n\t * To be checked\n\t * @return true if operation succeeds if denied false\n\t */\n\tpublic boolean canLogin(Session session);\n\n\t/**\n\t * Indicating if the current session can do a search\n\t * \n\t * @param session\n\t * To be checked\n\t * @return true if operation succeeds if denied false\n\t */\n\tpublic boolean canSearch(Session session);\n\n\t/**\n\t * Indicating if the current session can do a register process\n\t * \n\t * @param session\n\t * To be checked\n\t * @param user\n\t * Data of this user should be changed\n\t * @return true if operation succeeds if denied false\n\t */\n\tpublic boolean canEditUserData(Session session, User user);\n\n\t/**\n\t * Inidicating if the given session can comment\n\t * \n\t * @param session\n\t * to be investigated\n\t * @return true if operation succeeds if denied false\n\t */\n\tpublic boolean canComment(Session session);\n\n\t/**\n\t * Indicating if the given session can edit a given comment.\n\t * \n\t * @param session\n\t * the call belongs to\n\t * @param comment\n\t * to be checked\n\t * @return true if operation succeeds if denied false\n\t */\n\tpublic boolean canEditComment(Session session, Comment comment);\n\n\t/**\n\t * Indicating if the current session can create a snippet in the given\n\t * category.\n\t * \n\t * @param session\n\t * To be checked\n\t * @param category\n\t * Category where the snippet should be created\n\t * @return true if operation succeeds if denied false\n\t */\n\tpublic boolean canCreateSnippet(Session session, Category category);\n\n\t/**\n\t * Indicating if the current session can do a register process\n\t * \n\t * @param session\n\t * To be checked\n\t * @param snippet\n\t * Concrete snippet that should be deleted\n\t * @return true if operation succeeds if denied false\n\t */\n\tpublic boolean canDeleteSnippet(Session session, Snippet snippet);\n\n\t/**\n\t * Indicating if the current session can do a register process\n\t * \n\t * @param session\n\t * To be checked\n\t * @param snippet\n\t * Concrete snippet, that should be edited\n\t * @return true if operation succeeds if denied false\n\t */\n\tpublic boolean canEditSnippet(Session session, Snippet snippet);\n\n\t/**\n\t * Indicating if the given session can tag the given snippet\n\t * \n\t * @param session\n\t * to be checked. Concrete, the user of the session will be\n\t * checked\n\t * @param snippet\n\t * to be tagged\n\t * @return true if operation succeeds if denied false\n\t */\n\tpublic boolean canTagSnippet(Session session, Snippet snippet);\n\n\t/**\n\t * Indicating if the given session is able to rate a snippet\n\t * \n\t * @param session\n\t * to be checked. Concrete, the user of the session will be\n\t * checked\n\t * @param snippet\n\t * to be tagged\n\t * @return true if operation succeeds if denied false\n\t */\n\tpublic boolean canRateSnippet(Session session, Snippet snippet);\n\n\t/**\n\t * Indicating if the given session can edit a given category.\n\t * \n\t * @param session\n\t * the call belongs to\n\t * @param category\n\t * to be checked\n\t * @return true if operation succeeds if denied false\n\t */\n\tpublic boolean canEditCategory(Session session, Category category);\n\n\t/**\n\t * Indicating if the given session can delete a given comment\n\t * \n\t * @param session\n\t * the call belongs to\n\t * @param comment\n\t * to be checked\n\t * @return if operation succeeds if denied false\n\t */\n\tpublic boolean canDeleteComment(Session session, Comment comment);\n}", "@Test\n public void testJdoeAccess() throws IOException {\n HttpResponse response = makeRequest(\"http://localhost:8080/api/jdoe\", \"jdoe\", \"jdoe\");\n assertAccessGranted(response, \"jdoe\");\n\n // jdoe can access information about alice because he is granted with \"people-manager\" role\n response = makeRequest(\"http://localhost:8080/api/alice\", \"jdoe\", \"jdoe\");\n assertAccessGranted(response, \"alice\");\n }", "@Test\n public void testAliceAccess() throws IOException {\n HttpResponse response = makeRequest(\"http://localhost:8080/api/alice\", \"alice\", \"alice\");\n assertAccessGranted(response, \"alice\");\n\n // alice can not access information about jdoe\n response = makeRequest(\"http://localhost:8080/api/jdoe\", \"alice\", \"alice\");\n assertEquals(403, response.getStatusLine().getStatusCode());\n }", "@Override\r\n protected void mayProceed() throws InsufficientPermissionException {\n if (ub.isSysAdmin() || ub.isTechAdmin()) {\r\n return;\r\n }\r\n// if (currentRole.getRole().equals(Role.STUDYDIRECTOR) || currentRole.getRole().equals(Role.COORDINATOR)) {// ?\r\n// ?\r\n// return;\r\n// }\r\n\r\n addPageMessage(respage.getString(\"no_have_correct_privilege_current_study\") + respage.getString(\"change_study_contact_sysadmin\"));\r\n throw new InsufficientPermissionException(Page.MENU_SERVLET, resexception.getString(\"not_allowed_access_extract_data_servlet\"), \"1\");// TODO\r\n // above copied from create dataset servlet, needs to be changed to\r\n // allow only admin-level users\r\n\r\n }", "protected void accionUsuario() {\n\t\t\r\n\t}", "void askForPermissions();", "private PermissionHelper() {}", "@Override\n\tprotected boolean isAccessAllowed(ServletRequest request, ServletResponse response, Object mappedValue)\n\t\t\tthrows Exception {\n\t\treturn false;\n\t}", "int getAccessCounter();", "public interface SingleAccessPoint {\t\n\t\n\t/**\n\t * This method returns some kind of message to the client, which could be anything\n\t * and needs to be implemented for the concrete accesspoint\n\t */\n\tpublic void returnMessage(String message);\n\t\n\t/**\n\t * \n\t * @param message Message to display\n\t * @return AuthenticationToken that needs to be compatible with backend.\n\t */\n\tpublic AuthenticationToken getAuthentication(String message);\n\t\n\n\t\t\n\t\n\t\n}", "public void clearAccess();", "boolean isNonSecureAccess();", "public interface DataAccess {\n\n /**\n * Given a user name, retrieves a list of tokens identifying which permissions the specified user has been granted.\n * \n * @param login the user name\n * @return a list of tokens conveying the information on which permissions have been granted\n * @throws IOException\n */\n public List<String> getUserPermissions(String login) throws IOException;\n\n /**\n * Disposes of the data access.\n */\n public void dispose();\n\n}", "@Override\r\n\tprotected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows ServletException, IOException {\r\n\t\tString path = request.getRequestURI();\r\n\t\tString[] parts = path.split(\"/\");\r\n\t\tm.setMessage(\"The requested access is not permitted\");\r\n\t\tstatus = 401;\r\n\r\n\t\tSystem.out.println(\"User requested \" + Integer.parseInt(parts[3]));\r\n\t\tHttpSession session = request.getSession();\r\n\t\tPrintWriter pw = response.getWriter();\r\n\t\tUser currentUser = (User) session.getAttribute(\"currentUser\");\r\n\r\n\t\tif (currentUser != null) {\r\n\t\t\tUser userRequested = UserService.findUserByID(currentUser.getUserId(), Integer.parseInt(parts[3]),\r\n\t\t\t\t\tcurrentUser.getRole().getRoleId());\r\n\r\n\t\t\tif (userRequested != null) {\r\n\t\t\t\tpw.println(mapper.writerWithDefaultPrettyPrinter().writeValueAsString(userRequested));\r\n\t\t\t\tstatus = 200;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tpw.println(mapper.writerWithDefaultPrettyPrinter().writeValueAsString(m));\r\n\t\t}\r\n\t\tresponse.setStatus(status);\r\n\r\n\t}", "private void getUser(){\n mainUser = DatabaseAccess.getUser();\n }", "List<UserContentAccess> findContentAccess();", "@Override\n public void beforePhase(PhaseEvent pe) {\n\n AccessController accessController = (AccessController) FacesUtils.getManagedObject(\"access\");\n accessController.doSecurity();\n }", "@Override\n public String execute(HttpServletRequest request, HttpServletResponse response) {\n String login = request.getParameter(\"name\");\n String password = request.getParameter(\"password\");\n Authorization au = new Authorization();\n au.setLogin(login);\n au.setPassword(password);\n DaoFactory factory = DaoFactory.getDaoFactory();\n AuthorizationDao udao = factory.getAuthorizationDao();\n StaffDao sdao = factory.getStaffDao();\n DepartmentDao ddao = factory.getDepartmentDao();\n PatientDao pdao = factory.getPatientDao();\n if (udao.isAuthorization(au)) {\n HttpSession session = request.getSession(true);\n Authorization forSession = udao.readByLogin(login);\n Staff forAccess = sdao.readById(forSession.getStaff());\n String fa = forAccess.getSpecialization();\n session.setAttribute(\"access\", fa);\n if (session.getAttribute(\"access\").equals(\"admin\")) {\n List<Department> departments = ddao.getAllDepartments();\n request.setAttribute(\"departments\", departments);\n return \"/views/adminUserInformation.jsp\";\n } else if (session.getAttribute(\"access\").equals(\"doctor\")) {\n return \"/views/doctorStartPage.html\";\n } else if (session.getAttribute(\"access\").equals(\"nurse\")) {\n List<Patient> patients = pdao.getAllPatients();\n request.setAttribute(\"patients\", patients);\n return \"/views/nurseStart.jsp\";\n } else {\n return \"/views/test.html\";\n }\n } else {\n return \"../index.html\";\n }\n\n }", "private void init() {\r\n\t\t// administration\r\n\t\taddPrivilege(CharsetAction.class, User.ROLE_ADMINISTRATOR);\r\n\t\taddPrivilege(LanguageAction.class, User.ROLE_ADMINISTRATOR);\r\n\t\t\r\n\t\t// dictionary management\r\n\t\taddPrivilege(AddApplicationAction.class, User.ROLE_APPLICATION_OWNER | User.ROLE_TRANSLATION_MANAGER);\r\n\t\taddPrivilege(AddDictLanguageAction.class, User.ROLE_APPLICATION_OWNER | User.ROLE_TRANSLATION_MANAGER);\r\n\t\taddPrivilege(AddLabelAction.class, User.ROLE_APPLICATION_OWNER);\r\n\t\taddPrivilege(ChangeApplicationVersionAction.class, User.ROLE_APPLICATION_OWNER | User.ROLE_TRANSLATION_MANAGER);\r\n\t\taddPrivilege(ChangeDictVersionAction.class, User.ROLE_APPLICATION_OWNER | User.ROLE_TRANSLATION_MANAGER);\r\n\t\taddPrivilege(CreateApplicationAction.class, User.ROLE_APPLICATION_OWNER | User.ROLE_TRANSLATION_MANAGER);\r\n\t\taddPrivilege(CreateApplicationBaseAction.class, User.ROLE_APPLICATION_OWNER | User.ROLE_TRANSLATION_MANAGER);\r\n\t\taddPrivilege(CreateOrAddApplicationAction.class, User.ROLE_APPLICATION_OWNER | User.ROLE_TRANSLATION_MANAGER);\r\n\t\taddPrivilege(CreateProductAction.class, User.ROLE_APPLICATION_OWNER | User.ROLE_TRANSLATION_MANAGER);\r\n\t\taddPrivilege(CreateProductReleaseAction.class, User.ROLE_APPLICATION_OWNER | User.ROLE_TRANSLATION_MANAGER);\r\n\t\taddPrivilege(DeleteLabelAction.class, User.ROLE_APPLICATION_OWNER);\r\n\t\taddPrivilege(DeliverAppDictAction.class, User.ROLE_APPLICATION_OWNER);\r\n\t\taddPrivilege(DeliverDictAction.class, User.ROLE_APPLICATION_OWNER);\r\n\t\taddPrivilege(DeliverUpdateDictAction.class, User.ROLE_APPLICATION_OWNER);\r\n\t\taddPrivilege(DeliverUpdateDictLanguageAction.class, User.ROLE_APPLICATION_OWNER);\r\n\t\taddPrivilege(DeliverUpdateLabelAction.class, User.ROLE_APPLICATION_OWNER);\r\n\t\taddPrivilege(RemoveApplicationAction.class, User.ROLE_APPLICATION_OWNER | User.ROLE_TRANSLATION_MANAGER);\r\n\t\taddPrivilege(RemoveApplicationBaseAction.class, User.ROLE_APPLICATION_OWNER | User.ROLE_TRANSLATION_MANAGER);\r\n\t\taddPrivilege(RemoveDictAction.class, User.ROLE_APPLICATION_OWNER);\r\n\t\taddPrivilege(RemoveDictLanguageAction.class, User.ROLE_APPLICATION_OWNER);\r\n\t\taddPrivilege(RemoveProductAction.class, User.ROLE_APPLICATION_OWNER | User.ROLE_TRANSLATION_MANAGER);\r\n\t\taddPrivilege(RemoveProductBaseAction.class, User.ROLE_APPLICATION_OWNER | User.ROLE_TRANSLATION_MANAGER);\r\n\t\taddPrivilege(UpdateDictAction.class, User.ROLE_APPLICATION_OWNER | User.ROLE_TRANSLATION_MANAGER);\r\n\t\taddPrivilege(UpdateDictLanguageAction.class, User.ROLE_APPLICATION_OWNER | User.ROLE_TRANSLATION_MANAGER);\r\n\t\taddPrivilege(UpdateLabelAction.class, User.ROLE_APPLICATION_OWNER | User.ROLE_TRANSLATION_MANAGER);\r\n\t\taddPrivilege(UpdateLabelStatusAction.class, User.ROLE_APPLICATION_OWNER | User.ROLE_TRANSLATION_MANAGER);\r\n\t\taddPrivilege(ImportTranslationDetailsAction.class, User.ROLE_APPLICATION_OWNER | User.ROLE_TRANSLATION_MANAGER);\r\n\r\n\t\taddPrivilege(UpdateLabelRefAndTranslationsAction.class, User.ROLE_APPLICATION_OWNER | User.ROLE_TRANSLATION_MANAGER);\r\n\t\taddPrivilege(GlossaryAction.class, User.ROLE_ADMINISTRATOR);\r\n\r\n\r\n\t\t// translation management\r\n\t\taddPrivilege(UpdateStatusAction.class, User.ROLE_APPLICATION_OWNER | User.ROLE_TRANSLATION_MANAGER);\r\n\t\taddPrivilege(UpdateTranslationAction.class, User.ROLE_APPLICATION_OWNER | User.ROLE_TRANSLATION_MANAGER);\r\n\t\t\r\n\t\t// task management\r\n\t\taddPrivilege(ApplyTaskAction.class, User.ROLE_TRANSLATION_MANAGER);\r\n\t\taddPrivilege(CloseTaskAction.class, User.ROLE_TRANSLATION_MANAGER);\r\n\t\taddPrivilege(CreateTaskAction.class, User.ROLE_TRANSLATION_MANAGER);\r\n\t\taddPrivilege(ReceiveTaskFilesAction.class, User.ROLE_TRANSLATION_MANAGER);\r\n\t}", "@Test\n public void getObjectAccessTest() throws ApiException {\n AccessRequest request = null;\n String scope = null;\n AccessResponse response = api.getObjectAccess(request, scope);\n\n // TODO: test validations\n }", "@Override\n public String getStudyAccess() throws WdkModelException, WdkUserException {\n return \"public\";\n }", "public abstract void createAccessPoints(IApplicationContext context);", "public boolean hasAccess(String accessId);", "protected void login() {\n\t\t\r\n\t}", "public boolean checkAccess(String s, String op, String obj){\n\t\t\n\t\t/*Integer object = values.get(5).get(obj);\n\t\tInteger operation = values.get(3).get(op);\n\t\tInteger session = values.get(4).get(s);*/\n\t\t\n\t\tHashMap<Integer,Integer> elements = new HashMap<Integer,Integer>();\n\t\telements.put(5, values.get(5).get(obj));\n\t\telements.put(3,values.get(3).get(op));\n\t\telements.put(4, values.get(4).get(s));\n\t\t\n\t\tif (authGraph.dfsWalkEdges(authGraph.getRoot(), elements)) return true;\n\t\telse return false;\n\t\t\n\t\t//CHECK ACCESS MUST HANDLE THE INHERITANCE PROPERLY.........\n\t\t//MEANING IF THERE IS A SPECIAL EDGE BETWEEN TWO ROLES THEN PASS IT WITHOUT CONSUMING THE PATH VALUES....\n\t}", "void add(User user) throws AccessControlException;", "void permissionGranted(int requestCode);", "private void fineLocationPermissionGranted() {\n UtilityService.addGeofences(this);\n UtilityService.requestLocation(this);\n }", "private boolean isAuthorized() {\n return true;\n }", "public abstract boolean canEditAccessRights(OwObject object_p) throws Exception;", "private RefereesInLeagueDBAccess() {\n\n }", "@Override\n protected String requiredGetPermission() {\n return \"user\";\n }", "@Override\n public void checkPermission(Permission perm, Object context) {\n }", "@Override\n public CurrentAccess getCurrentAccess() throws WebdavException {\n if (currentAccess != null) {\n return currentAccess;\n }\n\n if (event == null) {\n return null;\n }\n\n try {\n currentAccess = getSysi().checkAccess(event, PrivilegeDefs.privAny, true);\n } catch (Throwable t) {\n throw new WebdavException(t);\n }\n\n return currentAccess;\n }", "private void loggedInUser() {\n\t\t\n\t}", "public static void accessoriesstatuspage(Long id){\r\n\t\tAccount a = (Account) Cache.get(\"authUser\");\r\n\t\tif (a != null){\r\n\t\t\tOrderAccessories o = OrderAccessories.findById(id);\r\n\t\t\trender(o);\r\n\t\t}\r\n\t\telse\t\r\n\t\t\tDealerControllerMap.pleaselogin();\r\n\t}", "@Override\n\tpublic void apply( final ApplyFn fn ) throws AccessDeniedException;", "@ThreadSafe\npublic interface AuthorizationProvider {\n\n public static String SENTRY_PROVIDER = \"sentry.provider\";\n\n /***\n * Returns validate subject privileges on given Authorizable object\n *\n * @param subject: UserID to validate privileges\n * @param authorizableHierarchy : List of object according to namespace hierarchy.\n * eg. Server->Db->Table or Server->Function\n * The privileges will be validated from the higher to lower scope\n * @param actions : Privileges to validate\n * @param roleSet : Roles which should be used when obtaining privileges\n * @return\n * True if the subject is authorized to perform requested action on the given object\n */\n public boolean hasAccess(Subject subject, List<? extends Authorizable> authorizableHierarchy,\n Set<? extends Action> actions, ActiveRoleSet roleSet);\n\n /***\n * Get the GroupMappingService used by the AuthorizationProvider\n *\n * @return GroupMappingService used by the AuthorizationProvider\n */\n public GroupMappingService getGroupMapping();\n\n /***\n * Validate the policy file format for syntax and semantic errors\n * @param strictValidation\n * @throws SentryConfigurationException\n */\n public void validateResource(boolean strictValidation) throws SentryConfigurationException;\n\n /***\n * Returns the list privileges for the given subject\n * @param subject\n * @return\n * @throws SentryConfigurationException\n */\n public Set<String> listPrivilegesForSubject(Subject subject) throws SentryConfigurationException;\n\n /**\n * Returns the list privileges for the given group\n * @param groupName\n * @return\n * @throws SentryConfigurationException\n */\n public Set<String> listPrivilegesForGroup(String groupName) throws SentryConfigurationException;\n\n /***\n * Returns the list of missing privileges of the last access request\n * @return\n */\n public List<String> getLastFailedPrivileges();\n\n /**\n * Frees any resources held by the the provider\n */\n public void close();\n}", "void checkAdmin() throws HsqlException {\n Trace.check(isAdmin(), Trace.ACCESS_IS_DENIED);\n }", "public int getAccessLevel() {\n return 0;\r\n }", "public interface AuthManager\n{\n void checkAuthAnnounce(Id<Node> nodeId, DynamicAnnouncement announcement, HttpServletRequest request);\n\n void checkAuthDelete(Id<Node> nodeId, HttpServletRequest request);\n\n void checkAuthReplicate(HttpServletRequest request);\n}", "public AuthorizationManager() throws Exception {\n\t\tNCIASecurityManager mgr = (NCIASecurityManager)SpringApplicationContext.getBean(\"nciaSecurityManager\");\n securityRights = mgr.getSecurityMapForPublicRole();\n }", "public boolean adminAccess (String password) throws PasswordException;", "public void setAccess(Rail access) {\n\tthis.access = access;\n }", "@Override\n public void checkPermission(Permission perm) {\n }", "protected void doGetPermissions() throws TmplException {\r\n try {\r\n GlbPerm perm = (GlbPerm)TmplEJBLocater.getInstance().getEJBRemote(\"pt.inescporto.permissions.ejb.session.GlbPerm\");\r\n\r\n perms = perm.getFormPerms(MenuSingleton.getRole(), permFormId);\r\n }\r\n catch (java.rmi.RemoteException rex) {\r\n //can't get form perms\r\n TmplException tmplex = new TmplException(TmplMessages.NOT_DEFINED);\r\n tmplex.setDetail(rex);\r\n throw tmplex;\r\n }\r\n catch (javax.naming.NamingException nex) {\r\n //can't find GlbPerm\r\n TmplException tmplex = new TmplException(TmplMessages.NOT_DEFINED);\r\n tmplex.setDetail(nex);\r\n throw tmplex;\r\n }\r\n }", "private List<Map<String,Object>> listAccessibleMaps() {\r\n \r\n List<Map<String, Object>> accessMapData = null;\r\n \r\n ArrayList args = new ArrayList();\r\n String accessClause = userAuthoritiesProvider.getInstance().sqlRoleClause(\"allowed_usage\", \"owner_name\", args, \"read\");\r\n try {\r\n accessMapData = magicDataTpl.queryForList(\r\n \"SELECT name, title, description FROM \" + env.getProperty(\"postgres.local.mapsTable\") + \" WHERE \" + \r\n accessClause + \" ORDER BY title\", args.toArray()\r\n );\r\n /* Determine which maps the user can additionally edit and delete */\r\n ArrayList wargs = new ArrayList();\r\n List<Map<String,Object>> writeMapData = magicDataTpl.queryForList(\r\n \"SELECT name FROM \" + env.getProperty(\"postgres.local.mapsTable\") + \" WHERE \" + \r\n userAuthoritiesProvider.getInstance().sqlRoleClause(\"allowed_edit\", \"owner_name\", wargs, \"update\") + \" ORDER BY title\", wargs.toArray()\r\n );\r\n ArrayList dargs = new ArrayList();\r\n List<Map<String,Object>> deleteMapData = magicDataTpl.queryForList(\r\n \"SELECT name FROM \" + env.getProperty(\"postgres.local.mapsTable\") + \" WHERE \" + \r\n userAuthoritiesProvider.getInstance().sqlRoleClause(\"allowed_edit\", \"owner_name\", dargs, \"delete\") + \" ORDER BY title\", dargs.toArray()\r\n );\r\n for (Map<String,Object> mapData : accessMapData) {\r\n mapData.put(\"w\", \"no\");\r\n mapData.put(\"d\", \"no\");\r\n String name = (String)mapData.get(\"name\");\r\n writeMapData.stream().map((wData) -> (String)wData.get(\"name\")).filter((wName) -> (wName.equals(name))).forEachOrdered((_item) -> {\r\n mapData.put(\"w\", \"yes\");\r\n });\r\n deleteMapData.stream().map((dData) -> (String)dData.get(\"name\")).filter((dName) -> (dName.equals(name))).forEachOrdered((_item) -> {\r\n mapData.put(\"d\", \"yes\");\r\n });\r\n }\r\n } catch(DataAccessException dae) {\r\n accessMapData = new ArrayList();\r\n System.out.println(\"Failed to determine accessible maps for user, error was : \" + dae.getMessage());\r\n }\r\n return(accessMapData);\r\n }", "private void checkAction(HttpServletRequest req, HttpServletResponse resp) throws SQLException, IOException {\n\t\tString account = req.getParameter(\"account\");\r\n\t\tString password = req.getParameter(\"password\");\r\n\t\tManage manage = this.service.checkLogin(account, password);\r\n\r\n\t\t// 如果User不是空,证明账号密码正确\r\n\t\tif (manage != null) {\r\n\t\t\tsession.setAttribute(\"MANAGEINSESSION\", manage);\r\n//\t\t\tresp.sendRedirect(path + \"/jsps/manage/index.jsp\");\r\n\t\t\tpw.print(true);\r\n\t\t} else {\r\n\t\t\tpw.print(false);\r\n//\t\t\tresp.sendRedirect(path + \"/jsps/manage/login.jsp\");\r\n\t\t}\r\n\t\treturn;\r\n\t}", "private boolean checkPermissions(HttpServletRequest request, RouteAction route) {\n\t\treturn true;\n\t}", "public void authenticationProcedure(){\n\t\tthrow new UnsupportedOperationException(\"TODO: auto-generated method stub\");\r\n\t}", "boolean authNeeded();", "public String getAccess()\n\t\t{\n\t\t\treturn m_access;\n\t\t}", "public void checkPrivileges() {\n\t\tPrivileges privileges = this.mySession.getPrivileges();\n\t}", "public boolean accesspermission()\n {\n AppOpsManager appOps = (AppOpsManager) context.getSystemService(Context.APP_OPS_SERVICE);\n int mode = 0;\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {\n mode = appOps.checkOpNoThrow(AppOpsManager.OPSTR_GET_USAGE_STATS,\n Process.myUid(),context.getPackageName());\n }\n if (mode == AppOpsManager.MODE_ALLOWED) {\n\n return true;\n }\n return false;\n\n }", "private void initForWritableEndpoints(UserGroupInformation callerUGI,\n boolean doAdminACLsCheck) throws AuthorizationException {\n // clear content type\n response.setContentType(null);\n\n if (callerUGI == null) {\n String msg = \"Unable to obtain user name, user not authenticated\";\n throw new AuthorizationException(msg);\n }\n\n if (UserGroupInformation.isSecurityEnabled() && isStaticUser(callerUGI)) {\n String msg = \"The default static user cannot carry out this operation.\";\n throw new ForbiddenException(msg);\n }\n\n if (doAdminACLsCheck) {\n ApplicationACLsManager aclsManager = rm.getApplicationACLsManager();\n if (aclsManager.areACLsEnabled()) {\n if (!aclsManager.isAdmin(callerUGI)) {\n String msg = \"Only admins can carry out this operation.\";\n throw new ForbiddenException(msg);\n }\n }\n }\n }", "boolean isReadAccess();", "public void doPermissions(RunData data, Context context)\n\t{\n\t\tSessionState state = ((JetspeedRunData)data).getPortletSessionState(((JetspeedRunData)data).getJs_peid());\n\n\t\t// cancel copy if there is one in progress\n\t\tif(! Boolean.FALSE.toString().equals(state.getAttribute (STATE_COPY_FLAG)))\n\t\t{\n\t\t\tinitCopyContext(state);\n\t\t}\n\n\t\t// cancel move if there is one in progress\n\t\tif(! Boolean.FALSE.toString().equals(state.getAttribute (STATE_MOVE_FLAG)))\n\t\t{\n\t\t\tinitMoveContext(state);\n\t\t}\n\n\t\t// should we save here?\n\t\tstate.setAttribute(STATE_LIST_SELECTIONS, new TreeSet());\n\n\t\t// get the current home collection id and the related site\n\t\tString collectionId = (String) state.getAttribute (STATE_HOME_COLLECTION_ID);\n\t\tReference ref = EntityManager.newReference(ContentHostingService.getReference(collectionId));\n\t\tString siteRef = SiteService.siteReference(ref.getContext());\n\n\t\t// setup for editing the permissions of the site for this tool, using the roles of this site, too\n\t\tstate.setAttribute(PermissionsHelper.TARGET_REF, siteRef);\n\n\t\t// ... with this description\n\t\tstate.setAttribute(PermissionsHelper.DESCRIPTION, rb.getString(\"setpermis1\")\n\t\t\t\t+ SiteService.getSiteDisplay(ref.getContext()));\n\n\t\t// ... showing only locks that are prpefixed with this\n\t\tstate.setAttribute(PermissionsHelper.PREFIX, \"content.\");\n\n\t\t// get into helper mode with this helper tool\n\t\tstartHelper(data.getRequest(), \"sakai.permissions.helper\");\n\n\t}", "public AccessRequests accessRequests() {\n return this.accessRequests;\n }", "private void checkRights() {\n image.setEnabled(true);\n String user = fc.window.getUserName();\n \n for(IDataObject object : objects){\n ArrayList<IRights> rights = object.getRights();\n \n if(rights != null){\n boolean everybodyperm = false;\n \n for(IRights right : rights){\n String name = right.getName();\n \n //user found, therefore no other check necessary.\n if(name.equals(user)){\n if(!right.getOwner()){\n image.setEnabled(false);\n }else{\n image.setEnabled(true);\n }\n return;\n //if no user found, use everybody\n }else if(name.equals(BUNDLE.getString(\"Everybody\"))){\n everybodyperm = right.getOwner();\n }\n }\n image.setEnabled(everybodyperm);\n if(!everybodyperm){\n return;\n }\n }\n }\n }", "@Override\n\tprotected boolean isAccessAllowed(ServletRequest request,\n\t\t\tServletResponse response, Object mappedValue) {\n\t\treturn false;\n\t}", "void enableSecurity();", "public void setAccession(String accession) {\n this.accession = accession;\n }", "public void setAccession(String accession) {\n this.accession = accession;\n }", "void check(Object dbobject, int rights) throws HsqlException {\n Trace.check(isAccessible(dbobject, rights), Trace.ACCESS_IS_DENIED);\n }", "void requestStoragePermission();", "boolean isExecuteAccess();", "@Override\n\tpublic int size() throws AccessDeniedException;", "@Override\n protected String requiredPutPermission() {\n return \"admin\";\n }", "@Override\n public void onPermissionGranted() {\n }", "Privilege getPrivilege();", "public void addAccess(String accessId);", "void requestNeededPermissions(int requestCode);", "@Override\n public void onGranted() {\n }" ]
[ "0.69610965", "0.6914773", "0.6914773", "0.6755986", "0.65637577", "0.64963394", "0.64439124", "0.6396987", "0.6376031", "0.6314452", "0.63029456", "0.6206428", "0.61771905", "0.6174534", "0.6152815", "0.6084497", "0.60694915", "0.606438", "0.60581785", "0.6050271", "0.60322535", "0.6013931", "0.60132873", "0.60104084", "0.59858215", "0.5980187", "0.5978944", "0.59486073", "0.5939278", "0.59331137", "0.5891616", "0.58765036", "0.5859102", "0.58554", "0.5853474", "0.5813641", "0.5796223", "0.57713586", "0.5758303", "0.57538563", "0.574232", "0.57408255", "0.57374", "0.5736542", "0.57350683", "0.57337314", "0.5727782", "0.572705", "0.57247853", "0.57229114", "0.5720917", "0.5701118", "0.5696209", "0.5695594", "0.5691632", "0.56868726", "0.5679688", "0.56760216", "0.5669624", "0.5669059", "0.56646144", "0.5661112", "0.56568134", "0.565478", "0.5652617", "0.56497276", "0.56494445", "0.5647966", "0.56401986", "0.564009", "0.5627559", "0.5606051", "0.55994093", "0.558866", "0.55785984", "0.55686015", "0.5566127", "0.55659", "0.5562708", "0.55547625", "0.55546886", "0.5554449", "0.5538219", "0.55168295", "0.5514206", "0.55122465", "0.5506301", "0.55015326", "0.5500714", "0.54975885", "0.54975885", "0.548907", "0.5487801", "0.5487725", "0.54868793", "0.5486718", "0.548368", "0.5472565", "0.5469053", "0.54686916", "0.5461554" ]
0.0
-1
TODO Autogenerated method stub
public List<Posts> listPosts() { return this.findAll(); }
{ "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
int _numberOne; String myAge; int numberTwo; int $numberThree; int 1numberFour; float number4;
public static void main(String[] args) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n int static2 = 22;\n int _static = 22;\n int $tatic = 45;\n int staticVar = 23;\n\n int salary$ = 55;\n // int 1stMonthSalary = 55; --- ERROR, cannot start with number\n int $ = 10;\n int _ = 3;\n System.out.println(\"salary $ = \" + $); // these variable work....but not recommended\n System.out.println(\"weekly _ = \" + _);// these variable work....but not recommended\n // int number-of-friends = 400; --- cannot use dashes ----> ERROR\n\n //int number_of_friends = 500; ---- NOT CONVENTION\n int numberOfFriends = 500; // use this camel case\n\n\n\n\n\n\n\n\n\n }", "@Test\n public void variableNaming(){\n String $aString=\"bob\";\n float $owed=10f;\n int aMount=4;\n long Amount=5;\n String A0123456789bCd$f=\"ugh\";\n\n\n assertEquals(4,aMount);\n assertEquals(5,Amount);\n assertEquals(10.0F,$owed,0);\n assertEquals(\"bob\",$aString);\n assertEquals(\"ugh\",A0123456789bCd$f);\n }", "public static void main (String[] args) {\n\n byte number = 6;\n// byte number1 = 127;\n //byte number2 = 129; for byte the rangde is -128 to 127 why its not compile\n short number3 = 100;\n short number4 = 31789;\n\n int number1;\n int num$=9;\n //int 5num=12 ===> this is NOT OK\n\n //system.out.println =sout;\n\n int number5=32_000;// you can use underscore (__) in beetween digits\n\n int number6= 1_000_000;// you can use (_) in beetwen numbers they are not effecting screen show\n\n System.out.println(number6);\n\n long number7=34345;\n long number8=74_813_492_034_854L;// you should use L at the end of the long values ....\n\n System.out.println(number8);\n\n float number9 = 2.3f; // you should use f/F at the end of float values\n float number10=56.0f;\n System.out.println(\"Value of number10--->\" +number10);\n\n\n double number12=2.1;\n\n double number13=89;// 89--->89.0 double data type can store int values\n\n System.out.println();\n\n //MOST COMMON primitive data toe USAGES ARE int, double, long, boolean\n\n\n\n\n}", "public static void main(String[] args) {\n\n byte number = 6;\n byte number1 = 127;\n // byte number2 = 129; for byte the range is -128 to 127. that's why it will not compile\n\n short number3 = 100;\n short number4 =31789;\n\n int number5 = 32_000;// you can use underscore (_) in between digits, it will not effect the value\n\n int number6 = 1_000_000;// you can use underscore (_) in between digits it will not effect the value\n\n System.out.println(number6);\n\n long number7 = 341345;\n long number8 = 74_813_492_034_854L;// you should use 'l/L' at the end of long values\n System.out.println(number8);\n\n float number9 = 2.3f; // // you should use 'f/F' at the end of float values\n\n float number10 = 56; //56 --> 56.0\n\n System.out.println(\"Value of number10 --> \"+number10);\n\n // int a = 5.6; you can not store decimal value in int data type\n float number11 =56.0f;\n\n double number12 = 2.1;\n\n double number13 = 89; // 89 --> 89.0 double data type can store int values\n System.out.println(number13);\n\n // most common primitive data type usages are int, double, long, boolean\n\n }", "public static void main(String[] args) {\n\t\tString name = \"Jane Doe\";\r\n\t\t int $age = 24;\r\n\t\t Double _height = 123.5;\r\n\t\t double temp = 37.5;\r\n\r\n\r\n\t}", "public String getNumber(){return number;}", "public void handleNumbers() {\n // TODO handle \"one\", \"two\", \"three\", etc.\n }", "java.lang.String getField1415();", "java.lang.String getField1000();", "public static void main(String[] args) {\n\t\tint i = Integer.parseInt(\"1234\");\r\n\t\tlong l = Long.parseLong(\"4141\");\r\n\t\tfloat f = Float.parseFloat(\"3.1415\");\r\n\t\tdouble d = Double.parseDouble(\"1.14\");\r\n\t}", "private static void LessonFundamentals() {\n byte myNum1 = 100;\n System.out.println(myNum1);\n short myNum2 = 5000;\n System.out.println(myNum2);\n int myNum3 = 100000;\n System.out.println(myNum3);\n long myNum4 = 15000000000L;\n System.out.println(myNum4);\n float myNum5 = 5.75f;\n System.out.println(myNum5);\n double myNum6 = 19.99d;\n System.out.println(myNum6);\n boolean isJavaFun = true;\n boolean isFishTasty = false;\n System.out.println(isJavaFun);\n System.out.println(isFishTasty);\n char myGrade = 'B';\n System.out.println(myGrade);\n String greeting = \"Hello World\";\n System.out.println(greeting);\n\n //#4\n //Strings are non-primitive data types that are objects\n //Strings can be empty or null while primitive type can not\n //int a = null;\n String b = null;\n\n //#5\n List<String> stringList = new ArrayList<String>();\n stringList.add(\"Hello\");\n stringList.add(\"World\");\n stringList.add(\"Let's do this\");\n\n for(String oneStr : stringList) {\n System.out.println(oneStr);\n }\n\n //List can't have primitive types like int, char, double etc\n //List(int) characters = new ArrayList<int>()\n\n //#6\n //Lottery Variables\n String gameName = \"Powerball\";\n double jackpot = 20000000.00d;\n String drawingDate = \"1/2/2013\";\n List<String> winningNumbers = new ArrayList<String>();\n winningNumbers.add(\"3\");\n winningNumbers.add(\"7\");\n winningNumbers.add(\"13\");\n winningNumbers.add(\"25\");\n winningNumbers.add(\"47\");\n winningNumbers.add(\"13LB\");\n winningNumbers.add(\"5x\");\n\n }", "public static void main(String[] args) {\n\t\t\n\t\tbyte length = 3;\n\t\tSystem.out.println(length);\n\t\tbyte width = 4;\n\t\t short age = 32767;\n\t\t System.out.println(age);\n\t\tshort num3 = -11000;\n\t\tint num4 = 5000000;\n\t\t\n\t\tlong longNumber = 10l;\n\t\tint intNumber = 10;\n\t\t\n\t\tfloat example = 10.58F;\n\t\tSystem.out.println(example);\n\t\t\n\t\tdouble doubleNumber = 148.3957;\n\t\tdouble doubleNumber2 = example;\n\t\tSystem.out.println(doubleNumber2);\n\t\t\n\t}", "java.lang.String getField1022();", "java.lang.String getField1321();", "java.lang.String getField1998();", "java.lang.String getField1993();", "java.lang.String getField1234();", "java.lang.String getField1323();", "public static void main(String[] args) {\n //I can store my age in byte, short, int, long\n\n int myAge = 28;\n\n //I can store my year for the date of birth short, int, long\n\n int myDateOfYear = 1993;\n\n //I can store my favorite number in byte, short, int or long depending on its capacity\n\n int myFavoriteNumber = 5;\n\n //I can store my favorite character in char data type\n\n char myFavoriteCharacter = 'A';\n\n System.out.println(\"My age is: \" + myAge\n + \"\\nMy date of year is: \" + myDateOfYear\n + \"\\nMy favorite number is: \" + myFavoriteNumber\n + \"\\nMy favorite character is: \" + myFavoriteCharacter);\n\n }", "java.lang.String getField1034();", "java.lang.String getField1994();", "java.lang.String getField1987();", "public String getNumber(){\r\n return number;\r\n }", "public java.lang.Integer getVar213() {\n return var213;\n }", "java.lang.String getField1406();", "java.lang.String getField1999();", "public java.lang.Integer getVar124() {\n return var124;\n }", "java.lang.String getField1324();", "java.lang.String getField1307();", "public TamilWord readNumber(double number);", "java.lang.String getField1322();", "public static void main(String[] args) {\n\t\tdouble num1= 10.35;\r\n\t\t// byte with value 5\r\n\t\tbyte num2=5;\r\n\t\t//int with value 3\r\n\t\tint num3=3;\r\n\t\t\r\n\t\t//Declare 3 string variables\r\n\t\t String name1;\r\n\t\t String name2;\r\n\t\t String name3;\r\n\t\t\r\n\t\t//Assign values to the previously created variables\r\n\t\tname1= \"John\";\r\n\t\tname2= \"Mary\";\r\n\t\tname3= \"Dog\";\r\n\t\tSystem.out.println(name1);\r\n\t\tSystem.out.println(name1+ name2);\r\n\t\t\r\n\t\t\r\n\t\r\n\t}", "java.lang.String getField1035();", "java.lang.String getField1500();", "java.lang.String getField1124();", "java.lang.String getField1919();", "java.lang.String getField1329();", "java.lang.String getField1237();", "java.lang.String getField1297();", "public MyAllTypesFirst() {\n myInt = 0;\n myLong = 0;\n myString = \"\";\n myBool = false;\n myOtherInt = 0;\n }", "java.lang.String getField1978();", "java.lang.String getField1320();", "java.lang.String getField1125();", "public java.lang.Integer getVar213() {\n return var213;\n }", "java.lang.String getField1230();", "java.lang.String getField1325();", "public java.lang.Integer getVar43() {\n return var43;\n }", "java.lang.String getField1032();", "java.lang.String getField1223();", "public final EObject ruleNumberVariableDefinition() throws RecognitionException {\n EObject current = null;\n\n Token lv_name_1_0=null;\n Token otherlv_2=null;\n Token lv_value_3_0=null;\n Token otherlv_4=null;\n EObject lv_type_0_0 = null;\n\n\n enterRule(); \n \n try {\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:3327:28: ( ( ( (lv_type_0_0= ruleSimpleDataType ) ) ( (lv_name_1_0= RULE_ID ) ) otherlv_2= '=' ( (lv_value_3_0= RULE_NUMBER ) ) otherlv_4= ';' ) )\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:3328:1: ( ( (lv_type_0_0= ruleSimpleDataType ) ) ( (lv_name_1_0= RULE_ID ) ) otherlv_2= '=' ( (lv_value_3_0= RULE_NUMBER ) ) otherlv_4= ';' )\n {\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:3328:1: ( ( (lv_type_0_0= ruleSimpleDataType ) ) ( (lv_name_1_0= RULE_ID ) ) otherlv_2= '=' ( (lv_value_3_0= RULE_NUMBER ) ) otherlv_4= ';' )\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:3328:2: ( (lv_type_0_0= ruleSimpleDataType ) ) ( (lv_name_1_0= RULE_ID ) ) otherlv_2= '=' ( (lv_value_3_0= RULE_NUMBER ) ) otherlv_4= ';'\n {\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:3328:2: ( (lv_type_0_0= ruleSimpleDataType ) )\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:3329:1: (lv_type_0_0= ruleSimpleDataType )\n {\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:3329:1: (lv_type_0_0= ruleSimpleDataType )\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:3330:3: lv_type_0_0= ruleSimpleDataType\n {\n \n \t newCompositeNode(grammarAccess.getNumberVariableDefinitionAccess().getTypeSimpleDataTypeParserRuleCall_0_0()); \n \t \n pushFollow(FOLLOW_ruleSimpleDataType_in_ruleNumberVariableDefinition7478);\n lv_type_0_0=ruleSimpleDataType();\n\n state._fsp--;\n\n\n \t if (current==null) {\n \t current = createModelElementForParent(grammarAccess.getNumberVariableDefinitionRule());\n \t }\n \t\tset(\n \t\t\tcurrent, \n \t\t\t\"type\",\n \t\tlv_type_0_0, \n \t\t\"SimpleDataType\");\n \t afterParserOrEnumRuleCall();\n \t \n\n }\n\n\n }\n\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:3346:2: ( (lv_name_1_0= RULE_ID ) )\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:3347:1: (lv_name_1_0= RULE_ID )\n {\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:3347:1: (lv_name_1_0= RULE_ID )\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:3348:3: lv_name_1_0= RULE_ID\n {\n lv_name_1_0=(Token)match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleNumberVariableDefinition7495); \n\n \t\t\tnewLeafNode(lv_name_1_0, grammarAccess.getNumberVariableDefinitionAccess().getNameIDTerminalRuleCall_1_0()); \n \t\t\n\n \t if (current==null) {\n \t current = createModelElement(grammarAccess.getNumberVariableDefinitionRule());\n \t }\n \t\tsetWithLastConsumed(\n \t\t\tcurrent, \n \t\t\t\"name\",\n \t\tlv_name_1_0, \n \t\t\"ID\");\n \t \n\n }\n\n\n }\n\n otherlv_2=(Token)match(input,17,FOLLOW_17_in_ruleNumberVariableDefinition7512); \n\n \tnewLeafNode(otherlv_2, grammarAccess.getNumberVariableDefinitionAccess().getEqualsSignKeyword_2());\n \n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:3368:1: ( (lv_value_3_0= RULE_NUMBER ) )\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:3369:1: (lv_value_3_0= RULE_NUMBER )\n {\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:3369:1: (lv_value_3_0= RULE_NUMBER )\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:3370:3: lv_value_3_0= RULE_NUMBER\n {\n lv_value_3_0=(Token)match(input,RULE_NUMBER,FOLLOW_RULE_NUMBER_in_ruleNumberVariableDefinition7529); \n\n \t\t\tnewLeafNode(lv_value_3_0, grammarAccess.getNumberVariableDefinitionAccess().getValueNUMBERTerminalRuleCall_3_0()); \n \t\t\n\n \t if (current==null) {\n \t current = createModelElement(grammarAccess.getNumberVariableDefinitionRule());\n \t }\n \t\tsetWithLastConsumed(\n \t\t\tcurrent, \n \t\t\t\"value\",\n \t\tlv_value_3_0, \n \t\t\"NUMBER\");\n \t \n\n }\n\n\n }\n\n otherlv_4=(Token)match(input,18,FOLLOW_18_in_ruleNumberVariableDefinition7546); \n\n \tnewLeafNode(otherlv_4, grammarAccess.getNumberVariableDefinitionAccess().getSemicolonKeyword_4());\n \n\n }\n\n\n }\n\n leaveRule(); \n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }", "java.lang.String getField1134();", "java.lang.String getField1235();", "java.lang.String getField1001();", "public static void main (String[]args) {\n\t\tdouble money = 10.35;\r\n\t//Define a variable type with value of 5*/\t\r\n\t\tbyte number = 5;\r\n\t//Define a variable type with a value of 3*/\t\r\n\t\tint age = 3; \r\n\t\t//Declare 3 String variables\r\n\t\r\n\tString greeting;\r\n\tString goodbye;\r\n\tString saying; \r\n\t//Assign values to those previously created variables\r\n\tgreeting = \"Hi\";\r\n\tgoodbye = \"Take care\";\r\n\tsaying = \"To each their own\";\r\n\tSystem.out.println(greeting);\r\n\tSystem.out.println(greeting+saying);//Expected : HiTo each their own\r\n\t}", "java.lang.String getField1301();", "public static void main(String[] args) {\n String str = \"Data type 1\";\n System.out.println(str);\n System.out.println(global);\n sum();\n final double PI =3.14;\n System.out.println(PI);\n System.out.println(\"Name\\tDOB\");\n short s = 10;\n int i = 28;\n long l =100L;\n\n float f = 3.1f;\n double d =3.5;\n\n char c= 'a';\n char c2 = '5';\n char c3 = 65; // 'A'\n\n boolean b1 = true;\n boolean b2 = false;\n\n Integer ref_i = 100;\n\n int a = 100;\n int b = 200;\n System.out.println(\"a = \" + a + \", b = \" +b);\n }", "public java.lang.Integer getVar124() {\n return var124;\n }", "java.lang.String getField1997();", "java.lang.String getField1399();", "java.lang.String getField1534();", "java.lang.String getField1236();", "java.lang.String getField1934();", "java.lang.String getField1299();", "public static void main(String[] args) {\n\t\t\n\t\tint num1=123;\n\t\tint num2=6767;\n\t\tint num3= 786876;\n\t\tchar num4='A';\n\t\t\n\t\t// 2. declare variable first and then assign value\n\t\tint n1;\n\t\tint n2;\n\t\tint n3;\n\t\t\n\t\tn1= 56;\n\t\tn2=7676;\n\t\tn3=767;\n\t\t// 3. declare all variables together and then assign value\n\t\tint number1, number2, number3;\n\t\t\n\t\tnumber1=12;\n\t\tnumber2=15;\n\t\tnumber3=676;\n\t\t\n\t\tnumber3= 1000;\n\t\t\n\t\tchar myVariable;\n\t\tmyVariable='*';\n\t\t\n\t\tnumber2=number1;\n\t\tSystem.out.println(number2);// it will run 12\n\t\t\n\t\t// number2=false; it will show compiler error and will ask for change the data type for variable2\n\t\t\n\t\tboolean isRain=false;\n\t\t\n\t}", "java.lang.String getField1023();", "java.lang.String getField1332();", "java.lang.String getField1326();", "java.lang.String getField1242();", "java.lang.String getField1327();", "java.lang.String getField1333();", "java.lang.String getField1434();", "java.lang.String getField1313();", "java.lang.String getField1298();", "java.lang.String getField1224();", "java.lang.String getField1042();", "java.lang.String getField1328();", "java.lang.String getField1040();", "java.lang.String getField1243();", "java.lang.String getField1342();", "public java.lang.Integer getVar43() {\n return var43;\n }", "java.lang.String getField1239();", "public void setNumber(String number) {\n this.number = number;\n }", "java.lang.String getField1635();", "java.lang.String getField1238();", "public java.lang.CharSequence getVar54() {\n return var54;\n }", "java.lang.String getField1030();", "java.lang.String getField1015();", "java.lang.String getField1026();", "java.lang.String getField1036();", "java.lang.String getField1303();", "java.lang.String getField1923();", "public java.lang.Integer getVar123() {\n return var123;\n }", "java.lang.String getField1098();", "java.lang.String getField1256();", "java.lang.String getField1345();", "public void setVar43(java.lang.Integer value) {\n this.var43 = value;\n }", "java.lang.String getField1348();", "public static void main(String [] args){\n\n System.out.println(\"Hello\");\n System.out.print(\"World\");\n System.out.println(\"!\");\n\n\n\n\n // V A R I A B L E S\n /*\n Names are case-sensitive and may begin with:\n letters, $, _\n After, may include\n letters, numbers, $, _\n Convention says\n Start with a lowercase word, then additional words are capitalized\n ex. myFirstVariable\n */\n String name = \"Mike\"; // String's are objects not primitives\n char testGrade = 'A'; // single 16-bit Unicode character.\n\n byte age0 = 0; // 8-bit signed two's complement integer\n short age1 = 10; // 16-bit signed two's complement integer.\n int age2 = 20; // 32-bit signed two's complement integer\n long age3 = 30L; // 64-bit optionally signed two's complement integer\n\n float gpa0 = 2.5f; // 32-bit floating point\n double gpa1 = 3.5; // double-precision 64-bit floating point\n\n boolean isTall; // 1 bit -> true/false\n isTall = true;\n\n name = \"John\";\n\n System.out.println(\"Your name is \" + name);\n System.out.printf(\"Your name is %s \\n\", name);\n /*\n %f -> double or float\n %d -> Integer\n %s -> string\n %c -> character\n %b -> boolean\n */\n\n\n\n\n\n\n // C A S T I N G & C O N V E R T I N G\n\n System.out.println( (int)3.14 );\n System.out.println( (double)3 );\n\n int intFromString = Integer.parseInt(\"50\");\n double doubleFromString = Double.parseDouble(\"50.99\");\n\n System.out.println(100 + intFromString);\n System.out.println( 100 + doubleFromString );\n\n\n\n\n\n // S T R I N G S\n\n String greeting = \"Hello\";\n // indexes: 01234\n\n System.out.println( greeting.length() );\n System.out.println( greeting.charAt(0) );\n System.out.println( greeting.indexOf(\"llo\") );\n System.out.println( greeting.indexOf(\"z\") );\n System.out.println( greeting.substring(2) );\n System.out.println( greeting.substring(1, 3) );\n\n\n\n\n\n // N U M B E R S\n\n System.out.println( 2 * 3 ); // Basic Arithmetic: +, -, /, *\n System.out.println( 10 % 3 ); // Modulus Op. : returns remainder of 10/3\n System.out.println( 1 + 2 * 3 ); // order of operations\n System.out.println(10 / 3.0); // int's and doubles\n\n\n int num = 10;\n num += 100; // +=, -=, /=, *=\n System.out.println(num);\n\n num++;\n System.out.println(num);\n\n // Math class has useful math methods\n System.out.println( Math.pow(2, 3) );\n System.out.println( Math.sqrt(144) );\n System.out.println( Math.round(2.7) );\n\n\n\n\n // U S E R I N P U T\n// import java.util.Scanner;\n Scanner keyboardInput = new Scanner(System.in);\n\n System.out.print(\"Enter username: \");\n String username = keyboardInput.nextLine(); // .nextDouble(), .nextInt()\n System.out.println(\"Hello, \" + username);\n\n // System.out.println( keyboardInput.hasNextLine() ); // .hasNextDouble(), .hasNextInt()\n\n\n\n\n\n // A R R A Y S\n\n // int [] luckyNumbers = new int[10];\n int [] luckyNumbers = {4, 8, 15, 16, 23, 42};\n // indexes: 0 1 2 3 4 5\n luckyNumbers[0] = 90;\n System.out.println(luckyNumbers[0]);\n System.out.println(luckyNumbers[1]);\n System.out.println(luckyNumbers.length);\n\n\n\n\n\n // N Dimensional Arrays\n\n // int [][] numberGrid = new int[2][3];\n int [][] numberGrid = { {1, 2}, {3, 4} };\n numberGrid[0][1] = 99;\n\n System.out.println(numberGrid[0][0]);\n System.out.println(numberGrid[0][1]);\n\n\n\n\n\n // A R R A Y L I S T\n\n ArrayList<String> friends = new ArrayList<String>();\n friends.add(\"Oscar\");\n friends.add(\"Angela\");\n friends.add(\"Kevin\");\n\n // friends.remove(\"Oscar\");\n System.out.println( friends.toString() );\n System.out.println( friends.get(0) );\n System.out.println( friends.contains(\"Oscar\") );\n System.out.println( friends.size() );\n\n\n\n\n\n\n // M E T H O D S\n\n int sum = addNumbers(4, 60);\n System.out.println(sum);\n\n // public static int addNumbers(int num1, int num2){\n // return num1 + num2;\n // }\n\n\n\n\n\n // I F S T A T E M E N T S\n\n boolean isStudent = false;\n \tboolean isSmart = false;\n\n \tif(isStudent && isSmart){\n \t\tSystem.out.println(\"You are a student\");\n } else if(isStudent && !isSmart){\n \tSystem.out.println(\"You are not a smart student\");\n } else {\n \tSystem.out.println(\"You are not a student and not smart\");\n }\n\n // >, <, >=, <=, !=, ==, String.equals()\n if(1 > 3){\n \tSystem.out.println(\"number omparison was true\");\n }\n\n if('a' > 'b'){\n System.out.println(\"character omparison was true\");\n }\n\n if(\"dog\".equals(\"cat\")){\n System.out.println(\"string omparison was true\");\n }\n\n\n\n\n\n\n // S W I T C H S T A T E M E N T S\n\n char myGrade = 'A';\n \tswitch(myGrade){\n \t\tcase 'A':\n \t\t\tSystem.out.println(\"You Pass\");\n break;\n case 'F':\n \tSystem.out.println(\"You fail\");\n \tbreak;\n default:\n \tSystem.out.println(\"Invalid grade\");\n }\n\n\n\n\n\n // W H I L E L O O P S\n\n \tint index = 1;\n \twhile(index <= 5){\n \tSystem.out.println(index);\n \tindex++;\n }\n\n // do{\n // \tSystem.out.println(index);\n // \tindex++;\n // }while(index <= 5);\n\n\n\n\n\n // F O R L O O P S\n\n for(int i = 0; i < 5; i++){\n \tSystem.out.println(i);\n }\n\n // int luckyNums[] = {4, 8, 15, 16, 23, 42};\n // for(int luckyNum : luckyNums){\n // System.out.println(luckyNum);\n // }\n\n\n\n\n\n\n // E X C E P T I O N C A T C H I N G\n\n // int division = 10/0;\n\n // try{\n // int division = 10/0;\n // }catch(ArithmeticException e){\n // System.out.println(e);\n // }catch(Exception e){\n // // Not best practice to use general Exception\n // }\n\n // throw new ArithmeticException(\"can't add numbers\");\n\n\n\n\n\n\n\n // Classes & Objects\n\n // public class Book{\n // public String title;\n // public String author;\n // public static String staticAttribute = \"My Static Attribute\";\n //\n // public void readBook(){\n // System.out.println(\"Reading \" + this.title + \" by \" + this.author);\n // }\n // }\n\n Book book1 = new Book();\n book1.title = \"Harry Potter\";\n book1.author = \"JK Rowling\";\n\n book1.readBook();\n System.out.println(book1.title);\n\n Book book2 = new Book();\n book2.title = \"Lord of the Rings\";\n book2.author = \"JRR Tolkien\";\n\n book2.readBook();\n System.out.println(book2.title);\n System.out.println(Book.staticAttribute)\n\n\n\n\n\n\n // C O N S T R U C T O R S\n /*\n public class Book{\n public String title;\n public String author;\n\n public Book(){\n this.title = \"no title\";\n this.author = \"no author\";\n }\n\n public Book(String title, String author){\n this.title = title;\n this.author = author;\n }\n\n public void readBook(){\n System.out.println(\"Reading \" + this.title + \" by \" + this.author);\n }\n }\n\n Book book1 = new Book(\"Harry Potter\", \"JK Rowling\");\n System.out.println(book1.title);\n\n Book book2 = new Book(\"Lord of the Rings\", \"JRR Tolkien\");\n System.out.println(book2.title);\n */\n\n\n\n\n\n // G E T T E R S & S E T T E R S\n /*\n public class Book\n {\n private String title;\n private String author;\n\n public Book()\n {\n this.title = \"no title\";\n this.author = \"no author\";\n }\n\n public Book(String title, String author)\n {\n this.Title = title;\n this.Author = author;\n }\n\n public string Title\n {\n get { return this.title; }\n set { this.title = value; }\n\n }\n public string Author\n {\n get { return this.author; }\n set { this.author = value; }\n\n }\n }\n\n Book book1 = new Book(\"Harry Potter\", \"JK Rowling\");\n Console.WriteLine(book1.Title);\n\n Book book2 = new Book(\"Lord of the Rings\", \"JRR Tolkien\");\n Console.WriteLine(book1.Author);\n */\n\n\n\n\n\n // Inheritance\n\n class Chef{\n\n public String name;\n public int age;\n\n public Chef(String name, int age){\n this.name = name;\n this.age = age;\n }\n\n\n public void makeChicken(){\n System.out.println(\"The chef makes chicken\");\n }\n\n public void makeSalad(){\n System.out.println(\"The chef makes salad\");\n }\n\n public void makeSpecialDish(){\n System.out.println(\"The chef makes a special dish\");\n }\n }\n\n class ItalianChef extends Chef{\n\n public String countryOfOrigin;\n\n public ItalianChef(String name, int age, String countryOfOrigin){\n super(name, age);\n this.countryOfOrigin = countryOfOrigin;\n }\n\n public void makePasta(){\n System.out.println(\"The chef makes pasta\");\n }\n\n @Override\n public void makeSpecialDish(){\n System.out.println(\"The chef makes chicken parm\");\n }\n }\n\n Chef myChef = new Chef(\"Gordon Ramsay\", 50);\n myChef.makeChicken();\n\n ItalianChef myItalianChef = new ItalianChef(\"Massimo Bottura\", 55, \"Italy\");\n myItalianChef.makeChicken();\n System.out.println(myItalianChef.age);\n\n\n\n\n // Abstract Classes & Attributes\n abstract class Vehicle{\n public abstract void move();\n public void getDescription(){\n System.out.println(\"Vehicles are used for transportation\");\n }\n }\n\n class Bicycle extends Vehicle{\n @Override\n public void move(){\n System.out.println(\"The bicycle pedals forward\");\n }\n }\n\n class Plane extends Vehicle{\n @Override\n public void move(){\n System.out.println(\"The plane flys through the sky\");\n }\n }\n\n\n\n\n\n\n\n // Interface Inheritance (Polymorphism)\n\n // interface Animal{\n // public void speak();\n // }\n\n // class Cat implements Animal{\n // @Override\n // public void speak(){\n // System.out.println(\"Meow Meow\");\n // }\n // }\n\n // class Dog implements Animal{\n // @Override\n // public void speak(){\n // System.out.println(\"Woof Woof\");\n // }\n // }\n\n\n Animal [] animals = {\n new Dog(),\n new Cat()\n };\n for(Animal animal : animals){\n animal.speak();\n }\n // discuss protected\n\n\n }", "java.lang.String getField1245();", "java.lang.String getField1099();", "java.lang.String getField1265();" ]
[ "0.62083155", "0.62028205", "0.6163582", "0.5933869", "0.5755221", "0.5660957", "0.56114024", "0.55304253", "0.5445901", "0.5436614", "0.54356563", "0.5411492", "0.5396258", "0.5342967", "0.53278846", "0.531972", "0.531607", "0.5316039", "0.5304297", "0.5298408", "0.5286017", "0.5270175", "0.52548033", "0.5248168", "0.5247319", "0.5245631", "0.52415454", "0.5239314", "0.523916", "0.5235976", "0.52328336", "0.5229915", "0.52235603", "0.5216372", "0.5214857", "0.5212964", "0.52058965", "0.52037364", "0.5202808", "0.5200701", "0.5200096", "0.519839", "0.5192491", "0.5192108", "0.51916784", "0.51901156", "0.518464", "0.5182679", "0.51807255", "0.51803905", "0.5180339", "0.51785344", "0.51732105", "0.516864", "0.5162662", "0.51604325", "0.5158128", "0.51562136", "0.5153896", "0.51531816", "0.51499325", "0.5146964", "0.51410353", "0.5137506", "0.51286846", "0.51284873", "0.5127991", "0.51263356", "0.512615", "0.5125682", "0.51239514", "0.51205987", "0.5120313", "0.5119733", "0.511956", "0.51194227", "0.51192933", "0.51142913", "0.5114081", "0.51133895", "0.51133806", "0.51123", "0.5106468", "0.5105304", "0.5104526", "0.5104032", "0.51039195", "0.51022065", "0.510095", "0.5100621", "0.5097959", "0.5095297", "0.5093507", "0.50927657", "0.50921464", "0.50894564", "0.508937", "0.50891644", "0.50868225", "0.50865227", "0.50856733" ]
0.0
-1
TODO Autogenerated method stub
@Override public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) { Market market = new Market(); Player player = (Player) sender; if (cmd.getName().equalsIgnoreCase(cmdPreco)) { if (args.length == 1) { int id = Util.getId(args[0]); if (id != 0) { double price = market.getPrice(id); String name = Util.getItemName(id); player.sendMessage(Util.chat("&eItem: &9" + name + "\n&ePreço: &a" + price)); return true; } player.sendMessage(Util.chat("&cParâmetros inválidos: /preço [id] ou <nome do item>")); return true; } player.sendMessage(Util.chat("&cSem parâmetro: /preço [id] ou <nome do item>")); return true; } if (cmd.getName().equalsIgnoreCase(cmdAddItem)) { if (args.length == 1) { int id = Util.getId(args[0]); if (id != 0) { if (!market.itemExist(id)) { market.addItem(id); player.sendMessage( Util.chat("&eItem &c[&f" + id + "&c] &9" + Util.getItemName(id) + " &aAdicionado!")); return true; } else { player.sendMessage(Util.chat("&cItem já está registrado!")); return true; } } player.sendMessage(Util.chat("&cParâmetros inválidos: /additem [id] ou <nome do item>")); return true; } if (args.length == 2) { if (Util.isNumber(args[1])) { int id = Util.getId(args[0]); double price = Double.parseDouble(args[1]); if (id != 0) { if (!market.itemExist(id)) { market.addItem(id, price); player.sendMessage(Util.chat("&eItem &c[&f" + id + "&c] &9" + Util.getItemName(id) + " &aAdicionado! \n&ePreço: &f" + price)); return true; } else { player.sendMessage(Util.chat("&cItem já está registrado!")); return true; } } else { player.sendMessage( Util.chat("&cParâmetros inválidos: /additem [id] ou <nome do item> <preço>")); return true; } } player.sendMessage(Util.chat("&cParâmetros inválidos: /additem [id] ou <nome do item> <preço>")); return true; } player.sendMessage(Util.chat("&cSem parâmetros: /additem [id] ou <nome do item> <preço>")); return true; } if (cmd.getName().equalsIgnoreCase(cmdRemoveItem)) { if (args.length == 1) { int id = Util.getId(args[0]); if (id != 0 || args[0].equals("AIR")) { if (market.itemExist(id)) { market.deleteItem(id); player.sendMessage(Util.chat("&eItem &9" + Util.getItemName(id) + "&c Deletado")); return true; } else player.sendMessage(Util.chat("&cEsse item ainda não foi registrado")); return true; } player.sendMessage(Util.chat("&cParâmetros inválidos: /removeritem [id] ou <nome do item>")); return true; } player.sendMessage(Util.chat("&cSem parâmetros: /removeritem [id] ou <nome do item>")); return true; } if (cmd.getName().equalsIgnoreCase(cmdAtualizarItem)) { if (args.length == 2) { if (Util.isNumber(args[1])) { int id = Util.getId(args[0]); if (id != 0) { if (market.itemExist(id)) { double value = Double.parseDouble(args[1]); market.updateItem(id, value); player.sendMessage(Util.chat( "&eItem &9" + Util.getItemName(id) + "&a Atualizado\n&ePreço atual: &f" + value)); return true; } else { player.sendMessage(Util.chat("&cEsse item ainda não foi registrado")); return true; } } player.sendMessage( Util.chat("&cParâmetros inválidos: /atualizaritem [id] ou <nome do item> <preço>")); return true; } player.sendMessage(Util.chat("&cParâmetros inválidos: /atualizaritem [id] ou <nome do item> <preço>")); return true; } player.sendMessage(Util.chat("&cSem parâmetros: /atualizaritem [id] ou <nome do item> <preço>")); return true; } if (cmd.getName().equalsIgnoreCase(cmdListarItens)) { List<ItemStack> listItem = new ArrayList<ItemStack>(); player.sendMessage(Util.chat("&cCARREGANDO LISTA......")); listItem = market.listItens(); Map map = Util.divList(listItem, 5); if (args.length == 0) { player.sendMessage(Util.chat("&f----------&6[Lista]&7 (1/" + Util.mapKeyQuantity(map) + ")&f--------------------" + "\n&7Use /listaritems [n] para ir para pagina n \n&f----&9NOME &f----&aPREÇO &f----&cID")); listItem = (List<ItemStack>) map.get(0); for (ItemStack item : listItem) { String name = Util.getItemName(item); int id = Util.getItemId(item); double price = market.getPrice(id); player.sendMessage(Util.chat("-> &9[" + name + "] &a[" + price + "] &c[" + id + "]")); } return true; } if (args.length == 1) { int p = Integer.parseInt(args[0]); if (p <= 0) { player.sendMessage(Util.chat("&cNúmero minímo de paginas é: " + 1)); return true; } if (p <= Util.mapKeyQuantity(map)) { listItem = (List<ItemStack>) map.get(p - 1); player.sendMessage(Util.chat("&f----------&6[Lista]&7 (" + args[0] + "/" + Util.mapKeyQuantity(map) + "&f--------------------\n&f----&9NOME &f----&aPREÇO &f----&cID")); for (ItemStack item : listItem) { String name = Util.getItemName(item); int id = Util.getItemId(item); double price = market.getPrice(id); player.sendMessage(Util.chat("-> &9[" + name + "] &a[" + price + "] &c[" + id + "]")); } return true; } player.sendMessage(Util.chat("&cNúmero maximo de paginas é: " + Util.mapKeyQuantity(map))); return true; } return true; } return false; }
{ "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
Convert the given object to string with each line indented by 4 spaces (except the first line).
private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String toIndentedString(Object object) {\n if (object == null) {\n return EndpointCentralConstants.NULL_STRING;\n }\n return object.toString().replace(EndpointCentralConstants.LINE_BREAK,\n EndpointCentralConstants.LINE_BREAK + EndpointCentralConstants.TAB_SPACES);\n }", "private String toIndentedString(Object o)\n/* */ {\n/* 128 */ if (o == null) {\n/* 129 */ return \"null\";\n/* */ }\n/* 131 */ return o.toString().replace(\"\\n\", \"\\n \");\n/* */ }", "private String toIndentedString( Object o )\n {\n if ( o == null )\n {\n return \"null\";\n }\n return o.toString().replace( \"\\n\", \"\\n \" );\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }" ]
[ "0.7885475", "0.75498515", "0.74975353", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901", "0.7461901" ]
0.0
-1
Add an observer to the list of collaborators
public void attach(Observer o);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void addObserver(IObserver observer) {\n observersList.add(observer);\n }", "public void addObservers(List<RegisterObserver> observers){\r\n registerObservers.addAll(observers);\r\n }", "@Override\n public void addObserver(Observer observer) {\n observers.add(observer);\n }", "public void addObserver(jObserver observer);", "@Override\n public void addObserver(Observer o) {\n listeObservers.add(o);\n getListeMorceau();\n }", "public void adicionarObservador (Observer observador) {\n list.add(observador);\n }", "public void addObserver(Observer obs) {\n this.listObserver.add(obs);\n }", "@Override\n public void registerObserver(Observer o) {\n list.add(o);\n \n }", "public void addObserver(IObserver observer)\n {\n observers.add(observer);\n }", "void addObserver(Observer observer);", "void addObserver(Observer observer);", "public void addObserver(ElevatorObserver observer) {\n\t\tobservers.add(observer);\n\t}", "@Override\r\n\tpublic void addObserver(Observer o){\r\n\t\tol.add(o);\r\n\t}", "public void addLobbyObserver(Observer obs)\r\n\t{\r\n\t\treceiver.addObserver(obs);\r\n\t}", "@Override\r\n\tpublic void addObserver(IObserver obs){\r\n\t\tif(obs != null){\r\n\t\t\tobservers.add(obs);\r\n\t\t}\r\n\t}", "public abstract void addObserver(Observer observer);", "@Override\n\tpublic void addObservateur(Observateur obs) {\n\t\tthis.listObservateur.add(obs);\n\t}", "@Override\r\n public void addObserver(Observer o) {\r\n observers.add(o);\r\n }", "@Override\n public void subscribe(Observer observer) {\n this.observers.add(observer);\n }", "public void addObserver(Observer observer) {\r\n this.observers.add(observer);\r\n notifyObservers();\r\n }", "@Override\r\n\tpublic void registerObservers(Observer o) {\n\t\tobservers.add(o);\r\n\t}", "@Override\n public void registerObserver(Observer observer) {\n observers[counterObservers++]=observer;\n\n }", "public void registerObserver(Observer observer);", "private void observerStuff() {\r\n\t\tfor (PirateShip pirate : pirates) {\r\n\t\t\tship.registerObserver(pirate);\r\n\t\t}\r\n\t}", "public void registerObserver(Observer observer) {\n\t\tobservers.add(observer);\n\t}", "public void registerObserver(Observer ob){\r\n\t\tobservers.add(ob);\r\n\t}", "@Override\n public void attach(IObserver observer) {\n listeners.add(observer);\n }", "@Override\r\n\tpublic void add(Observer observer) {\n\t\tvector.add(observer);\r\n\t}", "@Override\n void attach(Observer observer) {\n observers.add(observer);\n }", "@Override\n public void registerObserver(Observer ob) {\n this.observers.add(ob);\n System.out.println(\"** Sistema: Observado \" + this.getClass().getName() + \" - Observador \" + ob.getClass().getName() + \" está registrado.\");\n }", "@Override\n public void addObserver(Observer o) {\n Gui_producto.observadores.add(o);\n }", "public void addIObserver( IObserver iobs )\n {\n if ( observers.indexOf( iobs ) < 0 ) // only add the observer if it's \n observers.addElement( iobs ); // NOT already there.\n }", "public void addObservers(List<BiObserver<T, V>> l){\n biObserverList.addAll(l);\n }", "protected void registerObserver(Observer.GraphAttributeChanges observer) {\n observers.add(observer);\n }", "public abstract void addObserver(IObserver anIObserver);", "void addObserver(EntityObserver observer);", "@Override\n public void addObserver(Utilities.Observer o) {\n observers.add(o);\n }", "@Override\n public void registerObserver(Observer o){\n this.observers.add(o);\n }", "public void setObservers(ArrayList<Observer> observers) { \n\t\tGame.ui = observers; \n\t}", "public void registerObserver(Observer observer) { \n\t\tui.add(observer); \n\n\t}", "@Override\n\tpublic void attach(Observer observer) {\n\t\tobs.add(observer);\n\t}", "public void addObserver(Varien_Event_Observer observer) {\n\t\t_observers.put(observer.getName(), observer);\n\t}", "public void addObserver(GUIObserver g){\n\t\tobservers.add(g);\n\t}", "public void addObserver(ServiceObserverPrx observer);", "@Override\n\tpublic void addObserver(ObserverListener ob) {\n\t\tvector.add(ob);\n\t}", "public void addObserver(Node node){\n\t\tif(null == observerNodes)\n\t\t\tobserverNodes = new ArrayList<Node>();\n\t\tobserverNodes.add(node);\n\t}", "@Override\r\n\tpublic void notifyObservers() {\n\t\tfor(Observer o : list) {\r\n\t\t\t// Atualiza a informacao no observador\r\n\t\t\to.update(this, this);\r\n\t\t}\r\n\t}", "public void attach(Observer observer) {\n\t\tsubscribers.add(observer);\n\t}", "void addPropertyChangedObserver(PropertyChangeObserver observer);", "public void addObserver(T t){\n\t\t\n\t\tIterator<T> it = observers.iterator();\n\t\tboolean encontrado = false;\n\t\tT valor = null;\n\t\t\n\t\tobservers.contains(t);\n\t\twhile(it.hasNext() && !encontrado){\n\t\t\t\t\n\t\t\tvalor = it.next();\t\n\t\t\tencontrado = (valor.equals(t));\n\t\t}\n\t\t\n\t\tif(!encontrado){\n\t\t\t\n\t\t\tthis.observers.add(t);\n\t\t}\n\t}", "public void addObserver(BeverageControllerObserver observer);", "public void addObserver(Observer o) {\r\n\t\tif(observers == null) observers = new HashSet<>();\r\n\t\tobservers.add(o);\r\n\t}", "@Override\r\n\tpublic void registerObserver(Observer observer) {\n\t\t\r\n\t}", "public void register(Observer newObserver) {\n observers.add(newObserver);\r\n\r\n }", "public synchronized void addObserver(Observer obs) {\n if (isMutable()) {\n Observer[] observers = observersTable.get(this);\n\n if (observers == null) {\n observers = new Observer[0];\n }\n\n observers = DynamicArray.append(observers, obs);\n observersTable.put(this, observers);\n }\n }", "public void addInsertionObserver(InsertionObserver observer){\n insertionObservers.add(observer);\n }", "public synchronized void inviteCollaborator(User collaborator) {\n this.collaborators.add(collaborator);\n Path collaboratorsPath = uri.getPath().resolve(\"collaborators.txt\");\n Iterable<String> collaborators = this.collaborators.stream().map(c -> c.getName()).collect(Collectors.toList());\n try {\n Files.writeString(collaboratorsPath, String.join(\"\\r\\n\", collaborators), StandardCharsets.UTF_8);\n } catch (IOException e) {\n e.printStackTrace();\n }\n collaborator.queueInvite(new Invite(this, collaborator));\n }", "public void addObserver(TotalRevenueView viewer) {\n cashRegister.setObserver(viewer);\n }", "public void addObserver(GameObserver<S, A> o) {\n observers.add(o);\n }", "public void registerObserver(Observer o) {\n observers.add(o);\n }", "protected abstract void registerObserver();", "void enableObserver() {\n dataSourcesPanel.addObserver(this);\n }", "public void addObserver(IObserver ob) {\n this.DecoratedSortAlgo.addObserver(ob);\r\n }", "public synchronized void addCommunicator(TrackerServerCommunicator comm) {\n\t\tcomms.add(comm);\n\t}", "public void addObserver(BiObserver<T, V> b){\n biObserverList.add(b);\n }", "public void addObserver(GameObserver gameObserver){\n this.observers.add(gameObserver);\n }", "public void notifyObservers() {}", "public void register(Observer or);", "public void addChatListObserver(@NonNull LifecycleOwner theOwner,\n @NonNull Observer<? super List<ChatRoom>> theObserver) {\n mChatList.observe(theOwner, theObserver);\n }", "public void addObserver(ProcessObserver wpo){\r\n\t\tobservers.add(wpo);\r\n\t}", "public void registerObserver(ModelObserver mo){\n\t\tcontrollers.add(mo);\n\t}", "void setAddListener(AddNeededCollaborationListener addNeededCollaborationListener);", "static void NotifyCorrespondingObservers() {}", "public void notifyObservers();", "public void notifyObservers();", "public void notifyObservers();", "@Override\n public void notifyObserver() {\n for(Observer o:list){\n o.update(w);\n }\n }", "public void addRemovalObserver(RemovalObserver observer){\n removalObservers.add(observer);\n }", "public void addObserversToImageFiles(Observer observer) {\n for (ImageFile imageFile : allImagesUnderDirectory) {\n imageFile.addObserver(observer);\n }\n }", "public void registerObserver(DriverObserver driver);", "public void registerObserver(Observer newObserver) {\r\n\t\tobservers.add(newObserver);\r\n\t}", "public void notifyObservers(){\r\n\t\tif (this.lastNews != null)\r\n\t\t\tfor (Observer ob: observers){\r\n\t\t\t\tob.updateFromLobby(lastNews);\r\n\t\t\t}\r\n\t}", "public void notificarTodos(){\n for (Observer observer : list) {\n observer.notificar();\n }\n }", "void notifyObservers();", "void notifyObservers();", "public Ice.AsyncResult begin_addObserver(ServiceObserverPrx observer, Ice.Callback __cb);", "void registerObserver(AchieveImageController controller);", "public void addObservateur(Observateur o) {\r\n\t\tthis.listeObservateur.add(o);\t\t\r\n\t}", "public void notifyObservers() {\r\n\t\tDoctorEvent evt;\r\n\t\tif (loggedIn) {\r\n\t\t\tevt = new DoctorEvent(DoctorEventType.LOGIN, doctor);\r\n\t\t} else {\r\n\t\t\tevt = new DoctorEvent(DoctorEventType.LOGOUT, doctor);\r\n\t\t}\r\n\t\tfor (Iterator<IObserver> it = observers.iterator(); it.hasNext();) {\r\n\t\t\tIObserver observer = (IObserver) it.next();\r\n\t\t\tobserver.onNotify(evt);\r\n\t\t}\r\n\t}", "public void newAddObserver(Observer o) {\n\t\t\tthis.addNotifier.addObserver(o);\n\t\t}", "public ArrayList<Observer> getObservers() { \n\t\treturn ui; \n\t}", "public void registerInterest(IObserver IObserver) {\n observers.add(IObserver);\n }", "public void notifyObservers(String info){\r\n\t\tfor (Observer ob: observers){\r\n\t\t\tob.updateFromLobby(info);\r\n\t\t}\r\n\t}", "public void registerObs(Node obs){\r\n this.listeners.add(obs);\r\n }", "@Override\r\n\tpublic void notifyObservers() {\n\t for(Observer o : observers){\r\n\t\t o.update();\r\n\t }\r\n\t}", "@Override\n\tpublic void notifyObserver() {\n\t\tEnumeration<ObserverListener> enumd = vector.elements();\n\t\twhile (enumd.hasMoreElements()) {\n\t\t\tObserverListener observerListener = enumd\n\t\t\t\t\t.nextElement();\n\t\t\tobserverListener.observer();\n\t\t\tobserverListener.obsupdata();\n\t\t}\n\t}", "public void addSaleObserver(SaleObserver obs){\n saleObservers.add(obs);\n }", "public void notifyObservers() {\r\n for (Observer observer: this.observers) {\r\n observer.update(this);\r\n }\r\n\r\n// System.out.println(this);\r\n }", "private void registrarListeners() {\n ventanaAgregarOperador.agregarListenerBotonGuardarNuevoOperador(new VentanaAgregarOperadorBotonGuardarAL());\n ventanaEditarOperador.agregarListenerBotonGuardarDatosModificados(new VentanaEditarOperadorBotonGuardarAL());\n\n }", "void addPlayerObserver(PlayerObserver observer);", "public void register(Observer obj);" ]
[ "0.7194319", "0.7190825", "0.702595", "0.7005354", "0.69775015", "0.6912637", "0.6862041", "0.68178105", "0.67973536", "0.67669815", "0.67669815", "0.66566485", "0.6650092", "0.6637183", "0.658521", "0.65652674", "0.65619093", "0.65510315", "0.6548787", "0.6536158", "0.6535502", "0.65152544", "0.65069395", "0.6485682", "0.64698744", "0.64642376", "0.64316016", "0.6429987", "0.6427402", "0.642479", "0.6421988", "0.6418322", "0.6411626", "0.63938", "0.6361999", "0.6357039", "0.63298565", "0.63259774", "0.6323615", "0.6314281", "0.6295268", "0.6258613", "0.6221297", "0.6220454", "0.6215117", "0.6177393", "0.61772704", "0.6164281", "0.6149313", "0.6125786", "0.60577905", "0.60536927", "0.60520154", "0.6049736", "0.6049731", "0.60434294", "0.60390544", "0.60034746", "0.60000676", "0.59935987", "0.5971036", "0.59543484", "0.59498477", "0.59492254", "0.5938543", "0.59381914", "0.5921864", "0.59194076", "0.59105146", "0.5895691", "0.5887683", "0.58820814", "0.5868301", "0.5865165", "0.5865165", "0.5865165", "0.58572775", "0.58505434", "0.584729", "0.584079", "0.5828574", "0.58099586", "0.58037007", "0.57993937", "0.57993937", "0.57905567", "0.57826215", "0.578049", "0.5775123", "0.575671", "0.57561594", "0.57256514", "0.57252395", "0.5713783", "0.5707163", "0.57038313", "0.5696644", "0.56862766", "0.56723094", "0.5670133", "0.56679463" ]
0.0
-1
Detach an observer from the list of collaborators
public void detach(Observer o);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void detachObserver(jObserver observer);", "@Override\n void detach(Observer observer) {\n observers.remove(observer);\n }", "public void removerObservador (Observer observer){\n list.remove(observer);\n }", "public void detach(Observer observer) {\n\t\tsubscribers.remove(observer);\n\t}", "@Override\n\tpublic void detach(Observer observer) {\n\t\tobs.remove(observer);\n\t}", "public void removeObserver(Observer observer);", "public void detachAllObservers();", "@Override\n\tpublic void delObserver(ObserverListener ob) {\n\t\tvector.remove(ob);\n\t}", "public void deleteIObservers( )\n {\n observers.removeAllElements();\n }", "@Override\n public void removeObserver(Observer o) {\n list.remove(o);\n }", "void removeObserver(EntityObserver observer);", "public void removeObserver(DriverObserver driver);", "@Override\r\n\tpublic void removeObservers(Observer o) {\n\t\tint index = observers.indexOf(o);\r\n\t\tif(index >= 0)\r\n\t\t\tobservers.remove(index);\r\n\t}", "@Override\n\tpublic void removeObserver(Observer obs) {\n\t\tthis.observers.remove(obs);\t\n\t}", "public void deleteInstanceChangedObservers();", "void removePropertyChangedObserver(PropertyChangeObserver observer);", "public void removeObservateur() {\r\n\t\tlisteObservateur = new ArrayList<Observateur>();\t\t\r\n\t}", "public void removeObserver(Observer ob){\r\n\t\tobservers.remove(ob);\r\n\t}", "@Override\n public synchronized void deleteObserver(Observer observer) {\n observers.remove(observer);\n }", "public void removeObserver(ElevatorObserver observer) {\n\t\tobservers.remove(observer);\n\t}", "boolean removeObserver(Observer observer);", "public void removeObserver(BeverageControllerObserver observer);", "public void unregister(Observer deleteObserver) {\n\r\n int observerIndex = observers.indexOf(deleteObserver);\r\n\r\n // Print out message (Have to increment index to match)\r\n\r\n System.out.println(\"Observer \" + (observerIndex + 1) + \" deleted\");\r\n\r\n // Removes observer from the ArrayList\r\n\r\n observers.remove(observerIndex);\r\n\r\n }", "@Override\r\n\tpublic void removeObserver(Observer o) {\n\t\tobservers.remove(o);\r\n\t}", "public synchronized void deleteBaseObservers() {\n obs.removeAllElements();\n }", "@Override\n\tpublic void removeObserver(Sensor observer) {\n\n\t}", "@Override\n\tpublic void delObservateur() {\n\t\tthis.listObservateur = new ArrayList<Observateur>();\n\t}", "protected void unregisterObserver(Observer.GraphAttributeChanges observer) {\n observers.remove(observer);\n }", "@Override\r\n\tpublic void delete(Observer observer) {\n\t\tvector.remove(observer);\r\n\t}", "public void removeObserver(Observer observer) {\r\n this.observers.remove(observer);\r\n }", "public void detach(ObserverGenerator<GeneratorAsync> observerGenerator) {\n this.observerGeneratorChannel = null;\n }", "public void removeObserver(T t){\n\t\t\n\t\tIterator<T> it = observers.iterator();\n\t\tboolean encontrado = false;\n\t\tT valor = null;\n\t\t\n\t\t\n\t\twhile(it.hasNext() && !encontrado){\n\t\t\t\t\n\t\t\tvalor = it.next();\t\n\t\t\tencontrado = (valor.equals(t));\n\t\t}\n\t\t\n\t\t\n\t\tif(!encontrado){\n\t\t\t\n\t\t\tthis.observers.remove(t);\n\t\t}\n\t\t\n\t}", "@Override\n public void unpin(IObserver observer) {\n listeners.remove(observer);\n }", "protected abstract void unregisterObserver();", "@Override\r\n\tpublic void remove(Observer o) {\n\t\tif(observerList.contains(o)){\r\n\t\t\tobserverList.remove(o);\r\n\t\t}\r\n\t}", "public void removeObserver(Observer observer) { \n\t\tui.remove(observer); \n\n\t}", "public void deleteIObserver( IObserver iobs )\n {\n observers.removeElement( iobs );\n }", "@Override\r\n\tpublic void removeObserver(BpmObserver o) {\n\r\n\t}", "public static void detach(VerifierFactoryObserver o) {\n observers.removeElement(o);\n }", "public synchronized void removeObserver(Observer obs) {\n Observer[] observers = observersTable.get(this);\n if (observers == null) {\n return;\n }\n\n observers = DynamicArray.remove(observers, obs);\n if (observers == null) {\n observersTable.remove(this);\n } else {\n observersTable.put(this, observers);\n }\n }", "@Override\n\tpublic void removeObserver(Observer observer) {\n\t\t// TODO Auto-generated method stub\n\t\tsuper.removeObserver(observer);\n\t}", "public void unregister(BTCommObserver observer) {\n\t\tthis.observers.removeElement(observer);\n\t}", "protected void detachListeners() {\n\t\t\n\t}", "public void clearObservers(){\r\n\t\tobservers.clear();\r\n\t}", "public void unregisterListeners(){\n listeners.clear();\n }", "public void removeObserver(Observer o) {\n int i = observers.indexOf(o);\n if (i >= 0) {\n observers.remove(i);\n }\n }", "public void unregister(Observer deleteObserver) {\n int observerIndex = observers.indexOf(deleteObserver);\n // Print out message (Have to increment index to match)\n System.out.println(\"Observer \" + (observerIndex+1) + \" deleted\");\n // Removes observer from the ArrayList\n observers.remove(observerIndex);\n\t}", "public synchronized void removeCommunicator(TrackerServerCommunicator comm) {\n\t\tcomms.remove(comm);\n\t}", "public void stopObserving() {\n if (myModel.contains(modelObserver)) {\n myModel.deleteObserver(modelObserver);\n }\n }", "boolean removeObserver(MultiWindowModeObserver observer);", "public void clearObservers() {\r\n\t\tobservers.clear();\r\n\t}", "public void clearChangeListeners() {\n observer.clear();\n }", "@Override\n public void removeNotify()\n {\n unregisterListeners();\n super.removeNotify();\n }", "@Override\r\n\tpublic void removeObserver(BeatObserver o) {\n\r\n\t}", "public void unregister(Observer obj);", "public void removeObserver(Node node){\n \tobserverNodes.remove(node);\n\t}", "public static void removeAllObservers() {\n compositeDisposable.clear();\n observersList.clear();\n Timber.i(\"This is the enter point: All live assets and team feed auto refresh DOs are removed\");\n }", "@Override\r\n\tprotected void detachListeners() {\n\t\t\r\n\t}", "public void addRemovalObserver(RemovalObserver observer){\n removalObservers.add(observer);\n }", "protected void removeListeners() {\n }", "void unregisterListeners();", "public void detachObserver(AssemblyLineStateObserver observer);", "public void deleteRemoveObserver(Observer o) {\n\t\t\tthis.removeNotifier.deleteObserver(o);\n\t\t}", "public void disconnectListeners(){\n for(int i=0; i<3; i++){\n for(int j=0; j<3; j++){\n grid[i][j].removeActionListener(this);\n }\n }\n }", "public void unsubscribe(Player spectator) {\r\n\t\tspectators.remove(spectator);\r\n\t}", "@Override\n public synchronized void removeTileObserver(final TileObserver observer) {\n observers = removeTileObserver(observers, observer);\n }", "void detach (ObservateurGenerateurAsync observateur);", "public void removeTimeObserver(TimeObserver observer);", "protected final void removeCollectableComponentModelListeners() {\n\t\tfor (CollectableComponentModel clctcompmodel : this.getCollectableComponentModels()) {\n\t\t\tclctcompmodel.removeCollectableComponentModelListener(this.getCollectableComponentModelListener());\n\t\t}\n\t}", "@Override\n public void onDetach() {\n super.onDetach();\n listener = null;\n }", "@Override\n public void onDetach() {\n super.onDetach();\n listener = null;\n }", "@Override\n public void onDetach() {\n super.onDetach();\n listener = null;\n }", "public void removeAllObjectChangeListeners()\n\t{\n\t\tlistenerList = null;\n\t}", "public void removeAllObjectChangeListeners()\n\t{\n\t\tlistenerList = null;\n\t}", "@Override\n public void onDetach() {\n super.onDetach();\n mListener = null;\n }", "public void unregister(BTCommObserver observer, BTEvent event) {\n\t\tthis.observers.removeElement(event, observer);\n\t}", "@Override\n\tpublic void removeGoalObserver(ObserverGoal o) {\n\t\t// TODO Auto-generated method stub\n\t\tobservers.remove(o);\n\t}", "public abstract void unregisterListeners();", "static <T> void unregisterObserver(@NonNull Observer<T> cb) {\n if (Thread.currentThread() != Looper.getMainLooper().getThread()) {\n throw new IllegalStateException(\"Must be called on UI thread.\");\n }\n for (Iterator<CallbackSubscriptionTuple> i=callbacks().iterator(); i.hasNext(); ) {\n CallbackSubscriptionTuple cbSub = i.next();\n if (cbSub.cb.equals(cb)) {\n cbSub.sub.unsubscribe();\n i.remove();\n return;\n }\n }\n }", "public void removeListeners() {\n if ( listeners != null ) {\n listeners.clear();\n }\n }", "public static void clean() {\n keptObservers.put(new Object(), new ArrayList<Runnable>());\n }", "void unregisterObserver(BallStateObserver observer);", "private void unregisterObserver(Intent intent) {\n C2DMObserver observer = C2DMObserver.createFromIntent(intent);\n if (observers.remove(observer)) {\n C2DMSettings.setObservers(context, observers);\n onUnregisteredSingleObserver(observer);\n }\n if (observers.isEmpty()) {\n // No more observers, need to unregister\n if (!isUnregisteringInProcess()) {\n unregister();\n }\n }\n }", "@Override\r\n\tpublic void removeListener(INotifyChangedListener notifyChangedListener) {\r\n\t\tchangeNotifier.removeListener(notifyChangedListener);\r\n\t}", "public void detachListener()\n {\n m_localInstance.detachListener();\n }", "@Override\n\tpublic void removeListener(INotifyChangedListener notifyChangedListener) {\n\t\tchangeNotifier.removeListener(notifyChangedListener);\n\t}", "@Override\n\tpublic void removeListener(INotifyChangedListener notifyChangedListener) {\n\t\tchangeNotifier.removeListener(notifyChangedListener);\n\t}", "public void unregisterObserver(Observer oldObserver) {\r\n\t\tint indexToRemove = observers.indexOf(oldObserver);\r\n\t\tobservers.remove(indexToRemove);\r\n\t}", "private void unregisterReceivers() {\n LocalBroadcastManager.getInstance(getActivity()).unregisterReceiver(userUpdater);\n postChangeController.unregisterReceivers(getActivity());\n }", "void unregister() {\n for (Component comp : jTabbedPane1.getComponents()) {\n if (comp instanceof MiniTimelinePanel) {\n DiscoveryEventUtils.getDiscoveryEventBus().unregister(comp);\n }\n }\n }", "public synchronized void deleteBaseObserver(BaseObserver<M, T> o) {\n obs.removeElement(o);\n }", "public void removeInteractionsListener(InteractionsListener l) {\n _listeners.remove(l);\n }", "protected void uninstallListeners() {\n frame.removePropertyChangeListener(propertyChangeListener);\n }", "private void removeListeners() {\n \t\tlistenToTextChanges(false);\n \t\tfHistory.removeOperationHistoryListener(fHistoryListener);\n \t\tfHistoryListener= null;\n \t}", "public void removeItemListerners() {\r\n\t\titemListeners.clear();\r\n\t}", "protected void remove() {\n injectors.remove();\n }", "public void removeAllListeners() {\r\n\t\tgetListeners().removeAllListeners();\r\n\t}", "public void deleteAddObserver(Observer o) {\n\t\t\tthis.addNotifier.deleteObserver(o);\n\t\t}", "protected void uninstallListeners() {\n }", "protected void uninstallListeners() {\n }" ]
[ "0.7529461", "0.7329054", "0.7214712", "0.71763", "0.7175529", "0.70885164", "0.69310915", "0.690598", "0.68717563", "0.6772551", "0.6715006", "0.67050165", "0.6685041", "0.6645653", "0.65513265", "0.65363294", "0.6530866", "0.6489185", "0.6476927", "0.6469239", "0.646693", "0.6463943", "0.645409", "0.6437005", "0.6433614", "0.6424066", "0.6397786", "0.6384643", "0.6379791", "0.63637507", "0.63527936", "0.632857", "0.63271606", "0.632268", "0.6315474", "0.63108826", "0.62849116", "0.6267747", "0.6267707", "0.6236548", "0.6214666", "0.62016594", "0.6198116", "0.614444", "0.61406684", "0.61299413", "0.60960746", "0.6087946", "0.6080143", "0.604211", "0.60311854", "0.6021007", "0.6006988", "0.60053736", "0.5997218", "0.5984802", "0.5960251", "0.5950714", "0.5929351", "0.59142876", "0.5911665", "0.5891475", "0.585615", "0.5836453", "0.5831426", "0.58130616", "0.581187", "0.5807662", "0.57945746", "0.5780282", "0.5780282", "0.5780282", "0.5768878", "0.5768878", "0.575471", "0.57487154", "0.57288593", "0.5722788", "0.5718862", "0.57019275", "0.56894374", "0.56830484", "0.5674142", "0.56709063", "0.56613183", "0.5652711", "0.5652711", "0.56519645", "0.56456673", "0.56343365", "0.5616064", "0.55737185", "0.55613196", "0.5548783", "0.5545611", "0.5537321", "0.55287844", "0.5520873", "0.55195135", "0.55195135" ]
0.69691944
6
Notify all observers of changes
public void notifyObservers();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void notifyObservers() {\n\t\tfor (Observer o : this.observers) {\r\n\t\t\to.update();\r\n\t\t}\r\n\t}", "@Override\n\tpublic void notifyObservers() {\n\t\tfor (Observer obs : this.observers)\n\t\t{\n\t\t\tobs.update();\n\t\t}\n\t}", "@Override\n void notifys() {\n for (Observer o : observers) {\n o.update();\n }\n }", "private void notifyObservers() {\n\t\tIterator<Observer> i = observers.iterator();\r\n\t\twhile( i.hasNext() ) {\r\n\t\t\tObserver o = ( Observer ) i.next();\r\n\t\t\to.update( this );\r\n\t\t}\r\n\t}", "@Override\n public void notifyObservers() {\n for (Observer observer : observers){\n // observers will pull the data from the observer when notified\n observer.update(this, null);\n }\n }", "@Override\n\tpublic void notifys() {\n\t\tfor(Observer observer : observers) {\n\t\t\tobserver.update(this);\n\t\t}\n\t}", "@Override\r\n\tpublic void notifyObservers() {\n\t for(Observer o : observers){\r\n\t\t o.update();\r\n\t }\r\n\t}", "public void notifyObservers() {\n for (int i = 0; i < observers.size(); i++) {\n Observer observer = (Observer)observers.get(i);\n observer.update(this.durum);\n }\n }", "@Override\r\n\tpublic void notifyObservers() {\n\t\tfor(Observer o : list) {\r\n\t\t\t// Atualiza a informacao no observador\r\n\t\t\to.update(this, this);\r\n\t\t}\r\n\t}", "@Override\n\tpublic void Notify() {\n\t\tfor (Observer observer : obs) {\n\t\t\tobserver.update();\n\t\t}\n\t}", "public void notifyObservers() {\r\n for (Observer observer: this.observers) {\r\n observer.update(this);\r\n }\r\n\r\n// System.out.println(this);\r\n }", "public void notifyObservers() {}", "public void notifyAllObservers() {\n\t\tfor(Observer observer : observers) {\n\t\t\tobserver.update();\n\t\t}\n\t}", "void notifyObservers();", "void notifyObservers();", "@Override\r\n\tpublic void notifyObservers() {\n\t\t\r\n\t}", "public void notifyObservers(){\n\t\tfor (ModelObserver c : controllers){\n\t\t\tc.update();\n\t\t}\n\t}", "@Override\r\n\tpublic void notifyObservers(){\r\n\t\tfor(IObserver obs : observers){\r\n\t\t\tobs.update(this, selectedEntity);\r\n\t\t}\r\n\t\tselectedEntity = null;\r\n\t}", "public void notifyObserver() {\n\r\n for (Observer observer : observers) {\r\n\r\n observer.update(stockName, price);\r\n\r\n }\r\n }", "static void NotifyCorrespondingObservers() {}", "@Override\n public void notifyObserver() {\n for(Observer o:list){\n o.update(w);\n }\n }", "private void notifyObservors() {\n this.obervors.forEach(Obervor::modelChanged);\n }", "private void notifyObservers() {\n\t\tfor (Observer observer : subscribers) {\n\t\t\tobserver.update(theInterestingValue); // we can send whole object, or just value of interest\n\t\t\t// using a pull variant, the update method will ask for the information from the observer\n\t\t\t// observer.update(this)\n\t\t}\n\t}", "@Override\r\n\tpublic void notifyObservers() {\n\t\tEnumeration<Observer> enumo = vector.elements();\r\n\t\twhile(enumo.hasMoreElements()){\r\n\t\t\tenumo.nextElement().update();\r\n\t\t}\r\n\t}", "private void notifyListeners() {\n\t\tfor(ModelListener l:listeners) {\n\t\t\tl.update();\t// Tell the listener that something changed\n\t\t}\n\t}", "public void notifyChange()\r\n {\r\n setChanged();\r\n notifyObservers();\r\n }", "protected void notifyObservers() {\n os.notify(this, null);\n }", "public void notifyAllObservers(){\n\t\tthis.notifyAllObservers(null);\n\t}", "public void notifyObservers(){\n for (GameObserver g: observers){\n g.handleUpdate(new GameEvent(this,\n currentPlayer,\n genericWorldMap,\n gameState,\n currentTerritoriesOfInterest,\n currentMessage));\n }\n }", "@Override\n\tpublic void notifyObserver() {\n\t\tEnumeration<ObserverListener> enumd = vector.elements();\n\t\twhile (enumd.hasMoreElements()) {\n\t\t\tObserverListener observerListener = enumd\n\t\t\t\t\t.nextElement();\n\t\t\tobserverListener.observer();\n\t\t\tobserverListener.obsupdata();\n\t\t}\n\t}", "public void notifyObservers(Object... args)\n {\n for (IObserver observer : observers)\n {\n observer.update(this, args);\n }\n }", "private void notifyObservers() {\n BinStatusUpdate newStatus = buildNewStatus();\n observers.iterator().forEachRemaining(binStatusUpdateStreamObserver -> binStatusUpdateStreamObserver.onNext(newStatus));\n }", "private void notifyidiots() {\n\t\tfor(Observ g:obslist) {\n\t\t\tg.update();\n\t\t}\n\t}", "protected void notifyChangeListeners() { \n Utilities.invokeLater(new Runnable() {\n public void run() { for(ChangeListener l: _changeListeners) l.apply(this); }\n });\n }", "public void atacar() {\n notifyObservers();\n }", "public void notifyStudentsObservers() {\n \t\tfor (IStudentsObserver so : studentsObservers) {\n \t\t\tso.updateStudents();\n \t\t}\n \t}", "private void notifyUpdated() {\n if (mChanged) {\n mChanged = false;\n mObserver.onChanged(this);\n }\n }", "void notifyObserver();", "public void notifyObservers(){\r\n\t\tif (this.lastNews != null)\r\n\t\t\tfor (Observer ob: observers){\r\n\t\t\t\tob.updateFromLobby(lastNews);\r\n\t\t\t}\r\n\t}", "public void notifyObservers()\n\t{\n\t\tsetChanged();\n\t\tnotifyObservers(new GameWorldProxy(this));\n\t}", "public void notifyObservers() {\n\t\tfor(ElevatorObserver obs: observers) {\n\t\t\tobs.elevatorDidFinishTask(this);\n\t\t}\n\t}", "@Override\n\tpublic void notifyAllObservers() {\n\t\tmyTurtle.notifyObservers();\n\t}", "@Override\n public void notifyUnitObservers() {\n for(UnitObserver unitObserver : unitObservers){\n unitObserver.update(entities.returnUnitRenderInformation());\n entities.setUnitObserver(unitObserver);\n }\n }", "public void notifyListeners() {\n Logger logger = LogX;\n logger.d(\"notifyListeners: \" + this.mListeners.size(), false);\n List<IWalletCardBaseInfo> tmpCardInfo = getCardInfo();\n Iterator<OnDataReadyListener> it = this.mListeners.iterator();\n while (it.hasNext()) {\n it.next().refreshData(tmpCardInfo);\n }\n }", "@Override\r\n\tpublic void operations() {\n\t\tSystem.out.println(\"update self!\"); \r\n notifyObservers(); \r\n\r\n\t}", "public void detachAllObservers();", "public void notifyState() {\n\t\tList<T> alldata = new ArrayList<T>(this.dataMap.values());\t\r\n\t\t// call them with the current data\r\n\t\t// for each observer call them\r\n\t\tfor( ModelEvents<T> observer : this.ObserverList){\r\n\t\t\tobserver.dataState(alldata);\r\n\t\t}\r\n\r\n\t}", "public void notifyObservers() {\r\n\t\tDoctorEvent evt;\r\n\t\tif (loggedIn) {\r\n\t\t\tevt = new DoctorEvent(DoctorEventType.LOGIN, doctor);\r\n\t\t} else {\r\n\t\t\tevt = new DoctorEvent(DoctorEventType.LOGOUT, doctor);\r\n\t\t}\r\n\t\tfor (Iterator<IObserver> it = observers.iterator(); it.hasNext();) {\r\n\t\t\tIObserver observer = (IObserver) it.next();\r\n\t\t\tobserver.onNotify(evt);\r\n\t\t}\r\n\t}", "protected void notifyObservers()\n\t{\n\t Trace.println(Trace.EXEC_PLUS);\n\n\t for (TestGroupResultObserver observer : myObserverCollection)\n\t {\n\t \tobserver.notify(this);\n\t }\n\t}", "public void notifyBaseObservers() {\n notifyBaseObservers(null);\n }", "@Override\n\tpublic void NotifyObserver() {\n\n\t}", "protected void notifyModificationListeners() {\r\n\t\tfor (ElementModificationListener l : modificationListeners) {\r\n\t\t\tl.elementModified(current);\r\n\t\t}\r\n\t}", "public void notifyChangementJoueurs();", "void notifyAllAboutChange();", "public void updateObserver();", "private void notifyListeners() \n\t{\n\t\tSystem.out.println(\"Event Source: Notifying all listeners\");\n\n\t\tfor(IListener listener : listeners)\n\t\t{\n\t\t\tlistener.eventOccured(new Event(this));//passing and object of source\n\t\t}\n\n\t}", "private void notifyObservers(GameEvent<S, A> e) {\n \tfor (GameObserver<S, A> o : observers){\n\t\t\to.notifyEvent(e);\n\t\t}\n\t}", "private void observerStuff() {\r\n\t\tfor (PirateShip pirate : pirates) {\r\n\t\t\tship.registerObserver(pirate);\r\n\t\t}\r\n\t}", "protected final void notifyInvalidated() {\n if (!myNotificationsEnabled) {\n return;\n }\n\n for (InvalidationListener listener : myListeners) {\n listener.onInvalidated(this);\n }\n\n for (InvalidationListener listener : myWeakListeners) {\n listener.onInvalidated(this);\n }\n }", "private void notifyEventListListeners() {\n this.eventListListeners.forEach(listener -> listener.onEventListChange(this.getEventList()));\n }", "void\n notifyChange() {\n this.notifyChange = true;\n synchronized (this.changeMonitor) {\n this.changeMonitor.notifyAll();\n }\n }", "public void setObservers() {\n feedBackVM.isLoading.addOnPropertyChangedCallback(new Observable.OnPropertyChangedCallback() {\n @Override\n public void onPropertyChanged(Observable observable, int i) {\n if (feedBackVM.isLoading.get()) {\n showWaitingDialog(true);\n } else {\n showWaitingDialog(false);\n }\n }\n });\n\n feedBackVM.toastMsg.addOnPropertyChangedCallback(new Observable.OnPropertyChangedCallback() {\n @Override\n public void onPropertyChanged(Observable observable, int i) {\n toast(feedBackVM.toastMsg.get());\n feedBackVM.toastMsg.set(null);\n }\n });\n }", "private void reafficher() {\n\t\tthis.setChanged();\n\t\tthis.notifyObservers();\n\t}", "@Override\n public void notifyObservers(String errorMessage) {\n for (Observer observer : observers){\n // push the error message to all the observers\n observer.update(this, errorMessage);\n }\n }", "private void notifyListeners() {\n IDisplayPaneContainer container = (IDisplayPaneContainer) activeEditorMap\n .get(currentWindow);\n for (IVizEditorChangedListener listener : changeListeners) {\n listener.editorChanged(container);\n }\n }", "public void notifyObservers(String info){\r\n\t\tfor (Observer ob: observers){\r\n\t\t\tob.updateFromLobby(info);\r\n\t\t}\r\n\t}", "public void notifyChangementCroyants();", "public void notifyObservers(int UPDATE_VALUE){\n\t\tfor(int i = 0; i < observerNodes.size();i++){\n\t\t\tNode currentNode = observerNodes.get(i);\n\t\t\tif(currentNode.filterType.filter(UPDATE_VALUE)) {\n\t\t\t\t\tcurrentNode.listen(UPDATE_VALUE);\n\t\t }\n\t\t}\n\t}", "public void notifyAllObservers(Object object){\n\t\tsynchronized (this) {\n\t\t\tif(!this.isChanged){return;}//if nothing changed\n\t\t\tif(this.observers.isEmpty()){\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tfor (Observer ob : this.observers) {\n\t\t\t\tob.update(this, object);\n\t\t\t}\n\t\t\tthis.clearChange();\n\t\t}\n\t}", "private void setObservers() {\n evaluateDetailVM.isLoading.addOnPropertyChangedCallback(new Observable.OnPropertyChangedCallback() {\n @Override\n public void onPropertyChanged(Observable observable, int i) {\n if (evaluateDetailVM.isLoading.get()) {\n showWaitingDialog(true);\n } else {\n showWaitingDialog(false);\n }\n }\n });\n\n evaluateDetailVM.toastMsg.addOnPropertyChangedCallback(new Observable.OnPropertyChangedCallback() {\n @Override\n public void onPropertyChanged(Observable observable, int i) {\n toast(evaluateDetailVM.toastMsg.get());\n evaluateDetailVM.toastMsg.set(null);\n }\n });\n }", "public void clearChangeListeners() {\n observer.clear();\n }", "public void notifyListeners() {\n Handler handler = new Handler(Looper.getMainLooper()); // TODO reuse\n // handler\n Runnable runnable = new Runnable() {\n\n @Override\n public void run() {\n synchronized (listeners) {\n for (IContentRequester requester : listeners) {\n requester.contentChanged(Content.this);\n }\n }\n }\n };\n boolean success = handler.post(runnable);\n if (success) {\n // Log.d(TAG,\n // \"Posted notification for all listeners from \"+this.toString()+\" to \"+listeners.size()+\" listeners.\");\n Log.d(TAG, \"Posted notification for all listeners from content id \"\n + id + \" to \" + listeners.size() + \" listeners.\");\n } else {\n Log.e(TAG, \"Failed to post notification for all listeners\");\n }\n }", "public void notifySelectedCourseObservers() {\n \t\tfor (ISelectedCourseObserver so : selectedCourseObservers) {\n \t\t\tso.updateSelectedCourse();\n \t\t}\n \t}", "public void notifyUpdate() {\n if (mObserver != null) {\n synchronized (mObserver) {\n mNotified = true;\n mObserver.notify();\n }\n }\n }", "void firePropertyChange() {\n java.util.Vector targets;\n synchronized (this) {\n if (listeners == null) {\n return;\n }\n targets = (java.util.Vector) listeners.clone();\n }\n\n PropertyChangeEvent evt = new PropertyChangeEvent(this, null, null, null);\n\n for (int i = 0; i < targets.size(); i++) {\n PropertyChangeListener target = (PropertyChangeListener)targets.elementAt(i);\n target.propertyChange(evt);\n }\n }", "private static void fireMazeChanged() {\r\n\t\tfor (ATEListener l : listeners) {\r\n\t\t\tl.mazeChanged(currentMaze);\r\n\t\t}\r\n\t}", "private void modelListenersNotify()\n {\n modelArray = this.toArray(new Object[this.size()]);\n notifyTableModelChange();\n notifyComboBoxModelChange(0, this.size()-1);\n }", "void addPropertyChangedObserver(PropertyChangeObserver observer);", "protected final void notifyContentChanged() {\n // notify all listeners (including parents)\n for (DialogModuleChangeListener listener : listeners) {\n listener.onContentChanged();\n }\n }", "public void notifyChange() {\n synchronized (this) {\n if (mCallbacks == null) {\n return;\n }\n }\n mCallbacks.notifyCallbacks(this, 0, null);\n }", "protected void updateAll() {\n for (String key : listenerMap.keySet()) {\n updateValueForKey(key, true);\n }\n }", "@Override\n public void notifyStructureObservers() {\n for(StructureObserver structureObserver : structureObservers){\n structureObserver.update(entities.returnStructureRenderInformation());\n }\n }", "private synchronized void notifyCompleted() {\n // since there will be no more observer messages after this, there\n // is no need to keep any observers registered after we finish here\n // so get the observers one last time, and at the same time\n // remove them from the table\n Observer[] observers = observersTable.remove(this);\n if (observers != null) {\n for (Observer observer : observers) {\n observer.completed(this);\n }\n observersTable.remove(this);\n }\n\n }", "public void notifyChange(Object obj) {\n\t\t\ttry\n\t\t\t{\n\t\t\t\tsetChanged();\n\t\t\t\tnotifyObservers(obj);\n\t\t\t}\n\t\t\tcatch(Exception e)\n\t\t\t{\n\t\t\t}\n\t\t\t\n\t\t}", "public void doNotify(){\n\t\tsynchronized(m){\n\t\t\tm.notifyAll();\n\t\t}\n\t}", "public static void fire() {\n\t\tILocalizationListener[] array = listeners.toArray(new ILocalizationListener[listeners.size()]);\n\t\tfor(ILocalizationListener l : array) {\n\t\t\tl.localizationChanged();\n\t\t}\n\t}", "protected void fireChange() {\n\t\tActionListener[] actionListenerArray = actionListeners.toArray(new ActionListener[0]);\n\t\tfor (int i = 0; i < actionListenerArray.length; i++) {\n\t\t\tActionListener listener = actionListenerArray[i];\n\t\t\tlistener.onActionChanged(this);\n\t\t}\n\t}", "private synchronized void notifyUpdatedProperty(String key, String value) {\n Observer[] observers = observersTable.get(this);\n if (observers != null) {\n for (Observer observer : observers) {\n observer.updatedProperty(this, key, value);\n }\n }\n }", "private void notificarSensores() {\n\t\tmvmSensorsObservers.forEach(sensorObserver -> sensorObserver.update());\n\t}", "@Override\r\n\tpublic void update() {\n\t\tSystem.out.println(\"Observer1 has received update!\");\r\n\t}", "protected void notifyAllObserversForClose() {\n\t\tArrayList<BTEvent> keys = this.observers.keys();\n\t\tfor (BTEvent event : keys) {\n\t\t\tArrayList<BTCommObserver> currentObservers = this.observers\n\t\t\t\t\t.get(event);\n\t\t\tif (currentObservers != null) {\n\t\t\t\tfor (BTCommObserver commObserver : currentObservers) {\n\t\t\t\t\tcommObserver.notifyForClose(this);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "protected void notifyDeleted(List<T> objects){\n\t\tfor( ModelEvents<T> observer : this.ObserverList){\r\n\t\t\tobserver.dataDeleted(objects);\r\n\t\t}\r\n\t}", "public void notifyIObservers( Object observed_obj, Object reason )\n {\n // Note: The notification may cause changes to the list of observers.\n // In particular, if the notification is that the observed object\n // is being destroyed, so the observers should destroy themselves,\n // then the call to iobs.update() will probably remove iobs from\n // the the list of observers. In order to update all of the \n // observers in this case, it is necessary to step backwards through\n // the list of observers.\n for ( int i = observers.size()-1; i >= 0; i-- ) \n {\n IObserver iobs = (IObserver) observers.elementAt(i);\n iobs.update( observed_obj, reason );\n }\n }", "private void notifyObservers(int vitesse) {\n for(CapteurObserver capObserver : sesObservers) {\n capObserver.onVitesseChange(this, vitesse);\n }\n }", "public void clearObservers(){\r\n\t\tobservers.clear();\r\n\t}", "public void notifyObserver(boolean result) {\r\n\t\tfor(Observer o : observers) {\r\n\t\t\to.updateStats(result);\r\n\t\t}\r\n\t}", "private void notifyClassObservers(ClassDescriptor classDescriptor) {\n for (IClassObserver observer : classObserverList) {\n observer.observeClass(classDescriptor);\n }\n }", "public void clearObservers() {\r\n\t\tobservers.clear();\r\n\t}" ]
[ "0.8538108", "0.85319674", "0.85259616", "0.8514363", "0.8513845", "0.84931153", "0.8452804", "0.83783764", "0.83546394", "0.83333945", "0.8290768", "0.8257899", "0.809179", "0.80096376", "0.80096376", "0.79770905", "0.79732066", "0.78888315", "0.7869747", "0.7789245", "0.77801204", "0.7752603", "0.7690227", "0.7685836", "0.76822865", "0.7657945", "0.7619299", "0.7566636", "0.7545192", "0.74783003", "0.743452", "0.7415865", "0.74040616", "0.73580444", "0.733986", "0.7293719", "0.72744864", "0.7235929", "0.72229373", "0.720423", "0.7164086", "0.71481717", "0.71441203", "0.71178764", "0.70918036", "0.70824933", "0.70764256", "0.7072514", "0.70287895", "0.7024303", "0.70162225", "0.70084", "0.7002898", "0.699986", "0.69549185", "0.6871237", "0.685328", "0.677029", "0.67419744", "0.6735131", "0.67277443", "0.6716191", "0.6702648", "0.66915524", "0.6681654", "0.66773653", "0.6661625", "0.66532254", "0.66527855", "0.6643318", "0.663459", "0.6628219", "0.6598713", "0.65932775", "0.6586786", "0.6559707", "0.655004", "0.6542836", "0.6525358", "0.65197897", "0.65040034", "0.6501961", "0.64726096", "0.6458983", "0.64564836", "0.6444955", "0.64278305", "0.6417986", "0.6408535", "0.6406809", "0.6393512", "0.6390987", "0.6383946", "0.6379851", "0.63784456", "0.6375159", "0.63727", "0.63677007" ]
0.80316484
15
Creates the scene to be put on the stage.
public Scene createScene() { myRoot = new AnchorPane(); myTabs = new TabPane(); Button newTab = new Button(CREATE_NEW_TAB); newTab.setOnAction(event -> createNewTab()); TabMainScreen mainScreen = new TabMainScreen(myResources.getString(WORKSPACE) + (myTabs.getTabs().size())); TabHelp help1 = new TabHelp(myResources.getString(BASIC_COMMANDS), HELP_TAB_TEXT1); TabHelp help2 = new TabHelp(myResources.getString(EXTENDED_COMMANDS), HELP_TAB_TEXT2); myTabs.getTabs().addAll(mainScreen.getTab(myStage), help1.getTab(), help2.getTab()); AnchorPane.setTopAnchor(myTabs, TABS_OFFSET); AnchorPane.setTopAnchor(newTab, NEWTAB_OFFSET); myRoot.getChildren().addAll(myTabs, newTab); myScene = new Scene(myRoot, windowHeight, windowWidth, Color.WHITE); return myScene; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void createScene();", "private void createScene() {\r\n imageView.setFitWidth(400);\r\n imageView.setFitHeight(300);\r\n\r\n Scene scene = new Scene(rootScene(), 700, 600);\r\n\r\n primaryStage.setTitle(TITLE);\r\n primaryStage.setScene(scene);\r\n primaryStage.show();\r\n }", "void createScene(){\n\t\tmainScene = new Scene(mainPane);\r\n\t\t\r\n\t\t//If keyEvent is not focussed on a node on the scene, you can attach\r\n\t\t//a keyEvent to a scene to be consumed by the screen itself.\r\n\t\tCloser closer = new Closer();\r\n\t\tmainScene.setOnKeyPressed(closer);\r\n\t}", "public Scene createScene() {\n root = new Group();\n key = new Group();\n Scene scene = new Scene(root, 500, 500, Color.WHITE);\n addRootNode();\n setupKey();\n getAlreadyConnectedPeers();\n return scene;\n }", "protected void buildScene() {\n Geometry cube1 = buildCube(ColorRGBA.Red);\n cube1.setLocalTranslation(-1f, 0f, 0f);\n Geometry cube2 = buildCube(ColorRGBA.Green);\n cube2.setLocalTranslation(0f, 0f, 0f);\n Geometry cube3 = buildCube(ColorRGBA.Blue);\n cube3.setLocalTranslation(1f, 0f, 0f);\n\n Geometry cube4 = buildCube(ColorRGBA.randomColor());\n cube4.setLocalTranslation(-0.5f, 1f, 0f);\n Geometry cube5 = buildCube(ColorRGBA.randomColor());\n cube5.setLocalTranslation(0.5f, 1f, 0f);\n\n rootNode.attachChild(cube1);\n rootNode.attachChild(cube2);\n rootNode.attachChild(cube3);\n rootNode.attachChild(cube4);\n rootNode.attachChild(cube5);\n }", "public WorldScene makeScene() {\n // WorldCanvas c = new WorldCanvas(300, 300);\n WorldScene s = new WorldScene(this.width, this.height);\n s.placeImageXY(newImg, this.width / 2, this.height / 2);\n return s;\n }", "@Override\n\tpublic void createScene()\n\t\n\t{\n\t loading = new Sprite (0,0,resourceManager.loadingRegion,vbo); // тупо ставим спрайт с картинкой\n\t\tattachChild(loading);\n\t}", "public void setupScene() {\n\t\tplayScene = new Scene(new Group());\n\t\tupdateScene(playScene);\n\t\twindow.setScene(playScene);\n\t\twindow.show();\n\t}", "private void buildScene() {\n for (int i = 0; i < Layer.LAYERCOUNT.ordinal(); i++) {\n SceneNode layer = new SceneNode();\n sceneLayers[i] = layer;\n\n sceneGraph.attachChild(layer);\n }\n\n // Prepare the tiled background\n Texture texture = textures.getTexture(Textures.DESERT);\n IntRect textureRect = new IntRect(worldBounds);\n texture.setRepeated(true);\n\n // Add the background sprite to the scene\n SpriteNode backgroundSprite = new SpriteNode(texture, textureRect);\n backgroundSprite.setPosition(worldBounds.left, worldBounds.top);\n sceneLayers[Layer.BACKGROUND.ordinal()].attachChild(backgroundSprite);\n\n // Add player's aircraft\n playerAircraft = new Aircraft(Aircraft.Type.EAGLE, textures);\n playerAircraft.setPosition(spawnPosition);\n playerAircraft.setVelocity(40.f, scrollSpeed);\n sceneLayers[Layer.AIR.ordinal()].attachChild(playerAircraft);\n\n // Add two escorting aircrafts, placed relatively to the main plane\n Aircraft leftEscort = new Aircraft(Aircraft.Type.RAPTOR, textures);\n leftEscort.setPosition(-80.f, 50.f);\n playerAircraft.attachChild(leftEscort);\n\n Aircraft rightEscort = new Aircraft(Aircraft.Type.RAPTOR, textures);\n rightEscort.setPosition(80.f, 50.f);\n playerAircraft.attachChild(rightEscort);\n }", "void createStage(Stage stage){\n\t\tstage.setHeight(background.getHeight()+25);//displays full image (1)\r\n\t\tstage.setWidth(background.getWidth());\r\n\t\tshowBackground.setFitWidth(stage.getWidth());\r\n\t\tshowBackground.setFitHeight(stage.getHeight()-23);//displays full image (1)\r\n\t\r\n\t\tstage.setAlwaysOnTop(true);\r\n\t\tstage.setResizable(false);\r\n\t\t\r\n\t\t//launches first window in center of screen. \r\n\t\tstage.centerOnScreen();\r\n\t\tstage.setScene(mainScene);\r\n\t\tstage.setTitle(\"Don't Play Games in Class\");\r\n\t\t//supposed to prevent window from being moved\r\n\t\t\r\n\t\t//removes minimize, maximize and close buttons\r\n\t\t//unused because replacing the \r\n\t\t//stage.initStyle(StageStyle.UNDECORATED);\r\n\t\t\r\n\t\t//removes minimize and maximize button\r\n\t\tstage.initStyle(StageStyle.UTILITY);\r\n\t\t\r\n\t\t//replaces the closed window in the center of the screen.\r\n\t\tRespawn launch = new Respawn();\r\n\t\tstage.setOnCloseRequest(launch);\r\n\t}", "public void Scene() {\n Scene scene = new Scene(this.root);\n this.stage.setScene(scene);\n this.stage.show();\n }", "@Override\n public void start (Stage stage) throws IOException {\n init.start(stage);\n myScene = view.makeScene(50,50);\n stage.setScene(myScene);\n stage.show();\n }", "private void setStage() {\n\t\tstage = new Stage();\n\t\tstage.setScene(myScene);\n\t\tstage.setTitle(title);\n\t\tstage.show();\n\t\tstage.setResizable(false);\n//\t\tstage.setOnCloseRequest(e -> {\n//\t\t\te.consume();\n//\t\t});\n\t}", "private void createFXScene() {\n try {\n Parent root = FXMLLoader.load(getClass().getResource(\"toolBarFXML.fxml\"));\n Scene scene = new Scene(root, Color.LIGHTGREY);\n fxPanel.setScene(scene);\n } catch (IOException e) {\n Exceptions.printStackTrace(e);\n }\n\n }", "private void createScene() \n {\n PlatformImpl.startup(\n new Runnable() {\n public void run() { \n Group root = new Group(); \n Scene scene = new Scene(root, 80, 20); \n SizeView sizeview = createSizeView(scene);\n root.getChildren().add(sizeview);\n jfxPanel.setScene(scene); \n } \n }); \n }", "public void createMainStage(){\n mainStage = new Stage();\n BorderPane mainPageBp = new BorderPane();\n \n String headerTextMain = \"Main menu\";\n setBorderPaneTop(mainPageBp, headerTextMain, mainStage);\n setBorderPaneCenterMain(mainPageBp);\n setBorderPaneBottomMain(mainPageBp);\n \n Scene sceneMain = new Scene(mainPageBp,Constants.SCENEWIDTH, Constants.SCENEHEIGHT);\n sceneMain.getStylesheets().add(\"/styles/aitBank.css\");// add connection to stylesheet per scene\n mainStage.setTitle(bankName);\n mainStage.setScene(sceneMain);\n }", "@Override\n\tpublic void create() {\n\t\tAssets.load();\n\t\t\n\t\t//creo pantallas y cargo por defecto menuPrincipal\n\t\tscreenJuego = new JuegoScreen(this);\n\t\tmenuPrincipal = new MenuPrincipal(this);\n\t\tsetScreen(menuPrincipal);\n\t}", "public void create() {\n\t\t// TODO Auto-generated method stub\n\t\tskin = new Skin(Gdx.files.internal(\"uiskin.json\"));\n\t\tstage = new Stage();\n\t\tfinal TextButton playButton = new TextButton(\"Play\", skin, \"default\"); // Creates button with label \"play\"\n\t\tfinal TextButton leaderboardButton = new TextButton(\"Leaderboards\", skin, \"default\"); // Creates button with\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// label \"leaderboards\"\n\t\tfinal TextButton optionsButton = new TextButton(\"Options\", skin, \"default\"); // Creates button with label\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// \"options\"\n\t\tfinal TextButton userInfoButton = new TextButton(\"User Info\", skin, \"default\");// Creates button with label\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// \"User Info\"\n\t\tfinal TextButton quitGameButton = new TextButton(\"Exit Game\", skin, \"default\");\n\n\t\t// Three lines below this set the widths of buttons using the constant widths\n\t\tplayButton.setWidth(Gdx.graphics.getWidth() / 3);\n\t\tleaderboardButton.setWidth(playButton.getWidth());\n\t\toptionsButton.setWidth(playButton.getWidth());\n\t\tuserInfoButton.setWidth(playButton.getWidth());\n\t\tquitGameButton.setWidth(playButton.getWidth());\n\n\t\t// Set the heights using constant height\n\t\tplayButton.setHeight(Gdx.graphics.getHeight() / 15);\n\t\tleaderboardButton.setHeight(playButton.getHeight());\n\t\toptionsButton.setHeight(playButton.getHeight());\n\t\tuserInfoButton.setHeight(playButton.getHeight());\n\t\tquitGameButton.setHeight(playButton.getHeight());\n\n\t\t// Sets positions for buttons\n\t\tplayButton.setPosition(Gdx.graphics.getWidth() / 20, Gdx.graphics.getHeight() / 3);\n\t\tleaderboardButton.setPosition(playButton.getX(), playButton.getY() - leaderboardButton.getHeight());\n\t\toptionsButton.setPosition(playButton.getX(), leaderboardButton.getY() - optionsButton.getHeight());\n\t\tuserInfoButton.setPosition(playButton.getX(), optionsButton.getY() - userInfoButton.getHeight());\n\t\tquitGameButton.setPosition(playButton.getX(), userInfoButton.getY() - quitGameButton.getHeight());\n\n\t\t// User Info Name and sign in/ sign out button at the top of the screen\n\t\tfinal Label userInfoLabel = new Label(\"HI GUYS: \" + Constants.user, skin, \"default\");\n\t\tfinal TextButton userSignButton = new TextButton(\"singin/out\", skin, \"default\");\n\t\tuserSignButton.setHeight(Gdx.graphics.getHeight() / 40);\n\t\tuserSignButton.setPosition(Gdx.graphics.getWidth() - userSignButton.getWidth(),\n\t\t\t\tGdx.graphics.getHeight() - userSignButton.getHeight());\n\t\tif (Constants.userID == 0)\n\t\t\tuserSignButton.setText(\"Sign In\");\n\t\telse\n\t\t\tuserSignButton.setText(\"Sign Out\");\n\t\tuserSignButton.addListener(new ClickListener() { // When Sign in/Sing out is pressed in the top right\n\t\t\t@Override\n\t\t\tpublic void clicked(InputEvent event, float x, float y) {\n\t\t\t\tif (Constants.userID == 0) { // If no one is signed in\n\t\t\t\t\tdispose();\n\t\t\t\t\tgame.setScreen(new UserInfoScreen(game));\n\t\t\t\t} else { // If a user is currently signed in\n\t\t\t\t\tConstants.userID = 0;\n\t\t\t\t\tConstants.user = \"Temporary User\";\n\t\t\t\t\tcreate();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tuserInfoLabel.setHeight(userSignButton.getHeight());\n\t\tuserInfoLabel.setPosition(Gdx.graphics.getWidth() - userInfoLabel.getWidth() - userSignButton.getWidth(),\n\t\t\t\tGdx.graphics.getHeight() - userInfoLabel.getHeight());\n\t\tstage.addActor(userInfoLabel);\n\t\tstage.addActor(userSignButton);\n\n\t\tplayButton.addListener(new ClickListener() { // This tells button what to do when clicked\n\t\t\t@Override\n\t\t\tpublic void clicked(InputEvent event, float x, float y) {\n\t\t\t\tdispose();\n\t\t\t\tgame.setScreen(new LobbyScreen(game)); // Switch over to lobby screen\n\t\t\t}\n\t\t});\n\n\t\tleaderboardButton.addListener(new ClickListener() {\n\t\t\t@Override\n\t\t\tpublic void clicked(InputEvent event, float x, float y) {\n\t\t\t\tdispose();\n\t\t\t\tgame.setScreen(new LeaderboardScreen(game)); // Switch over to leaderboard screen\n\t\t\t}\n\t\t});\n\n\t\toptionsButton.addListener(new ClickListener() {\n\t\t\t@Override\n\t\t\tpublic void clicked(InputEvent event, float x, float y) {\n\t\t\t\t// Do some stuff when clicked\n\t\t\t\tdispose();\n\t\t\t\tgame.setScreen(new OptionsScreen(game));\n\n\t\t\t}\n\t\t});\n\n\t\tuserInfoButton.addListener(new ClickListener() {\n\t\t\t@Override\n\t\t\tpublic void clicked(InputEvent event, float x, float y) {\n\t\t\t\tdispose();\n\t\t\t\tgame.setScreen(new UserInfoScreen(game));\n\n\t\t\t}\n\t\t});\n\n\t\tquitGameButton.addListener(new ClickListener() {\n\t\t\t@Override\n\t\t\tpublic void clicked(InputEvent event, float x, float y) {\n\t\t\t\tdispose();\n\t\t\t\tGdx.app.exit();\n\t\t\t}\n\t\t});\n\n\t\t// Adds all buttons to stage to be rendered\n\t\tstage.addActor(playButton);\n\t\tstage.addActor(leaderboardButton);\n\t\tstage.addActor(optionsButton);\n\t\tstage.addActor(userInfoButton);\n\t\tstage.addActor(quitGameButton);\n\n\t\tGdx.input.setInputProcessor(stage);\n\t}", "private void initStage() {\n stage = new Stage();\n stage.setTitle(\"Attentions\");\n stage.setScene(new Scene(root));\n stage.sizeToScene();\n }", "public void createChequeStage(){\n chequeStage = new Stage();\n BorderPane chequePageBp = new BorderPane();\n \n String headerTextMain = \"Cheque Account\";\n setBorderPaneTop(chequePageBp, headerTextMain, chequeStage);\n setBorderPaneCenterCheque(chequePageBp);\n setBorderPaneBottomCheque(chequePageBp, chequeStage);\n \n Scene sceneCheque = new Scene(chequePageBp,Constants.SCENEWIDTH, Constants.SCENEHEIGHT);\n sceneCheque.getStylesheets().add(\"/styles/aitBank.css\");// add connection to stylesheet per scene\n chequeStage.setTitle(bankName);\n chequeStage.setScene(sceneCheque);\n }", "public Scene scene() {\n AnchorPane anchorPane = new AnchorPane();\n\n Pane track = raceTrack.trackpainting();\n\n AnchorPane.setTopAnchor(track, 40.0);\n AnchorPane.setLeftAnchor(track, 40.0);\n\n determineStartingLocation(carOne, carTwo, carThree);\n\n carPosition(carOne);\n carPosition(carTwo);\n carPosition(carThree);\n\n AnchorPane.setTopAnchor(btnStartRace, 480.0);\n AnchorPane.setLeftAnchor(btnStartRace, 740.0);\n\n AnchorPane.setTopAnchor(btnEndRace, 480.0);\n AnchorPane.setLeftAnchor(btnEndRace, 730.0);\n\n AnchorPane.setTopAnchor(txtWarning, 600.0);\n AnchorPane.setLeftAnchor(txtWarning, 610.0);\n\n anchorPane.setBackground(\n new Background(new BackgroundFill(Color.rgb(0, 132, 0),\n CornerRadii.EMPTY, Insets.EMPTY)));\n\n anchorPane.getChildren().addAll(track, carOne, carTwo, carThree, btnStartRace, btnEndRace, txtWarning);\n\n Scene scene = new Scene(anchorPane, 1580, 1030);\n return scene;\n }", "public Scene() {}", "public void buildInitialScene() {\n\t\t\n\t\t//Creation image background\n\t\tfinal String BACKGROUND_PATH = \"src/assets/img/temp_background.png\";\n\t\tthis.background = new GameImage(BACKGROUND_PATH);\n\n\t\t//Creation image Game Over\n\t\tfinal String GAME_OVER_PATH = \"src/assets/img/erro.png\";\n\t\tthis.errorScene = new Sprite(GAME_OVER_PATH);\n\n\t\t//Game over sprite center position\n\t\tthis.errorScene.x = spos.calculatePosition(WindowConstants.WIDTH, 2, this.errorScene, 2);\n\t\tthis.errorScene.y = spos.calculatePosition(WindowConstants.HEIGHT, 2, this.errorScene, 2);\n\t}", "@Override\n protected void initScene() {\n setupCamera(0xff888888);\n\n /*\n * Create a Cube and display next to the cube\n * */\n setupCube();\n\n\n /*\n * Create a Sphere and place it initially 4 meters next to the cube\n * */\n setupSphere();\n\n\n /*\n * Create a Plane and place it initially 2 meters next to the cube\n * */\n setupPlane();\n setupImage();\n setupText();\n\n }", "@Override\n public void start( Stage primaryStage ) throws Exception {\n primaryStage.setTitle(\"Battleship\");\n primaryStage.setScene(createScene());\n primaryStage.show();\n }", "public WorldScene makeScene() {\r\n WorldScene scene = this.getEmptyScene();\r\n //make the image to draw \\/ \\/\r\n WorldImage cell = new EmptyImage();\r\n\r\n if (this.allCellsFlooded()) {\r\n cell = this.drawWin();\r\n }\r\n else if (this.currTurn >= this.maxTurn) {\r\n cell = this.drawLose();\r\n }\r\n else {\r\n cell = this.drawBoard();\r\n }\r\n\r\n //place the image on the scene \\/ \\/\r\n scene.placeImageXY(cell, 100, 200);\r\n\r\n return scene;\r\n }", "@Override\r\n\tpublic void createScene() {\n\t\tthis.setBackground(new Background(255, 255, 255));\r\n\t\tsLogo = new Sprite(BaseActivity.WIDTH / 2, BaseActivity.HEIGHT / 2, logoRegion.getWidth() * 1.23f, logoRegion.getHeight() * 1.23f, logoRegion, engine.getVertexBufferObjectManager());\r\n\t\tthis.attachChild(sLogo);\r\n\t\tSystem.out.println(\"stufff\");\r\n\t\t\r\n\t\tengine.registerUpdateHandler(new TimerHandler(0.2f, new ITimerCallback() \r\n\t {\r\n\t public void onTimePassed(final TimerHandler pTimerHandler) \r\n\t {\r\n\t System.out.println(\"stuff1\");\r\n\t engine.unregisterUpdateHandler(pTimerHandler);\r\n\t PlayScene play = new PlayScene(engine, activity, camera);\r\n\t play.createScene();\r\n\t engine.setScene(play);\r\n\t Resources.getInstance().music.setLooping(true);\r\n\t \t\tResources.getInstance().music.play();\r\n\t play.start();\r\n\t }\r\n\t }));\r\n\t}", "private Scene createMainMenuScene() {\n VBox root = new VBox();\n root.setId(\"pane\");\n root.setAlignment(Pos.CENTER);\n root.setSpacing(BUTTON_DISTANCE);\n\n Label lTitle = new Label(\"2048 Fx\");\n lTitle.setId(\"title-label\");\n root.getChildren().add(lTitle);\n\n Button bNewGame = new Button(\"New game\");\n bNewGame.setOnAction(new EventHandler<ActionEvent>() {\n @Override\n public void handle(ActionEvent event) {\n Game.board.init();\n }\n });\n bNewGame.setId(\"c16\");\n root.getChildren().add(bNewGame);\n\n Button bLoadGame = new Button(\"Load game\");\n bLoadGame.setId(\"c256\");\n bLoadGame.setOnAction(new EventHandler<ActionEvent>() {\n @Override\n public void handle(ActionEvent event) {\n FileChooser fileChooser = new FileChooser();\n fileChooser.setTitle(\"Load saving\");\n File directory = new File(\"./savegames\");\n if (!directory.exists()) {\n directory = new File(\"./\");\n }\n fileChooser.setInitialDirectory(directory);\n FileChooser.ExtensionFilter extFilter =\n new FileChooser.ExtensionFilter(\"Saved 2048 games\", \"*.saving\");\n fileChooser.getExtensionFilters().add(extFilter);\n File file = fileChooser.showOpenDialog(Game.stage);\n if (file != null) {\n Game.board.replay(file);\n }\n }\n });\n root.getChildren().add(bLoadGame);\n\n Button bSettings = new Button(\"Settings\");\n bSettings.setId(\"c4096\");\n bSettings.setOnAction(new EventHandler<ActionEvent>() {\n @Override\n public void handle(ActionEvent event) {\n settingsMenu();\n }\n });\n root.getChildren().add(bSettings);\n\n Button bGenerate = new Button(\"Also\");\n bGenerate.setOnAction(new EventHandler<ActionEvent>() {\n @Override\n public void handle(ActionEvent event) {\n\tGame.statBoard.statMenu();\n }\n });\n bGenerate.setId(\"c1024\");\n root.getChildren().add(bGenerate);\n\n Button bQuit = new Button(\"Quit\");\n bQuit.setId(\"c65536\");\n bQuit.setOnAction(new EventHandler<ActionEvent>() {\n @Override\n public void handle(ActionEvent event) {\n FileHandler.saveSettings(Game.settings);\n Game.stage.close();\n }\n });\n root.getChildren().add(bQuit);\n Scene menuScene = new Scene(root, Game.WINDOW_SIZE_X, Game.WINDOW_SIZE_Y);\n menuScene.getStylesheets().\n addAll(this.getClass().getResource(\"menu.css\").toExternalForm());\n return menuScene;\n }", "private void showCreateNewPlayer(){\n try{\n FXMLLoader loader = new FXMLLoader();\n loader.setLocation(Game.class.getResource(\"view/CreateNewPlayer.fxml\"));\n AnchorPane janela = (AnchorPane) loader.load();\n \n Stage createNewPlayerStage = new Stage();\n createNewPlayerStage.setTitle(\"Create new player\");\n createNewPlayerStage.initModality(Modality.WINDOW_MODAL);\n createNewPlayerStage.initOwner(primaryStage);\n Scene scene = new Scene(janela);\n createNewPlayerStage.setScene(scene);\n \n CreateNewPlayerController controller = loader.getController();\n controller.setGame(this);\n controller.setCreateNewPlayerStage(createNewPlayerStage); \n \n createNewPlayerStage.showAndWait();\n }catch(IOException e){\n }\n }", "private Scene createScene() {\r\n\t\tGroup root = new Group();\r\n\t\tScene scene = new Scene(root, this.getWidth(), this.getHeight());\r\n\t\tthis.textfield = new TextField();\r\n\t\ttextfield.setPromptText(this.placeholder);\r\n\t\ttextfield.setPrefWidth(this.getWidth());\r\n\t\ttextfield.setPrefHeight(this.getHeight());\r\n\t\ttextfield.setMinSize(TextField.USE_PREF_SIZE, TextField.USE_PREF_SIZE);\r\n\t\tthis.fixNavigation(textfield);\r\n\t\tthis.node = textfield;\r\n\t\troot.getChildren().add(textfield);\r\n\t\treturn scene;\r\n\t}", "private void createNameSubScene() {\n\t\tnameSubScene = new ViewSubScene();\n\t\tthis.mainPane.getChildren().add(nameSubScene);\n\t\tInfoLabel enterName = new InfoLabel(\"ENTER YOU NAME\");\n\t\tenterName.setLayoutX(20);\n\t\tenterName.setLayoutY(40);\n\t\t\n\t\tinputName = new TextField();\n\t\tinputName.setLayoutX(120);\n\t\tinputName.setLayoutY(150);\n\t\t\n\t\tnameSubScene.getPane().getChildren().add(enterName);\n\t\tnameSubScene.getPane().getChildren().add(inputName);\n\t\tnameSubScene.getPane().getChildren().add(createLinkButton());\n\t}", "@Override\n public void start(Stage primaryStage) throws Exception{\n Parent root = FXMLLoader.load(getClass().getResource(\"Scene.fxml\"));\n primaryStage.setTitle(\"Project 3\");\n primaryStage.setScene(new Scene(root, 600, 600));\n primaryStage.show();\n }", "public void create() {\n connect();\n batch = new SpriteBatch();\n font = new BitmapFont();\n\n audioManager.preloadTracks(\"midlevelmusic.wav\", \"firstlevelmusic.wav\", \"finallevelmusic.wav\", \"mainmenumusic.wav\");\n\n mainMenuScreen = new MainMenuScreen(this);\n pauseMenuScreen = new PauseMenuScreen(this);\n settingsScreen = new SettingsScreen(this);\n completeLevelScreen = new CompleteLevelScreen(this);\n completeGameScreen = new CompleteGameScreen(this);\n\n setScreen(mainMenuScreen);\n }", "@Override\n public void start(Stage stage) throws Exception {\n Parent root = FXMLLoader.load(getClass().getResource(\"Lesson3.fxml\"));\n \n \n // Create Scene with background Color\n Scene scene = new Scene(root, 700, 350, Color.LIGHTYELLOW);\n \n // set scene on stage with title\n stage.setTitle(\"Lesson 3 FXML\");\n stage.setScene(scene);\n stage.show();\n }", "public CreateUAV(){\n createStage = new Stage();\n createStage.setTitle(\"UAV Setup\");\n createStage.initModality(Modality.APPLICATION_MODAL);\n setupOverwriteDialog();\n }", "@Override\n\tpublic void create () {\n\t\tgempiresAssetHandler = new GempiresAssetHandler(this);\n\t\tbatch = new SpriteBatch();\n\t\tcastle = new CastleScreen(this);\n\t\tsetScreen(new MainMenuScreen(this));\n\t}", "@Override\r\n public void start(Stage primaryStage) throws Exception{\n primaryStage.setTitle(\"Color switch\");\r\n Gameplay obj1 = new Gameplay();\r\n obj1.mainmenu(primaryStage);\r\n// pane.getChildren().add(new Polygon(10,20,30,10,20,30));\r\n\r\n }", "protected Scene createView() {\n\t\treturn null;\n\t}", "protected Scene buildScene() throws FileNotFoundException, NoSuchObjectException {\n SplitPane split = new SplitPane();\n Scene myGameScene = new Scene(split, 800, 600);\n split.setDividerPositions(0.35f, 0.6f);\n attachStyle(myGameScene, \"GameView\");\n\n Pane leftPane = getPane(myGameResourceBundle.getString(\"LeftPaneCss\"));\n buildLeftSplitPane(leftPane);\n SplitPane.setResizableWithParent(leftPane, Boolean.FALSE);\n Pane rightPane = getPane(myGameResourceBundle.getString(\"RightPaneCss\"));\n Entity player = getPlayerEntity();\n background = new ImageView(new Image(new FileInputStream(levelInfoParser.getBackgroundImage())));\n cameraView = new CameraView(player, myGameScene.heightProperty(), myGameScene.widthProperty());\n buildRightSplitPane(rightPane);\n cameraView.bindBackgroundImage(background);\n ImageView playerDisplay = cameraView.createPlayerDisplay(player);\n setUpGameOver(player);\n rightPane.getChildren().add(playerDisplay);\n split.getItems().addAll(leftPane, rightPane);\n SplitPane.setResizableWithParent(leftPane, Boolean.FALSE);\n myGameScene.setOnKeyPressed(e -> handleKeyPressed(e));\n cameraView.handleCamera(rightPane, playerDisplay,background);\n myGameScene.setOnKeyReleased(e->handleKeyReleased(e));\n rightPane.requestFocus();\n rightPane.setFocusTraversable(true);\n return myGameScene;\n }", "public static void create(){\n\t\tstage = new Stage(new StretchViewport(1680, 1050)); \n\t\tCamera camera = stage.getCamera();\n\t\tcamera.update();\n\n\t\t//Instantiate the Managers\n\t\tGdx.input.setInputProcessor(getStage());\t\n\t\tstage.getActors().clear();\n\t\t\n\t\tmapManager = new Game_Map_Manager();\n\t\tmapManager.create(getStage());\n\t\t\n\t\tGame_CardHand cardHand = new Game_CardHand();\n\t\tcardHand.create(getStage());\n\n\t\tGameScreenUI actorManager = new GameScreenUI();\n\t\tactorManager.create(getStage());\n\n\t\tTrainDepotUI trainDepot = new TrainDepotUI();\n\t\ttrainDepot.create(getStage());\n\n\t\tGoalMenu goalScreenManager = new GoalMenu();\n\t\tgoalScreenManager.create(getStage());\n\t\t\n\t\tPlayerGoals ticketManager = new PlayerGoals();\n\t\tticketManager.create(getStage());\t\n\t\t\n\t\tGame_StartingSequence startgameManager = new Game_StartingSequence(replayMode);\n\t\tstartgameManager.create(getStage());\n\t\t\n\t\tGame_Shop shop = new Game_Shop();\n\t\tshop.create(getStage());\n\t\t\n\t\tGame_PauseMenu pauseMenu= new Game_PauseMenu();\n\t\tpauseMenu.create(getStage());\n\t\t\n\t\tWarningMessage warningMessage = new WarningMessage();\n\t\twarningMessage.create(getStage());\n\t\t\n\t\tif (replayMode){\n\t\t\tReplayModeUI replayUI = new ReplayModeUI();\n\t\t\treplayUI.create(getStage());\n\t\t\t\n\t\t\tif (Game_StartingSequence.inProgress){\n\t\t\t\tWorldMap replayMap = WorldMap.getInstance();\n\t\t\t\tGame_StartingSequence.player1 = false;\n\t\t\t\t\n\t\t\t\tStation p1station = replayMap.stationsList.get(0);\n\t\t\t\tfor (Station station : replayMap.stationsList){\n\t\t\t\t\tif (station.getName().equals(LocomotionCommotion.getReplayTurn().getJSONObject(\"player1\").getJSONArray(\"stations\").getJSONObject(0).getString(\"stationName\"))){\n\t\t\t\t\t\tp1station = station;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tStation p2station = replayMap.stationsList.get(1);\n\t\t\t\tfor (Station station : replayMap.stationsList){\n\t\t\t\t\tif (station.getName().equals(LocomotionCommotion.getReplayTurn().getJSONObject(\"player2\").getJSONArray(\"stations\").getJSONObject(0).getString(\"stationName\"))){\n\t\t\t\t\t\tp2station = station;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tcreateCoreGame(p1station, p2station);\n\t\t\t\tGame_StartingSequence.startGame();\n\t\t\t\tGameScreenUI.refreshResources();\n\t\t\t\tGame_StartingSequence.inProgress = false;\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tpublic Scene onLoadScene() {\n\t\tmEngine.registerUpdateHandler(new FPSLogger());\n\t\tScene scene=new Scene();\n\t\tAutoParallaxBackground autoParallaxBackground=new AutoParallaxBackground(0, 0, 0, 5);\n\t\tautoParallaxBackground.attachParallaxEntity(new ParallaxEntity(-10.0f, new Sprite(0, 0, mTextureRegion)));\n\t\tscene.setBackground(autoParallaxBackground);\n\t\t//Position of the Sprite in the region\n\t\tAnimatedSprite banana=new AnimatedSprite(200,200,bananaRegion);\n\t\tbanana.animate(100);\n\t\tscene.attachChild(banana);\n\t\treturn scene;\n\t}", "@Override\n public void create() {\n tex = new Texture(Gdx.files.internal(\"data/scene.png\"));\n\n //important since we aren't using some uniforms and attributes that SpriteBatch expects\n ShaderProgram.pedantic = false;\n\n //print it out for clarity\n System.out.println(\"Vertex Shader:\\n-------------\\n\\n\" + VERT);\n System.out.println(\"\\n\");\n System.out.println(\"Fragment Shader:\\n-------------\\n\\n\" + FRAG);\n\n shader = new ShaderProgram(VERT, FRAG);\n if (!shader.isCompiled()) {\n System.err.println(shader.getLog());\n System.exit(0);\n }\n if (shader.getLog().length() != 0)\n System.out.println(shader.getLog());\n\n\n batch = new SpriteBatch(1000, shader);\n batch.setShader(shader);\n\n cam = new OrthographicCamera(Gdx.graphics.getWidth(), Gdx.graphics.getHeight());\n cam.setToOrtho(false);\n }", "@Override\n\tpublic Scene giveScene() {\n\t\tLabel SignIn=new Label(\"SIGN IN\");\n\t\tLabel UserName=new Label(\"Username\");\n\t\tLabel Password=new Label(\"Password\");\n\t\tTextField Username=new TextField();\n\t\tTextField PassWord=new TextField();\n\t\tButton SubmitButton=new Button(\"SUBMIT\");\n\t\tButton BackButton=new Button(\"BACK\");\n\t\tBackButton.setOnAction(new EventHandler<ActionEvent>() {\t\n\t\t\t@Override\n\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\tmyGame.setPrimaryStage(myGame.GetLoginPageScene());\n\t\t\t}\n\t\t});\t\n\t\tSignIn.setId(\"SignInLabel\");\n\t\tUserName.setId(\"UserLabel\");\n\t\tPassword.setId(\"PasswordLabel\");\n\t\tUsername.setId(\"UserText\");\n\t\tPassWord.setId(\"PasswordText\");\n\t\tSubmitButton.setId(\"SubmitButton\");\n\t\tBackButton.setId(\"BackButton\");\n\t\tVBox SignInPageVb=new VBox(50,SignIn,UserName,Username,Password,PassWord,BackButton,SubmitButton);\n\t\tSignInPageVb.setTranslateY(100);\n\t\tSignInPageVb.setAlignment(Pos.TOP_CENTER);\n\t\tStackPane MainPageStackpane=new StackPane(SignInPageVb);\n\t\tMainPageStackpane.getStylesheets().add(getClass().getResource(\"SignInPage.css\").toString());\n\t\tmyScene= new Scene(MainPageStackpane,500,1000);\n\t\tmyScene.setFill(Color.BLACK);\n\t\tSubmitButton.setOnAction(new EventHandler<ActionEvent>() {\t\n\t\t\t@Override\n\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\tPlayer newPLayer = myGame.getMyDataBase().login(Username.getText(), PassWord.getText());\n\t\t\t\t//System.out.println(newPLayer);\n\t\t\t\tif (newPLayer != null) {\n\t\t\t\t\tmyGame.setCurrentPlayer(newPLayer);\n\t\t\t\t\tmyGame.setPrimaryStage(myGame.GetMainPageScene());\n\t\t\t\t}else {\n\t\t\t\t\tif(NoPlayer==null) {\n\t\t\t\t\t\tNoPlayer=new Label(\"Invalid User/Password\");\n\t\t\t\t\t\tSignInPageVb.getChildren().add(NoPlayer);\n\t\t\t\t\t}//System.out.println(\"katta\");\n\t\t\t\t//myGame.setPrimaryStage(myGame.GetGamePlayScene());\n\t\t\t\t}\n\t\t\t}\n\t\t});\t\n\n\t\treturn myScene;\n\t}", "public static Scene scene2() {\n\t\tScene finalScene = new Scene().initAmbient(new Vec(1.0))\r\n\t\t\t\t.initCamera(/* Camera Position = */new Point(0.0, 2.0, 6.0), \r\n\t\t\t\t\t\t/* Towards Vector = */ new Vec(0.0, -0.1 ,-1.0),\r\n\t\t\t\t\t\t/* Up vector = */new Vec(0.0, 1.0, 0.0), \r\n\t\t\t\t\t\t/*Distance to plain =*/ 2.0)\r\n\t\t\t\t.initName(\"scene2\").initAntiAliasingFactor(1)\r\n\t\t\t\t.initAmbient(new Vec(0.4))\r\n\t\t\t\t.initRenderRefarctions(true).initRenderReflections(true).initMaxRecursionLevel(6);\r\n // Add Surfaces to the scene.\r\n\t\t// (1) A plain that represents the ground floor.\r\n\t\tShape plainShape = new Plain(new Vec(0.0,1.0,0.0), new Point(0.0, -1.0, 0.0));\r\n\t\tMaterial plainMat = Material.getMetalMaterial();\r\n\t\tSurface plainSurface = new Surface(plainShape, plainMat);\r\n\t\tfinalScene.addSurface(plainSurface);\r\n\r\n\t\t// (2) We will also add spheres to form a triangle shape (similar to a pool game).\r\n\t\tfor (int depth = 0; depth < 4; depth++) {\r\n\t\t\tfor(int width=-1*depth; width<=depth; width++) {\r\n\t\t\t\tShape sphereShape = new Sphere(new Point((double)width, 0.0, -1.0*(double)depth), 0.5);\r\n\t\t\t\tMaterial sphereMat = Material.getRandomMaterial();\r\n\t\t\t\tSurface sphereSurface = new Surface(sphereShape, sphereMat);\r\n\t\t\t\tfinalScene.addSurface(sphereSurface);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t// Add lighting condition:\r\n\t\tDirectionalLight directionalLight=new DirectionalLight(new Vec(0.5,-0.5,0.0),new Vec(0.7));\r\n\t\tfinalScene.addLightSource(directionalLight);\r\n\r\n\t\t\r\n\t\treturn finalScene;\r\n\t}", "@Override\r\n\tpublic void start(Stage stage) {\n\r\n scenes.put(SceneName.MAIN, new MainView(stage).getScene());\r\n scenes.put(SceneName.SCENE1, new ViewOne(stage).getScene());\r\n/*\t\tscenes.put(SceneName.SCENE2, new ViewTwo(stage).getScene());\r\n\t\tscenes.put(SceneName.SCENE3, new ViewThree(stage).getScene());\r\n*/\r\n\r\n\t\t// Start with the main scene\r\n\t\tstage.setScene(scenes.get(SceneName.MAIN));\r\n\t\tstage.setTitle(\"Multi-Scene Demo\");\r\n\t\tstage.show();\r\n\t}", "@Override\n\tpublic void create() {\n\t\tGdx.app.setLogLevel(Application.LOG_DEBUG);\n\t\t\n\t\t//Load assets\n\t\tAssets.instance.init(new AssetManager());\n\t\t\n\t\t//initialize controller and renderer\n\t\tworldController = new WorldController();\n\t\tworldRenderer= new WorldRenderer(worldController);\n\t\t\n\t\t//The world is not paused on start\n\t\tpaused = false;\n\t}", "public WorldScene makeScene() {\n WorldScene scene = new WorldScene(this.width * GamePiece.GAMEPIECE_SIZE,\n this.height * GamePiece.GAMEPIECE_SIZE);\n WorldImage row = new EmptyImage();\n for (int i = 0; i < this.width; i++) {\n WorldImage column = new EmptyImage();\n for (int j = 0; j < this.height; j++) {\n column = new AboveImage(column, this.board.get(i).get(j)\n .drawPiece(this.board.get(powerRow).get(powerCol), this.radius));\n }\n row = new BesideImage(row, column);\n }\n scene.placeImageXY(row, (this.width * GamePiece.GAMEPIECE_SIZE) / 2,\n (this.height * GamePiece.GAMEPIECE_SIZE) / 2);\n return scene;\n }", "public static Scene scene3() {\n\t\tScene finalScene = new Scene().initAmbient(new Vec(1.0))\r\n\t\t\t\t.initCamera(/* Camera Position = */new Point(0.0, 2.0, 6.0), \r\n\t\t\t\t\t\t/* Towards Vector = */ new Vec(0.0, -0.1 ,-1.0),\r\n\t\t\t\t\t\t/* Up vector = */new Vec(0.0, 1.0, 0.0), \r\n\t\t\t\t\t\t/*Distance to plain =*/ 2.0)\r\n\t\t\t\t.initName(\"scene3\").initAntiAliasingFactor(1)\r\n\t\t\t\t.initRenderRefarctions(true).initRenderReflections(true).initMaxRecursionLevel(6);\r\n // Add Surfaces to the scene.\r\n\t\t// (1) A plain that represents the ground floor.\r\n\t\tShape plainShape = new Plain(new Vec(0.0,1.0,0.0), new Point(0.0, -1.0, 0.0));\r\n\t\tMaterial plainMat = Material.getMetalMaterial();\r\n\t\tSurface plainSurface = new Surface(plainShape, plainMat);\r\n\t\tfinalScene.addSurface(plainSurface);\r\n\t\t\r\n\t\t// (2) We will also add spheres to form a triangle shape (similar to a pool game). \r\n\t\tfor (int depth = 0; depth < 4; depth++) {\r\n\t\t\tfor(int width=-1*depth; width<=depth; width++) {\r\n\t\t\t\tShape sphereShape = new Sphere(new Point((double)width, 0.0, -1.0*(double)depth), 0.5);\r\n\t\t\t\tMaterial sphereMat = Material.getRandomMaterial();\r\n\t\t\t\tSurface sphereSurface = new Surface(sphereShape, sphereMat);\r\n\t\t\t\tfinalScene.addSurface(sphereSurface);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t// Add light sources:\r\n\t\tCutoffSpotlight cutoffSpotlight = new CutoffSpotlight(new Vec(0.0, -1.0, 0.0), 45.0);\r\n\t\tcutoffSpotlight.initPosition(new Point(4.0, 4.0, -3.0));\r\n\t\tcutoffSpotlight.initIntensity(new Vec(1.0,0.6,0.6));\r\n\t\tfinalScene.addLightSource(cutoffSpotlight);\r\n\t\tcutoffSpotlight = new CutoffSpotlight(new Vec(0.0, -1.0, 0.0), 30.0);\r\n\t\tcutoffSpotlight.initPosition(new Point(-4.0, 4.0, -3.0));\r\n\t\tcutoffSpotlight.initIntensity(new Vec(0.6,1.0,0.6));\r\n\t\tfinalScene.addLightSource(cutoffSpotlight);\r\n\t\tcutoffSpotlight = new CutoffSpotlight(new Vec(0.0, -1.0, 0.0), 30.0);\r\n\t\tcutoffSpotlight.initPosition(new Point(0.0, 4.0, 0.0));\r\n\t\tcutoffSpotlight.initIntensity(new Vec(0.6,0.6,1.0));\r\n\t\tfinalScene.addLightSource(cutoffSpotlight);\r\n\t\tDirectionalLight directionalLight=new DirectionalLight(new Vec(0.5,-0.5,0.0),new Vec(0.2));\r\n\t\tfinalScene.addLightSource(directionalLight);\r\n\t\t\r\n\t\treturn finalScene;\r\n\t}", "public gameScene_Model(Stage primaryStage){\n this.primaryStage = primaryStage;\n background = new MyStage();\n this.scene = new Scene(background,600,800);\n animal = new Animal(\"file:src/FroggerApp/Images_File/froggerUp.png\");\n }", "@Override\n public void start(Stage primaryStage) {\n\n // Creates the scene and displays it to the main window\n Scene withDrawPaneSetup = new Scene(withDrawPaneSetup(primaryStage), 1024, 768);\n primaryStage.setScene(withDrawPaneSetup);\n }", "private void createScene(Group globalRoot, Group root3D) {\n if(appView.getSelectedRunway().equals(\"\")){\n createGeneralScene(root3D);\n generateGeneralLegend(globalRoot);\n } else if(appView.getMenuPanel().isIsolateMode()){\n createIsolatedScene(globalRoot, root3D);\n generateSelectedLegend(globalRoot);\n } else {\n createSelectedScene(globalRoot, root3D);\n generateSelectedLegend(globalRoot);\n }\n }", "@Override\n\tpublic void create () {\n\t\t//IntrigueGraphicalDebugger.enable();\n\t\tIntrigueGraphicSys = new IntrigueGraphicSystem();\n\t\tIntrigueTotalPhysicsSys = new IntrigueTotalPhysicsSystem();\n\t\t\n\t\tfinal int team1 = 1;\n\t\tfinal int team2 = 2;\n\t\t\n\t\tstage = new Stage();\n\t\ttable = new Table();\n\t\ttable.bottom();\n\t\ttable.left();\n\t\ttable.setFillParent(true);\n\t\t\n\t\tLabelStyle textStyle;\n\t\tBitmapFont font = new BitmapFont();\n\t\t\n\n\t\ttextStyle = new LabelStyle();\n\t\ttextStyle.font = font;\n\n\t\ttext = new Label(\"Intrigue\",textStyle);\n\t\tLabel text2 = new Label(\"@author: Matt\", textStyle);\n\t\tLabel text3 = new Label(\"OPERATION 1\", textStyle);\n\t\t\n\t\ttext.setFontScale(1f,1f);\n\t\ttable.add(text);\n\t\ttable.row();\n\t\ttable.add(text2);\n\t\ttable.row();\n\t\ttable.add(text3);\n\t\tstage.addActor(table);\n\n\t\ttable.setDebug(true);\n\t\tString path_to_char = \"3Dmodels/Soldier/ArmyPilot/ArmyPilot.g3dj\";\n //String path_to_road = \"3Dmodels/Road/roadV2.g3db\";\n\t\t//String path_to_rink = \"3Dmodels/Rink/Rink2.g3dj\";\n\t\tString path_to_snow_terrain = \"3Dmodels/Snow Terrain/st5.g3dj\";\n\t\tString path_to_crosshair = \"2Dart/Crosshairs/rifle_cross.png\";\n\t\n\t\tMatrix4 trans = new Matrix4();\n\t\tMatrix4 iceTrans = new Matrix4();\n\t\tMatrix4 iceTrans2 = new Matrix4();\n\t\tMatrix4 iceTrans3 = new Matrix4();\n\t\tMatrix4 iceTrans4 = new Matrix4();\n\t\tMatrix4 trans2 = new Matrix4();\n\t\tMatrix4 trans3 = new Matrix4();\n\t\n\t\ttrans.translate(-3000,6000,-500);\n\t\t//Vector3 halfExtents = new Vector3(30f,90f,25f);\n\t\tbtCapsuleShape person_shape = new btCapsuleShape(30f, 90f);\n\t\t\n\t\tmamaDukes.add(new Entity.Builder(player_guid)\n\t\t\t\t\t.IntrigueModelComponent(path_to_char).IntrigueControllerComponent(1)\n\t\t\t\t\t.IntriguePhysicalComponent(person_shape, 200f, trans)\n\t\t\t\t\t.MotionComponent()\n\t\t\t\t\t.AimingComponent()\n\t\t\t\t\t.DecalComponent()\n\t\t\t\t\t.ThirdPersonCameraComponent()\n .CharacterActionsComponent()\n\t\t\t\t\t.AnimationComponent()\n\t\t\t\t\t.Fireable(path_to_crosshair)\n\t\t\t\t\t.TargetingAI(team1)\n\t\t\t\t\t//.CharacterSoundComponent(\"SoundEffects/Character/walking/step-spur.mp3\", \"SoundEffects/guns/M4A1.mp3\")\n\t\t\t\t\t.Build());\n\t\tJson json_test = new Json(); \n\t\tEntity d = mamaDukes.get(player_guid);\n\t\t//System.out.println(json_test.prettyPrint(d));\n\t\t\n\t\t\n\t\tmamaDukes.get(player_guid).getPhysicalComponent()\n\t\t\t\t\t.getPhysicsBody().getRigidBody()\n\t\t\t\t\t.setActivationState(Collision.DISABLE_DEACTIVATION);\n\n\t\tmamaDukes.add(level_factory.createLevel(path_to_snow_terrain,\n\t\t\t\t\"3DParticles/blizzard.pfx\", iceTrans, Entity.class));\n\t\t\t\t/*\n\t\t\t\tnew DrifterObject.DrifterObjectBuilder(1)\n\t\t\t\t\t.BaseObject(new Gobject.Builder(1)\n\t\t\t\t\t.IntrigueModelComponent(path_to_snow_terrain)\n\t\t\t\t\t.IntriguePhysicalComponent(iceMass, iceTrans)\n\t\t\t\t\t.ParticleComponent(\"Blizzard\",\n\t\t\t\t\t\t\t\"3DParticles/blizzard.pfx\",new Vector3(1000,1000, -2500), \n\t\t\t\t\t\t\tnew Vector3(3000, 1000,2000 ))\n\t\t\t\t\t.Build())\n\t\t\t\t\t.Build());*/\n\t\ttrans2.translate(-1000,1000,1500);\n\t\t\n\t\tmamaDukes.add(new Entity.Builder(2)\n\t\t\t\t\t.IntrigueModelComponent(path_to_char)\n\t\t\t\t\t.IntriguePhysicalComponent(person_shape, 200f, trans2)\n\t\t\t\t\t.ParticleComponent(\"Blood\", \"3DParticles/Character/Blood.pfx\", \n\t\t\t\t\t\t\tnew Vector3(), new Vector3(1f,1f,1f))\n\t\t\t\t\t.MotionComponent()\n\t\t\t\t\t.AimingComponent()\n\t\t\t\t\t.CharacterActionsComponent()\n\t\t\t\t\t.AnimationComponent()\n\t\t\t\t\t.Fireable()\n\t\t\t\t\t.ShootingSoldierAI()\n\t\t\t\t\t.TargetingAI(team2)\n\t\t\t\t\t.Build());\n\t\t\n\t\tmamaDukes.get(2).getPhysicalComponent()\n\t\t\t\t\t.getPhysicsBody()\n\t\t\t\t\t.getRigidBody()\n\t\t\t\t\t.setAngularFactor(new Vector3(0,0,0));\n\t\tmamaDukes.get(2).getPhysicalComponent()\n\t\t\t\t\t.getPhysicsBody()\n\t\t\t\t\t.getRigidBody()\n\t\t\t\t\t.setActivationState(Collision.DISABLE_DEACTIVATION);\n\t\t\n\t\tmamaDukes.get(2).getPhysicalComponent()\n\t\t\t\t\t.getPhysicsBody().getRigidBody()\n\t\t\t\t\t.setUserIndex(2);\n\t\t\n\t\ttrans3.translate(-1000, 1000, 2000);\n\t\t\n\t\tmamaDukes.add(new Entity.Builder(3)\n\t\t\t\t\t.IntrigueModelComponent(path_to_char)\n\t\t\t\t\t.IntriguePhysicalComponent(person_shape, 200f, trans3)\n\t\t\t\t\t.MotionComponent()\n\t\t\t\t\t.AimingComponent()\n\t\t\t\t\t.CharacterActionsComponent()\n\t\t\t\t\t.AnimationComponent().Fireable()\n\t\t\t\t\t.ShootingSoldierAI().TargetingAI(team2)\n\t\t\t\t\t.Build());\n\t\t\n\t\tmamaDukes.get(3).getPhysicalComponent()\n\t\t\t\t\t.getPhysicsBody().getRigidBody()\n\t\t\t\t\t.setAngularFactor(new Vector3(0,0,0));\n\t\tmamaDukes.get(3).getPhysicalComponent()\n\t\t\t\t\t.getPhysicsBody().getRigidBody()\n\t\t\t\t\t.setActivationState(Collision.DISABLE_DEACTIVATION);\n\t\tmamaDukes.get(3).getPhysicalComponent()\n\t\t\t\t\t.getPhysicsBody().getRigidBody().setUserIndex(3);\n\t\t\n\t\tVector3 rpos = new Vector3();\n\t\t\n\t\tmamaDukes.get(1).getModelComponent().getModel()\n\t\t\t\t\t.transform.getTranslation(rpos);\n\t\t\n\t\ticeTrans2.translate(0, 0, 6185.332f);\n\t\t\n\t\tmamaDukes.add(level_factory.createLevel(path_to_snow_terrain,\n\t\t\t\t\"SoundEffects/stages/snow stage/wind1.mp3\",\n\t\t\t\t\"3DParticles/blizzard.pfx\", iceTrans2, Entity.class));\n\t\t\n\t\t\t\t\t/*new DrifterObject.DrifterObjectBuilder(4)\n\t\t\t\t\t.BaseObject(new Gobject.Builder(4)\n\t\t\t\t\t.IntrigueModelComponent(path_to_snow_terrain)\n\t\t\t\t\t.IntriguePhysicalComponent(iceMass, iceTrans2)\n\t\t\t\t\t.IntrigueLevelComponent(\"SoundEffects/stages/snow stage/wind1.mp3\")\n\t\t\t\t\t.Build())\n\t\t\t\t\t.ParticleComponent(\"Blizzard\",\"3DParticles/blizzard.pfx\",\n\t\t\t\t\t\t\tnew Vector3(0, 0, 6185.332f),\n\t\t\t\t\t\t\tnew Vector3(3000, 1000,2000 ))\n\t\t\t\t\t.Build());*/\n\t\t\n\t\tmamaDukes.get(4).getModelComponent().getModel().transform.translate(new Vector3(0, 0, 6185.332f)); //btStaticMeshShapes do not update their motionStates. The model Translation must be set manually in these cases.\n\t\ticeTrans3.translate(-6149.6568f, 0, 6185.332f);\n\t\t\n\t\tmamaDukes.add(level_factory.createLevel(path_to_snow_terrain,\n\t\t\t\t\"3DParticles/blizzard.pfx\" , iceTrans3, Entity.class));\n\t\t/**\n\t\t * btStaticMeshShapes do not update their motionStates. The model Translation must be set manually in these cases.\n\t\t */\n\t\tmamaDukes.get(5).getModelComponent().getModel().transform.translate(new Vector3(-6149.6568f, 0, 6185.332f)); \n\t\t\n\t\ticeTrans4.translate(-6149.6568f, 0, 0);\n\t\tmamaDukes.add(level_factory.createLevel(path_to_snow_terrain,\n\t\t\t\t\"3DParticles/blizzard.pfx\" , iceTrans4, Entity.class));\n\t\t\t\t\t/**new DrifterObject.DrifterObjectBuilder(6)\n\t\t\t\t\t.BaseObject(new Gobject.Builder(6)\n\t\t\t\t\t.IntrigueModelComponent(path_to_snow_terrain)\n\t\t\t\t\t.IntriguePhysicalComponent(iceMass, iceTrans4)\n\t\t\t\t\t.ParticleComponent(\"Blizzard\",\"3DParticles/blizzard.pfx\",\n\t\t\t\t\t\t\tnew Vector3(-6149.6568f, 0, 0), new Vector3(3000, 1000,2000 ))\n\t\t\t\t\t.Build())\n\t\t\t\t\t.Build());*/\n\t\tmamaDukes.get(6).getModelComponent().getModel().transform.translate(new Vector3(-6149.6568f, 0, 0)); \n\t\t\n\t}", "public void create () \n\t{ \n\t\t// Set Libgdx log level to DEBUG\n\t\tGdx.app.setLogLevel(Application.LOG_DEBUG);\n\t\t// Load assets\n\t\tAssets.instance.init(new AssetManager());\n\t\tpaused = false;\n\t\t// Load preferences for audio settings and start playing music\n\t\tGamePreferences.instance.load();\n\t\tAudioManager.instance.play(Assets.instance.music.song01);\n\t\t// Start game at menu screen\n\t\tsetScreen(new MenuScreen(this));\n\t\t\n\t}", "public WorldScene makeScene() {\n WorldScene w = new WorldScene(width * scale, height * scale);\n for (Vertex v : vertices) {\n Color color = generateColor(v);\n w.placeImageXY(new RectangleImage(scale, scale, OutlineMode.SOLID, color),\n (v.x * scale) + (scale * 1 / 2), (v.y * scale) + (scale * 1 / 2));\n }\n for (Edge e : walls) {\n if (e.to.x == e.from.x) {\n w.placeImageXY(\n new RectangleImage(scale, scale / 10, OutlineMode.SOLID, Color.black),\n (e.to.x * scale) + (scale * 1 / 2),\n ((e.to.y + e.from.y) * scale / 2) + (scale * 1 / 2));\n }\n else {\n w.placeImageXY(\n new RectangleImage(scale / 10, scale, OutlineMode.SOLID, Color.black),\n ((e.to.x + e.from.x) * scale / 2) + (scale * 1 / 2),\n (e.to.y * scale) + (scale * 1 / 2));\n }\n }\n return w;\n }", "public void createNewGame(Stage menuStage) {\n\t\t\n\t\tthis.menuStage = menuStage;\n\t\tthis.menuStage.hide();\n\t\tview = new GameView(inputs[1]);\n\t\ttry {\n\t\tview.show();\n\t\tgame = new Game(getNames(), inputs[0]);\n\t\tturned = false;\n\t\tview.initialisePlayerViews(nameList);\n\t\tcreateKeyListeners();\n\t\tcreateGameLoop();\n\t\t}catch (IndexOutOfBoundsException ex){\n\t\t\tthrow new GameException(\"User cancelled game\");\n\t\t}\n\t}", "@Override // Override the start method in the Application class\r\n /**\r\n * Start method for layout building\r\n */\r\n public void start(Stage primaryStage)\r\n {\n Scene scene = new Scene(pane, 370, 200);\r\n primaryStage.setTitle(\"Sales Conversion\"); // Set the stage title\r\n primaryStage.setScene(scene); // Place the scene in the stage\r\n primaryStage.show(); // Display the stage\r\n }", "@Override\n\tpublic void create() {\n\t\tassetManager = new AssetManager();\n\t\tassetManager.load(ROLIT_BOARD_MODEL, Model.class);\n\t\tassetManager.load(ROLIT_BALL_MODEL, Model.class);\n\t\t\n\t\t//construct the lighting\n\t\tenvironment = new Environment();\n\t\tenvironment.set(new ColorAttribute(ColorAttribute.AmbientLight, 0.4f, 0.4f, 0.4f, 1f));\n\t\tenvironment.add(new DirectionalLight().set(0.8f, 0.8f, 0.8f, -1f, -0.8f, -0.2f));\n\t\t\n\t\tmodelBatch = new ModelBatch();\n\t\t\n\t\tcam = new PerspectiveCamera(67f, Gdx.graphics.getWidth(), Gdx.graphics.getHeight());\n\t\t\n\t\tGdx.input.setInputProcessor(new InputHandler());\n\t}", "private void setupStage(Scene scene) {\n SystemTray.create(primaryStage, shutDownHandler);\n\n primaryStage.setOnCloseRequest(event -> {\n event.consume();\n stop();\n });\n\n\n // configure the primary stage\n primaryStage.setTitle(bisqEnvironment.getRequiredProperty(AppOptionKeys.APP_NAME_KEY));\n primaryStage.setScene(scene);\n primaryStage.setMinWidth(1020);\n primaryStage.setMinHeight(620);\n\n // on windows the title icon is also used as task bar icon in a larger size\n // on Linux no title icon is supported but also a large task bar icon is derived from that title icon\n String iconPath;\n if (Utilities.isOSX())\n iconPath = ImageUtil.isRetina() ? \"/images/[email protected]\" : \"/images/window_icon.png\";\n else if (Utilities.isWindows())\n iconPath = \"/images/task_bar_icon_windows.png\";\n else\n iconPath = \"/images/task_bar_icon_linux.png\";\n\n primaryStage.getIcons().add(new Image(getClass().getResourceAsStream(iconPath)));\n\n // make the UI visible\n primaryStage.show();\n }", "@Override\r\n\tpublic void create() {\n\t\tbatch = new SpriteBatch();\r\n\t\tcamera = new OrthographicCamera();\r\n\t\tassets = new AssetManager();\r\n\t\t\r\n\t\tcamera.setToOrtho(false,WIDTH,HEIGHT);\r\n\t\t\r\n\t\tTexture.setAssetManager(assets);\r\n\t\tTexture.setEnforcePotImages(false);\r\n\t\t\r\n\t\tsetScreen(new SplashScreen(this));\r\n\t}", "public void startScene()\r\n\t{\r\n\t\tthis.start();\r\n\t}", "public void createNewButtonClicked(){\n loadNewScene(apptStackPane, \"Create_New_Appointment.fxml\");\n }", "private void initScene() {\n scene = new idx3d_Scene() {\n\n @Override\n public boolean isAdjusting() {\n return super.isAdjusting() || isAnimating() || isInStartedPlayer() || AbstractCube7Idx3D.this.isAdjusting();\n }\n\n @Override\n public void prepareForRendering() {\n validateAlphaBeta();\n validateScaleFactor();\n validateCube();\n validateStickersImage();\n validateAttributes(); // must be done after validateStickersImage!\n super.prepareForRendering();\n }\n @Override\n\t\tpublic /*final*/ void rotate(float dx, float dy, float dz) {\n super.rotate(dx, dy, dz);\n fireStateChanged();\n }\n };\n scene.setBackgroundColor(0xffffff);\n\n scaleTransform = new idx3d_Group();\n scaleTransform.scale(0.018f);\n\n for (int i = 0; i < locationTransforms.length; i++) {\n scaleTransform.addChild(locationTransforms[i]);\n }\n alphaBetaTransform = new idx3d_Group();\n alphaBetaTransform.addChild(scaleTransform);\n scene.addChild(alphaBetaTransform);\n\n scene.addCamera(\"Front\", idx3d_Camera.FRONT());\n scene.camera(\"Front\").setPos(0, 0, -4.9f);\n scene.camera(\"Front\").setFov(40f);\n\n scene.addCamera(\"Rear\", idx3d_Camera.FRONT());\n scene.camera(\"Rear\").setPos(0, 0, 4.9f);\n scene.camera(\"Rear\").setFov(40f);\n scene.camera(\"Rear\").roll((float) Math.PI);\n\n //scene.environment.ambient = 0x0;\n //scene.environment.ambient = 0xcccccc;\n scene.environment.ambient = 0x777777;\n //scene.addLight(\"Light1\",new idx3d_Light(new idx3d_Vector(0.2f,-0.5f,1f),0x888888,144,120));\n //scene.addLight(\"Light1\",new idx3d_Light(new idx3d_Vector(1f,-1f,1f),0x888888,144,120));\n // scene.addLight(\"Light2\",new idx3d_Light(new idx3d_Vector(1f,1f,1f),0x222222,100,40));\n //scene.addLight(\"Light2\",new idx3d_Light(new idx3d_Vector(-1f,1f,1f),0x222222,100,40));\n // scene.addLight(\"Light3\",new idx3d_Light(new idx3d_Vector(-1f,2f,1f),0x444444,200,120));\n scene.addLight(\"KeyLight\", new idx3d_Light(new idx3d_Vector(1f, -1f, 1f), 0xffffff, 0xffffff, 100, 100));\n scene.addLight(\"FillLightRight\", new idx3d_Light(new idx3d_Vector(-1f, 0f, 1f), 0x888888, 50, 50));\n scene.addLight(\"FillLightDown\", new idx3d_Light(new idx3d_Vector(0f, 1f, 1f), 0x666666, 50, 50));\n\n if (sharedLightmap == null) {\n sharedLightmap = scene.getLightmap();\n } else {\n scene.setLightmap(sharedLightmap);\n }\n }", "@Override\n\tpublic void create() {\n\t\tGdx.gl20.glClearColor(1, 1, 1, 1);\n\n\t\t// instancia batch, asset manager e ambiente 3D\n\t\tmodelBatch = new ModelBatch();\n\t\tassets = new AssetManager();\n\t\tambiente = new Environment();\n\t\tambiente.set(new ColorAttribute(ColorAttribute.AmbientLight, 0.4f, 0.4f, 0.4f, 1f));\n\t\tambiente.add(new DirectionalLight().set(0.8f, 0.8f, 0.8f, -1f, -0.8f, -0.2f));\n\n\t\t// configura a câmera\n\t\tfloat razaoAspecto = ((float) Gdx.graphics.getWidth()) / Gdx.graphics.getHeight();\n\t\tcamera = new PerspectiveCamera(67, 480f * razaoAspecto, 480f);\n\t\tcamera.position.set(1f, 1.75f, 3f);\n\t\tcamera.lookAt(0, 0.35f, 0);\n\t\tcamera.near = 1f;\n\t\tcamera.far = 300f;\n\t\tcamera.update();\n\t\tcameraController = new CameraInputController(camera);\n\t\tGdx.input.setInputProcessor(cameraController);\n\n\t\t// solicita carregamento dos 2 modelos 3D da cena\n\t\tassets.load(\"caldeirao.obj\", Model.class);\n\t\tassets.load(\"caldeirao-jogos.obj\", Model.class);\n\t\tassets.load(\"caldeirao-love.obj\", Model.class);\n\t\tassets.load(\"fogueira.obj\", Model.class);\n\n\t\t// instancia e configura 2 tipos de renderizadores de partículas:\n\t\t// 1. Billboards (para fogo)\n\t\t// 2. PointSprites (para bolhas)\n\t\tBillboardParticleBatch billboardBatch = new BillboardParticleBatch(ParticleShader.AlignMode.Screen, true, 500);\n\t\tPointSpriteParticleBatch pointSpriteBatch = new PointSpriteParticleBatch();\n\t\tsistemaParticulas = new ParticleSystem();\n\t\tbillboardBatch.setCamera(camera);\n\t\tpointSpriteBatch.setCamera(camera);\n\t\tsistemaParticulas.add(billboardBatch);\n\t\tsistemaParticulas.add(pointSpriteBatch);\n\n\t\t// solicita o carregamento dos efeitos de partículas\n\t\tParticleEffectLoader.ParticleEffectLoadParameter loadParam = new ParticleEffectLoader.ParticleEffectLoadParameter(\n\t\t\t\tsistemaParticulas.getBatches());\n\t\tassets.load(\"fogo.pfx\", ParticleEffect.class, loadParam);\n\t\tassets.load(\"fogo-jogos.pfx\", ParticleEffect.class, loadParam);\n\t\tassets.load(\"fogo-love.pfx\", ParticleEffect.class, loadParam);\n\t\tassets.load(\"bolhas.pfx\", ParticleEffect.class, loadParam);\n\t\tassets.load(\"bolhas-jogos.pfx\", ParticleEffect.class, loadParam);\n\t\tassets.load(\"bolhas-love.pfx\", ParticleEffect.class, loadParam);\n\n\t\t// solicita carregamento da música\n\t\tmusica = Gdx.audio.newMusic(Gdx.files.internal(\"zelda-potion-shop.mp3\"));\n\n\t\taindaEstaCarregando = true;\n\t}", "public void newGame () throws IOException {\n\t\tMenuController.setTheme(selectedTheme);\n\t\tScene tableViewScene = FXMLLoader.load(Main.class.getResource(\"/views/menu.fxml\"));\n\t\tStage stage = (Stage)gameScene.getWindow();\n\t\tstage.setScene(tableViewScene);\n\t\t// Views dosen't update on Linux when you don't set size, until you move the view.\n\t\t// To fix that we need to update the view somehow. This was the solution...\n\t\tstage.setX(stage.getX());\n\t\tstage.show();\n\t}", "@Override\n public final void start(final Stage primaryStage) {\n Scene scene = new Scene(getPane(), PANE_WIDTH, PANE_HEIGHT);\n primaryStage.setTitle(\"Tic-Tak-Toe\"); // Set the stage title.\n primaryStage.setScene(scene); // Place the scene in the stage.\n primaryStage.show(); // Display the stage.\n }", "public void moveScene(Parent root) {\n Stage stage = new Stage();\n stage.setScene(new Scene(root));\n stage.show();\n }", "public Scene setSigninScene() {\n\t\tBorderPane newUserbp = new BorderPane();\n\n\t\tGridPane createUserGP = new GridPane();\n\t\tcreateUserGP.setPadding(new Insets(20));\n\t\tcreateUserGP.setVgap(10);\n\t\tcreateUserGP.setHgap(20);\n\n\t\tLabel createUser = new Label(\"Write username, min. 4 letters\");\n\t\tTextField usernameInput = new TextField();\n\t\tButton newUserBtn = new Button(\"Create\");\n\t\tButton goBackBtn = new Button(\"Login page\");\n\n\t\tcreateUserGP.add(createUser, 0, 1);\n\t\tcreateUserGP.add(usernameInput, 0, 2);\n\t\tcreateUserGP.add(newUserBtn, 0, 3);\n\t\tcreateUserGP.add(goBackBtn, 2, 3);\n\t\tcreateUserGP.add(userMsg, 0, 0);\n\n\t\tnewUserBtn.setOnAction(e -> {\n\t\t\tString username = usernameInput.getText();\n\t\t\tif (usernameInput.getText().length() <= 3) {\n\t\t\t\tuserMsg.setTextFill(Color.RED);\n\t\t\t\tuserMsg.setText(\"Username is too short, try again\");\n\t\t\t\tusernameInput.setText(\"\");\n\t\t\t} else if (hs.createUser(username)) {\n\t\t\t\tuserMsg.setTextFill(Color.GREEN);\n\t\t\t\tuserMsg.setText(\"New user created successfully, now login!\");\n\t\t\t\tstage.setScene(setLoginScene());\n\t\t\t\tusernameInput.setText(\"\");\n\t\t\t} else {\n\t\t\t\tuserMsg.setTextFill(Color.RED);\n\t\t\t\tuserMsg.setText(\"Username isn't available, try again.\");\n\t\t\t\tusernameInput.setText(\"\");\n\t\t\t}\n\t\t});\n\t\tgoBackBtn.setOnAction(e -> stage.setScene(loginScene));\n\n\t\tnewUserbp.setTop(new Text(\"Create New Username\"));\n\t\tnewUserbp.setCenter(createUserGP);\n\n\t\tnewUserScene = new Scene(newUserbp);\n\n\t\treturn this.newUserScene;\n\t}", "@Override\n public void create() {\n\n batch = new SpriteBatch();\n manager = new AssetManager();\n\n manager.load(\"audio/main_theme.mp3\", Music.class);\n // manager.load(\"String sonido\", Sound.class);\n manager.load(\"sprites/dragon.pack\", TextureAtlas.class);\n manager.load(\"sprites/vanyr.pack\", TextureAtlas.class);\n manager.finishLoading();\n\n setScreen(new PlayScreen(this));\n\n }", "public WorldScene makeScene() {\n WorldScene ws = new WorldScene(ForbiddenIslandWorld.ISLAND_SIZE,\n ForbiddenIslandWorld.ISLAND_SIZE);\n for (Cell c : this.board) {\n ws.placeImageXY(c.drawCell(waterHeight), c.x * 10, c.y * 10);\n }\n for (Target t : this.helicopterpieces) {\n ws.placeImageXY(t.drawPiece(), t.x * 10, t.y * 10);\n }\n ws.placeImageXY(this.player.drawPerson(), player.x * 10, player.y * 10);\n ws.placeImageXY(this.player2.drawPerson2(), player2.x * 10, player2.y * 10);\n return ws;\n }", "public void goToAddPartScene(ActionEvent event) throws IOException {\n Parent addPartParent = FXMLLoader.load(getClass().getResource(\"AddPart.fxml\"));\n Scene addPartScene = new Scene(addPartParent);\n\n Stage window = (Stage) ((Node)event.getSource()).getScene().getWindow();\n\n window.setScene(addPartScene);\n window.show();\n }", "public void start(Stage stage) {\n game = new Game();\n\n Scene gameScene = new Scene(game.getVisual().getRoot(), MainGUI.WIDTH, MainGUI.HEIGHT);\n gameScene.setOnKeyPressed(new PressHandler());\n gameScene.setOnKeyReleased(new ReleaseHandler());\n\n createMenu(stage, gameScene);\n Scene menuScene = new Scene(root, MainGUI.WIDTH, MainGUI.HEIGHT);\n stage.setScene(menuScene);\n\n }", "@Override\n public void start(Stage primaryStage) {\n\n pStage = primaryStage;\n\n try {\n\n\n Parent root = FXMLLoader.load(getClass().getResource(\"/GUI.fxml\"));\n\n Scene scene = new Scene(root, 600, 400);\n\n primaryStage.setTitle(\"Shopper 5000 Ultimate\");\n\n primaryStage.setResizable(false);\n primaryStage.setScene(scene);\n primaryStage.show();\n\n } catch(Exception e) {\n e.printStackTrace();\n }\n }", "@Override\n\tpublic void createScene() {\n\t\t\n\t\tSprite backGround = new Sprite(0, 0, rm.setting_background_region, rm.vbo);\n\t\t\n\t\tv_on = new Sprite(400,100,rm.on_region,rm.vbo){\n\t\t\t@Override\n\t\t\tpublic boolean onAreaTouched(final TouchEvent pSceneTouchEvent, final float pTouchAreaLocalX, final float pTouchAreaLocalY) {\n\t\t\t\t\n\t\t\t\tif(pSceneTouchEvent.isActionDown()){\n\t\t\t\t\t\n\t\t\t\t\tisVoice = true;\n\t\t\t\t\t\n\t\t\t\t\tv_on.setColor(0, 0, 1);\n\t\t\t\t\tv_off.setColor(1,0,0);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t return false;\n\t\t\t}};\n\t\tv_off = new Sprite(500,100,rm.off_region,rm.vbo){\n\t\t\t\t@Override\n\t\t\tpublic boolean onAreaTouched(final TouchEvent pSceneTouchEvent, final float pTouchAreaLocalX, final float pTouchAreaLocalY) {\n\t\t\t\t\t\n\t\t\t\t\tif(pSceneTouchEvent.isActionDown()){\n\t\t\t\t\t\t\n\t\t\t\t\t\tisVoice = false;\n\t\t\t\t\t\t\n\t\t\t\t\t\tv_off.setColor(0, 0, 1);\n\t\t\t\t\t\tv_on.setColor(1,0,0);\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\t return false;\n\t\t }};\n\t\ts_on = new Sprite(400,170,rm.on_region,rm.vbo){\n\t\t\t\t@Override\n\t\t\t\tpublic boolean onAreaTouched(final TouchEvent pSceneTouchEvent, final float pTouchAreaLocalX, final float pTouchAreaLocalY) {\n\t\t\t\t\t\n\t\t\t\t\tif(pSceneTouchEvent.isActionDown()){\n\t\t\t\t\t\t\n\t\t\t\t\t\tisSound = true;\n\t\t\t\t\t\t\n\t\t\t\t\t\ts_on.setColor(0, 0, 1);\n\t\t\t\t\t\ts_off.setColor(1,0,0);\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\t return false;\n\t\t\t\t}};\n\t\ts_off = new Sprite(500,170,rm.off_region,rm.vbo){\n\t\t\t\t\t@Override\n\t\t\t\tpublic boolean onAreaTouched(final TouchEvent pSceneTouchEvent, final float pTouchAreaLocalX, final float pTouchAreaLocalY) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(pSceneTouchEvent.isActionDown()){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tisSound = false;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\ts_off.setColor(0, 0, 1);\n\t\t\t\t\t\t\ts_on.setColor(1,0,0);\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t return false;\n\t\t\t }};\n\t\t \n\t\t\n\t\t \n\t\tauto_on = new Sprite(400,240,rm.on_region,rm.vbo){\n\t\t\t\t@Override\n\t\t\t\tpublic boolean onAreaTouched(final TouchEvent pSceneTouchEvent, final float pTouchAreaLocalX, final float pTouchAreaLocalY) {\n\t\t\t\t\t\n\t\t\t\t\tif(pSceneTouchEvent.isActionDown()){\n\t\t\t\t\t\t\n\t\t\t\t\t\tisAutofight = true;\n\t\t\t\t\t\t\n\t\t\t\t\t\tauto_on.setColor(0, 0, 1);\n\t\t\t\t\t\tauto_off.setColor(1,0,0);\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\t return false;\n\t\t\t\t}};\n\t\tauto_off = new Sprite(500,240,rm.off_region,rm.vbo){\n\t\t\t\t\t@Override\n\t\t\t\tpublic boolean onAreaTouched(final TouchEvent pSceneTouchEvent, final float pTouchAreaLocalX, final float pTouchAreaLocalY) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(pSceneTouchEvent.isActionDown()){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tisAutofight = false;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tauto_off.setColor(0, 0, 1);\n\t\t\t\t\t\t\tauto_on.setColor(1,0,0);\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t return false;\n\t\t\t }};\n\t\t\t p_on = new Sprite(400,310,rm.on_region,rm.vbo){\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic boolean onAreaTouched(final TouchEvent pSceneTouchEvent, final float pTouchAreaLocalX, final float pTouchAreaLocalY) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(pSceneTouchEvent.isActionDown()){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tisParticle = true;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tp_on.setColor(0, 0, 1);\n\t\t\t\t\t\t\tp_off.setColor(1,0,0);\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t return false;\n\t\t\t\t\t}};\n\t\t\tp_off = new Sprite(500,310,rm.off_region,rm.vbo){\n\t\t\t\t\t\t@Override\n\t\t\t\t\tpublic boolean onAreaTouched(final TouchEvent pSceneTouchEvent, final float pTouchAreaLocalX, final float pTouchAreaLocalY) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(pSceneTouchEvent.isActionDown()){\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tisParticle = false;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tp_off.setColor(0, 0, 1);\n\t\t\t\t\t\t\t\tp_on.setColor(1,0,0);\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t return false;\n\t\t\t\t }};\n\t\t\t\t \n\t\t\t\t skill_on = new Sprite(400,380,rm.on_region,rm.vbo){\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic boolean onAreaTouched(final TouchEvent pSceneTouchEvent, final float pTouchAreaLocalX, final float pTouchAreaLocalY) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(pSceneTouchEvent.isActionDown()){\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tshowSkillEffect = true;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tskill_on.setColor(0, 0, 1);\n\t\t\t\t\t\t\t\tskill_off.setColor(1,0,0);\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t return false;\n\t\t\t\t\t\t}};\n\t\t\t\tskill_off = new Sprite(500,380,rm.off_region,rm.vbo){\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic boolean onAreaTouched(final TouchEvent pSceneTouchEvent, final float pTouchAreaLocalX, final float pTouchAreaLocalY) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif(pSceneTouchEvent.isActionDown()){\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tshowSkillEffect = false;\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tskill_off.setColor(0, 0, 1);\n\t\t\t\t\t\t\t\t\tskill_on.setColor(1,0,0);\n\t\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t return false;\n\t\t\t\t\t }};\n\t\t\t \n\t\t\t Sprite back = new Sprite(690,365,rm.options_back_region,rm.vbo){\n\t\t\t\t\t@Override\n\t\t\t\tpublic boolean onAreaTouched(final TouchEvent pSceneTouchEvent, final float pTouchAreaLocalX, final float pTouchAreaLocalY) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(pSceneTouchEvent.isActionDown()){\n\t\t\t\t\t\t\tonBackKeyPressed();\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t return false;\n\t\t\t }};\n\t\t\t reset();\n\t\t \n\t \n\t\t \n\t attachChild(backGround);\n\t attachChild(v_off);\n\t attachChild(v_on);\n\t attachChild(s_off);\n\t attachChild(s_on);\n\t attachChild(auto_off);\n\t attachChild(auto_on);\n\t attachChild(p_off);\n\t attachChild(p_on);\n\t attachChild(skill_off);\n\t attachChild(skill_on);\n attachChild(back);\n\t\t\t\n\t registerTouchArea(v_off);\n registerTouchArea(v_on);\n registerTouchArea(s_off);\n registerTouchArea(s_on);\n registerTouchArea(auto_off);\n registerTouchArea(auto_on);\n registerTouchArea(p_off);\n registerTouchArea(p_on);\n registerTouchArea(skill_off);\n registerTouchArea(skill_on);\n \n\t registerTouchArea(back);\n\t \n\t\t\n\t}", "@Override\n public void start(Stage stage) throws IOException {\n try {\n FXMLLoader fxmlLoader = new FXMLLoader(MainScreen.class.getResource(\"MainScreen.fxml\"));\n\n\n Parent root = fxmlLoader.load();\n MainScreen mainScreen = fxmlLoader.getController();\n Scene scene = new Scene(root);\n\n stage.setTitle(\"Inventory Management System\");\n stage.setScene(scene);\n stage.show();\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void setup() {\n this.primaryStage.setTitle(Constants.APP_NAME);\n\n this.root = new VBox();\n root.setAlignment(Pos.TOP_CENTER);\n root.getChildren().addAll(getMenuBar());\n\n Scene scene = new Scene(root);\n this.primaryStage.setScene(scene);\n\n // set the default game level.\n setGameLevel(GameLevel.BEGINNER);\n\n // fix the size of the game window.\n this.primaryStage.setResizable(false);\n this.primaryStage.show();\n }", "@Override\n public void start(Stage primaryStage) throws Exception {\n\n // set up window.\n primaryStage.setWidth(600);\n primaryStage.setHeight(400);\n primaryStage.setResizable(false);\n\n // set up scenes.\n FXMLLoader mainMenuLoader = new FXMLLoader(getClass().getResource(\"FXML/mainMenuLayout.fxml\"));\n Scene mainMenuScene = new Scene(mainMenuLoader.load());\n FXMLLoader gameLoader = new FXMLLoader(getClass().getResource(\"FXML/gameLayout.fxml\"));\n Scene gameScene = new Scene(gameLoader.load());\n\n // set the main menu to load into the game.\n MainMenuController mainMenuController = (MainMenuController) mainMenuLoader.getController();\n mainMenuController.setGameScene(gameScene);\n\n primaryStage.setScene(mainMenuScene);\n\n primaryStage.show();\n\n }", "public void backToStartScene(ActionEvent event) throws IOException {\r\n Parent startView = FXMLLoader.load(Main.class.getResource(\"fxml/StartScene.fxml\"));\r\n Scene startViewScene = new Scene(startView);\r\n\r\n // This line gets the Stage information (no Stage is passed in)\r\n Stage window = (Stage) ((Node)event.getSource()).getScene().getWindow();\r\n\r\n window.setScene(startViewScene);\r\n window.show();\r\n }", "@Override\n public void start (Stage primaryStage) {\n Group root = new Group();\n Scene scene = new Scene(root, AppConstants.STAGE_WIDTH, AppConstants.STAGE_HEIGHT);\n ModulePopulator = new ModuleCreationHelper(root, scene, primaryStage);\n view = new View();\n scene.setFill(AppConstants.BACKGROUND_COLOR);\n // scene.getStylesheets().add(getClass().getResource(\"application.css\").toExternalForm());\n view.init(root, ModulePopulator);\n ModulePopulator.setView(view);\n ModulePopulator.createMainPageModules();\n view.initRunner(root, ModulePopulator);\n primaryStage.setTitle(\"SLogo!\");\n primaryStage.setScene(scene);\n primaryStage.show();\n\n System.out.println(\"App Has Started!\");\n }", "public void start_game() throws IOException, JAXBException {\n savetoxml();\n logger.trace(\"starting the game now...\");\n primarystage.setResizable(false);\n primarystage.setScene(game_scene);\n primarystage.show();\n\n }", "public static Scene scene4() {\n\t\tScene finalScene = new Scene().initAmbient(new Vec(1.0))\r\n\t\t\t\t.initCamera(/* Camera Position = */new Point(0.0, 2.0, 6.0), \r\n\t\t\t\t\t\t/* Towards Vector = */ new Vec(0.0, -0.1 ,-1.0),\r\n\t\t\t\t\t\t/* Up vector = */new Vec(0.0, 1.0, 0.0), \r\n\t\t\t\t\t\t/*Distance to plain =*/ 2.0)\r\n\t\t\t\t.initName(\"scene4\").initAntiAliasingFactor(1)\r\n\t\t\t\t.initRenderRefarctions(true).initRenderReflections(true).initMaxRecursionLevel(6);\r\n // Add Surfaces to the scene.\r\n\t\t\r\n\t\t// (2) Add two domes to make it look like we split a sphere in half. \r\n\t\tShape domeShape = new Dome(new Point(2.0, 0.0, -10.0), 5.0, new Vec(1.0, 0.0, 0.0));\r\n\t\tMaterial domeMat = Material.getRandomMaterial();\r\n\t\tSurface domeSurface = new Surface(domeShape, domeMat);\r\n\t\tfinalScene.addSurface(domeSurface);\r\n\t\t\r\n\t\tdomeShape = new Dome(new Point(-2.0, 0.0, -10.0), 5.0, new Vec(-1.0, 0.0, 0.0));\r\n\t\tdomeSurface = new Surface(domeShape, domeMat);\r\n\t\tfinalScene.addSurface(domeSurface);\r\n\t\t\r\n\t\t// Add light sources:\r\n\t\tCutoffSpotlight cutoffSpotlight = new CutoffSpotlight(new Vec(0.0, -1.0, 0.0), 75.0);\r\n\t\tcutoffSpotlight.initPosition(new Point(0.0, 6.0, -10.0));\r\n\t\tcutoffSpotlight.initIntensity(new Vec(.5,0.5,0.5));\r\n\t\tfinalScene.addLightSource(cutoffSpotlight);\r\n\t\t\r\n\t\treturn finalScene;\r\n\t}", "private void setTheScene()\n {\n board.setLocalRotation(Quaternion.IDENTITY);\n board.rotate(-FastMath.HALF_PI, -FastMath.HALF_PI, 0);\n board.setLocalTranslation(0, 0, -3);\n\n cam.setLocation(new Vector3f(0, 0, 10));\n cam.lookAt(Vector3f.ZERO, Vector3f.UNIT_Y);\n }", "@Override\n\tpublic void start(Stage primaryStage) throws IOException {\n\t\t// Create the root of the graph scene. It is mainly used in the updateScene() method.\n\t\troot = new Group();\n\n\t\t// Create a simulation with N elements\n\t\tsimulation = new Simulation();\n\n\t\t// Configure and start periodic scene update: after PERIOD_MS ms, updateScene() is called.\n\t\ttimeline = new Timeline(new KeyFrame(PERIOD_MS, ae -> {\n\t\t\tupdateScene();\n\t\t})); // \"->\" is a Java 8 specific construction\n\t\ttimeline.setCycleCount(Animation.INDEFINITE);\n\t\ttimeline.play();\n\n\n\t\t/** Allows the window to be dragged by the mouse */\n\t root.setOnMousePressed(new EventHandler<MouseEvent>() {\n\t \t@Override\n\t public void handle(MouseEvent event) {\n\t xOffset = primaryStage.getX() - event.getScreenX();\n\t yOffset = primaryStage.getY() - event.getScreenY();\n\t }\n\t });\t \n\t root.setOnMouseDragged(new EventHandler<MouseEvent>() {\n @Override\n public void handle(MouseEvent event) {\n \tprimaryStage.setX(event.getScreenX() + xOffset);\n\t primaryStage.setY(event.getScreenY() + yOffset);\n\t }\n\t });\n\t \n\t \n\t /** Adds the stylesheet for visual effect */\n\t root.getStylesheets().add(\"/stylesheet.css\");\n\t root.getStyleClass().add(\"rootPane\");\n\t \n\t /** Adds icon */\n\t primaryStage.getIcons().add(new Image(\"/icon.png\"));\n\t \n\t Scene scene = new Scene(root, Simulation.SPACE_SIZE, Simulation.SPACE_SIZE, Simulation.BACKGROUND); \n\t primaryStage.setScene(scene);\n \tprimaryStage.setTitle(\"Gabriel's Land\");\n \tprimaryStage.setResizable(false);\n\t primaryStage.getScene().setCursor(Cursor.HAND);\n\t primaryStage.show();\n\n\t}", "public void create() {\n\t\trandomUtil = new RandomUtil();\n\t\t// create the camera using the passed in viewport values\n\t\tcamera = new OrthographicCamera(viewPortWidth, viewPortHeight);\n\t\tbatch.setProjectionMatrix(camera.combined);\n\t\tdebugRender = new Box2DDebugRenderer(true, false, false, false, false, true);\n\t\ttestWorld = new TestWorld(assetManager.blockManager(), new Vector2(0, 0f));\n\t\ttestWorld.genWorld(debugUtil);\n\t\ttestWorld.setCamera(getCamera());\n\t\tplayer.createBody(testWorld.getWorld(), BodyType.DynamicBody);\n\t\ttestWorld.getPlayers().add(player);\n\t\tworldParser = new WorldParser(testWorld, \"Test World\");\n\t\tworldParser = new WorldParser(testWorld, \"Test Write\");\n\t\tworldParser.parseWorld();\n\t\twriter = new WorldWriter(\"Test Write\", testWorld);\n\t}", "public Scene getPrimaryScene() {\n VBox myBox = new VBox(15);\r\n myBox.setAlignment(Pos.CENTER);\r\n\r\n // Creating an Image object and something to hold the image (ImageViewer)\r\n // so we can view it later\r\n Image image = new Image(imageNames[0], 400, 400, true, true);\r\n ImageView imView = new ImageView(image);\r\n\r\n // Creating buttons\r\n Button myButton = new Button(\"Click to Change Memes\");\r\n Button sceneButton = new Button(\"Click to Leave\");\r\n\r\n // Setting what the change meme button will do when someone presses it\r\n myButton.setOnAction(e -> {\r\n Random rand = new Random();\r\n int randInt = rand.nextInt(imageNames.length);\r\n imView.setImage(new Image(imageNames[randInt], 400, 400, true, true));\r\n });\r\n // Alternative way to write above code using an anonymous inner class\r\n // myButton.setOnAction(new EventHandler<Event>() {\r\n // public void handle(Event e) {\r\n // Random rand = new Random();\r\n // int randInt = rand.nextInt(imageNames.length);\r\n // imView.setImage(new Image(imageNames[randInt], 400, 400, true, true));\r\n // }\r\n // })\r\n\r\n // Setting what the leave button will do\r\n sceneButton.setOnAction(e -> {\r\n Scene secondaryScene = getSecondaryScene();\r\n primaryStage.setScene(secondaryScene);\r\n primaryStage.show();\r\n });\r\n\r\n // Adding our ImageViewer and Buttons onto the VBox\r\n myBox.getChildren().addAll(imView, myButton, sceneButton);\r\n // Actually instantiating the scene with the VBox containing everything\r\n Scene primaryScene = new Scene(myBox, 450, 450);\r\n // Returning the scene\r\n return primaryScene;\r\n }", "@Override\n\tpublic void create() {\n\t\t// TODO: create completely new batches for sprites and models\n\t\tsprites = new SpriteBatch();\n\t\tmodelBatch = new ModelBatch();\n\n\t\t// TODO: create a new environment\n\t\t// set a new color attribute for ambient light in the environment\n\t\t// add a new directional light to the environment\n\n\t\tenvironment = new Environment();\n\t\tenvironment.set(new ColorAttribute(ColorAttribute.AmbientLight, 0.4f, 0.4f, 0.4f, 0.1f));\n\t\tenvironment.add(new DirectionalLight().set(0.8f, 0.8f, 0.8f, -1f, -0.8f, -0.2f));\n\n\t\t// create a new logo texture from the \"data/firstorder.png\" file\n\t\tlogo = new Texture(\"data/firstorder.png\");\n\n\t\t// TODO: create a new perspective camera with a field-of-view of around 70,\n\t\t// and the width and height found in the Gdx.graphics class\n\t\t// set the position of the camera to (100, 100, 100)\n\t\t// set the camera to look at the origin point (0, 0, 0)\n\t\t// set the near and far planes of the camera to 1 and 300\n\t\t// update the camera\n\t\tint width = Gdx.graphics.getWidth();\n\t\tint height = Gdx.graphics.getHeight();\n\t\tcam = new PerspectiveCamera(70f, width, height);\n\t\tcam.position.set(100f,100f,100f);\n\t\tcam.lookAt(0f, 0f, 0f);\n\t\tcam.near = 1f;\n\t\tcam.far = 300f;\n\t\tcam.update();\n\n\t\tbackgroundMusic = Gdx.audio.newMusic(Gdx.files.internal(\"data/StarWarsMusicTheme.mp3\"));\n\t\tbackgroundMusic.setLooping(true);\n\t\tbackgroundMusic.play();\n\n\t\t// create a new model loader\n\t\tfinal ModelLoader modelLoader = new ObjLoader();\n\n\t\t// TODO: load the internal file \"data/stormtrooper.obj\" into the model variable\n\t\tmodel = modelLoader.loadModel(Gdx.files.internal(\"data/stormtrooper_unwrapped.obj\"));\n\n\t\t// TODO: create a new model instance and scale it to 20% it's original size (it's huge...)\n\t\tinstance = new ModelInstance(model); // ← our model instance is here\n\t\tinstance.transform.scale(0.2f, 0.2f, 0.2f);\n\n\t\t// TODO: set the helmet details material to a new diffuse black color attribute\n\n\t\tgetHelmetDetails().material = new Material(ColorAttribute.createDiffuse(Color.BLACK));\n\t\tgetHelmetMoreDetails().material = new Material(ColorAttribute.createDiffuse(Color.DARK_GRAY));\n\t\tgetHelmetBase().material = new Material(ColorAttribute.createDiffuse(Color.WHITE));\n\n\t\t// set the input processor to work with our custom input:\n\t\t// clicking the image in the lower right should change the colors of the helmets\n\t\t// bonus points: implement your own GestureDetector and an input processor based on it\n\t\tGdx.app.log(\"instance node size\", \"\"+String.valueOf(instance.nodes.size));\n\n\n\t\tGdx.input.setInputProcessor(new FirstOrderInputProcessor(cam, new Runnable() {\n\t\t\tprivate Texture camouflage = new Texture(\"data/camouflage.png\");\n\t\t\tprivate Texture paper = new Texture(\"data/paper.png\");\n\t\t\tprivate Texture hive = new Texture(\"data/hive.png\");\n\t\t\tprivate Texture strips = new Texture(\"data/strip.png\");\n\t\t\tprivate Texture grass = new Texture(\"data/grass.jpeg\");\n\t\t\tpublic void run() {\n\t\t\t\t// TODO: change the helmet details material to a new diffuse random color\n\n\t\t\t\tgetHelmetDetails().material = getRandomMaterial();\n\t\t\t\tgetHelmetMoreDetails().material = getRandomMaterial();\n\n\t\t\t\t// bonus points:\n\t\t\t\t// randomly change the material of the helmet base to a texture\n\t\t\t\t// from the files aloha.png and camouflage.png (or add your own!)\n\t\t\t\tgetHelmetBase().material = getRandomMaterial();\n\t\t\t\tsetRandomLight();\n\n\t\t\t}\n\n\t\t\tprivate Material getRandomMaterial() {\n\t\t\t\tint rand = (int) (MathUtils.random() * 100) % 8;\n\t\t\t\tGdx.app.log(\"Random\", \"\" + rand);\n\n\t\t\t\t//Texture aloha = new Texture(\"data/aloha.png\");\n\t\t\t\tMaterial randMaterial = null;\n\n\t\t\t\tswitch (rand) {\n\t\t\t\t\tcase 0:\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\trandMaterial = new Material(ColorAttribute.createReflection(Color.WHITE));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 2:\n\t\t\t\t\t\trandMaterial = new Material(TextureAttribute.createDiffuse(paper));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 3:\n\t\t\t\t\t\trandMaterial = new Material(TextureAttribute.createDiffuse(hive));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 4:\n\t\t\t\t\t\trandMaterial = new Material(TextureAttribute.createDiffuse(camouflage));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 5:\n\t\t\t\t\t\trandMaterial = new Material(ColorAttribute.createDiffuse(getRandomColor()));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 6:\n\t\t\t\t\t\trandMaterial = new Material(TextureAttribute.createDiffuse(strips));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 7:\n\t\t\t\t\t\trandMaterial = new Material(TextureAttribute.createDiffuse(grass));\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\treturn randMaterial;\n\t\t\t}\n\t\t}));\n\t}", "public static Scene scene7() {\r\n\t\tPoint cameraPosition = new Point(-3.0, 1.0, 6.0);\r\n\t\tScene finalScene = new Scene().initAmbient(new Vec(1.0))\r\n\t\t\t\t.initCamera(/* Camera Position = */cameraPosition,\r\n\t\t\t\t\t\t/* Towards Vector = */ new Vec(0.0, -0.1 ,-1.0),\r\n\t\t\t\t\t\t/* Up vector = */new Vec(0.0, 1.0, 0.0),\r\n\t\t\t\t\t\t/*Distance to plain =*/ 2.0)\r\n\t\t\t\t.initName(\"scene7\").initAntiAliasingFactor(1)\r\n\t\t\t\t.initBackgroundColor(new Vec(0.01,0.19,0.22))\r\n\t\t\t\t.initRenderRefarctions(true).initRenderReflections(true).initMaxRecursionLevel(3);\r\n\r\n\t\tShape plainShape = new Plain(new Vec(0.0,-4.3,0.0), new Point(0.0, -4.3, 0.0));\r\n\t\tMaterial plainMat = Material.getMetalMaterial()\r\n\t\t\t\t.initKa(new Vec(0.11,0.09,0.02)).initReflectionIntensity(0.1);\r\n\t\tSurface plainSurface = new Surface(plainShape, plainMat);\r\n\t\tfinalScene.addSurface(plainSurface);\r\n\r\n\t\tShape transparentSphere = new Sphere(new Point(1.5, 0, -3.5), 4);\r\n\t\tMaterial transparentSphereMat = Material.getGlassMaterial(true)\r\n\t\t\t\t.initRefractionIntensity(0.8).initRefractionIndex(1.35).initReflectionIntensity(0.4);\r\n\t\tSurface transparentSphereSurface = new Surface(transparentSphere, transparentSphereMat);\r\n\t\tfinalScene.addSurface(transparentSphereSurface);\r\n\r\n\t\tPoint sunPosition = new Point(0, 3, -45);\r\n\t\tShape sunDome = new Dome(sunPosition, 8, new Vec(0, 1, 0));\r\n\t\tMaterial sunDomeMat = Material.getMetalMaterial().initKa(new Vec(0.95,0.84,0.03));\r\n\t\tSurface sunDomeSurface = new Surface(sunDome, sunDomeMat);\r\n\t\tfinalScene.addSurface(sunDomeSurface);\r\n\r\n\t\tVec sunDirection = cameraPosition.sub(sunPosition);\r\n\t\tLight sunLight = new DirectionalLight(sunDirection, new Vec(0.95,0.84,0.03));\r\n\t\tfinalScene.addLightSource(sunLight);\r\n\r\n\t\treturn finalScene;\r\n\t}", "@Override\r\n public void start(Stage primaryStage) throws Exception {\n Parent root = FXMLLoader.load(getClass().getResource(\"ui/main.fxml\")); //FXMLLoader.load(Utilities.getResourceURL(\"ui/main.fxml\"));\r\n primaryStage.setTitle(\"Custom Groovy Game Engine\");\r\n primaryStage.setScene(new Scene(root, 960, 480));\r\n primaryStage.show();\r\n }", "@Override\n public void start(Stage primaryStage)\n throws ClassNotFoundException, NoSuchMethodException, InvocationTargetException, InstantiationException, IllegalAccessException {\n makeMainGrid();\n Scene myHomeScene = new Scene(myMainGrid, WINDOW_WIDTH, WINDOW_HEIGHT);\n primaryStage.setScene(myHomeScene);\n primaryStage.show();\n }", "public void start(Stage stage) {\n stage.setScene(\n //create scene with root and size 250 x 100\n new Scene(\n //add circle to a new Group named root\n new Group(\n //create circle of radius = 30 at x=40, y=40\n new Circle(40, 40, 30)\n ), 250, 100)\n );\n stage.setTitle(\"My JavaFX Application\"); //set the stage\n stage.show();\t\t\t\t\t\t\t\t //made stage visible\n }", "private void createGeneralScene(Group root3D){\n generateRunways(root3D);\n for(String runwayId: controller.getRunways()){\n genRunwayName(root3D, runwayId, runwayElevation);\n }\n generateLighting(root3D);\n pointCameraAt(new Point3D(0,0,0),root3D);\n }", "@Override\n\tpublic void create() {\n\t\tthis.batch = new SpriteBatch();\n\t\t\n//\t\tgame.batch.begin();\n// player.draw(game.batch);\n// \n// game.batch.end();\n\t\t\n\t\tmanager = new AssetManager();\n\t\tmanager.setLoader(TiledMap.class, new TmxMapLoader(new InternalFileHandleResolver()));\n\t\tmanager.load(\"data/level1.tmx\", TiledMap.class);\n\t\tmanager.load(\"data/background.png\", Texture.class);\n//\t\tmanager.load(\"level1.tsx\", TiledMapTileSet.class);\n\t\tmanager.finishLoading();\n\t\tscreen = new GameScreen(this);\n\t\tsetScreen(screen);\n\t\t\n\t}", "public void start(Stage myStage) { \n \n System.out.println(\"Inside the start() method.\"); \n \n // Give the stage a title. \n myStage.setTitle(\"JavaFX Skeleton.\"); \n \n // Create a root node. In this case, a flow layout \n // is used, but several alternatives exist. \n FlowPane rootNode = new FlowPane(); \n \n // Create a scene. \n Scene myScene = new Scene(rootNode, 300, 200); \n \n // Set the scene on the stage. \n myStage.setScene(myScene); \n \n // Show the stage and its scene. \n myStage.show(); \n }", "@Override\n\tpublic void create() {\n\t\t// This should come from the platform\n\t\theight = platform.getScreenDimension().getHeight();\n\t\twidth = platform.getScreenDimension().getWidth();\n\n\t\t// create the drawing boards\n\t\tsb = new SpriteBatch();\n\t\tsr = new ShapeRenderer();\n\n\t\t// Push in first state\n\t\tgsm.push(new CountDownState(gsm));\n//\t\tgsm.push(new PlayState(gsm));\n\t}", "@Override\r\n public void start(Stage primaryStage) {\n VFlow flow = FlowFactory.newFlow();\r\n\r\n // make it visible\r\n flow.setVisible(true);\r\n\r\n // create two nodes:\r\n // one leaf node and one subflow which is returned by createNodes\r\n createFlow(flow, 3, 6);\r\n\r\n // show the main stage/window\r\n showFlow(flow, primaryStage, \"VWorkflows Tutorial 05: View 1\");\r\n }", "private void configureScene() {\n uiController.setTitle(resources.getString(\"Launch\"));\n BorderPane sp = new BorderPane();\n this.fileLoadButton = new Button();\n sp.setCenter(fileLoadButton);\n sp.setTop(createSettings());\n fileLoadButton.setText(resources.getString(\"LoadSimulationXML\"));\n fileLoadButton.setOnAction(event -> uiController.loadNewSimulation());\n sp.setPrefWidth(width);\n sp.setPrefHeight(height);\n renderNode(sp);\n }", "@Override\n public void show() {\n stage = new Stage(new FitViewport(game.SCREEN_WIDTH, game.SCREEN_HEIGHT), batch);\n Gdx.input.setInputProcessor(stage);\n\n background = game.getAssetManager().get(\"startscreen.png\");\n bgViewPort = new StretchViewport(game.SCREEN_WIDTH, game.SCREEN_HEIGHT);\n\n fonts = new Fonts();\n fonts.createSmallestFont();\n fonts.createSmallFont();\n fonts.createMediumFont();\n fonts.createLargeFont();\n fonts.createTitleFont();\n\n createButtons();\n }", "@Override\n public void start(Stage primaryStage) {\n root = new VBox(10);\n root.setPadding(new Insets(30));\n initLabel();\n //set up scene\n Scene scene = new Scene(root);\n primaryStage.setScene(scene);\n primaryStage.sizeToScene();\n primaryStage.setTitle(\"Mastermind\");\n primaryStage.show();\n }", "public void setNewScene() {\n switch (game.getCurrentRoomId()) {\n case 14:\n WizardOfTreldan.setFinishScene();\n break;\n\n }\n }", "@Override\n\tpublic void start(Stage primaryStage) throws Exception {\n\t\tprimaryStage.setTitle(\"MyMoney Application\");\n\t\t// Set the scene of the application to the new Scene\n\t\tprimaryStage.setScene(createScene());\n\t\tprimaryStage.setResizable(true);\n\t\t// Display the Stage\n\t\tprimaryStage.show();\n\t}", "private void loadScene() throws IOException {\n FXMLLoader loader = new FXMLLoader(getClass().getResource(\"CurriculumDisplaySE.fxml\"));\n loader.setController(this);\n Parent root = loader.load();\n scene = new Scene(root);\n }" ]
[ "0.82040495", "0.79270273", "0.7686579", "0.7539898", "0.7170029", "0.71511686", "0.71265024", "0.7117881", "0.7114758", "0.7104704", "0.7054354", "0.70273155", "0.6997549", "0.6969927", "0.6941308", "0.6908016", "0.6893753", "0.68383914", "0.6804528", "0.6803587", "0.6802819", "0.6764615", "0.67627954", "0.6733386", "0.6709039", "0.66965187", "0.666601", "0.6630148", "0.66060424", "0.6601113", "0.65998703", "0.65975916", "0.65854526", "0.6562135", "0.6539876", "0.65398425", "0.65325636", "0.6528501", "0.65226513", "0.6521557", "0.65168536", "0.6513451", "0.6491641", "0.6481285", "0.64752394", "0.64578164", "0.64549404", "0.6446993", "0.64362043", "0.642752", "0.6404194", "0.63924277", "0.6383789", "0.6381546", "0.63694715", "0.6360079", "0.6349439", "0.63165414", "0.6310659", "0.62907094", "0.6288399", "0.6286172", "0.6280856", "0.62675333", "0.6259295", "0.62492406", "0.6240188", "0.62284076", "0.62139994", "0.62124413", "0.62113017", "0.6210839", "0.62012315", "0.62011194", "0.6189658", "0.6182776", "0.61758536", "0.6167935", "0.61643934", "0.6160654", "0.6147865", "0.6143156", "0.6143148", "0.61310446", "0.61259675", "0.61254096", "0.61206913", "0.61194164", "0.6108176", "0.6101936", "0.6101293", "0.61009884", "0.6099485", "0.6096524", "0.609592", "0.6093437", "0.60861236", "0.6084684", "0.60823625", "0.6073509" ]
0.72708315
4
Returns width of window
@Override public int getWidth() { return windowWidth; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected double getWindowWidth() {\n\t\treturn m_windowWidth;\n\t}", "public int getWidth(){\n Window w = vc.getFullScreenWindow();\n if(w != null){\n return w.getWidth();\n } else {\n return 0;\n }\n }", "public int getScreenWidth();", "public int getScreenWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "public static int getWidth()\r\n\t{\r\n\t\treturn width;\r\n\t}", "private float ScreenWidth() {\n RelativeLayout linBoardGame = (RelativeLayout) ((Activity) context).findViewById(R.id.gridContainer);\n Resources r = linBoardGame.getResources();\n DisplayMetrics d = r.getDisplayMetrics();\n return d.widthPixels;\n }", "Integer getCurrentWidth();", "public int getWidth();", "public int getWidth();", "public int getWidth();", "public static double getDisplayWidth() {\n\t\treturn javafx.stage.Screen.getPrimary().getVisualBounds().getWidth();\n\t}", "public int getCurrentWidth();", "public int getWidth() {\r\n return Display.getWidth();\r\n }", "public int getWidth () {\r\n\tcheckWidget();\r\n\tint [] args = {OS.Pt_ARG_WIDTH, 0, 0};\r\n\tOS.PtGetResources (handle, args.length / 3, args);\r\n\treturn args [1];\r\n}", "@Override\n\tpublic float getPrefWidth() {\n\t\treturn windowSize * 1.2f;\n\t}", "long getWidth();", "public double getWidth() {\r\n\r\n\t\treturn w;\r\n\r\n\t}", "double getWidth();", "double getWidth();", "@Override\n\tpublic int getWidth() {\n\n\t\treturn ((WorldWindowSWTGLCanvas) slave).getCanvas().getSize().x;\n\t}", "public double getWidth();", "public double getWidth();", "public float getWidth();", "public int getW() {\n\t\treturn this.width;\n\t}", "public int getWidth()\r\n\t{\r\n\t\treturn WIDTH;\r\n\t}", "public int getWidth() {\n return (int) Math.round(width);\n }", "int getWindowSize();", "public int sWidth(){\n\t\t\n\t\tint Measuredwidth = 0; \n\t\tPoint size = new Point();\n\t\tWindowManager w = activity.getWindowManager();\n\t\tif(Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {\n\t\t w.getDefaultDisplay().getSize(size);\n\t\t Measuredwidth = size.x; \n\t\t}else{\n\t\t Display d = w.getDefaultDisplay(); \n\t\t Measuredwidth = d.getWidth(); \n\t\t}\n\t\treturn Measuredwidth;\n\t}", "public int getWidth() {\n\t\treturn width;\r\n\t}", "public int getWidth() {\r\n return width;\r\n }", "public int getWidth()\r\n\t{\r\n\t\treturn width;\r\n\t}", "public final int getWidth() {\r\n return width;\r\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\r\n return width;\r\n }", "public int getWidth() {\r\n\t\treturn width;\r\n\t}", "public int getWidth() {\r\n\t\treturn width;\r\n\t}", "public Integer getWidth()\n {\n return (Integer) getStateHelper().eval(PropertyKeys.width, null);\n }", "public int getWidth()\n {\n return width;\n }", "public int getWidth()\n {\n return width;\n }", "public int getWidth()\n {\n return width;\n }", "public int getWidth() \n\t{\n\t\treturn width;\n\t}", "public int getWidth()\n\t{\n\t\treturn width;\n\t}", "public int getWidth()\n\t{\n\t\treturn width;\n\t}", "public static int getWidth() {\r\n\t\treturn 1280;\r\n\t}", "public int getWidth() {\r\n\t\t\r\n\t\treturn width;\r\n\t}", "public int getWidth(){\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() {\n\t\treturn width;\n\t}", "public int getWidth() { return width; }", "public int getWidth() { return width; }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width;\n }", "public int getWidth() {\n return width_;\n }", "public int getWidth() {\n return width_;\n }", "public final int getWidth() {\r\n return config.width;\r\n }", "int getWidth() {return width;}", "public int getWidth() {\n\t\t\treturn width;\n\t\t}", "public static double getRawDisplayWidth() {\n\t\treturn javafx.stage.Screen.getPrimary().getBounds().getWidth();\n\t}", "public final int getWidth(){\n return width_;\n }", "public double getWidth()\r\n {\r\n return width;\r\n }" ]
[ "0.8368821", "0.8291727", "0.78115904", "0.78115904", "0.77332616", "0.77332616", "0.77332616", "0.77332616", "0.77332616", "0.77332616", "0.77332616", "0.77332616", "0.77332616", "0.77332616", "0.77332616", "0.77332616", "0.77332616", "0.77332616", "0.77332616", "0.77332616", "0.77332616", "0.76882184", "0.7659948", "0.764852", "0.7629536", "0.7629536", "0.7629536", "0.7622182", "0.758533", "0.75694156", "0.75373006", "0.7536345", "0.7533023", "0.75218487", "0.74909544", "0.74909544", "0.7470274", "0.7461976", "0.7461976", "0.74533606", "0.7393433", "0.7387132", "0.73702466", "0.7355675", "0.7332429", "0.7306663", "0.73021245", "0.72976416", "0.72900194", "0.72814655", "0.72814655", "0.72814655", "0.72814655", "0.72814655", "0.72814655", "0.72814655", "0.72814655", "0.72814655", "0.72814655", "0.72814655", "0.72814655", "0.72814655", "0.728092", "0.72795737", "0.72795737", "0.726883", "0.72558206", "0.72558206", "0.72558206", "0.7254228", "0.72515917", "0.72515917", "0.72409856", "0.72373", "0.7235122", "0.7233506", "0.7233506", "0.7233506", "0.7233506", "0.7233506", "0.7233506", "0.7233506", "0.7233506", "0.7233506", "0.7233506", "0.7233506", "0.7233506", "0.7233506", "0.7217968", "0.7217968", "0.72041565", "0.72041565", "0.7187855", "0.7187855", "0.7183046", "0.7176319", "0.7164577", "0.7161288", "0.7159942", "0.7153972" ]
0.84435815
0
Returns height of window
@Override public int getHeight() { return windowHeight; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected double getWindowHeight() {\n\t\treturn m_windowHeight;\n\t}", "public int getHeight(){\n Window w = vc.getFullScreenWindow();\n if(w != null){\n return w.getHeight();\n } else {\n return 0;\n }\n }", "public int getScreenHeight();", "public int getScreenHeight();", "private int getWindowHeight() {\n DisplayMetrics displayMetrics = new DisplayMetrics();\n ((Activity) getContext()).getWindowManager().getDefaultDisplay().getMetrics(displayMetrics);\n return displayMetrics.heightPixels;\n }", "Integer getCurrentHeight();", "public static double getDisplayHeight() {\n\t\treturn javafx.stage.Screen.getPrimary().getVisualBounds().getHeight();\n\t}", "public int getHeight() {\r\n return Display.getHeight();\r\n }", "int getheight();", "public static int getHeight()\r\n\t{\r\n\t\treturn height;\r\n\t}", "public int getCurrentHeight();", "double getHeight();", "public int getHeight() {\n\t\treturn canvasHeight;\n\t}", "public int getHeightScreen(){\n return heightScreen ;\n }", "@Override\n\tpublic float getPrefHeight() {\n\t\treturn windowSize * 0.6f;\n\t}", "public double getHeight();", "public double getHeight();", "public float getHeight();", "int getHeight();", "int getHeight();", "int getHeight();", "int getHeight();", "int getHeight();", "int getHeight();", "int getHeight();", "int getHeight();", "int getHeight();", "int getHeight();", "int getHeight();", "int getHeight();", "int getHeight();", "int getHeight();", "int getHeight();", "int getHeight();", "long getHeight();", "public int getScreenHeight() {\n return this.screenHeight;\n }", "public int getHeight() {\n\t\treturn WORLD_HEIGHT;\n\t}", "public int getViewportHeight() {\n return viewport.getHeight();\n }", "private double getHeight() {\n\t\treturn height;\n\t}", "public int getHeight() {\r\n\t\treturn height;\r\n\t}", "public int getHeight() {\r\n\t\treturn height;\r\n\t}", "public final int getHeight() {\r\n return height;\r\n }", "public int getHeight()\r\n\t{\r\n\t\treturn HEIGHT;\r\n\t}", "public 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 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 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 int getHeight()\n\t{\n\t\treturn height;\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() {\n return height;\n }", "public int getHeight();", "public int getHeight();", "public int getHeight();", "public int getHeight();", "public int getHeight();", "public int getHeight();", "public double getHeight() {\n\t\t\treturn height.get();\n\t\t}", "public float getHeight()\n {\n return getUpperRightY() - getLowerLeftY();\n }", "public double getHeight () {\n return height;\n }", "public int height() {\n return this.root.height();\n }", "public abstract int getDisplayHeight();", "public double getHeight() {\r\n\t\treturn height;\r\n\t}", "public double getHeight() {\r\n return height;\r\n }", "public int getHeight() {\n\t\t\treturn height;\n\t\t}", "public int getHeight()\n {\n return height;\n }", "public double getHeight()\r\n {\r\n return height;\r\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 getDesktopHeight() {\n\t\treturn getClientHeight(PROGRAM_MANAGER);\n\t}", "@Override\n public int getHeight() {\n return graphicsEnvironmentImpl.getHeight(canvas);\n }", "public int getHeight()\n {\n \treturn height;\n }", "public double getHeight() {\n return height;\n }", "public double getHeight() {\n return height;\n }", "public Integer getHeight()\n {\n return (Integer) getStateHelper().eval(PropertyKeys.height, null);\n }", "public final int getHeight() {\r\n return config.height;\r\n }" ]
[ "0.8267778", "0.81390244", "0.77833027", "0.77833027", "0.7783099", "0.75810176", "0.750337", "0.74830633", "0.74510586", "0.74428093", "0.7414758", "0.7359826", "0.73325217", "0.7302093", "0.7274857", "0.72600764", "0.72600764", "0.7255768", "0.724535", "0.724535", "0.724535", "0.724535", "0.724535", "0.724535", "0.724535", "0.724535", "0.724535", "0.724535", "0.724535", "0.724535", "0.724535", "0.724535", "0.724535", "0.724535", "0.72448456", "0.7220997", "0.72154933", "0.7204555", "0.72036326", "0.7200048", "0.7200048", "0.71985257", "0.71939003", "0.7191455", "0.71880484", "0.718649", "0.718649", "0.718649", "0.718649", "0.718649", "0.718649", "0.718649", "0.718649", "0.718649", "0.718649", "0.718649", "0.71835464", "0.71835464", "0.71835464", "0.71835464", "0.71835464", "0.71835464", "0.71835464", "0.71835464", "0.71835464", "0.71835464", "0.71835464", "0.71784914", "0.71784914", "0.7177928", "0.7174295", "0.7169858", "0.7169858", "0.7169858", "0.7169858", "0.7169858", "0.7169858", "0.71668595", "0.7162818", "0.71599174", "0.7149528", "0.7134884", "0.7132198", "0.7131151", "0.712952", "0.71273196", "0.71262044", "0.7124926", "0.7124926", "0.7124926", "0.7124926", "0.7124926", "0.7124926", "0.71192986", "0.71173674", "0.71124613", "0.71062106", "0.71062106", "0.7097542", "0.7094291" ]
0.84161675
0